nx_video_source_sdk  1.0
Video Source SDK
ref_counter.h
1 // Copyright 2018-present Network Optix, Inc. Licensed under MPL 2.0: www.mozilla.org/MPL/2.0/
2 
3 #ifndef DEFAULT_REF_COUNTER_H
4 #define DEFAULT_REF_COUNTER_H
5 
6 #include <plugins/plugin_tools.h>
7 
8 namespace rpi_cam
9 {
10  template <typename T>
11  class DefaultRefCounter : public T
12  {
13  public:
14  virtual int addRef() const override { return m_refManager.addRef(); }
15  virtual int releaseRef() const override { return m_refManager.releaseRef(); }
16 
17  protected:
18  nxpt::CommonRefManager m_refManager;
19 
21  : m_refManager(this)
22  {}
23 
25  : m_refManager(refManager)
26  {}
27  };
28 }
29 
30 #endif //DEFAULT_REF_COUNTER_H
Raspberry Pi camera unit and configuration.
Definition: camera_manager.cpp:21
Definition: plugin_tools.h:68
int addRef() const
Definition: plugin_tools.h:95
Definition: ref_counter.h:11
int releaseRef() const
Definition: plugin_tools.h:106