xref: /aosp_15_r20/external/v4l2_codec2/v4l2/include/v4l2_codec2/v4l2/V4L2DecodeComponent.h (revision 0ec5a0ec62797f775085659156625e7f1bdb369f)
1 
2 #ifndef ANDROID_V4L2_CODEC2_V4L2_V4L2_DECODE_COMPONENT_H
3 #define ANDROID_V4L2_CODEC2_V4L2_V4L2_DECODE_COMPONENT_H
4 
5 #include <v4l2_codec2/components/DecodeComponent.h>
6 
7 namespace android {
8 class V4L2DecodeComponent : public DecodeComponent {
9 public:
10     static std::shared_ptr<C2Component> create(const std::string& name, c2_node_id_t id,
11                                                std::shared_ptr<DecodeInterface> intfImpl,
12                                                C2ComponentFactory::ComponentDeleter deleter);
13 
14     V4L2DecodeComponent(uint32_t debugStreamId, const std::string& name, c2_node_id_t id,
15                         std::shared_ptr<DecodeInterface> intfImpl);
16 
17     ~V4L2DecodeComponent() override;
18 
19     void startTask(c2_status_t* status, ::base::WaitableEvent* done) override;
20 
21 private:
22     static std::atomic<int32_t> sConcurrentInstances;
23     static std::atomic<uint32_t> sNextDebugStreamId;
24 };
25 
26 };  // namespace android
27 
28 #endif  // ANDROID_V4L2_CODEC2_V4L2_V4L2_DECODE_COMPONENT_H