tencent cloud


Media Information APIs

Last updated: 2022-05-24 16:41:41


    This document provides an overview of APIs and SDK code samples for media information.

    API Operation Description
    GetMediaInfo Querying file information Queries media file information

    Querying File Information

    Feature description

    This API is used to get media file information.

    Method prototype

    CosResult GetMediaInfo(const GetMediaInfoReq& request, GetMediaInfoResp* response);

    Sample code

    qcloud_cos::CosConfig config("./config.json");
    qcloud_cos::CosAPI cos(config);
    GetMediaInfoReq req(bucket_name, object_name);
    GetMediaInfoResp resp;
    CosResult result = cos.GetMediaInfo(req, &resp);
    if (result.IsSucc()) {
     // The call is successful. You can call the `resp` member functions to get the return content.
     std::cout << "Result: " << resp.GetResult().to_string() << std::endl;
    } else {
     // The call failed. You can call the `result` member functions to get the error information.

    Parameter description

    Parameter Description Type Required
    request Operation request. GetMediaInfoReq Yes
    response Operation response. GetMediaInfoResp Yes
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support