获取当前时间戳 - GetCurrentTimestamp
函数简介
获取当前时间戳。
接口名称
GetCurrentTimestamp
DLL调用
double GetCurrentTimestamp(int64_t instance, int64_t videoHandle)
参数说明
| 参数名 | 类型 | 说明 |
|---|---|---|
| instance | 长整数型 | OLAPlug对象的指针,由 CreateCOLAPlugInterFace 接口生成。 |
| videoHandle | 长整数型 | 视频句柄 |
示例
int64_t instance = CreateCOLAPlugInterFace();
int64_t videoHandle = OpenVideo(instance, "test.mp4");
double timestamp = GetCurrentTimestamp(instance, videoHandle);
printf("当前时间戳: %.2f 秒\n", timestamp);
CloseVideo(instance, videoHandle);
DestroyCOLAPlugInterFace(instance);
返回值
当前时间戳(秒),失败返回0.0。
