rtc.avd_SDK-C++  3.2.0
mscreen.h
浏览该文件的文档.
1 #ifndef RT_Screen_H_
2 #define RT_Screen_H_
3 
4 #include "common.h"
5 #include "room.h"
6 #include "videocapture.h"
7 
8 namespace rtc {
9  class IRoom;
10  class IVideoRender;
11  class IRemoteCtrl;
17  class RT_API_EXPORT IMScreen : public IModule {
18  public:
24  class IListener {
25  public:
27 
33  virtual void onScreenStatusNotify(ScreenStatus status, const DeviceId& fromId) = 0;
41  virtual void onScreenDataNotify(int level, const String& description, const DeviceId& fromId) = 0;
49  virtual void onPublishScreenNotify(const ScreenWindow& screen) = 0;
57  virtual void onUnpublishScreenNotify(const ScreenWindow& screen) = 0;
58 
60 
67  virtual void onSubscribeScreenResult(Result result, const DeviceId& fromId) = 0;
75  virtual void onUnsubscribeScreenResult(Result result, const DeviceId& fromId) = 0;
83  virtual void onPublishScreenResult(Result result, const DeviceId& fromId) = 0;
91  virtual void onUnpublishScreenResult(Result result, const DeviceId& fromId) = 0;
92 
93  protected:
94  virtual ~IListener() {
95  }
96  };
97  public:
103  static IMScreen* getScreen(IRoom* room);
104  //
111  virtual Result setListener(IListener* listener) = 0;
118  virtual Result previewScreen(const ScreenWindow& device, IVideoRender* render) = 0;
123  virtual Result unpreviewScreen() = 0;
131  virtual Result publishScreen(const ScreenWindow& screen) = 0;
132 
138  virtual Result pubScreenWithSource(ScreenWindow& device, webrtc::VideoTrackSourceInterface* capture) = 0;
139  // Define platform specific window types.
140 #if defined(RT_DESKTOP)
141 
146  virtual Result setExcludedWindows(std::vector<AvdWindowId>& excluded) = 0;
147 #endif//RT_DESKTOP
148 
159  virtual Result publishScreen(ScreenWindow& fakeDevice, FakeVideoCapturer* capture) = 0;
166  virtual Result unpublishScreen() = 0;
172  virtual Result swithToScreen(const DeviceId& deviceId) = 0;
180  virtual Result updateScreenData(const DeviceId& deviceId, int level, const String& description) = 0;
188  virtual Result subscribe(const DeviceId& deviceId) = 0;
196  virtual Result unsubscribe(const DeviceId& deviceId) = 0;
202  virtual Result getPublishedScreens(ScreensType& items) const = 0;
208  virtual Result getSubscribedScreens(ScreensType& items) const = 0;
213  virtual bool isScreenSubscribed(const DeviceId& fromId) const = 0;
214 
216 
226  virtual Result attachRender(const DeviceId& deviceId, IVideoRender* render) = 0;
233  virtual Result detachRender(const DeviceId& deviceId) = 0;
239  virtual Result detachRender(IVideoRender* render) = 0;
240 
242 
247  virtual Result getScreenWindows(ScreensType& items) = 0;
248 
250 #if (defined(RT_DESKTOP) && defined(RT_WIN32))
251 
270  virtual Result startAnnotation(const DeviceId& screenId) = 0;
278  virtual Result stopAnnotation(const DeviceId& screenId) = 0;
279 
288  virtual Result startOtherAnnotation(const DeviceId& screenId, IVideoRender* render) = 0;
295  virtual Result setAnnotationBarPosition(int x, int y) = 0;
296 
297  virtual Result setRemoteCtrl(IRemoteCtrl* remote) = 0;
298 #endif//RT_DESKTOP
299 
300  /*
301  *获取远端共享的屏幕是否是pc端的桌面
302  */
303  virtual bool getIsPcSharedScreen(DeviceId deviceId) = 0;
304 
308  virtual void setPublishKeepAliveTime(int timeout) = 0;
324  virtual Result setScreenBitrate(const DeviceId& deviceId, int minBitrateBps, int maxBitrateBps) = 0;
325 
330  virtual Result setScreenZone(const DeviceId& deviceId, float catx, float caty,float catw,float cath) = 0;
331  protected:
332  virtual ~IMScreen() {
333  }
334  };
335 
336 } // namespace rtc
337 #endif//RT_Screen_H_
视频渲染接口类
Definition: videorender.h:90
Definition: annotationobject.h:71
Definition: mremotectrl.h:76
int Result
返回值类型
Definition: combase.h:13
屏幕窗口设备信息结构.
Definition: common.h:313
视频流导入接口.
Definition: videocapture.h:14
房间模块接口类
Definition: room.h:382
String DeviceId
设备号类型,唯一标识房间内一个设备,长度不大于Max_DeviceId定义;定义如下:userId+"_"+md5[os.getdeviceid() or os.getsystemid()]
Definition: common.h:12
enum DeviceStatus ScreenStatus
屏幕窗口共享状态
Definition: combase.h:126
#define RT_API_EXPORT
Definition: defines.h:216
std::string String
定义的String类型
Definition: common.h:10
virtual ~IMScreen()
Definition: mscreen.h:332
房间接口类
Definition: room.h:16
房间中屏幕窗口共享模块回调接口.
Definition: mscreen.h:24
房间中屏幕窗口共享模块接口.
Definition: mscreen.h:17
std::vector< ScreenWindow > ScreensType
屏幕窗口集合类型.
Definition: common.h:321
virtual ~IListener()
Definition: mscreen.h:94