MediaRecorderConfiguration
- Unreal C++
更新时间不可用
音视频流录制配置。
struct MediaRecorderConfiguration {
const char* storagePath;
MediaRecorderContainerFormat containerFormat;
MediaRecorderStreamType streamType;
int maxDurationMs;
int recorderInfoUpdateInterval;
int width;
int height;
int fps;
int sample_rate;
int channel_num;
agora::rtc::VIDEO_SOURCE_TYPE videoSourceType;
MediaRecorderConfiguration()
: storagePath(NULL),
containerFormat(FORMAT_MP4),
streamType(STREAM_TYPE_BOTH),
maxDurationMs(120000),
recorderInfoUpdateInterval(0),
width(1280),
height(720),
fps(30),
sample_rate(48000),
channel_num(1),
videoSourceType(rtc::VIDEO_SOURCE_CAMERA_PRIMARY) {}
MediaRecorderConfiguration(const char* path, MediaRecorderContainerFormat format,
MediaRecorderStreamType type, int duration, int interval)
: storagePath(path),
containerFormat(format),
streamType(type),
maxDurationMs(duration),
recorderInfoUpdateInterval(interval),
width(1280),
height(720),
fps(30),
sample_rate(48000),
channel_num(1),
videoSourceType(rtc::VIDEO_SOURCE_CAMERA_PRIMARY) {}};属性
| 参数名 | 描述 |
|---|---|
storagePath | |
containerFormat | 录制文件的格式。详见 MediaRecorderContainerFormat。 |
streamType | 录制内容。详见 MediaRecorderStreamType。 |
maxDurationMs | |
recorderInfoUpdateInterval | 录制信息更新间隔,单位为毫秒,取值范围为 [1000,10000]。SDK 会根据该值的设置触发 onRecorderInfoUpdated 回调,报告更新后的录制信息。 |
width | 录制视频的宽度 (px),宽 × 高的最大值不应超过 3840 × 2160。 该参数仅在 调用 createMediaRecorder 且将 RecorderStreamInfo 中的 type设置为 PREVIEW 时需要传入。 |
height | 录制视频的高度 (px),宽 × 高的最大值不超过 3840 × 2160。 该参数仅在 调用 createMediaRecorder 且将 RecorderStreamInfo 中的 type设置为 PREVIEW 时需要传入。 |
fps | 录制视频的帧率,最高值不超过 30,如: 5、10、15、24、30 等。 该参数仅在 调用 createMediaRecorder 且将 RecorderStreamInfo 中的 type设置为 PREVIEW 时需要传入。 |
sample_rate | 录制音频的采样率 (Hz),可设置为 16000,32000,44100 或 48000。 该参数仅在 调用 createMediaRecorder 且将 RecorderStreamInfo 中的 type设置为 PREVIEW 时需要传入。 |
channel_num | 录制音频的声道数:
该参数仅在 调用 createMediaRecorder 且将 RecorderStreamInfo 中的 type设置为 PREVIEW 时需要传入。 |
videoSourceType | 录制视频源的类型。详见 VIDEO_SOURCE_TYPE。 该参数仅在 调用 createMediaRecorder 且将 RecorderStreamInfo 中的 type设置为 PREVIEW 时需要传入。 |