关闭视频 - CloseVideo
函数简介
关闭视频并释放资源。
接口名称
CloseVideo
DLL调用
int32_t CloseVideo(int64_t instance, int64_t videoHandle)
参数说明
| 参数名 | 类型 | 说明 |
|---|---|---|
| instance | 长整数型 | OLAPlug对象的指针,由 CreateCOLAPlugInterFace 接口生成。 |
| videoHandle | 长整数型 | 视频句柄 |
示例
int64_t instance = CreateCOLAPlugInterFace();
int64_t videoHandle = OpenVideo(instance, "test.mp4");
// ... 使用视频 ...
int32_t result = CloseVideo(instance, videoHandle);
if (result == 1) {
printf("视频关闭成功\n");
} else {
printf("视频关闭失败\n");
}
DestroyCOLAPlugInterFace(instance);
返回值
- 0: 失败
- 1: 成功
注意事项
- 使用完视频后必须调用此函数释放资源
- 关闭后不能再使用该视频句柄进行任何操作
