All Products
Search
Document Center

Live-to-VOD

Last Updated: Jul 11, 2019

Initialize a client

Initialize a client before using the SDK. For more information, see initVodClient.

Query a list of VOD files created from live streams

For more information about the request and response parameters, see ListLiveRecordVideo.

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

/*Method for querying a list of VOD files created from live streams*/
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"] = "testStreamName";
    args["DomainName"] = "testdomain.aliyun.com";
    args["AppName"] = "testAppName";
    return getAcsResponse(authInfo, apiName, args);
}

// Call example
void main() {
    VodCredential authInfo = initVodClient("<Your AccessKey ID>", "<Your AccessKey Secret>");
    VodApiResponse response = listLiveRecordVideo(authInfo);
    printf("httpCode: %d, result: %s\n", response.httpCode, response.result.c_str());
}