rtc.avd_SDK-C++  3.2.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 rtc {
8 
15  public:
21  class Listener {
22  public:
28  virtual bool OnStart() = 0;
33  virtual void OnStop() = 0;
34  protected:
35  virtual ~Listener() {}
36  };
37 
38  public:
46  static FakeVideoCapturer* Create(FakeVideoCapturer::Listener* listener, bool isScreen = false);
47 
56  static FakeVideoCapturer* Create(FakeVideoCapturer::Listener* listener, FourCC fourFormat, bool isScreen = false);
57 
62  static void Destroy(FakeVideoCapturer* capturer);
63 
67  virtual bool isRunning() = 0;
85  virtual Result inputCapturedFrame(
86  uint64 timestamp_ns, uint32 format, int w, int h, const uint8* data, size_t len, int rotation, bool mirror) = 0;
87 
101  virtual Result inputEncodedFrame(
102  uint64 timestamp_ns, int w, int h, const uint8* sample, size_t sample_size) = 0;
103 
122  virtual Result inputYUVFrame(
123  uint64 timestamp_ns, uint32 format, int w, int h, int stride, const uint8* data, size_t len, int rotation, bool mirror) = 0;
134  virtual Result inputCapturedBmpFrame(const uint8* pBmpBuf, uint32 len) = 0;
135 
136 
137  virtual Result inputYUVFrame(uint64 timestamp_ns, uint32 format, int w, int h, int stride, const uint8* src_y, const uint8* src_uv, int rotation, bool mirror) = 0;
138  virtual FourCC format() const = 0;
139 
140  virtual Result resetFormat(FourCC cc) = 0;
141  virtual void enableLandscape(bool enable) = 0;
142  virtual bool landscape() = 0;
143  virtual void SetUseScale(bool use) = 0;
144  protected:
145  virtual ~FakeVideoCapturer() {};
146  };
147 
148 } // namespace rtc
149 
150 #endif //RTC_FakeVideoCapturer_H_
Definition: annotationobject.h:71
int Result
返回值类型
Definition: combase.h:13
视频流导入接口.
Definition: videocapture.h:14
#define RT_API_EXPORT
Definition: defines.h:216
unsigned int uint32
Definition: defines.h:387
unsigned long long uint64
Definition: defines.h:376
FourCC
Definition: combase.h:701
virtual ~FakeVideoCapturer()
Definition: videocapture.h:145
视频流导入回调接口.
Definition: videocapture.h:21
unsigned char uint8
Definition: defines.h:391
virtual ~Listener()
Definition: videocapture.h:35