cn.tee3.avd_SDK-C++  2.1.0
screenrecorder.h
浏览该文件的文档.
1 #ifndef RT_AVDScreenRecorder_H_
2 #define RT_AVDScreenRecorder_H_
3 
4 #include "api/defines.h"
5 #include "api/common.h"
6 namespace tee3 {
7  namespace avd {
8 
16  public:
17 
18  struct IMG {
19 
20  };
21  struct ScreenImgType {
24  };
25  typedef std::vector<ScreenImgType> ScreensImgType;
26 
27  static IAVDScreenRecorder* create();
28  static void destroy(IAVDScreenRecorder* recorder);
29  //Listener
31  public:
33 
45  virtual void videoEncodedOut(VideoEncodedType format, uint64 timestamp_ns, unsigned int width, unsigned int height, bool isKeyFrame, const uint8 *data, unsigned int len) = 0;
46 
62  virtual void videoYUVOut(uint64 timestamp_ns,
63  const uint8_t* dataY,
64  const uint8_t* dataU,
65  const uint8_t* dataV,
66  int width,
67  int height,
68  int strideY,
69  int strideU,
70  int strideV,
71  int rotation) = 0;
72  };
74  public:
85  virtual void audioPCMOut(uint64 timestamp_ns, int sampleRate, int channels, const uint8 *data, unsigned int len) = 0;
86 
87  };
88 
89  virtual Result setVideoListener(IVideoListener* listener) = 0;
90  virtual Result setAudioListener(IAudioListener* listener) = 0;
91 
92  //Setting interface
93  virtual Result setRecorderFile(std::string filePath) = 0;
94  virtual Result setVideoFps(uint8 fps) = 0;
95  virtual Result setVideoBitRate(uint32 bitRate) = 0;
96  //virtual Result setVideoFrameRate(uint8 frameRate) = 0;
97  virtual Result setAudioInfo(uint32 frameRate, uint8 channel, uint8 bitPerSample) = 0;
98  virtual Result setVideoEncodedType(VideoEncodedType format) = 0;
99  virtual Result setAudioEncodedType(AudioEncodedType format) = 0;
100  virtual Result setRecordedAudio(AudioRecordedType recordedAudio) = 0;
101  virtual Result setRecordedScreen(const ScreenWindow& screen) = 0;
102  //Control interface
103  virtual Result getScreenWindows(ScreensType& wnds) = 0;
104  virtual Result getScreenWindows(ScreensImgType& wnds) = 0;
105  virtual Result startScreenRecord() = 0;
106  virtual Result stopScreenRecord() = 0;
107  virtual Result pauseScreenRecord() = 0;
108  virtual Result restoreScreenRecord() = 0;
109  protected:
110  virtual ~IAVDScreenRecorder() {}
111  };
112  }
113 }
114 
115 #endif//RT_AVDScreenRecorder_H_
AudioEncodedType
Definition: combase.h:648
屏幕录制接口.
Definition: screenrecorder.h:15
int Result
返回值类型
Definition: combase.h:9
屏幕窗口设备信息结构.
Definition: common.h:301
#define RT_API_EXPORT
Definition: defines.h:186
unsigned int uint32
Definition: defines.h:391
Definition: screenrecorder.h:18
ScreensType screen
Definition: screenrecorder.h:22
unsigned long long uint64
Definition: defines.h:380
IMG img
Definition: screenrecorder.h:23
VideoEncodedType
Definition: combase.h:641
std::vector< ScreenImgType > ScreensImgType
Definition: screenrecorder.h:25
unsigned char uint8
Definition: defines.h:395
AudioRecordedType
Definition: combase.h:657
Definition: screenrecorder.h:30
virtual ~IAVDScreenRecorder()
Definition: screenrecorder.h:110
Definition: audiocapture.h:5
std::vector< ScreenWindow > ScreensType
屏幕窗口集合类型.
Definition: common.h:309
Definition: screenrecorder.h:21
Definition: screenrecorder.h:73