Windows(C++)[v1.7.5.0]
PanoRecording.h
1#pragma once
2
3#include "PanoRtcDefs.h"
4
5PANORTC_NS_BEGIN
6
7
15{
16public:
17 class Callback;
18
25 enum class LayoutMode {
27 Gallery = 0,
29 Floating = 1,
31 Speaker = 2,
33 ActiveSpeaker = 3,
34 };
35
48 const char* recordingPath{nullptr};
50 uint64_t minFreeDiskSpaceMB{ 1024 }; // default to 1 GB
51 };
52
67 virtual QResult setCallback(Callback *callback) = 0;
82 virtual QResult startRecording(const LocalRecordingOption &option) = 0;
95 virtual QResult pauseRecording() = 0;
121 virtual QResult stopRecording() = 0;
136 virtual QResult updateLayout(LayoutMode layout) = 0;
151 virtual QResult setSpeakerUser(uint64_t userId) = 0;
152
169 using EnumCallback = bool(*) (void *context, const char *channelId, const char *filePath, const char *recordTime);
182 virtual void enumLocalRecordingFiles(const char *recordingPath, EnumCallback cb, void *context) const = 0;
183
190 enum class State {
191 Idle,
192 Started,
193 Paused,
194 Resumed,
195 Stopped,
196 Error,
197 };
198
206 {
207 public:
218 virtual void onRecordingStateChanged(State state, QResult reason) {}
219
220 virtual ~Callback() {};
221 };
222
223protected:
224 virtual ~PanoRecording() {}
225};
226
227PANORTC_NS_END
QResult
返回值
Definition: PanoRtcDefs.h:54
VideoProfileType
视频能力类型
Definition: PanoRtcDefs.h:254
PanoRecording 的回调函数,在使用 PanoRecording 之前必须要设置回调以获取事件通知。
Definition: PanoRecording.h:206
virtual void onRecordingStateChanged(State state, QResult reason)
录制状态变更的通知
Definition: PanoRecording.h:218
PanoRecording, 录制服务核心接口
Definition: PanoRecording.h:15
virtual QResult resumeRecording()=0
恢复录制。
bool(*)(void *context, const char *channelId, const char *filePath, const char *recordTime) EnumCallback
本地录制文件枚举回调
Definition: PanoRecording.h:169
State
录制状态
Definition: PanoRecording.h:190
virtual QResult setSpeakerUser(uint64_t userId)=0
设置主讲人。
virtual QResult setCallback(Callback *callback)=0
设置录制服务的回调。
virtual QResult startRecording(const LocalRecordingOption &option)=0
开启本地录制。
virtual QResult pauseRecording()=0
暂停录制。
virtual QResult stopRecording()=0
停止录制。
virtual void enumLocalRecordingFiles(const char *recordingPath, EnumCallback cb, void *context) const =0
枚举本地录制文件。
LayoutMode
录制布局模式
Definition: PanoRecording.h:25
@ Speaker
演讲者模式
@ ActiveSpeaker
语音激励模式
virtual QResult updateLayout(LayoutMode layout)=0
更改录制布局模式。
本地录制参数
Definition: PanoRecording.h:42
VideoProfileType profileType
录制分辨率
Definition: PanoRecording.h:46
const char * recordingPath
本地录制存储路径,必须为绝对路径
Definition: PanoRecording.h:48
uint64_t minFreeDiskSpaceMB
最小空闲磁盘空间,小于此值将停止录制。单位:MB
Definition: PanoRecording.h:50
LayoutMode layoutMode
录制布局模式
Definition: PanoRecording.h:44