直播转点播

本篇文档提供了C/C++ SDK视频直播转点播模块,查询直转点视频列表功能的API调用示例。

初始化客户端

使用前请先初始化客户端,请参见初始化

查询直转点视频列表

调用ListLiveRecordVideo接口,完成查询直转点视频列表功能。

接口参数和返回字段请参见ListLiveRecordVideo。调用示例如下:

#include <stdio.h>
#include <string>
#include <map>
#include <jsoncpp/json/json.h>
#include "vod_sdk/openApiUtil.h"

/*查询直播转点播视频列表函数*/
VodApiResponse listLiveRecordVideo(VodCredential authInfo) {
    string apiName = "ListLiveRecordVideo";
    map<string, string> args;
    args["StartTime"] = "2018-04-24T03:21:04Z";
    args["EndTime"] = "2018-05-21T03:21:44Z";
    args["StreamName"] = "testStream****";
    args["DomainName"] = "example.aliyundoc.com";
    args["AppName"] = "testApp****";
    return getAcsResponse(authInfo, apiName, args);
}

// 请求示例
void main() {
    VodCredential authInfo = initVodClient("<Your AccessKeyId>", "<Your AccessKeySecret>");
    VodApiResponse response = listLiveRecordVideo(authInfo);
    printf("httpCode: %d, result: %s\n", response.httpCode, response.result.c_str());
}
阿里云首页 视频点播 相关技术圈