1 #ifndef AVD_Module_Exporter_H__ 2 #define AVD_Module_Exporter_H__ 15 virtual Result setScaleType(IVideoRenderView::ScalingType scale) = 0;
17 virtual Result setAutoLayout(
bool useAuto) = 0;
19 virtual Result addSubVideo(
const DeviceId& vId,
int zorder,
float x,
float y,
float w,
float h) = 0;
21 virtual Result modSubVideo(
const DeviceId& vId,
int zorder,
float x,
float y,
float w,
float h) = 0;
23 virtual bool rmvSubVideo(
const DeviceId& vId) = 0;
25 virtual void clearSubVideos() = 0;
54 bool isValid()
const {
return !
id.empty(); }
65 virtual void videoStreamOut(
const String& eId,
uint64 timestamp_ns,
rtc::VideoCodec c,
unsigned int w,
unsigned int h,
bool isKeyFrame,
const uint8 *data,
unsigned int len) = 0;
67 virtual void audioStreamOut(
const String& eId,
uint64 timestamp_ns,
rtc::AudioCodec c,
int sampleRate,
int channels,
const uint8 *data,
unsigned int len) = 0;
83 ViewInfo() :mixWidth(0), mixHeight(0), backgroundColor(0), outBitrate(0), outFps(0){}
86 virtual Result createLocalRecorder(
String& eId,
const String& filePath,
const ViewInfo& view) = 0;
88 virtual Result createLocalRealtimeRecorder(
String& eId,
const String& filePath,
const ViewInfo& view) = 0;
90 virtual Result createLocalRealtimeRecorder(
String& eId, StreamOut* out,
const ViewInfo& view) = 0;
92 virtual Result createLocalLivecast(
String& eId,
const String& pushUrl,
const ViewInfo& view) = 0;
104 virtual Result selectAudio4Exporter(
const String& eId,
const UserId& audioUserId) = 0;
115 : x(0.0f), y(0.0f), width(0.0f), height(0.0f), zorder(0), alpha(0), render(IVideoRenderView::Scale_Aspect_Fit) {}
117 : id(aId), x(ax), y(ay), width(aw), height(ah), zorder(az), alpha(0), render(IVideoRenderView::Scale_Aspect_Fit) {}
119 if (infosEqual(
VideoInfo(
id, ax, ay, aw, ah, az))) {
122 x = ax; y = ay; width = aw; height = ah;
127 if (r.
x == x && r.
y == y && r.
width == width && r.
height == height && r.
zorder == zorder) {
143 virtual Result pauseResume(
const String& eId,
bool isResume) = 0;
147 virtual Result stopExporterAll() = 0;
156 virtual void* getCurExportItem(
String eId) = 0;
167 #endif//AVD_Module_Exporter_H__ float x
Definition: mstreamexporter.h:108
String desturl
录制:文件名称 直播:推流地址;
Definition: mstreamexporter.h:46
unsigned short uint16
Definition: defines.h:389
#define NAMESPACE_RTC_BEGIN
Definition: combase.h:106
VideoInfo()
Definition: mstreamexporter.h:114
bool update(float ax, float ay, float aw, float ah, uint16 az)
Definition: mstreamexporter.h:118
RecordStatus
旁路录制状态定义
Definition: combase.h:524
UserId creatorId
创建者用户ID
Definition: mstreamexporter.h:38
String UserId
用户号类型,唯一标识房间内一个用户,长度不大于Max_UserId定义;由应用层定义传递给AVD SDK,要求保证房间内唯一
Definition: common.h:13
float y
Definition: mstreamexporter.h:108
int Result
返回值类型
Definition: combase.h:13
Definition: mstreamexporter.h:61
String DeviceId
设备号类型,唯一标识房间内一个设备,长度不大于Max_DeviceId定义;定义如下:userId+"_"+md5[os.getdeviceid() or os.getsystemid()]
Definition: common.h:12
VideoInfo(const DeviceId &aId, float ax, float ay, float aw, float ah, uint16 az)
Definition: mstreamexporter.h:116
#define RT_API_EXPORT
Definition: defines.h:216
uint32 mixWidth
Definition: mstreamexporter.h:78
Definition: mstreamexporter.h:63
uint32 backgroundColor
Definition: mstreamexporter.h:80
bool isValid() const
Definition: mstreamexporter.h:134
virtual ~StreamOut()
Definition: mstreamexporter.h:69
unsigned int uint32
Definition: defines.h:387
VideoCodec
视频编解码器类型.
Definition: combase.h:163
std::vector< VideoInfo > VideosType
Definition: mstreamexporter.h:138
std::string String
定义的String类型
Definition: common.h:10
ViewInfo()
Definition: mstreamexporter.h:83
ExporterInfo * LPExporterInfo
Definition: mstreamexporter.h:56
const String toString(const ExporterInfo &obj)
unsigned long long uint64
Definition: defines.h:376
uint16 alpha
Definition: mstreamexporter.h:111
创建录制
Definition: combase.h:525
uint32 mixHeight
Definition: mstreamexporter.h:79
IVideoRenderView::ScalingType render
Definition: mstreamexporter.h:112
Definition: mstreamexporter.h:77
bool isValid() const
Definition: mstreamexporter.h:54
#define NAMESPACE_RTC_END
Definition: combase.h:107
float height
Definition: mstreamexporter.h:109
std::function< void(Result result, const ExporterInfo &info)> Cb_CreateResult
Definition: mstreamexporter.h:94
float width
Definition: mstreamexporter.h:109
ViewInfo(uint32 aw, uint32 ah, uint32 outbt)
Definition: mstreamexporter.h:84
录制数据结构.
Definition: mstreamexporter.h:35
String RoomId
房间号类型,唯一标识房间内一个房间,长度不大于Max_RoomId定义;
Definition: common.h:11
String createTime
创建起始时间
Definition: mstreamexporter.h:41
RecordStatus status
状态
Definition: mstreamexporter.h:42
DeviceId RecordId
录制ID类型
Definition: common.h:15
ExporterInfo()
Definition: mstreamexporter.h:53
uint32 outFps
Definition: mstreamexporter.h:82
unsigned char uint8
Definition: defines.h:391
RecordId id
录制(直播频道)ID
Definition: mstreamexporter.h:36
bool infosEqual(const VideoInfo &r) const
Definition: mstreamexporter.h:126
std::vector< ExporterInfo > ExporterInfosType
Definition: mstreamexporter.h:58
RoomId roomId
关联房间号
Definition: mstreamexporter.h:37
AudioCodec
Definition: combase.h:717
uint32 outBitrate
Definition: mstreamexporter.h:81
String name
名称
Definition: mstreamexporter.h:39
std::function< void(const String &eId, Result error, const String &msg)> Cb_OnError
Definition: mstreamexporter.h:74
DeviceId id
Definition: mstreamexporter.h:107
virtual ~IMStreamExporter()
Definition: mstreamexporter.h:158
uint16 zorder
Definition: mstreamexporter.h:110
String appdata
应用自定义数据, json
Definition: mstreamexporter.h:40
uint64 size
录制:录制文件大小 直播:直播当前时长
Definition: mstreamexporter.h:43
Definition: mstreamexporter.h:11
virtual ~IVideoMixer()
Definition: mstreamexporter.h:27
Definition: mstreamexporter.h:106
String playurls
录制:播放录制链接列表,可能多个文件,如录制mp4视频分辨率变化会产生多个文件 直播:推流地址,和播放地址;根据url协议确定地址用途:如rtmp是推流和播放地址;htl是播放地址;
Definition: mstreamexporter.h:49