diff --git a/VERSION b/VERSION index 3cb9cbf49..5aa50598f 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.2030 \ No newline at end of file +1.36.2031 \ No newline at end of file diff --git a/vod/CMakeLists.txt b/vod/CMakeLists.txt index 93e2132e5..ba48fbb7e 100644 --- a/vod/CMakeLists.txt +++ b/vod/CMakeLists.txt @@ -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 diff --git a/vod/include/alibabacloud/vod/VodClient.h b/vod/include/alibabacloud/vod/VodClient.h index ee9163d8d..2b6cc1065 100644 --- a/vod/include/alibabacloud/vod/VodClient.h +++ b/vod/include/alibabacloud/vod/VodClient.h @@ -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 AttachAppPolicyToIdentityOutcome; typedef std::future AttachAppPolicyToIdentityOutcomeCallable; typedef std::function&)> AttachAppPolicyToIdentityAsyncHandler; + typedef Outcome BatchGetMediaInfosOutcome; + typedef std::future BatchGetMediaInfosOutcomeCallable; + typedef std::function&)> BatchGetMediaInfosAsyncHandler; typedef Outcome BatchSetVodDomainConfigsOutcome; typedef std::future BatchSetVodDomainConfigsOutcomeCallable; typedef std::function&)> BatchSetVodDomainConfigsAsyncHandler; @@ -503,6 +510,9 @@ namespace AlibabaCloud typedef Outcome DeleteWatermarkOutcome; typedef std::future DeleteWatermarkOutcomeCallable; typedef std::function&)> DeleteWatermarkAsyncHandler; + typedef Outcome DescribeMediaDistributionOutcome; + typedef std::future DescribeMediaDistributionOutcomeCallable; + typedef std::function&)> DescribeMediaDistributionAsyncHandler; typedef Outcome DescribePlayTopVideosOutcome; typedef std::future DescribePlayTopVideosOutcomeCallable; typedef std::function&)> 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& 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& 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& 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& 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& 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& context = nullptr) const; DescribePlayTopVideosOutcomeCallable describePlayTopVideosCallable(const Model::DescribePlayTopVideosRequest& request) const; diff --git a/vod/include/alibabacloud/vod/model/BatchGetMediaInfosRequest.h b/vod/include/alibabacloud/vod/model/BatchGetMediaInfosRequest.h new file mode 100644 index 000000000..2591689b5 --- /dev/null +++ b/vod/include/alibabacloud/vod/model/BatchGetMediaInfosRequest.h @@ -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 +#include +#include +#include +#include + +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_ diff --git a/vod/include/alibabacloud/vod/model/BatchGetMediaInfosResult.h b/vod/include/alibabacloud/vod/model/BatchGetMediaInfosResult.h new file mode 100644 index 000000000..6f29100b4 --- /dev/null +++ b/vod/include/alibabacloud/vod/model/BatchGetMediaInfosResult.h @@ -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 +#include +#include +#include +#include + +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 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 videoStreamList; + std::string duration; + std::vector 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 getNonExistMediaIds()const; + std::vector getMediaInfos()const; + std::vector getForbiddenMediaIds()const; + + protected: + void parse(const std::string &payload); + private: + std::vector nonExistMediaIds_; + std::vector mediaInfos_; + std::vector forbiddenMediaIds_; + + }; + } + } +} +#endif // !ALIBABACLOUD_VOD_MODEL_BATCHGETMEDIAINFOSRESULT_H_ \ No newline at end of file diff --git a/vod/include/alibabacloud/vod/model/DescribeMediaDistributionRequest.h b/vod/include/alibabacloud/vod/model/DescribeMediaDistributionRequest.h new file mode 100644 index 000000000..5913fb3b7 --- /dev/null +++ b/vod/include/alibabacloud/vod/model/DescribeMediaDistributionRequest.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 +#include +#include +#include +#include + +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_ diff --git a/vod/include/alibabacloud/vod/model/DescribeMediaDistributionResult.h b/vod/include/alibabacloud/vod/model/DescribeMediaDistributionResult.h new file mode 100644 index 000000000..b535fa506 --- /dev/null +++ b/vod/include/alibabacloud/vod/model/DescribeMediaDistributionResult.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 +#include +#include +#include +#include + +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 getMediaDistributionList()const; + + protected: + void parse(const std::string &payload); + private: + long total_; + std::vector mediaDistributionList_; + + }; + } + } +} +#endif // !ALIBABACLOUD_VOD_MODEL_DESCRIBEMEDIADISTRIBUTIONRESULT_H_ \ No newline at end of file diff --git a/vod/include/alibabacloud/vod/model/GetPlayInfoResult.h b/vod/include/alibabacloud/vod/model/GetPlayInfoResult.h index 79e9f39f4..f6e8ee6d0 100644 --- a/vod/include/alibabacloud/vod/model/GetPlayInfoResult.h +++ b/vod/include/alibabacloud/vod/model/GetPlayInfoResult.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; diff --git a/vod/include/alibabacloud/vod/model/UploadStreamByURLRequest.h b/vod/include/alibabacloud/vod/model/UploadStreamByURLRequest.h index f0c659ed4..1ede4749e 100644 --- a/vod/include/alibabacloud/vod/model/UploadStreamByURLRequest.h +++ b/vod/include/alibabacloud/vod/model/UploadStreamByURLRequest.h @@ -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 diff --git a/vod/src/VodClient.cc b/vod/src/VodClient.cc index 9d431b880..4859882eb 100644 --- a/vod/src/VodClient.cc +++ b/vod/src/VodClient.cc @@ -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& 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>( + [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& 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>( + [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(); diff --git a/vod/src/model/BatchGetMediaInfosRequest.cc b/vod/src/model/BatchGetMediaInfosRequest.cc new file mode 100644 index 000000000..125e55bf0 --- /dev/null +++ b/vod/src/model/BatchGetMediaInfosRequest.cc @@ -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 + +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); +} + diff --git a/vod/src/model/BatchGetMediaInfosResult.cc b/vod/src/model/BatchGetMediaInfosResult.cc new file mode 100644 index 000000000..b12b15191 --- /dev/null +++ b/vod/src/model/BatchGetMediaInfosResult.cc @@ -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 +#include + +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 BatchGetMediaInfosResult::getNonExistMediaIds()const +{ + return nonExistMediaIds_; +} + +std::vector BatchGetMediaInfosResult::getMediaInfos()const +{ + return mediaInfos_; +} + +std::vector BatchGetMediaInfosResult::getForbiddenMediaIds()const +{ + return forbiddenMediaIds_; +} + diff --git a/vod/src/model/DescribeMediaDistributionRequest.cc b/vod/src/model/DescribeMediaDistributionRequest.cc new file mode 100644 index 000000000..c5d99685b --- /dev/null +++ b/vod/src/model/DescribeMediaDistributionRequest.cc @@ -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 + +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); +} + diff --git a/vod/src/model/DescribeMediaDistributionResult.cc b/vod/src/model/DescribeMediaDistributionResult.cc new file mode 100644 index 000000000..21097bd2e --- /dev/null +++ b/vod/src/model/DescribeMediaDistributionResult.cc @@ -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 +#include + +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::getMediaDistributionList()const +{ + return mediaDistributionList_; +} + diff --git a/vod/src/model/GetPlayInfoResult.cc b/vod/src/model/GetPlayInfoResult.cc index 930c209fd..506a201f1 100644 --- a/vod/src/model/GetPlayInfoResult.cc +++ b/vod/src/model/GetPlayInfoResult.cc @@ -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"]; diff --git a/vod/src/model/UploadStreamByURLRequest.cc b/vod/src/model/UploadStreamByURLRequest.cc index c8e0bc78e..a4a0426a2 100644 --- a/vod/src/model/UploadStreamByURLRequest.cc +++ b/vod/src/model/UploadStreamByURLRequest.cc @@ -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); +} +