Add BatchGetMediaInfos.
This commit is contained in:
@@ -41,6 +41,8 @@ set(vod_public_header_model
|
||||
include/alibabacloud/vod/model/AddWatermarkResult.h
|
||||
include/alibabacloud/vod/model/AttachAppPolicyToIdentityRequest.h
|
||||
include/alibabacloud/vod/model/AttachAppPolicyToIdentityResult.h
|
||||
include/alibabacloud/vod/model/BatchGetMediaInfosRequest.h
|
||||
include/alibabacloud/vod/model/BatchGetMediaInfosResult.h
|
||||
include/alibabacloud/vod/model/BatchSetVodDomainConfigsRequest.h
|
||||
include/alibabacloud/vod/model/BatchSetVodDomainConfigsResult.h
|
||||
include/alibabacloud/vod/model/BatchStartVodDomainRequest.h
|
||||
@@ -101,6 +103,8 @@ set(vod_public_header_model
|
||||
include/alibabacloud/vod/model/DeleteVodTemplateResult.h
|
||||
include/alibabacloud/vod/model/DeleteWatermarkRequest.h
|
||||
include/alibabacloud/vod/model/DeleteWatermarkResult.h
|
||||
include/alibabacloud/vod/model/DescribeMediaDistributionRequest.h
|
||||
include/alibabacloud/vod/model/DescribeMediaDistributionResult.h
|
||||
include/alibabacloud/vod/model/DescribePlayTopVideosRequest.h
|
||||
include/alibabacloud/vod/model/DescribePlayTopVideosResult.h
|
||||
include/alibabacloud/vod/model/DescribePlayUserAvgRequest.h
|
||||
@@ -396,6 +400,8 @@ set(vod_src
|
||||
src/model/AddWatermarkResult.cc
|
||||
src/model/AttachAppPolicyToIdentityRequest.cc
|
||||
src/model/AttachAppPolicyToIdentityResult.cc
|
||||
src/model/BatchGetMediaInfosRequest.cc
|
||||
src/model/BatchGetMediaInfosResult.cc
|
||||
src/model/BatchSetVodDomainConfigsRequest.cc
|
||||
src/model/BatchSetVodDomainConfigsResult.cc
|
||||
src/model/BatchStartVodDomainRequest.cc
|
||||
@@ -456,6 +462,8 @@ set(vod_src
|
||||
src/model/DeleteVodTemplateResult.cc
|
||||
src/model/DeleteWatermarkRequest.cc
|
||||
src/model/DeleteWatermarkResult.cc
|
||||
src/model/DescribeMediaDistributionRequest.cc
|
||||
src/model/DescribeMediaDistributionResult.cc
|
||||
src/model/DescribePlayTopVideosRequest.cc
|
||||
src/model/DescribePlayTopVideosResult.cc
|
||||
src/model/DescribePlayUserAvgRequest.cc
|
||||
|
||||
@@ -42,6 +42,8 @@
|
||||
#include "model/AddWatermarkResult.h"
|
||||
#include "model/AttachAppPolicyToIdentityRequest.h"
|
||||
#include "model/AttachAppPolicyToIdentityResult.h"
|
||||
#include "model/BatchGetMediaInfosRequest.h"
|
||||
#include "model/BatchGetMediaInfosResult.h"
|
||||
#include "model/BatchSetVodDomainConfigsRequest.h"
|
||||
#include "model/BatchSetVodDomainConfigsResult.h"
|
||||
#include "model/BatchStartVodDomainRequest.h"
|
||||
@@ -102,6 +104,8 @@
|
||||
#include "model/DeleteVodTemplateResult.h"
|
||||
#include "model/DeleteWatermarkRequest.h"
|
||||
#include "model/DeleteWatermarkResult.h"
|
||||
#include "model/DescribeMediaDistributionRequest.h"
|
||||
#include "model/DescribeMediaDistributionResult.h"
|
||||
#include "model/DescribePlayTopVideosRequest.h"
|
||||
#include "model/DescribePlayTopVideosResult.h"
|
||||
#include "model/DescribePlayUserAvgRequest.h"
|
||||
@@ -413,6 +417,9 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::AttachAppPolicyToIdentityResult> AttachAppPolicyToIdentityOutcome;
|
||||
typedef std::future<AttachAppPolicyToIdentityOutcome> AttachAppPolicyToIdentityOutcomeCallable;
|
||||
typedef std::function<void(const VodClient*, const Model::AttachAppPolicyToIdentityRequest&, const AttachAppPolicyToIdentityOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> AttachAppPolicyToIdentityAsyncHandler;
|
||||
typedef Outcome<Error, Model::BatchGetMediaInfosResult> BatchGetMediaInfosOutcome;
|
||||
typedef std::future<BatchGetMediaInfosOutcome> BatchGetMediaInfosOutcomeCallable;
|
||||
typedef std::function<void(const VodClient*, const Model::BatchGetMediaInfosRequest&, const BatchGetMediaInfosOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> BatchGetMediaInfosAsyncHandler;
|
||||
typedef Outcome<Error, Model::BatchSetVodDomainConfigsResult> BatchSetVodDomainConfigsOutcome;
|
||||
typedef std::future<BatchSetVodDomainConfigsOutcome> BatchSetVodDomainConfigsOutcomeCallable;
|
||||
typedef std::function<void(const VodClient*, const Model::BatchSetVodDomainConfigsRequest&, const BatchSetVodDomainConfigsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> BatchSetVodDomainConfigsAsyncHandler;
|
||||
@@ -503,6 +510,9 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::DeleteWatermarkResult> DeleteWatermarkOutcome;
|
||||
typedef std::future<DeleteWatermarkOutcome> DeleteWatermarkOutcomeCallable;
|
||||
typedef std::function<void(const VodClient*, const Model::DeleteWatermarkRequest&, const DeleteWatermarkOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DeleteWatermarkAsyncHandler;
|
||||
typedef Outcome<Error, Model::DescribeMediaDistributionResult> DescribeMediaDistributionOutcome;
|
||||
typedef std::future<DescribeMediaDistributionOutcome> DescribeMediaDistributionOutcomeCallable;
|
||||
typedef std::function<void(const VodClient*, const Model::DescribeMediaDistributionRequest&, const DescribeMediaDistributionOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeMediaDistributionAsyncHandler;
|
||||
typedef Outcome<Error, Model::DescribePlayTopVideosResult> DescribePlayTopVideosOutcome;
|
||||
typedef std::future<DescribePlayTopVideosOutcome> DescribePlayTopVideosOutcomeCallable;
|
||||
typedef std::function<void(const VodClient*, const Model::DescribePlayTopVideosRequest&, const DescribePlayTopVideosOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribePlayTopVideosAsyncHandler;
|
||||
@@ -946,6 +956,9 @@ namespace AlibabaCloud
|
||||
AttachAppPolicyToIdentityOutcome attachAppPolicyToIdentity(const Model::AttachAppPolicyToIdentityRequest &request)const;
|
||||
void attachAppPolicyToIdentityAsync(const Model::AttachAppPolicyToIdentityRequest& request, const AttachAppPolicyToIdentityAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
AttachAppPolicyToIdentityOutcomeCallable attachAppPolicyToIdentityCallable(const Model::AttachAppPolicyToIdentityRequest& request) const;
|
||||
BatchGetMediaInfosOutcome batchGetMediaInfos(const Model::BatchGetMediaInfosRequest &request)const;
|
||||
void batchGetMediaInfosAsync(const Model::BatchGetMediaInfosRequest& request, const BatchGetMediaInfosAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
BatchGetMediaInfosOutcomeCallable batchGetMediaInfosCallable(const Model::BatchGetMediaInfosRequest& request) const;
|
||||
BatchSetVodDomainConfigsOutcome batchSetVodDomainConfigs(const Model::BatchSetVodDomainConfigsRequest &request)const;
|
||||
void batchSetVodDomainConfigsAsync(const Model::BatchSetVodDomainConfigsRequest& request, const BatchSetVodDomainConfigsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
BatchSetVodDomainConfigsOutcomeCallable batchSetVodDomainConfigsCallable(const Model::BatchSetVodDomainConfigsRequest& request) const;
|
||||
@@ -1036,6 +1049,9 @@ namespace AlibabaCloud
|
||||
DeleteWatermarkOutcome deleteWatermark(const Model::DeleteWatermarkRequest &request)const;
|
||||
void deleteWatermarkAsync(const Model::DeleteWatermarkRequest& request, const DeleteWatermarkAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
DeleteWatermarkOutcomeCallable deleteWatermarkCallable(const Model::DeleteWatermarkRequest& request) const;
|
||||
DescribeMediaDistributionOutcome describeMediaDistribution(const Model::DescribeMediaDistributionRequest &request)const;
|
||||
void describeMediaDistributionAsync(const Model::DescribeMediaDistributionRequest& request, const DescribeMediaDistributionAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
DescribeMediaDistributionOutcomeCallable describeMediaDistributionCallable(const Model::DescribeMediaDistributionRequest& request) const;
|
||||
DescribePlayTopVideosOutcome describePlayTopVideos(const Model::DescribePlayTopVideosRequest &request)const;
|
||||
void describePlayTopVideosAsync(const Model::DescribePlayTopVideosRequest& request, const DescribePlayTopVideosAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
DescribePlayTopVideosOutcomeCallable describePlayTopVideosCallable(const Model::DescribePlayTopVideosRequest& request) const;
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_VOD_MODEL_BATCHGETMEDIAINFOSREQUEST_H_
|
||||
#define ALIBABACLOUD_VOD_MODEL_BATCHGETMEDIAINFOSREQUEST_H_
|
||||
|
||||
#include <alibabacloud/vod/VodExport.h>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
namespace AlibabaCloud {
|
||||
namespace Vod {
|
||||
namespace Model {
|
||||
class ALIBABACLOUD_VOD_EXPORT BatchGetMediaInfosRequest : public RpcServiceRequest {
|
||||
public:
|
||||
BatchGetMediaInfosRequest();
|
||||
~BatchGetMediaInfosRequest();
|
||||
std::string getMediaIds() const;
|
||||
void setMediaIds(const std::string &mediaIds);
|
||||
|
||||
private:
|
||||
std::string mediaIds_;
|
||||
};
|
||||
} // namespace Model
|
||||
} // namespace Vod
|
||||
} // namespace AlibabaCloud
|
||||
#endif // !ALIBABACLOUD_VOD_MODEL_BATCHGETMEDIAINFOSREQUEST_H_
|
||||
148
vod/include/alibabacloud/vod/model/BatchGetMediaInfosResult.h
Normal file
148
vod/include/alibabacloud/vod/model/BatchGetMediaInfosResult.h
Normal file
@@ -0,0 +1,148 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_VOD_MODEL_BATCHGETMEDIAINFOSRESULT_H_
|
||||
#define ALIBABACLOUD_VOD_MODEL_BATCHGETMEDIAINFOSRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/vod/VodExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Vod
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_VOD_EXPORT BatchGetMediaInfosResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct MediaBasicInfo
|
||||
{
|
||||
struct MediaInfo
|
||||
{
|
||||
std::string status;
|
||||
std::string description;
|
||||
std::string userData;
|
||||
std::string storageClass;
|
||||
std::string downloadSwitch;
|
||||
std::string title;
|
||||
std::string modificationTime;
|
||||
long cateId;
|
||||
std::string cateName;
|
||||
std::string restoreStatus;
|
||||
std::string preprocessStatus;
|
||||
std::string restoreExpiration;
|
||||
std::string mediaId;
|
||||
std::string appId;
|
||||
std::string creationTime;
|
||||
std::string coverURL;
|
||||
std::string regionId;
|
||||
std::string storageLocation;
|
||||
std::vector<std::string> snapshots;
|
||||
std::string tags;
|
||||
std::string templateGroupId;
|
||||
};
|
||||
struct MezzanineInfo
|
||||
{
|
||||
struct AudioStream
|
||||
{
|
||||
std::string codecTag;
|
||||
std::string codecTimeBase;
|
||||
std::string channelLayout;
|
||||
std::string startTime;
|
||||
std::string index;
|
||||
std::string lang;
|
||||
std::string duration;
|
||||
std::string sampleFmt;
|
||||
std::string bitrate;
|
||||
std::string codecName;
|
||||
std::string channels;
|
||||
std::string timebase;
|
||||
std::string codecTagString;
|
||||
std::string sampleRate;
|
||||
std::string codecLongName;
|
||||
std::string numFrames;
|
||||
};
|
||||
struct VideoStream
|
||||
{
|
||||
std::string codecTag;
|
||||
std::string codecTimeBase;
|
||||
std::string rotate;
|
||||
std::string sar;
|
||||
std::string hDRType;
|
||||
std::string startTime;
|
||||
std::string fps;
|
||||
std::string index;
|
||||
std::string lang;
|
||||
std::string duration;
|
||||
std::string pixFmt;
|
||||
std::string bitrate;
|
||||
std::string codecName;
|
||||
std::string avgFPS;
|
||||
std::string profile;
|
||||
std::string timebase;
|
||||
std::string codecTagString;
|
||||
std::string hasBFrames;
|
||||
std::string dar;
|
||||
std::string codecLongName;
|
||||
std::string height;
|
||||
std::string level;
|
||||
std::string numFrames;
|
||||
std::string width;
|
||||
};
|
||||
std::string status;
|
||||
std::string cRC64;
|
||||
long size;
|
||||
std::string fileName;
|
||||
std::string fps;
|
||||
std::vector<VideoStream> videoStreamList;
|
||||
std::string duration;
|
||||
std::vector<AudioStream> audioStreamList;
|
||||
std::string bitrate;
|
||||
std::string fileURL;
|
||||
std::string mediaId;
|
||||
std::string creationTime;
|
||||
long height;
|
||||
long width;
|
||||
};
|
||||
MediaInfo mediaInfo;
|
||||
std::string mediaId;
|
||||
MezzanineInfo mezzanineInfo;
|
||||
};
|
||||
|
||||
|
||||
BatchGetMediaInfosResult();
|
||||
explicit BatchGetMediaInfosResult(const std::string &payload);
|
||||
~BatchGetMediaInfosResult();
|
||||
std::vector<std::string> getNonExistMediaIds()const;
|
||||
std::vector<MediaBasicInfo> getMediaInfos()const;
|
||||
std::vector<std::string> getForbiddenMediaIds()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::vector<std::string> nonExistMediaIds_;
|
||||
std::vector<MediaBasicInfo> mediaInfos_;
|
||||
std::vector<std::string> forbiddenMediaIds_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_VOD_MODEL_BATCHGETMEDIAINFOSRESULT_H_
|
||||
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_VOD_MODEL_DESCRIBEMEDIADISTRIBUTIONREQUEST_H_
|
||||
#define ALIBABACLOUD_VOD_MODEL_DESCRIBEMEDIADISTRIBUTIONREQUEST_H_
|
||||
|
||||
#include <alibabacloud/vod/VodExport.h>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
namespace AlibabaCloud {
|
||||
namespace Vod {
|
||||
namespace Model {
|
||||
class ALIBABACLOUD_VOD_EXPORT DescribeMediaDistributionRequest : public RpcServiceRequest {
|
||||
public:
|
||||
DescribeMediaDistributionRequest();
|
||||
~DescribeMediaDistributionRequest();
|
||||
std::string getEndTime() const;
|
||||
void setEndTime(const std::string &endTime);
|
||||
std::string getStartTime() const;
|
||||
void setStartTime(const std::string &startTime);
|
||||
std::string getStorageClass() const;
|
||||
void setStorageClass(const std::string &storageClass);
|
||||
std::string getInterval() const;
|
||||
void setInterval(const std::string &interval);
|
||||
|
||||
private:
|
||||
std::string endTime_;
|
||||
std::string startTime_;
|
||||
std::string storageClass_;
|
||||
std::string interval_;
|
||||
};
|
||||
} // namespace Model
|
||||
} // namespace Vod
|
||||
} // namespace AlibabaCloud
|
||||
#endif // !ALIBABACLOUD_VOD_MODEL_DESCRIBEMEDIADISTRIBUTIONREQUEST_H_
|
||||
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_VOD_MODEL_DESCRIBEMEDIADISTRIBUTIONRESULT_H_
|
||||
#define ALIBABACLOUD_VOD_MODEL_DESCRIBEMEDIADISTRIBUTIONRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/vod/VodExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Vod
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_VOD_EXPORT DescribeMediaDistributionResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct MediaDistribution
|
||||
{
|
||||
std::string endTime;
|
||||
std::string startTime;
|
||||
long count;
|
||||
};
|
||||
|
||||
|
||||
DescribeMediaDistributionResult();
|
||||
explicit DescribeMediaDistributionResult(const std::string &payload);
|
||||
~DescribeMediaDistributionResult();
|
||||
long getTotal()const;
|
||||
std::vector<MediaDistribution> getMediaDistributionList()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
long total_;
|
||||
std::vector<MediaDistribution> mediaDistributionList_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_VOD_MODEL_DESCRIBEMEDIADISTRIBUTIONRESULT_H_
|
||||
@@ -59,6 +59,7 @@ namespace AlibabaCloud
|
||||
std::string fps;
|
||||
std::string modificationTime;
|
||||
int bitDepth;
|
||||
std::string codecName;
|
||||
std::string preprocessStatus;
|
||||
std::string complexity;
|
||||
std::string format;
|
||||
|
||||
@@ -42,6 +42,8 @@ public:
|
||||
void setStreamURL(const std::string &streamURL);
|
||||
std::string getMediaId() const;
|
||||
void setMediaId(const std::string &mediaId);
|
||||
std::string getUploadMetadata() const;
|
||||
void setUploadMetadata(const std::string &uploadMetadata);
|
||||
|
||||
private:
|
||||
std::string fileExtension_;
|
||||
@@ -50,6 +52,7 @@ private:
|
||||
std::string definition_;
|
||||
std::string streamURL_;
|
||||
std::string mediaId_;
|
||||
std::string uploadMetadata_;
|
||||
};
|
||||
} // namespace Model
|
||||
} // namespace Vod
|
||||
|
||||
@@ -411,6 +411,42 @@ VodClient::AttachAppPolicyToIdentityOutcomeCallable VodClient::attachAppPolicyTo
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
VodClient::BatchGetMediaInfosOutcome VodClient::batchGetMediaInfos(const BatchGetMediaInfosRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return BatchGetMediaInfosOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return BatchGetMediaInfosOutcome(BatchGetMediaInfosResult(outcome.result()));
|
||||
else
|
||||
return BatchGetMediaInfosOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void VodClient::batchGetMediaInfosAsync(const BatchGetMediaInfosRequest& request, const BatchGetMediaInfosAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, batchGetMediaInfos(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
VodClient::BatchGetMediaInfosOutcomeCallable VodClient::batchGetMediaInfosCallable(const BatchGetMediaInfosRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<BatchGetMediaInfosOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->batchGetMediaInfos(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
VodClient::BatchSetVodDomainConfigsOutcome VodClient::batchSetVodDomainConfigs(const BatchSetVodDomainConfigsRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -1491,6 +1527,42 @@ VodClient::DeleteWatermarkOutcomeCallable VodClient::deleteWatermarkCallable(con
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
VodClient::DescribeMediaDistributionOutcome VodClient::describeMediaDistribution(const DescribeMediaDistributionRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DescribeMediaDistributionOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DescribeMediaDistributionOutcome(DescribeMediaDistributionResult(outcome.result()));
|
||||
else
|
||||
return DescribeMediaDistributionOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void VodClient::describeMediaDistributionAsync(const DescribeMediaDistributionRequest& request, const DescribeMediaDistributionAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, describeMediaDistribution(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
VodClient::DescribeMediaDistributionOutcomeCallable VodClient::describeMediaDistributionCallable(const DescribeMediaDistributionRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DescribeMediaDistributionOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->describeMediaDistribution(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
VodClient::DescribePlayTopVideosOutcome VodClient::describePlayTopVideos(const DescribePlayTopVideosRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
36
vod/src/model/BatchGetMediaInfosRequest.cc
Normal file
36
vod/src/model/BatchGetMediaInfosRequest.cc
Normal file
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/vod/model/BatchGetMediaInfosRequest.h>
|
||||
|
||||
using AlibabaCloud::Vod::Model::BatchGetMediaInfosRequest;
|
||||
|
||||
BatchGetMediaInfosRequest::BatchGetMediaInfosRequest()
|
||||
: RpcServiceRequest("vod", "2017-03-21", "BatchGetMediaInfos") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
BatchGetMediaInfosRequest::~BatchGetMediaInfosRequest() {}
|
||||
|
||||
std::string BatchGetMediaInfosRequest::getMediaIds() const {
|
||||
return mediaIds_;
|
||||
}
|
||||
|
||||
void BatchGetMediaInfosRequest::setMediaIds(const std::string &mediaIds) {
|
||||
mediaIds_ = mediaIds;
|
||||
setParameter(std::string("MediaIds"), mediaIds);
|
||||
}
|
||||
|
||||
234
vod/src/model/BatchGetMediaInfosResult.cc
Normal file
234
vod/src/model/BatchGetMediaInfosResult.cc
Normal file
@@ -0,0 +1,234 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/vod/model/BatchGetMediaInfosResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Vod;
|
||||
using namespace AlibabaCloud::Vod::Model;
|
||||
|
||||
BatchGetMediaInfosResult::BatchGetMediaInfosResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
BatchGetMediaInfosResult::BatchGetMediaInfosResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
BatchGetMediaInfosResult::~BatchGetMediaInfosResult()
|
||||
{}
|
||||
|
||||
void BatchGetMediaInfosResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allMediaInfosNode = value["MediaInfos"]["MediaBasicInfo"];
|
||||
for (auto valueMediaInfosMediaBasicInfo : allMediaInfosNode)
|
||||
{
|
||||
MediaBasicInfo mediaInfosObject;
|
||||
if(!valueMediaInfosMediaBasicInfo["MediaId"].isNull())
|
||||
mediaInfosObject.mediaId = valueMediaInfosMediaBasicInfo["MediaId"].asString();
|
||||
auto mediaInfoNode = value["MediaInfo"];
|
||||
if(!mediaInfoNode["StorageLocation"].isNull())
|
||||
mediaInfosObject.mediaInfo.storageLocation = mediaInfoNode["StorageLocation"].asString();
|
||||
if(!mediaInfoNode["CreationTime"].isNull())
|
||||
mediaInfosObject.mediaInfo.creationTime = mediaInfoNode["CreationTime"].asString();
|
||||
if(!mediaInfoNode["Status"].isNull())
|
||||
mediaInfosObject.mediaInfo.status = mediaInfoNode["Status"].asString();
|
||||
if(!mediaInfoNode["CateId"].isNull())
|
||||
mediaInfosObject.mediaInfo.cateId = std::stol(mediaInfoNode["CateId"].asString());
|
||||
if(!mediaInfoNode["MediaId"].isNull())
|
||||
mediaInfosObject.mediaInfo.mediaId = mediaInfoNode["MediaId"].asString();
|
||||
if(!mediaInfoNode["DownloadSwitch"].isNull())
|
||||
mediaInfosObject.mediaInfo.downloadSwitch = mediaInfoNode["DownloadSwitch"].asString();
|
||||
if(!mediaInfoNode["Tags"].isNull())
|
||||
mediaInfosObject.mediaInfo.tags = mediaInfoNode["Tags"].asString();
|
||||
if(!mediaInfoNode["ModificationTime"].isNull())
|
||||
mediaInfosObject.mediaInfo.modificationTime = mediaInfoNode["ModificationTime"].asString();
|
||||
if(!mediaInfoNode["RegionId"].isNull())
|
||||
mediaInfosObject.mediaInfo.regionId = mediaInfoNode["RegionId"].asString();
|
||||
if(!mediaInfoNode["CateName"].isNull())
|
||||
mediaInfosObject.mediaInfo.cateName = mediaInfoNode["CateName"].asString();
|
||||
if(!mediaInfoNode["Description"].isNull())
|
||||
mediaInfosObject.mediaInfo.description = mediaInfoNode["Description"].asString();
|
||||
if(!mediaInfoNode["PreprocessStatus"].isNull())
|
||||
mediaInfosObject.mediaInfo.preprocessStatus = mediaInfoNode["PreprocessStatus"].asString();
|
||||
if(!mediaInfoNode["AppId"].isNull())
|
||||
mediaInfosObject.mediaInfo.appId = mediaInfoNode["AppId"].asString();
|
||||
if(!mediaInfoNode["CoverURL"].isNull())
|
||||
mediaInfosObject.mediaInfo.coverURL = mediaInfoNode["CoverURL"].asString();
|
||||
if(!mediaInfoNode["TemplateGroupId"].isNull())
|
||||
mediaInfosObject.mediaInfo.templateGroupId = mediaInfoNode["TemplateGroupId"].asString();
|
||||
if(!mediaInfoNode["Title"].isNull())
|
||||
mediaInfosObject.mediaInfo.title = mediaInfoNode["Title"].asString();
|
||||
if(!mediaInfoNode["StorageClass"].isNull())
|
||||
mediaInfosObject.mediaInfo.storageClass = mediaInfoNode["StorageClass"].asString();
|
||||
if(!mediaInfoNode["RestoreStatus"].isNull())
|
||||
mediaInfosObject.mediaInfo.restoreStatus = mediaInfoNode["RestoreStatus"].asString();
|
||||
if(!mediaInfoNode["RestoreExpiration"].isNull())
|
||||
mediaInfosObject.mediaInfo.restoreExpiration = mediaInfoNode["RestoreExpiration"].asString();
|
||||
if(!mediaInfoNode["UserData"].isNull())
|
||||
mediaInfosObject.mediaInfo.userData = mediaInfoNode["UserData"].asString();
|
||||
auto allSnapshots = mediaInfoNode["Snapshots"]["Snapshot"];
|
||||
for (auto value : allSnapshots)
|
||||
mediaInfosObject.mediaInfo.snapshots.push_back(value.asString());
|
||||
auto mezzanineInfoNode = value["MezzanineInfo"];
|
||||
if(!mezzanineInfoNode["CreationTime"].isNull())
|
||||
mediaInfosObject.mezzanineInfo.creationTime = mezzanineInfoNode["CreationTime"].asString();
|
||||
if(!mezzanineInfoNode["Status"].isNull())
|
||||
mediaInfosObject.mezzanineInfo.status = mezzanineInfoNode["Status"].asString();
|
||||
if(!mezzanineInfoNode["FileURL"].isNull())
|
||||
mediaInfosObject.mezzanineInfo.fileURL = mezzanineInfoNode["FileURL"].asString();
|
||||
if(!mezzanineInfoNode["MediaId"].isNull())
|
||||
mediaInfosObject.mezzanineInfo.mediaId = mezzanineInfoNode["MediaId"].asString();
|
||||
if(!mezzanineInfoNode["Height"].isNull())
|
||||
mediaInfosObject.mezzanineInfo.height = std::stol(mezzanineInfoNode["Height"].asString());
|
||||
if(!mezzanineInfoNode["Bitrate"].isNull())
|
||||
mediaInfosObject.mezzanineInfo.bitrate = mezzanineInfoNode["Bitrate"].asString();
|
||||
if(!mezzanineInfoNode["FileName"].isNull())
|
||||
mediaInfosObject.mezzanineInfo.fileName = mezzanineInfoNode["FileName"].asString();
|
||||
if(!mezzanineInfoNode["Width"].isNull())
|
||||
mediaInfosObject.mezzanineInfo.width = std::stol(mezzanineInfoNode["Width"].asString());
|
||||
if(!mezzanineInfoNode["Size"].isNull())
|
||||
mediaInfosObject.mezzanineInfo.size = std::stol(mezzanineInfoNode["Size"].asString());
|
||||
if(!mezzanineInfoNode["CRC64"].isNull())
|
||||
mediaInfosObject.mezzanineInfo.cRC64 = mezzanineInfoNode["CRC64"].asString();
|
||||
if(!mezzanineInfoNode["Duration"].isNull())
|
||||
mediaInfosObject.mezzanineInfo.duration = mezzanineInfoNode["Duration"].asString();
|
||||
if(!mezzanineInfoNode["Fps"].isNull())
|
||||
mediaInfosObject.mezzanineInfo.fps = mezzanineInfoNode["Fps"].asString();
|
||||
auto allAudioStreamListNode = mezzanineInfoNode["AudioStreamList"]["AudioStream"];
|
||||
for (auto mezzanineInfoNodeAudioStreamListAudioStream : allAudioStreamListNode)
|
||||
{
|
||||
MediaBasicInfo::MezzanineInfo::AudioStream audioStreamObject;
|
||||
if(!mezzanineInfoNodeAudioStreamListAudioStream["Index"].isNull())
|
||||
audioStreamObject.index = mezzanineInfoNodeAudioStreamListAudioStream["Index"].asString();
|
||||
if(!mezzanineInfoNodeAudioStreamListAudioStream["Timebase"].isNull())
|
||||
audioStreamObject.timebase = mezzanineInfoNodeAudioStreamListAudioStream["Timebase"].asString();
|
||||
if(!mezzanineInfoNodeAudioStreamListAudioStream["SampleFmt"].isNull())
|
||||
audioStreamObject.sampleFmt = mezzanineInfoNodeAudioStreamListAudioStream["SampleFmt"].asString();
|
||||
if(!mezzanineInfoNodeAudioStreamListAudioStream["SampleRate"].isNull())
|
||||
audioStreamObject.sampleRate = mezzanineInfoNodeAudioStreamListAudioStream["SampleRate"].asString();
|
||||
if(!mezzanineInfoNodeAudioStreamListAudioStream["ChannelLayout"].isNull())
|
||||
audioStreamObject.channelLayout = mezzanineInfoNodeAudioStreamListAudioStream["ChannelLayout"].asString();
|
||||
if(!mezzanineInfoNodeAudioStreamListAudioStream["Lang"].isNull())
|
||||
audioStreamObject.lang = mezzanineInfoNodeAudioStreamListAudioStream["Lang"].asString();
|
||||
if(!mezzanineInfoNodeAudioStreamListAudioStream["CodecLongName"].isNull())
|
||||
audioStreamObject.codecLongName = mezzanineInfoNodeAudioStreamListAudioStream["CodecLongName"].asString();
|
||||
if(!mezzanineInfoNodeAudioStreamListAudioStream["Channels"].isNull())
|
||||
audioStreamObject.channels = mezzanineInfoNodeAudioStreamListAudioStream["Channels"].asString();
|
||||
if(!mezzanineInfoNodeAudioStreamListAudioStream["NumFrames"].isNull())
|
||||
audioStreamObject.numFrames = mezzanineInfoNodeAudioStreamListAudioStream["NumFrames"].asString();
|
||||
if(!mezzanineInfoNodeAudioStreamListAudioStream["Bitrate"].isNull())
|
||||
audioStreamObject.bitrate = mezzanineInfoNodeAudioStreamListAudioStream["Bitrate"].asString();
|
||||
if(!mezzanineInfoNodeAudioStreamListAudioStream["CodecTagString"].isNull())
|
||||
audioStreamObject.codecTagString = mezzanineInfoNodeAudioStreamListAudioStream["CodecTagString"].asString();
|
||||
if(!mezzanineInfoNodeAudioStreamListAudioStream["StartTime"].isNull())
|
||||
audioStreamObject.startTime = mezzanineInfoNodeAudioStreamListAudioStream["StartTime"].asString();
|
||||
if(!mezzanineInfoNodeAudioStreamListAudioStream["CodecName"].isNull())
|
||||
audioStreamObject.codecName = mezzanineInfoNodeAudioStreamListAudioStream["CodecName"].asString();
|
||||
if(!mezzanineInfoNodeAudioStreamListAudioStream["Duration"].isNull())
|
||||
audioStreamObject.duration = mezzanineInfoNodeAudioStreamListAudioStream["Duration"].asString();
|
||||
if(!mezzanineInfoNodeAudioStreamListAudioStream["CodecTag"].isNull())
|
||||
audioStreamObject.codecTag = mezzanineInfoNodeAudioStreamListAudioStream["CodecTag"].asString();
|
||||
if(!mezzanineInfoNodeAudioStreamListAudioStream["CodecTimeBase"].isNull())
|
||||
audioStreamObject.codecTimeBase = mezzanineInfoNodeAudioStreamListAudioStream["CodecTimeBase"].asString();
|
||||
mediaInfosObject.mezzanineInfo.audioStreamList.push_back(audioStreamObject);
|
||||
}
|
||||
auto allVideoStreamListNode = mezzanineInfoNode["VideoStreamList"]["VideoStream"];
|
||||
for (auto mezzanineInfoNodeVideoStreamListVideoStream : allVideoStreamListNode)
|
||||
{
|
||||
MediaBasicInfo::MezzanineInfo::VideoStream videoStreamObject;
|
||||
if(!mezzanineInfoNodeVideoStreamListVideoStream["Timebase"].isNull())
|
||||
videoStreamObject.timebase = mezzanineInfoNodeVideoStreamListVideoStream["Timebase"].asString();
|
||||
if(!mezzanineInfoNodeVideoStreamListVideoStream["Index"].isNull())
|
||||
videoStreamObject.index = mezzanineInfoNodeVideoStreamListVideoStream["Index"].asString();
|
||||
if(!mezzanineInfoNodeVideoStreamListVideoStream["AvgFPS"].isNull())
|
||||
videoStreamObject.avgFPS = mezzanineInfoNodeVideoStreamListVideoStream["AvgFPS"].asString();
|
||||
if(!mezzanineInfoNodeVideoStreamListVideoStream["PixFmt"].isNull())
|
||||
videoStreamObject.pixFmt = mezzanineInfoNodeVideoStreamListVideoStream["PixFmt"].asString();
|
||||
if(!mezzanineInfoNodeVideoStreamListVideoStream["Lang"].isNull())
|
||||
videoStreamObject.lang = mezzanineInfoNodeVideoStreamListVideoStream["Lang"].asString();
|
||||
if(!mezzanineInfoNodeVideoStreamListVideoStream["Sar"].isNull())
|
||||
videoStreamObject.sar = mezzanineInfoNodeVideoStreamListVideoStream["Sar"].asString();
|
||||
if(!mezzanineInfoNodeVideoStreamListVideoStream["Height"].isNull())
|
||||
videoStreamObject.height = mezzanineInfoNodeVideoStreamListVideoStream["Height"].asString();
|
||||
if(!mezzanineInfoNodeVideoStreamListVideoStream["CodecLongName"].isNull())
|
||||
videoStreamObject.codecLongName = mezzanineInfoNodeVideoStreamListVideoStream["CodecLongName"].asString();
|
||||
if(!mezzanineInfoNodeVideoStreamListVideoStream["NumFrames"].isNull())
|
||||
videoStreamObject.numFrames = mezzanineInfoNodeVideoStreamListVideoStream["NumFrames"].asString();
|
||||
if(!mezzanineInfoNodeVideoStreamListVideoStream["Bitrate"].isNull())
|
||||
videoStreamObject.bitrate = mezzanineInfoNodeVideoStreamListVideoStream["Bitrate"].asString();
|
||||
if(!mezzanineInfoNodeVideoStreamListVideoStream["Rotate"].isNull())
|
||||
videoStreamObject.rotate = mezzanineInfoNodeVideoStreamListVideoStream["Rotate"].asString();
|
||||
if(!mezzanineInfoNodeVideoStreamListVideoStream["CodecTagString"].isNull())
|
||||
videoStreamObject.codecTagString = mezzanineInfoNodeVideoStreamListVideoStream["CodecTagString"].asString();
|
||||
if(!mezzanineInfoNodeVideoStreamListVideoStream["HasBFrames"].isNull())
|
||||
videoStreamObject.hasBFrames = mezzanineInfoNodeVideoStreamListVideoStream["HasBFrames"].asString();
|
||||
if(!mezzanineInfoNodeVideoStreamListVideoStream["Profile"].isNull())
|
||||
videoStreamObject.profile = mezzanineInfoNodeVideoStreamListVideoStream["Profile"].asString();
|
||||
if(!mezzanineInfoNodeVideoStreamListVideoStream["StartTime"].isNull())
|
||||
videoStreamObject.startTime = mezzanineInfoNodeVideoStreamListVideoStream["StartTime"].asString();
|
||||
if(!mezzanineInfoNodeVideoStreamListVideoStream["Dar"].isNull())
|
||||
videoStreamObject.dar = mezzanineInfoNodeVideoStreamListVideoStream["Dar"].asString();
|
||||
if(!mezzanineInfoNodeVideoStreamListVideoStream["CodecName"].isNull())
|
||||
videoStreamObject.codecName = mezzanineInfoNodeVideoStreamListVideoStream["CodecName"].asString();
|
||||
if(!mezzanineInfoNodeVideoStreamListVideoStream["Width"].isNull())
|
||||
videoStreamObject.width = mezzanineInfoNodeVideoStreamListVideoStream["Width"].asString();
|
||||
if(!mezzanineInfoNodeVideoStreamListVideoStream["Duration"].isNull())
|
||||
videoStreamObject.duration = mezzanineInfoNodeVideoStreamListVideoStream["Duration"].asString();
|
||||
if(!mezzanineInfoNodeVideoStreamListVideoStream["Fps"].isNull())
|
||||
videoStreamObject.fps = mezzanineInfoNodeVideoStreamListVideoStream["Fps"].asString();
|
||||
if(!mezzanineInfoNodeVideoStreamListVideoStream["CodecTag"].isNull())
|
||||
videoStreamObject.codecTag = mezzanineInfoNodeVideoStreamListVideoStream["CodecTag"].asString();
|
||||
if(!mezzanineInfoNodeVideoStreamListVideoStream["CodecTimeBase"].isNull())
|
||||
videoStreamObject.codecTimeBase = mezzanineInfoNodeVideoStreamListVideoStream["CodecTimeBase"].asString();
|
||||
if(!mezzanineInfoNodeVideoStreamListVideoStream["Level"].isNull())
|
||||
videoStreamObject.level = mezzanineInfoNodeVideoStreamListVideoStream["Level"].asString();
|
||||
if(!mezzanineInfoNodeVideoStreamListVideoStream["HDRType"].isNull())
|
||||
videoStreamObject.hDRType = mezzanineInfoNodeVideoStreamListVideoStream["HDRType"].asString();
|
||||
mediaInfosObject.mezzanineInfo.videoStreamList.push_back(videoStreamObject);
|
||||
}
|
||||
mediaInfos_.push_back(mediaInfosObject);
|
||||
}
|
||||
auto allNonExistMediaIds = value["NonExistMediaIds"]["MediaId"];
|
||||
for (const auto &item : allNonExistMediaIds)
|
||||
nonExistMediaIds_.push_back(item.asString());
|
||||
auto allForbiddenMediaIds = value["ForbiddenMediaIds"]["MediaId"];
|
||||
for (const auto &item : allForbiddenMediaIds)
|
||||
forbiddenMediaIds_.push_back(item.asString());
|
||||
|
||||
}
|
||||
|
||||
std::vector<std::string> BatchGetMediaInfosResult::getNonExistMediaIds()const
|
||||
{
|
||||
return nonExistMediaIds_;
|
||||
}
|
||||
|
||||
std::vector<BatchGetMediaInfosResult::MediaBasicInfo> BatchGetMediaInfosResult::getMediaInfos()const
|
||||
{
|
||||
return mediaInfos_;
|
||||
}
|
||||
|
||||
std::vector<std::string> BatchGetMediaInfosResult::getForbiddenMediaIds()const
|
||||
{
|
||||
return forbiddenMediaIds_;
|
||||
}
|
||||
|
||||
63
vod/src/model/DescribeMediaDistributionRequest.cc
Normal file
63
vod/src/model/DescribeMediaDistributionRequest.cc
Normal file
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/vod/model/DescribeMediaDistributionRequest.h>
|
||||
|
||||
using AlibabaCloud::Vod::Model::DescribeMediaDistributionRequest;
|
||||
|
||||
DescribeMediaDistributionRequest::DescribeMediaDistributionRequest()
|
||||
: RpcServiceRequest("vod", "2017-03-21", "DescribeMediaDistribution") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
DescribeMediaDistributionRequest::~DescribeMediaDistributionRequest() {}
|
||||
|
||||
std::string DescribeMediaDistributionRequest::getEndTime() const {
|
||||
return endTime_;
|
||||
}
|
||||
|
||||
void DescribeMediaDistributionRequest::setEndTime(const std::string &endTime) {
|
||||
endTime_ = endTime;
|
||||
setParameter(std::string("EndTime"), endTime);
|
||||
}
|
||||
|
||||
std::string DescribeMediaDistributionRequest::getStartTime() const {
|
||||
return startTime_;
|
||||
}
|
||||
|
||||
void DescribeMediaDistributionRequest::setStartTime(const std::string &startTime) {
|
||||
startTime_ = startTime;
|
||||
setParameter(std::string("StartTime"), startTime);
|
||||
}
|
||||
|
||||
std::string DescribeMediaDistributionRequest::getStorageClass() const {
|
||||
return storageClass_;
|
||||
}
|
||||
|
||||
void DescribeMediaDistributionRequest::setStorageClass(const std::string &storageClass) {
|
||||
storageClass_ = storageClass;
|
||||
setParameter(std::string("StorageClass"), storageClass);
|
||||
}
|
||||
|
||||
std::string DescribeMediaDistributionRequest::getInterval() const {
|
||||
return interval_;
|
||||
}
|
||||
|
||||
void DescribeMediaDistributionRequest::setInterval(const std::string &interval) {
|
||||
interval_ = interval;
|
||||
setParameter(std::string("Interval"), interval);
|
||||
}
|
||||
|
||||
68
vod/src/model/DescribeMediaDistributionResult.cc
Normal file
68
vod/src/model/DescribeMediaDistributionResult.cc
Normal file
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/vod/model/DescribeMediaDistributionResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Vod;
|
||||
using namespace AlibabaCloud::Vod::Model;
|
||||
|
||||
DescribeMediaDistributionResult::DescribeMediaDistributionResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribeMediaDistributionResult::DescribeMediaDistributionResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribeMediaDistributionResult::~DescribeMediaDistributionResult()
|
||||
{}
|
||||
|
||||
void DescribeMediaDistributionResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allMediaDistributionListNode = value["MediaDistributionList"]["MediaDistribution"];
|
||||
for (auto valueMediaDistributionListMediaDistribution : allMediaDistributionListNode)
|
||||
{
|
||||
MediaDistribution mediaDistributionListObject;
|
||||
if(!valueMediaDistributionListMediaDistribution["StartTime"].isNull())
|
||||
mediaDistributionListObject.startTime = valueMediaDistributionListMediaDistribution["StartTime"].asString();
|
||||
if(!valueMediaDistributionListMediaDistribution["EndTime"].isNull())
|
||||
mediaDistributionListObject.endTime = valueMediaDistributionListMediaDistribution["EndTime"].asString();
|
||||
if(!valueMediaDistributionListMediaDistribution["Count"].isNull())
|
||||
mediaDistributionListObject.count = std::stol(valueMediaDistributionListMediaDistribution["Count"].asString());
|
||||
mediaDistributionList_.push_back(mediaDistributionListObject);
|
||||
}
|
||||
if(!value["Total"].isNull())
|
||||
total_ = std::stol(value["Total"].asString());
|
||||
|
||||
}
|
||||
|
||||
long DescribeMediaDistributionResult::getTotal()const
|
||||
{
|
||||
return total_;
|
||||
}
|
||||
|
||||
std::vector<DescribeMediaDistributionResult::MediaDistribution> DescribeMediaDistributionResult::getMediaDistributionList()const
|
||||
{
|
||||
return mediaDistributionList_;
|
||||
}
|
||||
|
||||
@@ -99,6 +99,8 @@ void GetPlayInfoResult::parse(const std::string &payload)
|
||||
playInfoListObject.jobType = std::stoi(valuePlayInfoListPlayInfo["JobType"].asString());
|
||||
if(!valuePlayInfoListPlayInfo["JobExt"].isNull())
|
||||
playInfoListObject.jobExt = valuePlayInfoListPlayInfo["JobExt"].asString();
|
||||
if(!valuePlayInfoListPlayInfo["CodecName"].isNull())
|
||||
playInfoListObject.codecName = valuePlayInfoListPlayInfo["CodecName"].asString();
|
||||
playInfoList_.push_back(playInfoListObject);
|
||||
}
|
||||
auto videoBaseNode = value["VideoBase"];
|
||||
|
||||
@@ -79,3 +79,12 @@ void UploadStreamByURLRequest::setMediaId(const std::string &mediaId) {
|
||||
setParameter(std::string("MediaId"), mediaId);
|
||||
}
|
||||
|
||||
std::string UploadStreamByURLRequest::getUploadMetadata() const {
|
||||
return uploadMetadata_;
|
||||
}
|
||||
|
||||
void UploadStreamByURLRequest::setUploadMetadata(const std::string &uploadMetadata) {
|
||||
uploadMetadata_ = uploadMetadata;
|
||||
setParameter(std::string("UploadMetadata"), uploadMetadata);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user