cn.tee3.avd_SDK-C++  2.1.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 tee3 {
9  namespace avd {
10  class IRoom;
11  class IVideoRender;
12 
18  class RT_API_EXPORT IMScreen : public IModule {
19  public:
25  class IListener {
26  public:
28 
34  virtual void onScreenStatusNotify(ScreenStatus status, const DeviceId& fromId) = 0;
42  virtual void onScreenDataNotify(int level, const String& description, const DeviceId& fromId) = 0;
50  virtual void onPublishScreenNotify(const ScreenWindow& screen) = 0;
58  virtual void onUnpublishScreenNotify(const ScreenWindow& screen) = 0;
59 
61 
68  virtual void onSubscribeScreenResult(Result result, const DeviceId& fromId) = 0;
76  virtual void onUnsubscribeScreenResult(Result result, const DeviceId& fromId) = 0;
84  virtual void onPublishScreenResult(Result result, const DeviceId& fromId) = 0;
92  virtual void onUnpublishScreenResult(Result result, const DeviceId& fromId) = 0;
93 
94  protected:
95  virtual ~IListener() {
96  }
97  };
98  public:
104  static IMScreen* getScreen(IRoom* room);
105  //
112  virtual Result setListener(IListener* listener) = 0;
119  virtual Result previewScreen(const ScreenWindow& device, IVideoRender* render) = 0;
124  virtual Result unpreviewScreen() = 0;
132  virtual Result publishScreen(const ScreenWindow& screen) = 0;
133 
134  // Define platform specific window types.
135 #if defined(RT_DESKTOP)
136 
141  virtual Result setExcludedWindows(std::vector<WindowId>& excluded) = 0;
142 #endif//RT_DESKTOP
143 
154  virtual Result publishScreen(ScreenWindow& fakeDevice, FakeVideoCapturer* capture) = 0;
161  virtual Result unpublishScreen() = 0;
167  virtual Result swithToScreen(const DeviceId& deviceId) = 0;
175  virtual Result updateScreenData(const DeviceId& deviceId, int level, const String& description) = 0;
183  virtual Result subscribe(const DeviceId& deviceId) = 0;
191  virtual Result unsubscribe(const DeviceId& deviceId) = 0;
197  virtual Result getPublishedScreens(ScreensType& items) const = 0;
203  virtual Result getSubscribedScreens(ScreensType& items) const = 0;
208  virtual bool isScreenSubscribed(const DeviceId& fromId) const = 0;
209 
211 
221  virtual Result attachRender(const DeviceId& deviceId, IVideoRender* render) = 0;
228  virtual Result detachRender(const DeviceId& deviceId) = 0;
234  virtual Result detachRender(IVideoRender* render) = 0;
235 
237 
242  virtual Result getScreenWindows(ScreensType& items) = 0;
243 
244 #if defined(RT_DESKTOP)
245 
264  virtual Result startAnnotation(const DeviceId& screenId) = 0;
272  virtual Result stopAnnotation(const DeviceId& screenId) = 0;
273 
282  virtual Result startOtherAnnotation(const DeviceId& screenId, IVideoRender* render) = 0;
283 #endif//RT_DESKTOP
284 
285  protected:
286  virtual ~IMScreen() {
287  }
288  };
289 
290  } // namespace avd
291 } // namespace tee3
292 #endif//RT_Screen_H_
DeviceStatus
设备状态.
Definition: combase.h:128
int Result
返回值类型
Definition: combase.h:9
屏幕窗口设备信息结构.
Definition: common.h:301
String DeviceId
设备号类型,唯一标识房间内一个设备,长度不大于Max_DeviceId定义;定义如下:userId+"_"+md5[os.getdeviceid() or os.getsystemid()]
Definition: common.h:12
视频渲染接口类
Definition: videorender.h:69
#define RT_API_EXPORT
Definition: defines.h:186
房间模块接口类
Definition: room.h:349
std::string String
tee3定义的String类型
Definition: common.h:10
视频流导入接口.
Definition: videocapture.h:15
virtual ~IListener()
Definition: mscreen.h:95
virtual ~IMScreen()
Definition: mscreen.h:286
房间接口类
Definition: room.h:17
房间中屏幕窗口共享模块回调接口.
Definition: mscreen.h:25
Definition: audiocapture.h:5
std::vector< ScreenWindow > ScreensType
屏幕窗口集合类型.
Definition: common.h:309
房间中屏幕窗口共享模块接口.
Definition: mscreen.h:18