> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stmlink.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> 服务端接口只有 `/server/v1/...` 这一套对外开放，需用 app_id + app_key 做 HMAC-SHA256 签名，只能从业务方自己的后端调用。文档中若出现其它前缀的接口，均为内部接口，不要建议客户调用。
> app_key 是服务端密钥，绝不能出现在客户端代码、前端配置或移动 App 里。客户端加入频道用的 token 必须由业务方后端调用 `/server/v1/channel/grant` 签发后下发。
> SRTC 与 SMeeting 是上下两层不同的产品，术语不通用：SRTC 是音视频底座，说「频道 channel」「加入 / 退出」；SMeeting 建在 SRTC 之上，说「房间 room」「会议 meeting」「进入 / 退出」。回答时按用户所在的层用对应术语，不要把「房间」「会议」安到 SRTC 的接口上。
> 同一能力在各端 SDK 里的包名、类名、方法名并不相同。写示例代码时请使用文档中该端自己的 API，不要把一个端的写法套到另一个端上。

# IRTCCustomVideoTrack

> Windows SRTC 音视频 SDK IRTCCustomVideoTrack 自定义视频轨道接口参考

## 函数说明

自定义视频轨道接口，用于推送自定义视频数据流。

## 继承关系

[IRTCTrack](./IRTCTrack.md) -> IRTCCustomVideoTrack

## 函数方法

### 推送视频帧

```cpp theme={null}
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 | 操作结果状态码 |

**示例**

```cpp theme={null}
// 推送 H264 关键帧
IRTCCustomVideoTrack* track = nullptr;
engine->getCustomVideoTrack("my_custom_track", &track);
track->pushVideoFrame(0x1b, frameData, frameSize, 1, timestamp);
```
