diff --git a/CHANGELOG b/CHANGELOG index b34b2e251..2c98d408d 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +2021-11-16 Version: 1.36.936 +- Add parameter type HDRType. + 2021-11-16 Version: 1.36.935 - Update apm interface parameter. diff --git a/VERSION b/VERSION index df8e0ef61..23b2a99bc 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.935 \ No newline at end of file +1.36.936 \ No newline at end of file diff --git a/vod/CMakeLists.txt b/vod/CMakeLists.txt index 9054530dc..b8e163457 100644 --- a/vod/CMakeLists.txt +++ b/vod/CMakeLists.txt @@ -335,6 +335,8 @@ set(vod_public_header_model include/alibabacloud/vod/model/UpdateEditingProjectResult.h include/alibabacloud/vod/model/UpdateImageInfosRequest.h include/alibabacloud/vod/model/UpdateImageInfosResult.h + include/alibabacloud/vod/model/UpdateStreamInfoRequest.h + include/alibabacloud/vod/model/UpdateStreamInfoResult.h include/alibabacloud/vod/model/UpdateTranscodeTemplateGroupRequest.h include/alibabacloud/vod/model/UpdateTranscodeTemplateGroupResult.h include/alibabacloud/vod/model/UpdateVideoInfoRequest.h @@ -670,6 +672,8 @@ set(vod_src src/model/UpdateEditingProjectResult.cc src/model/UpdateImageInfosRequest.cc src/model/UpdateImageInfosResult.cc + src/model/UpdateStreamInfoRequest.cc + src/model/UpdateStreamInfoResult.cc src/model/UpdateTranscodeTemplateGroupRequest.cc src/model/UpdateTranscodeTemplateGroupResult.cc src/model/UpdateVideoInfoRequest.cc diff --git a/vod/include/alibabacloud/vod/VodClient.h b/vod/include/alibabacloud/vod/VodClient.h index ee5a7a091..61950875c 100644 --- a/vod/include/alibabacloud/vod/VodClient.h +++ b/vod/include/alibabacloud/vod/VodClient.h @@ -336,6 +336,8 @@ #include "model/UpdateEditingProjectResult.h" #include "model/UpdateImageInfosRequest.h" #include "model/UpdateImageInfosResult.h" +#include "model/UpdateStreamInfoRequest.h" +#include "model/UpdateStreamInfoResult.h" #include "model/UpdateTranscodeTemplateGroupRequest.h" #include "model/UpdateTranscodeTemplateGroupResult.h" #include "model/UpdateVideoInfoRequest.h" @@ -834,6 +836,9 @@ namespace AlibabaCloud typedef Outcome UpdateImageInfosOutcome; typedef std::future UpdateImageInfosOutcomeCallable; typedef std::function&)> UpdateImageInfosAsyncHandler; + typedef Outcome UpdateStreamInfoOutcome; + typedef std::future UpdateStreamInfoOutcomeCallable; + typedef std::function&)> UpdateStreamInfoAsyncHandler; typedef Outcome UpdateTranscodeTemplateGroupOutcome; typedef std::future UpdateTranscodeTemplateGroupOutcomeCallable; typedef std::function&)> UpdateTranscodeTemplateGroupAsyncHandler; @@ -1337,6 +1342,9 @@ namespace AlibabaCloud UpdateImageInfosOutcome updateImageInfos(const Model::UpdateImageInfosRequest &request)const; void updateImageInfosAsync(const Model::UpdateImageInfosRequest& request, const UpdateImageInfosAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; UpdateImageInfosOutcomeCallable updateImageInfosCallable(const Model::UpdateImageInfosRequest& request) const; + UpdateStreamInfoOutcome updateStreamInfo(const Model::UpdateStreamInfoRequest &request)const; + void updateStreamInfoAsync(const Model::UpdateStreamInfoRequest& request, const UpdateStreamInfoAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + UpdateStreamInfoOutcomeCallable updateStreamInfoCallable(const Model::UpdateStreamInfoRequest& request) const; UpdateTranscodeTemplateGroupOutcome updateTranscodeTemplateGroup(const Model::UpdateTranscodeTemplateGroupRequest &request)const; void updateTranscodeTemplateGroupAsync(const Model::UpdateTranscodeTemplateGroupRequest& request, const UpdateTranscodeTemplateGroupAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; UpdateTranscodeTemplateGroupOutcomeCallable updateTranscodeTemplateGroupCallable(const Model::UpdateTranscodeTemplateGroupRequest& request) const; diff --git a/vod/include/alibabacloud/vod/model/GetMezzanineInfoResult.h b/vod/include/alibabacloud/vod/model/GetMezzanineInfoResult.h index 786a4d5ff..11bc0ebc1 100644 --- a/vod/include/alibabacloud/vod/model/GetMezzanineInfoResult.h +++ b/vod/include/alibabacloud/vod/model/GetMezzanineInfoResult.h @@ -41,11 +41,11 @@ namespace AlibabaCloud std::string channelLayout; std::string startTime; std::string index; - std::string duration; std::string lang; + std::string duration; std::string sampleFmt; - std::string codecName; std::string bitrate; + std::string codecName; std::string channels; std::string timebase; std::string codecTagString; @@ -59,16 +59,17 @@ namespace AlibabaCloud std::string codecTimeBase; std::string rotate; std::string sar; - std::string fps; + std::string hDRType; std::string startTime; + std::string fps; std::string index; - std::string duration; std::string lang; + std::string duration; std::string pixFmt; - std::string codecName; std::string bitrate; - std::string profile; + std::string codecName; std::string avgFPS; + std::string profile; std::string timebase; std::string codecTagString; std::string hasBFrames; @@ -76,8 +77,8 @@ namespace AlibabaCloud std::string codecLongName; std::string height; std::string level; - std::string width; std::string numFrames; + std::string width; }; std::string status; std::string videoId; diff --git a/vod/include/alibabacloud/vod/model/GetPlayInfoResult.h b/vod/include/alibabacloud/vod/model/GetPlayInfoResult.h index 72f889295..e54ed2760 100644 --- a/vod/include/alibabacloud/vod/model/GetPlayInfoResult.h +++ b/vod/include/alibabacloud/vod/model/GetPlayInfoResult.h @@ -55,23 +55,24 @@ namespace AlibabaCloud std::string status; std::string streamType; std::string rand; + std::string hDRType; long size; std::string watermarkId; std::string definition; std::string fps; - std::string duration; - std::string modificationTime; std::string specification; + std::string modificationTime; + std::string duration; std::string bitrate; long encrypt; std::string preprocessStatus; std::string complexity; std::string format; std::string encryptType; - std::string playURL; std::string narrowBandType; - std::string plaintext; + std::string playURL; std::string creationTime; + std::string plaintext; long height; long width; std::string jobId; diff --git a/vod/include/alibabacloud/vod/model/UpdateStreamInfoRequest.h b/vod/include/alibabacloud/vod/model/UpdateStreamInfoRequest.h new file mode 100644 index 000000000..ad7aed502 --- /dev/null +++ b/vod/include/alibabacloud/vod/model/UpdateStreamInfoRequest.h @@ -0,0 +1,57 @@ +/* + * 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_UPDATESTREAMINFOREQUEST_H_ +#define ALIBABACLOUD_VOD_MODEL_UPDATESTREAMINFOREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Vod + { + namespace Model + { + class ALIBABACLOUD_VOD_EXPORT UpdateStreamInfoRequest : public RpcServiceRequest + { + + public: + UpdateStreamInfoRequest(); + ~UpdateStreamInfoRequest(); + + std::string getJobId()const; + void setJobId(const std::string& jobId); + std::string getHDRType()const; + void setHDRType(const std::string& hDRType); + std::string getDefinition()const; + void setDefinition(const std::string& definition); + std::string getMediaId()const; + void setMediaId(const std::string& mediaId); + + private: + std::string jobId_; + std::string hDRType_; + std::string definition_; + std::string mediaId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_VOD_MODEL_UPDATESTREAMINFOREQUEST_H_ \ No newline at end of file diff --git a/vod/include/alibabacloud/vod/model/UpdateStreamInfoResult.h b/vod/include/alibabacloud/vod/model/UpdateStreamInfoResult.h new file mode 100644 index 000000000..c7f3ed90c --- /dev/null +++ b/vod/include/alibabacloud/vod/model/UpdateStreamInfoResult.h @@ -0,0 +1,49 @@ +/* + * 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_UPDATESTREAMINFORESULT_H_ +#define ALIBABACLOUD_VOD_MODEL_UPDATESTREAMINFORESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Vod + { + namespace Model + { + class ALIBABACLOUD_VOD_EXPORT UpdateStreamInfoResult : public ServiceResult + { + public: + + + UpdateStreamInfoResult(); + explicit UpdateStreamInfoResult(const std::string &payload); + ~UpdateStreamInfoResult(); + + protected: + void parse(const std::string &payload); + private: + + }; + } + } +} +#endif // !ALIBABACLOUD_VOD_MODEL_UPDATESTREAMINFORESULT_H_ \ No newline at end of file diff --git a/vod/include/alibabacloud/vod/model/UploadStreamByURLRequest.h b/vod/include/alibabacloud/vod/model/UploadStreamByURLRequest.h index 7dea6626d..6d8c9806c 100644 --- a/vod/include/alibabacloud/vod/model/UploadStreamByURLRequest.h +++ b/vod/include/alibabacloud/vod/model/UploadStreamByURLRequest.h @@ -37,21 +37,24 @@ namespace AlibabaCloud std::string getFileExtension()const; void setFileExtension(const std::string& fileExtension); - std::string getMediaId()const; - void setMediaId(const std::string& mediaId); std::string getUserData()const; void setUserData(const std::string& userData); + std::string getHDRType()const; + void setHDRType(const std::string& hDRType); std::string getDefinition()const; void setDefinition(const std::string& definition); std::string getStreamURL()const; void setStreamURL(const std::string& streamURL); + std::string getMediaId()const; + void setMediaId(const std::string& mediaId); private: std::string fileExtension_; - std::string mediaId_; std::string userData_; + std::string hDRType_; std::string definition_; std::string streamURL_; + std::string mediaId_; }; } diff --git a/vod/src/VodClient.cc b/vod/src/VodClient.cc index 6d24af486..f568e4df2 100644 --- a/vod/src/VodClient.cc +++ b/vod/src/VodClient.cc @@ -31,21 +31,21 @@ VodClient::VodClient(const Credentials &credentials, const ClientConfiguration & RpcServiceClient(SERVICE_NAME, std::make_shared(credentials), configuration) { auto locationClient = std::make_shared(credentials, configuration); - endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, ""); + endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, "vod"); } VodClient::VodClient(const std::shared_ptr& credentialsProvider, const ClientConfiguration & configuration) : RpcServiceClient(SERVICE_NAME, credentialsProvider, configuration) { auto locationClient = std::make_shared(credentialsProvider, configuration); - endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, ""); + endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, "vod"); } VodClient::VodClient(const std::string & accessKeyId, const std::string & accessKeySecret, const ClientConfiguration & configuration) : RpcServiceClient(SERVICE_NAME, std::make_shared(accessKeyId, accessKeySecret), configuration) { auto locationClient = std::make_shared(accessKeyId, accessKeySecret, configuration); - endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, ""); + endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, "vod"); } VodClient::~VodClient() @@ -5703,6 +5703,42 @@ VodClient::UpdateImageInfosOutcomeCallable VodClient::updateImageInfosCallable(c return task->get_future(); } +VodClient::UpdateStreamInfoOutcome VodClient::updateStreamInfo(const UpdateStreamInfoRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return UpdateStreamInfoOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return UpdateStreamInfoOutcome(UpdateStreamInfoResult(outcome.result())); + else + return UpdateStreamInfoOutcome(outcome.error()); +} + +void VodClient::updateStreamInfoAsync(const UpdateStreamInfoRequest& request, const UpdateStreamInfoAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, updateStreamInfo(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +VodClient::UpdateStreamInfoOutcomeCallable VodClient::updateStreamInfoCallable(const UpdateStreamInfoRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->updateStreamInfo(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + VodClient::UpdateTranscodeTemplateGroupOutcome VodClient::updateTranscodeTemplateGroup(const UpdateTranscodeTemplateGroupRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); diff --git a/vod/src/model/GetMezzanineInfoResult.cc b/vod/src/model/GetMezzanineInfoResult.cc index 22e9967ec..f3e021d6a 100644 --- a/vod/src/model/GetMezzanineInfoResult.cc +++ b/vod/src/model/GetMezzanineInfoResult.cc @@ -40,122 +40,124 @@ void GetMezzanineInfoResult::parse(const std::string &payload) reader.parse(payload, value); setRequestId(value["RequestId"].asString()); auto mezzanineNode = value["Mezzanine"]; - if(!mezzanineNode["VideoId"].isNull()) - mezzanine_.videoId = mezzanineNode["VideoId"].asString(); - if(!mezzanineNode["Bitrate"].isNull()) - mezzanine_.bitrate = mezzanineNode["Bitrate"].asString(); if(!mezzanineNode["CreationTime"].isNull()) mezzanine_.creationTime = mezzanineNode["CreationTime"].asString(); - if(!mezzanineNode["Duration"].isNull()) - mezzanine_.duration = mezzanineNode["Duration"].asString(); - if(!mezzanineNode["Fps"].isNull()) - mezzanine_.fps = mezzanineNode["Fps"].asString(); - if(!mezzanineNode["Height"].isNull()) - mezzanine_.height = std::stol(mezzanineNode["Height"].asString()); - if(!mezzanineNode["Width"].isNull()) - mezzanine_.width = std::stol(mezzanineNode["Width"].asString()); - if(!mezzanineNode["Size"].isNull()) - mezzanine_.size = std::stol(mezzanineNode["Size"].asString()); if(!mezzanineNode["Status"].isNull()) mezzanine_.status = mezzanineNode["Status"].asString(); if(!mezzanineNode["FileURL"].isNull()) mezzanine_.fileURL = mezzanineNode["FileURL"].asString(); + if(!mezzanineNode["VideoId"].isNull()) + mezzanine_.videoId = mezzanineNode["VideoId"].asString(); + if(!mezzanineNode["Height"].isNull()) + mezzanine_.height = std::stol(mezzanineNode["Height"].asString()); + if(!mezzanineNode["Bitrate"].isNull()) + mezzanine_.bitrate = mezzanineNode["Bitrate"].asString(); if(!mezzanineNode["FileName"].isNull()) mezzanine_.fileName = mezzanineNode["FileName"].asString(); - if(!mezzanineNode["CRC64"].isNull()) - mezzanine_.cRC64 = mezzanineNode["CRC64"].asString(); - if(!mezzanineNode["PreprocessStatus"].isNull()) - mezzanine_.preprocessStatus = mezzanineNode["PreprocessStatus"].asString(); if(!mezzanineNode["OutputType"].isNull()) mezzanine_.outputType = mezzanineNode["OutputType"].asString(); + if(!mezzanineNode["PreprocessStatus"].isNull()) + mezzanine_.preprocessStatus = mezzanineNode["PreprocessStatus"].asString(); + if(!mezzanineNode["Width"].isNull()) + mezzanine_.width = std::stol(mezzanineNode["Width"].asString()); + if(!mezzanineNode["Size"].isNull()) + mezzanine_.size = std::stol(mezzanineNode["Size"].asString()); + if(!mezzanineNode["CRC64"].isNull()) + mezzanine_.cRC64 = mezzanineNode["CRC64"].asString(); + if(!mezzanineNode["Duration"].isNull()) + mezzanine_.duration = mezzanineNode["Duration"].asString(); + if(!mezzanineNode["Fps"].isNull()) + mezzanine_.fps = mezzanineNode["Fps"].asString(); auto allAudioStreamListNode = mezzanineNode["AudioStreamList"]["AudioStream"]; for (auto mezzanineNodeAudioStreamListAudioStream : allAudioStreamListNode) { Mezzanine::AudioStream audioStreamObject; if(!mezzanineNodeAudioStreamListAudioStream["Index"].isNull()) audioStreamObject.index = mezzanineNodeAudioStreamListAudioStream["Index"].asString(); - if(!mezzanineNodeAudioStreamListAudioStream["CodecName"].isNull()) - audioStreamObject.codecName = mezzanineNodeAudioStreamListAudioStream["CodecName"].asString(); - if(!mezzanineNodeAudioStreamListAudioStream["CodecLongName"].isNull()) - audioStreamObject.codecLongName = mezzanineNodeAudioStreamListAudioStream["CodecLongName"].asString(); - if(!mezzanineNodeAudioStreamListAudioStream["CodecTimeBase"].isNull()) - audioStreamObject.codecTimeBase = mezzanineNodeAudioStreamListAudioStream["CodecTimeBase"].asString(); - if(!mezzanineNodeAudioStreamListAudioStream["CodecTagString"].isNull()) - audioStreamObject.codecTagString = mezzanineNodeAudioStreamListAudioStream["CodecTagString"].asString(); - if(!mezzanineNodeAudioStreamListAudioStream["CodecTag"].isNull()) - audioStreamObject.codecTag = mezzanineNodeAudioStreamListAudioStream["CodecTag"].asString(); + if(!mezzanineNodeAudioStreamListAudioStream["Timebase"].isNull()) + audioStreamObject.timebase = mezzanineNodeAudioStreamListAudioStream["Timebase"].asString(); if(!mezzanineNodeAudioStreamListAudioStream["SampleFmt"].isNull()) audioStreamObject.sampleFmt = mezzanineNodeAudioStreamListAudioStream["SampleFmt"].asString(); if(!mezzanineNodeAudioStreamListAudioStream["SampleRate"].isNull()) audioStreamObject.sampleRate = mezzanineNodeAudioStreamListAudioStream["SampleRate"].asString(); - if(!mezzanineNodeAudioStreamListAudioStream["Channels"].isNull()) - audioStreamObject.channels = mezzanineNodeAudioStreamListAudioStream["Channels"].asString(); if(!mezzanineNodeAudioStreamListAudioStream["ChannelLayout"].isNull()) audioStreamObject.channelLayout = mezzanineNodeAudioStreamListAudioStream["ChannelLayout"].asString(); - if(!mezzanineNodeAudioStreamListAudioStream["Timebase"].isNull()) - audioStreamObject.timebase = mezzanineNodeAudioStreamListAudioStream["Timebase"].asString(); - if(!mezzanineNodeAudioStreamListAudioStream["StartTime"].isNull()) - audioStreamObject.startTime = mezzanineNodeAudioStreamListAudioStream["StartTime"].asString(); - if(!mezzanineNodeAudioStreamListAudioStream["Duration"].isNull()) - audioStreamObject.duration = mezzanineNodeAudioStreamListAudioStream["Duration"].asString(); - if(!mezzanineNodeAudioStreamListAudioStream["Bitrate"].isNull()) - audioStreamObject.bitrate = mezzanineNodeAudioStreamListAudioStream["Bitrate"].asString(); - if(!mezzanineNodeAudioStreamListAudioStream["NumFrames"].isNull()) - audioStreamObject.numFrames = mezzanineNodeAudioStreamListAudioStream["NumFrames"].asString(); if(!mezzanineNodeAudioStreamListAudioStream["Lang"].isNull()) audioStreamObject.lang = mezzanineNodeAudioStreamListAudioStream["Lang"].asString(); + if(!mezzanineNodeAudioStreamListAudioStream["CodecLongName"].isNull()) + audioStreamObject.codecLongName = mezzanineNodeAudioStreamListAudioStream["CodecLongName"].asString(); + if(!mezzanineNodeAudioStreamListAudioStream["Channels"].isNull()) + audioStreamObject.channels = mezzanineNodeAudioStreamListAudioStream["Channels"].asString(); + if(!mezzanineNodeAudioStreamListAudioStream["NumFrames"].isNull()) + audioStreamObject.numFrames = mezzanineNodeAudioStreamListAudioStream["NumFrames"].asString(); + if(!mezzanineNodeAudioStreamListAudioStream["Bitrate"].isNull()) + audioStreamObject.bitrate = mezzanineNodeAudioStreamListAudioStream["Bitrate"].asString(); + if(!mezzanineNodeAudioStreamListAudioStream["CodecTagString"].isNull()) + audioStreamObject.codecTagString = mezzanineNodeAudioStreamListAudioStream["CodecTagString"].asString(); + if(!mezzanineNodeAudioStreamListAudioStream["StartTime"].isNull()) + audioStreamObject.startTime = mezzanineNodeAudioStreamListAudioStream["StartTime"].asString(); + if(!mezzanineNodeAudioStreamListAudioStream["CodecName"].isNull()) + audioStreamObject.codecName = mezzanineNodeAudioStreamListAudioStream["CodecName"].asString(); + if(!mezzanineNodeAudioStreamListAudioStream["Duration"].isNull()) + audioStreamObject.duration = mezzanineNodeAudioStreamListAudioStream["Duration"].asString(); + if(!mezzanineNodeAudioStreamListAudioStream["CodecTag"].isNull()) + audioStreamObject.codecTag = mezzanineNodeAudioStreamListAudioStream["CodecTag"].asString(); + if(!mezzanineNodeAudioStreamListAudioStream["CodecTimeBase"].isNull()) + audioStreamObject.codecTimeBase = mezzanineNodeAudioStreamListAudioStream["CodecTimeBase"].asString(); mezzanine_.audioStreamList.push_back(audioStreamObject); } auto allVideoStreamListNode = mezzanineNode["VideoStreamList"]["VideoStream"]; for (auto mezzanineNodeVideoStreamListVideoStream : allVideoStreamListNode) { Mezzanine::VideoStream videoStreamObject; - if(!mezzanineNodeVideoStreamListVideoStream["Index"].isNull()) - videoStreamObject.index = mezzanineNodeVideoStreamListVideoStream["Index"].asString(); - if(!mezzanineNodeVideoStreamListVideoStream["CodecName"].isNull()) - videoStreamObject.codecName = mezzanineNodeVideoStreamListVideoStream["CodecName"].asString(); - if(!mezzanineNodeVideoStreamListVideoStream["CodecLongName"].isNull()) - videoStreamObject.codecLongName = mezzanineNodeVideoStreamListVideoStream["CodecLongName"].asString(); - if(!mezzanineNodeVideoStreamListVideoStream["Profile"].isNull()) - videoStreamObject.profile = mezzanineNodeVideoStreamListVideoStream["Profile"].asString(); - if(!mezzanineNodeVideoStreamListVideoStream["CodecTimeBase"].isNull()) - videoStreamObject.codecTimeBase = mezzanineNodeVideoStreamListVideoStream["CodecTimeBase"].asString(); - if(!mezzanineNodeVideoStreamListVideoStream["CodecTagString"].isNull()) - videoStreamObject.codecTagString = mezzanineNodeVideoStreamListVideoStream["CodecTagString"].asString(); - if(!mezzanineNodeVideoStreamListVideoStream["CodecTag"].isNull()) - videoStreamObject.codecTag = mezzanineNodeVideoStreamListVideoStream["CodecTag"].asString(); - if(!mezzanineNodeVideoStreamListVideoStream["Width"].isNull()) - videoStreamObject.width = mezzanineNodeVideoStreamListVideoStream["Width"].asString(); - if(!mezzanineNodeVideoStreamListVideoStream["Height"].isNull()) - videoStreamObject.height = mezzanineNodeVideoStreamListVideoStream["Height"].asString(); - if(!mezzanineNodeVideoStreamListVideoStream["HasBFrames"].isNull()) - videoStreamObject.hasBFrames = mezzanineNodeVideoStreamListVideoStream["HasBFrames"].asString(); - if(!mezzanineNodeVideoStreamListVideoStream["Sar"].isNull()) - videoStreamObject.sar = mezzanineNodeVideoStreamListVideoStream["Sar"].asString(); - if(!mezzanineNodeVideoStreamListVideoStream["Dar"].isNull()) - videoStreamObject.dar = mezzanineNodeVideoStreamListVideoStream["Dar"].asString(); - if(!mezzanineNodeVideoStreamListVideoStream["PixFmt"].isNull()) - videoStreamObject.pixFmt = mezzanineNodeVideoStreamListVideoStream["PixFmt"].asString(); - if(!mezzanineNodeVideoStreamListVideoStream["Level"].isNull()) - videoStreamObject.level = mezzanineNodeVideoStreamListVideoStream["Level"].asString(); - if(!mezzanineNodeVideoStreamListVideoStream["Fps"].isNull()) - videoStreamObject.fps = mezzanineNodeVideoStreamListVideoStream["Fps"].asString(); - if(!mezzanineNodeVideoStreamListVideoStream["AvgFPS"].isNull()) - videoStreamObject.avgFPS = mezzanineNodeVideoStreamListVideoStream["AvgFPS"].asString(); if(!mezzanineNodeVideoStreamListVideoStream["Timebase"].isNull()) videoStreamObject.timebase = mezzanineNodeVideoStreamListVideoStream["Timebase"].asString(); - if(!mezzanineNodeVideoStreamListVideoStream["StartTime"].isNull()) - videoStreamObject.startTime = mezzanineNodeVideoStreamListVideoStream["StartTime"].asString(); - if(!mezzanineNodeVideoStreamListVideoStream["Duration"].isNull()) - videoStreamObject.duration = mezzanineNodeVideoStreamListVideoStream["Duration"].asString(); - if(!mezzanineNodeVideoStreamListVideoStream["NumFrames"].isNull()) - videoStreamObject.numFrames = mezzanineNodeVideoStreamListVideoStream["NumFrames"].asString(); + if(!mezzanineNodeVideoStreamListVideoStream["Index"].isNull()) + videoStreamObject.index = mezzanineNodeVideoStreamListVideoStream["Index"].asString(); + if(!mezzanineNodeVideoStreamListVideoStream["AvgFPS"].isNull()) + videoStreamObject.avgFPS = mezzanineNodeVideoStreamListVideoStream["AvgFPS"].asString(); + if(!mezzanineNodeVideoStreamListVideoStream["PixFmt"].isNull()) + videoStreamObject.pixFmt = mezzanineNodeVideoStreamListVideoStream["PixFmt"].asString(); if(!mezzanineNodeVideoStreamListVideoStream["Lang"].isNull()) videoStreamObject.lang = mezzanineNodeVideoStreamListVideoStream["Lang"].asString(); - if(!mezzanineNodeVideoStreamListVideoStream["Rotate"].isNull()) - videoStreamObject.rotate = mezzanineNodeVideoStreamListVideoStream["Rotate"].asString(); + if(!mezzanineNodeVideoStreamListVideoStream["Sar"].isNull()) + videoStreamObject.sar = mezzanineNodeVideoStreamListVideoStream["Sar"].asString(); + if(!mezzanineNodeVideoStreamListVideoStream["Height"].isNull()) + videoStreamObject.height = mezzanineNodeVideoStreamListVideoStream["Height"].asString(); + if(!mezzanineNodeVideoStreamListVideoStream["CodecLongName"].isNull()) + videoStreamObject.codecLongName = mezzanineNodeVideoStreamListVideoStream["CodecLongName"].asString(); + if(!mezzanineNodeVideoStreamListVideoStream["NumFrames"].isNull()) + videoStreamObject.numFrames = mezzanineNodeVideoStreamListVideoStream["NumFrames"].asString(); if(!mezzanineNodeVideoStreamListVideoStream["Bitrate"].isNull()) videoStreamObject.bitrate = mezzanineNodeVideoStreamListVideoStream["Bitrate"].asString(); + if(!mezzanineNodeVideoStreamListVideoStream["Rotate"].isNull()) + videoStreamObject.rotate = mezzanineNodeVideoStreamListVideoStream["Rotate"].asString(); + if(!mezzanineNodeVideoStreamListVideoStream["CodecTagString"].isNull()) + videoStreamObject.codecTagString = mezzanineNodeVideoStreamListVideoStream["CodecTagString"].asString(); + if(!mezzanineNodeVideoStreamListVideoStream["HasBFrames"].isNull()) + videoStreamObject.hasBFrames = mezzanineNodeVideoStreamListVideoStream["HasBFrames"].asString(); + if(!mezzanineNodeVideoStreamListVideoStream["Profile"].isNull()) + videoStreamObject.profile = mezzanineNodeVideoStreamListVideoStream["Profile"].asString(); + if(!mezzanineNodeVideoStreamListVideoStream["StartTime"].isNull()) + videoStreamObject.startTime = mezzanineNodeVideoStreamListVideoStream["StartTime"].asString(); + if(!mezzanineNodeVideoStreamListVideoStream["Dar"].isNull()) + videoStreamObject.dar = mezzanineNodeVideoStreamListVideoStream["Dar"].asString(); + if(!mezzanineNodeVideoStreamListVideoStream["CodecName"].isNull()) + videoStreamObject.codecName = mezzanineNodeVideoStreamListVideoStream["CodecName"].asString(); + if(!mezzanineNodeVideoStreamListVideoStream["Width"].isNull()) + videoStreamObject.width = mezzanineNodeVideoStreamListVideoStream["Width"].asString(); + if(!mezzanineNodeVideoStreamListVideoStream["Duration"].isNull()) + videoStreamObject.duration = mezzanineNodeVideoStreamListVideoStream["Duration"].asString(); + if(!mezzanineNodeVideoStreamListVideoStream["Fps"].isNull()) + videoStreamObject.fps = mezzanineNodeVideoStreamListVideoStream["Fps"].asString(); + if(!mezzanineNodeVideoStreamListVideoStream["CodecTag"].isNull()) + videoStreamObject.codecTag = mezzanineNodeVideoStreamListVideoStream["CodecTag"].asString(); + if(!mezzanineNodeVideoStreamListVideoStream["CodecTimeBase"].isNull()) + videoStreamObject.codecTimeBase = mezzanineNodeVideoStreamListVideoStream["CodecTimeBase"].asString(); + if(!mezzanineNodeVideoStreamListVideoStream["Level"].isNull()) + videoStreamObject.level = mezzanineNodeVideoStreamListVideoStream["Level"].asString(); + if(!mezzanineNodeVideoStreamListVideoStream["HDRType"].isNull()) + videoStreamObject.hDRType = mezzanineNodeVideoStreamListVideoStream["HDRType"].asString(); mezzanine_.videoStreamList.push_back(videoStreamObject); } diff --git a/vod/src/model/GetPlayInfoResult.cc b/vod/src/model/GetPlayInfoResult.cc index 58cb5c37f..bfb2fbf5c 100644 --- a/vod/src/model/GetPlayInfoResult.cc +++ b/vod/src/model/GetPlayInfoResult.cc @@ -43,73 +43,75 @@ void GetPlayInfoResult::parse(const std::string &payload) for (auto valuePlayInfoListPlayInfo : allPlayInfoListNode) { PlayInfo playInfoListObject; - if(!valuePlayInfoListPlayInfo["Width"].isNull()) - playInfoListObject.width = std::stol(valuePlayInfoListPlayInfo["Width"].asString()); - if(!valuePlayInfoListPlayInfo["Height"].isNull()) - playInfoListObject.height = std::stol(valuePlayInfoListPlayInfo["Height"].asString()); - if(!valuePlayInfoListPlayInfo["Size"].isNull()) - playInfoListObject.size = std::stol(valuePlayInfoListPlayInfo["Size"].asString()); - if(!valuePlayInfoListPlayInfo["PlayURL"].isNull()) - playInfoListObject.playURL = valuePlayInfoListPlayInfo["PlayURL"].asString(); - if(!valuePlayInfoListPlayInfo["Bitrate"].isNull()) - playInfoListObject.bitrate = valuePlayInfoListPlayInfo["Bitrate"].asString(); - if(!valuePlayInfoListPlayInfo["Definition"].isNull()) - playInfoListObject.definition = valuePlayInfoListPlayInfo["Definition"].asString(); - if(!valuePlayInfoListPlayInfo["Duration"].isNull()) - playInfoListObject.duration = valuePlayInfoListPlayInfo["Duration"].asString(); - if(!valuePlayInfoListPlayInfo["Format"].isNull()) - playInfoListObject.format = valuePlayInfoListPlayInfo["Format"].asString(); - if(!valuePlayInfoListPlayInfo["Fps"].isNull()) - playInfoListObject.fps = valuePlayInfoListPlayInfo["Fps"].asString(); - if(!valuePlayInfoListPlayInfo["Encrypt"].isNull()) - playInfoListObject.encrypt = std::stol(valuePlayInfoListPlayInfo["Encrypt"].asString()); - if(!valuePlayInfoListPlayInfo["Plaintext"].isNull()) - playInfoListObject.plaintext = valuePlayInfoListPlayInfo["Plaintext"].asString(); - if(!valuePlayInfoListPlayInfo["Complexity"].isNull()) - playInfoListObject.complexity = valuePlayInfoListPlayInfo["Complexity"].asString(); - if(!valuePlayInfoListPlayInfo["StreamType"].isNull()) - playInfoListObject.streamType = valuePlayInfoListPlayInfo["StreamType"].asString(); - if(!valuePlayInfoListPlayInfo["Rand"].isNull()) - playInfoListObject.rand = valuePlayInfoListPlayInfo["Rand"].asString(); - if(!valuePlayInfoListPlayInfo["JobId"].isNull()) - playInfoListObject.jobId = valuePlayInfoListPlayInfo["JobId"].asString(); - if(!valuePlayInfoListPlayInfo["PreprocessStatus"].isNull()) - playInfoListObject.preprocessStatus = valuePlayInfoListPlayInfo["PreprocessStatus"].asString(); - if(!valuePlayInfoListPlayInfo["WatermarkId"].isNull()) - playInfoListObject.watermarkId = valuePlayInfoListPlayInfo["WatermarkId"].asString(); - if(!valuePlayInfoListPlayInfo["Status"].isNull()) - playInfoListObject.status = valuePlayInfoListPlayInfo["Status"].asString(); if(!valuePlayInfoListPlayInfo["CreationTime"].isNull()) playInfoListObject.creationTime = valuePlayInfoListPlayInfo["CreationTime"].asString(); - if(!valuePlayInfoListPlayInfo["ModificationTime"].isNull()) - playInfoListObject.modificationTime = valuePlayInfoListPlayInfo["ModificationTime"].asString(); - if(!valuePlayInfoListPlayInfo["EncryptType"].isNull()) - playInfoListObject.encryptType = valuePlayInfoListPlayInfo["EncryptType"].asString(); - if(!valuePlayInfoListPlayInfo["NarrowBandType"].isNull()) - playInfoListObject.narrowBandType = valuePlayInfoListPlayInfo["NarrowBandType"].asString(); + if(!valuePlayInfoListPlayInfo["Status"].isNull()) + playInfoListObject.status = valuePlayInfoListPlayInfo["Status"].asString(); if(!valuePlayInfoListPlayInfo["Specification"].isNull()) playInfoListObject.specification = valuePlayInfoListPlayInfo["Specification"].asString(); + if(!valuePlayInfoListPlayInfo["Complexity"].isNull()) + playInfoListObject.complexity = valuePlayInfoListPlayInfo["Complexity"].asString(); + if(!valuePlayInfoListPlayInfo["NarrowBandType"].isNull()) + playInfoListObject.narrowBandType = valuePlayInfoListPlayInfo["NarrowBandType"].asString(); + if(!valuePlayInfoListPlayInfo["Height"].isNull()) + playInfoListObject.height = std::stol(valuePlayInfoListPlayInfo["Height"].asString()); + if(!valuePlayInfoListPlayInfo["Bitrate"].isNull()) + playInfoListObject.bitrate = valuePlayInfoListPlayInfo["Bitrate"].asString(); + if(!valuePlayInfoListPlayInfo["ModificationTime"].isNull()) + playInfoListObject.modificationTime = valuePlayInfoListPlayInfo["ModificationTime"].asString(); + if(!valuePlayInfoListPlayInfo["WatermarkId"].isNull()) + playInfoListObject.watermarkId = valuePlayInfoListPlayInfo["WatermarkId"].asString(); + if(!valuePlayInfoListPlayInfo["Encrypt"].isNull()) + playInfoListObject.encrypt = std::stol(valuePlayInfoListPlayInfo["Encrypt"].asString()); + if(!valuePlayInfoListPlayInfo["Definition"].isNull()) + playInfoListObject.definition = valuePlayInfoListPlayInfo["Definition"].asString(); + if(!valuePlayInfoListPlayInfo["Rand"].isNull()) + playInfoListObject.rand = valuePlayInfoListPlayInfo["Rand"].asString(); + if(!valuePlayInfoListPlayInfo["EncryptType"].isNull()) + playInfoListObject.encryptType = valuePlayInfoListPlayInfo["EncryptType"].asString(); + if(!valuePlayInfoListPlayInfo["PreprocessStatus"].isNull()) + playInfoListObject.preprocessStatus = valuePlayInfoListPlayInfo["PreprocessStatus"].asString(); + if(!valuePlayInfoListPlayInfo["StreamType"].isNull()) + playInfoListObject.streamType = valuePlayInfoListPlayInfo["StreamType"].asString(); + if(!valuePlayInfoListPlayInfo["JobId"].isNull()) + playInfoListObject.jobId = valuePlayInfoListPlayInfo["JobId"].asString(); + if(!valuePlayInfoListPlayInfo["Plaintext"].isNull()) + playInfoListObject.plaintext = valuePlayInfoListPlayInfo["Plaintext"].asString(); + if(!valuePlayInfoListPlayInfo["Size"].isNull()) + playInfoListObject.size = std::stol(valuePlayInfoListPlayInfo["Size"].asString()); + if(!valuePlayInfoListPlayInfo["Width"].isNull()) + playInfoListObject.width = std::stol(valuePlayInfoListPlayInfo["Width"].asString()); + if(!valuePlayInfoListPlayInfo["Fps"].isNull()) + playInfoListObject.fps = valuePlayInfoListPlayInfo["Fps"].asString(); + if(!valuePlayInfoListPlayInfo["Duration"].isNull()) + playInfoListObject.duration = valuePlayInfoListPlayInfo["Duration"].asString(); + if(!valuePlayInfoListPlayInfo["PlayURL"].isNull()) + playInfoListObject.playURL = valuePlayInfoListPlayInfo["PlayURL"].asString(); + if(!valuePlayInfoListPlayInfo["Format"].isNull()) + playInfoListObject.format = valuePlayInfoListPlayInfo["Format"].asString(); + if(!valuePlayInfoListPlayInfo["HDRType"].isNull()) + playInfoListObject.hDRType = valuePlayInfoListPlayInfo["HDRType"].asString(); playInfoList_.push_back(playInfoListObject); } auto videoBaseNode = value["VideoBase"]; + if(!videoBaseNode["CreationTime"].isNull()) + videoBase_.creationTime = videoBaseNode["CreationTime"].asString(); + if(!videoBaseNode["Status"].isNull()) + videoBase_.status = videoBaseNode["Status"].asString(); + if(!videoBaseNode["TranscodeMode"].isNull()) + videoBase_.transcodeMode = videoBaseNode["TranscodeMode"].asString(); if(!videoBaseNode["OutputType"].isNull()) videoBase_.outputType = videoBaseNode["OutputType"].asString(); + if(!videoBaseNode["VideoId"].isNull()) + videoBase_.videoId = videoBaseNode["VideoId"].asString(); if(!videoBaseNode["CoverURL"].isNull()) videoBase_.coverURL = videoBaseNode["CoverURL"].asString(); if(!videoBaseNode["Duration"].isNull()) videoBase_.duration = videoBaseNode["Duration"].asString(); - if(!videoBaseNode["Status"].isNull()) - videoBase_.status = videoBaseNode["Status"].asString(); if(!videoBaseNode["Title"].isNull()) videoBase_.title = videoBaseNode["Title"].asString(); - if(!videoBaseNode["VideoId"].isNull()) - videoBase_.videoId = videoBaseNode["VideoId"].asString(); if(!videoBaseNode["MediaType"].isNull()) videoBase_.mediaType = videoBaseNode["MediaType"].asString(); - if(!videoBaseNode["CreationTime"].isNull()) - videoBase_.creationTime = videoBaseNode["CreationTime"].asString(); - if(!videoBaseNode["TranscodeMode"].isNull()) - videoBase_.transcodeMode = videoBaseNode["TranscodeMode"].asString(); if(!videoBaseNode["DanMuURL"].isNull()) videoBase_.danMuURL = videoBaseNode["DanMuURL"].asString(); auto allThumbnailListNode = videoBaseNode["ThumbnailList"]["Thumbnail"]; diff --git a/vod/src/model/UpdateStreamInfoRequest.cc b/vod/src/model/UpdateStreamInfoRequest.cc new file mode 100644 index 000000000..e0bdf3cef --- /dev/null +++ b/vod/src/model/UpdateStreamInfoRequest.cc @@ -0,0 +1,73 @@ +/* + * 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::UpdateStreamInfoRequest; + +UpdateStreamInfoRequest::UpdateStreamInfoRequest() : + RpcServiceRequest("vod", "2017-03-21", "UpdateStreamInfo") +{ + setMethod(HttpRequest::Method::Post); +} + +UpdateStreamInfoRequest::~UpdateStreamInfoRequest() +{} + +std::string UpdateStreamInfoRequest::getJobId()const +{ + return jobId_; +} + +void UpdateStreamInfoRequest::setJobId(const std::string& jobId) +{ + jobId_ = jobId; + setParameter("JobId", jobId); +} + +std::string UpdateStreamInfoRequest::getHDRType()const +{ + return hDRType_; +} + +void UpdateStreamInfoRequest::setHDRType(const std::string& hDRType) +{ + hDRType_ = hDRType; + setParameter("HDRType", hDRType); +} + +std::string UpdateStreamInfoRequest::getDefinition()const +{ + return definition_; +} + +void UpdateStreamInfoRequest::setDefinition(const std::string& definition) +{ + definition_ = definition; + setParameter("Definition", definition); +} + +std::string UpdateStreamInfoRequest::getMediaId()const +{ + return mediaId_; +} + +void UpdateStreamInfoRequest::setMediaId(const std::string& mediaId) +{ + mediaId_ = mediaId; + setParameter("MediaId", mediaId); +} + diff --git a/vod/src/model/UpdateStreamInfoResult.cc b/vod/src/model/UpdateStreamInfoResult.cc new file mode 100644 index 000000000..af8545b12 --- /dev/null +++ b/vod/src/model/UpdateStreamInfoResult.cc @@ -0,0 +1,44 @@ +/* + * 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; + +UpdateStreamInfoResult::UpdateStreamInfoResult() : + ServiceResult() +{} + +UpdateStreamInfoResult::UpdateStreamInfoResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +UpdateStreamInfoResult::~UpdateStreamInfoResult() +{} + +void UpdateStreamInfoResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + +} + diff --git a/vod/src/model/UploadStreamByURLRequest.cc b/vod/src/model/UploadStreamByURLRequest.cc index 3fa603f42..8f401247e 100644 --- a/vod/src/model/UploadStreamByURLRequest.cc +++ b/vod/src/model/UploadStreamByURLRequest.cc @@ -38,17 +38,6 @@ void UploadStreamByURLRequest::setFileExtension(const std::string& fileExtension setParameter("FileExtension", fileExtension); } -std::string UploadStreamByURLRequest::getMediaId()const -{ - return mediaId_; -} - -void UploadStreamByURLRequest::setMediaId(const std::string& mediaId) -{ - mediaId_ = mediaId; - setParameter("MediaId", mediaId); -} - std::string UploadStreamByURLRequest::getUserData()const { return userData_; @@ -60,6 +49,17 @@ void UploadStreamByURLRequest::setUserData(const std::string& userData) setParameter("UserData", userData); } +std::string UploadStreamByURLRequest::getHDRType()const +{ + return hDRType_; +} + +void UploadStreamByURLRequest::setHDRType(const std::string& hDRType) +{ + hDRType_ = hDRType; + setParameter("HDRType", hDRType); +} + std::string UploadStreamByURLRequest::getDefinition()const { return definition_; @@ -82,3 +82,14 @@ void UploadStreamByURLRequest::setStreamURL(const std::string& streamURL) setParameter("StreamURL", streamURL); } +std::string UploadStreamByURLRequest::getMediaId()const +{ + return mediaId_; +} + +void UploadStreamByURLRequest::setMediaId(const std::string& mediaId) +{ + mediaId_ = mediaId; + setParameter("MediaId", mediaId); +} +