函数说明
自定义视频轨道接口,用于推送自定义视频数据流。继承关系
IRTCTrack -> IRTCCustomVideoTrack函数方法
推送视频帧
返回值
示例
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
推送自定义视频数据流的轨道接口
virtual StatusCode pushVideoFrame(int stmtype, unsigned char* buf, int buf_len, int frmtype, long ts) = 0;
| 参数 | 类型 | 说明 |
|---|---|---|
| stmtype | int | 流类型(如 H264、H265 等编码类型) |
| buf | unsigned char* | 视频帧数据缓冲区 |
| buf_len | int | 数据缓冲区长度 |
| frmtype | int | 帧类型(如关键帧、P 帧等) |
| ts | long | 时间戳 |
| 返回值 | 说明 |
|---|---|
| StatusCode | 操作结果状态码 |
// 推送 H264 关键帧
IRTCCustomVideoTrack* track = nullptr;
engine->getCustomVideoTrack("my_custom_track", &track);
track->pushVideoFrame(0x1b, frameData, frameSize, 1, timestamp);