Windows(C++)[v1.7.5.0]
PanoRtcStream.h
浏览该文件的文档.
1
3#pragma once
4#include "PanoRtcDefs.h"
5#include "PanoRtcDevice.h"
6
8PANORTC_NS_BEGIN
9
10
21{
22public:
23 class Callback;
24
40 virtual QResult setCallback(Callback *cb) = 0;
57 virtual QResult createVideoStream(const char deviceId[kMaxDeviceIDLength], int &streamId) = 0;
72 virtual QResult destroyVideoStream(int streamId) = 0;
90 virtual QResult setCaptureDevice(int streamId, const char deviceId[kMaxDeviceIDLength]) = 0;
103 virtual QResult getCaptureDevice(int streamId, char deviceId[kMaxDeviceIDLength]) = 0;
104
125 virtual QResult startVideo(int streamId, void *window, const VideoConfig &config) = 0;
144 virtual QResult startVideo(int streamId, RtcRenderSink *sink, VideoProfileType profileType) = 0;
163 virtual QResult startVideo(int streamId, RtcRenderSink *sink, const VideoSourceConfig &config) = 0;
178 virtual QResult stopVideo(int streamId) = 0;
195 virtual QResult muteVideo(int streamId) = 0;
212 virtual QResult unmuteVideo(int streamId) = 0;
232 virtual QResult setVideoFilter(int streamId, RtcExternalVideoFilter *filter, bool autoRelease = false) = 0;
233
258 virtual QResult subscribeVideo(uint64_t userId, int streamId, void *window, const VideoConfig &config) = 0;
281 virtual QResult subscribeVideo(uint64_t userId, int streamId, RtcRenderSink *sink, VideoProfileType profileType) = 0;
300 virtual QResult unsubscribeVideo(uint64_t userId, int streamId) = 0;
301
322 virtual QResult snapshotVideo(uint64_t userId, int streamId, const char *outputDir, SnapshotVideoOption option) = 0;
323
324public:
332 {
333 public:
346 virtual void onUserVideoStart(uint64_t userId, int streamId, VideoProfileType maxProfile) {}
357 virtual void onUserVideoStop(uint64_t userId, int streamId) {}
370 virtual void onUserVideoSubscribe(uint64_t userId, int streamId, MediaSubscribeResult result) {}
381 virtual void onUserVideoMute(uint64_t userId, int streamId) {}
392 virtual void onUserVideoUnmute(uint64_t userId, int streamId) {}
403 virtual void onFirstVideoDataReceived(uint64_t userId, int streamId) {}
414 virtual void onFirstVideoFrameRendered(uint64_t userId, int streamId) {}
429 virtual void onVideoSnapshotCompleted(uint64_t userId, int streamId, bool succeed, const char *filename) {}
430
443 virtual void onVideoCaptureStateChanged(int streamId, const char deviceId[kMaxDeviceIDLength], VideoCaptureState state) {}
444
455 virtual void onVideoStartResult(int streamId, QResult result) {}
456
457 virtual ~Callback() = default;
458 };
459
460protected:
461 virtual ~VideoStreamManager() = default;
462};
463
464
465PANORTC_NS_END
const int kMaxDeviceIDLength
设备标识长度的最大值
Definition: PanoRtcDefs.h:39
QResult
返回值
Definition: PanoRtcDefs.h:54
MediaSubscribeResult
用户媒体订阅结果
Definition: PanoRtcDefs.h:503
VideoCaptureState
视频采集状态
Definition: PanoRtcDefs.h:222
VideoProfileType
视频能力类型
Definition: PanoRtcDefs.h:254
外接视频滤镜
Definition: PanoRtcDevice.h:220
渲染器的数据接收槽
Definition: PanoRtcDevice.h:76
VideoStreamManager 的回调函数, 在使用 VideoStreamManager 之前必须要设置回调以获取事件通知。
Definition: PanoRtcStream.h:332
virtual void onUserVideoStop(uint64_t userId, int streamId)
Definition: PanoRtcStream.h:357
virtual void onUserVideoMute(uint64_t userId, int streamId)
Definition: PanoRtcStream.h:381
virtual void onUserVideoUnmute(uint64_t userId, int streamId)
Definition: PanoRtcStream.h:392
virtual void onVideoCaptureStateChanged(int streamId, const char deviceId[kMaxDeviceIDLength], VideoCaptureState state)
Definition: PanoRtcStream.h:443
virtual void onUserVideoSubscribe(uint64_t userId, int streamId, MediaSubscribeResult result)
Definition: PanoRtcStream.h:370
virtual void onUserVideoStart(uint64_t userId, int streamId, VideoProfileType maxProfile)
Definition: PanoRtcStream.h:346
virtual void onFirstVideoDataReceived(uint64_t userId, int streamId)
Definition: PanoRtcStream.h:403
virtual void onVideoSnapshotCompleted(uint64_t userId, int streamId, bool succeed, const char *filename)
Definition: PanoRtcStream.h:429
virtual void onVideoStartResult(int streamId, QResult result)
视频流开启成功与否的通知
Definition: PanoRtcStream.h:455
virtual void onFirstVideoFrameRendered(uint64_t userId, int streamId)
Definition: PanoRtcStream.h:414
视频流管理器
Definition: PanoRtcStream.h:21
virtual QResult snapshotVideo(uint64_t userId, int streamId, const char *outputDir, SnapshotVideoOption option)=0
捕获指定用户的视频流画面
virtual QResult subscribeVideo(uint64_t userId, int streamId, RtcRenderSink *sink, VideoProfileType profileType)=0
订阅用户的视频流, 并设置视频数据接收槽。
virtual QResult destroyVideoStream(int streamId)=0
销毁一个视频流。
virtual QResult unmuteVideo(int streamId)=0
恢复视频。
virtual QResult stopVideo(int streamId)=0
关闭视频流
virtual QResult subscribeVideo(uint64_t userId, int streamId, void *window, const VideoConfig &config)=0
订阅用户的视频流, 并设置渲染窗口。
virtual QResult createVideoStream(const char deviceId[kMaxDeviceIDLength], int &streamId)=0
创建一个新的视频流。
virtual QResult getCaptureDevice(int streamId, char deviceId[kMaxDeviceIDLength])=0
获取当前使用的视频采集设备
virtual QResult startVideo(int streamId, void *window, const VideoConfig &config)=0
开启视频流,并且设置渲染窗口
virtual QResult startVideo(int streamId, RtcRenderSink *sink, const VideoSourceConfig &config)=0
开启视频流,并且设置数据接收槽
virtual QResult muteVideo(int streamId)=0
暂停视频流。
virtual QResult unsubscribeVideo(uint64_t userId, int streamId)=0
取消订阅用户的视频。
virtual QResult setCaptureDevice(int streamId, const char deviceId[kMaxDeviceIDLength])=0
设置或更新视频流的采集设备。
virtual QResult setVideoFilter(int streamId, RtcExternalVideoFilter *filter, bool autoRelease=false)=0
设置视频流过滤器。
virtual QResult setCallback(Callback *cb)=0
设置视频流管理器的回调。
virtual QResult startVideo(int streamId, RtcRenderSink *sink, VideoProfileType profileType)=0
开启视频流,并且设置数据接收槽
图片文件格式。
Definition: PanoRtcDefs.h:1058
视频设置
Definition: PanoRtcDevice.h:496
视频源设置
Definition: PanoRtcDevice.h:514