C++SDK  1.0.0
videocapture.h
浏览该文件的文档.
1 #ifndef RTC_FakeVideoCapturer_H_
2 #define RTC_FakeVideoCapturer_H_
3 
4 #include "common.h"
5 #include "videorender.h"
6 
7 namespace tee3 {
8  namespace avd {
9 
16  public:
22  class Listener {
23  public:
29  virtual bool OnStart() = 0;
34  virtual void OnStop() = 0;
35  };
36 
37  public:
45  static FakeVideoCapturer* Create(FakeVideoCapturer::Listener* listener, bool isScreen = false);
46 
55  static FakeVideoCapturer* Create(FakeVideoCapturer::Listener* listener, FourCC fourFormat, bool isScreen = false);
56 
61  static void Destroy(FakeVideoCapturer* capturer);
62 
66  virtual bool isRunning() = 0;
84  virtual Result inputCapturedFrame(
85  uint64 timestamp_ns, uint32 format, int w, int h, const uint8* data, size_t len, int rotation, bool mirror) = 0;
99  virtual Result inputEncodedFrame(
100  uint64 timestamp_ns, int w, int h, const uint8* sample, size_t sample_size) = 0;
101 
102  virtual FourCC format() const = 0;
103 
104  virtual Result resetFormat(FourCC cc) = 0;
105  protected:
106  virtual ~FakeVideoCapturer() {};
107  };
108 
109  } // namespace avd
110 } // namespace tee3
111 
112 #endif //RTC_FakeVideoCapturer_H_
Definition: videocapture.h:15
int Result
Definition: combase.h:13
#define RT_API_EXPORT
Definition: defines.h:188
unsigned int uint32
Definition: defines.h:393
unsigned long long uint64
Definition: defines.h:382
Definition: videocapture.h:22
FourCC
Definition: combase.h:669
virtual ~FakeVideoCapturer()
Definition: videocapture.h:106
unsigned char uint8
Definition: defines.h:397
Definition: audiocapture.h:5