diff --git a/CHANGELOG b/CHANGELOG index 65e195f3c..9282942ef 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +2020-07-08 Version: 1.36.507 +- Add video compose api. + 2020-07-08 Version: 1.36.506 - Add video summarization related API. diff --git a/VERSION b/VERSION index 4dc9eb51c..317eba407 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.506 \ No newline at end of file +1.36.507 \ No newline at end of file diff --git a/vcs/include/alibabacloud/vcs/model/CreateVideoComposeTaskRequest.h b/vcs/include/alibabacloud/vcs/model/CreateVideoComposeTaskRequest.h index 976d5e4ef..36c900f9c 100644 --- a/vcs/include/alibabacloud/vcs/model/CreateVideoComposeTaskRequest.h +++ b/vcs/include/alibabacloud/vcs/model/CreateVideoComposeTaskRequest.h @@ -39,27 +39,27 @@ namespace AlibabaCloud void setCorpId(const std::string& corpId); std::string getDomainName()const; void setDomainName(const std::string& domainName); - std::string getPicUrlList()const; - void setPicUrlList(const std::string& picUrlList); - std::string getAudioUrl()const; - void setAudioUrl(const std::string& audioUrl); + int getVideoFrameRate()const; + void setVideoFrameRate(int videoFrameRate); + std::string getImageFileNames()const; + void setImageFileNames(const std::string& imageFileNames); + std::string getAudioFileName()const; + void setAudioFileName(const std::string& audioFileName); std::string getBucketName()const; void setBucketName(const std::string& bucketName); std::string getImageParameters()const; void setImageParameters(const std::string& imageParameters); - std::string getVideoRate()const; - void setVideoRate(const std::string& videoRate); std::string getVideoFormat()const; void setVideoFormat(const std::string& videoFormat); private: std::string corpId_; std::string domainName_; - std::string picUrlList_; - std::string audioUrl_; + int videoFrameRate_; + std::string imageFileNames_; + std::string audioFileName_; std::string bucketName_; std::string imageParameters_; - std::string videoRate_; std::string videoFormat_; }; diff --git a/vcs/include/alibabacloud/vcs/model/CreateVideoComposeTaskResult.h b/vcs/include/alibabacloud/vcs/model/CreateVideoComposeTaskResult.h index f80c34dec..54dbac227 100644 --- a/vcs/include/alibabacloud/vcs/model/CreateVideoComposeTaskResult.h +++ b/vcs/include/alibabacloud/vcs/model/CreateVideoComposeTaskResult.h @@ -32,25 +32,22 @@ namespace AlibabaCloud class ALIBABACLOUD_VCS_EXPORT CreateVideoComposeTaskResult : public ServiceResult { public: - struct Data - { - int bucketName; - int domainName; - }; CreateVideoComposeTaskResult(); explicit CreateVideoComposeTaskResult(const std::string &payload); ~CreateVideoComposeTaskResult(); + std::string getBucketName()const; std::string getMessage()const; - Data getData()const; + std::string getDomainName()const; std::string getCode()const; protected: void parse(const std::string &payload); private: + std::string bucketName_; std::string message_; - Data data_; + std::string domainName_; std::string code_; }; diff --git a/vcs/include/alibabacloud/vcs/model/GetVideoComposeResultResult.h b/vcs/include/alibabacloud/vcs/model/GetVideoComposeResultResult.h index a960ec9c5..9d9a67fef 100644 --- a/vcs/include/alibabacloud/vcs/model/GetVideoComposeResultResult.h +++ b/vcs/include/alibabacloud/vcs/model/GetVideoComposeResultResult.h @@ -37,13 +37,17 @@ namespace AlibabaCloud GetVideoComposeResultResult(); explicit GetVideoComposeResultResult(const std::string &payload); ~GetVideoComposeResultResult(); + std::string getStatus()const; std::string getMessage()const; + std::string getCode()const; std::string getVideoUrl()const; protected: void parse(const std::string &payload); private: + std::string status_; std::string message_; + std::string code_; std::string videoUrl_; }; diff --git a/vcs/src/VcsClient.cc b/vcs/src/VcsClient.cc index 89edffa77..b989d4183 100644 --- a/vcs/src/VcsClient.cc +++ b/vcs/src/VcsClient.cc @@ -31,21 +31,21 @@ VcsClient::VcsClient(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, "vcs"); + endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, ""); } VcsClient::VcsClient(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, "vcs"); + endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, ""); } VcsClient::VcsClient(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, "vcs"); + endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, ""); } VcsClient::~VcsClient() diff --git a/vcs/src/model/CreateVideoComposeTaskRequest.cc b/vcs/src/model/CreateVideoComposeTaskRequest.cc index c04babd2e..83ec9fdc7 100644 --- a/vcs/src/model/CreateVideoComposeTaskRequest.cc +++ b/vcs/src/model/CreateVideoComposeTaskRequest.cc @@ -49,26 +49,37 @@ void CreateVideoComposeTaskRequest::setDomainName(const std::string& domainName) setBodyParameter("DomainName", domainName); } -std::string CreateVideoComposeTaskRequest::getPicUrlList()const +int CreateVideoComposeTaskRequest::getVideoFrameRate()const { - return picUrlList_; + return videoFrameRate_; } -void CreateVideoComposeTaskRequest::setPicUrlList(const std::string& picUrlList) +void CreateVideoComposeTaskRequest::setVideoFrameRate(int videoFrameRate) { - picUrlList_ = picUrlList; - setBodyParameter("PicUrlList", picUrlList); + videoFrameRate_ = videoFrameRate; + setBodyParameter("VideoFrameRate", std::to_string(videoFrameRate)); } -std::string CreateVideoComposeTaskRequest::getAudioUrl()const +std::string CreateVideoComposeTaskRequest::getImageFileNames()const { - return audioUrl_; + return imageFileNames_; } -void CreateVideoComposeTaskRequest::setAudioUrl(const std::string& audioUrl) +void CreateVideoComposeTaskRequest::setImageFileNames(const std::string& imageFileNames) { - audioUrl_ = audioUrl; - setBodyParameter("AudioUrl", audioUrl); + imageFileNames_ = imageFileNames; + setBodyParameter("ImageFileNames", imageFileNames); +} + +std::string CreateVideoComposeTaskRequest::getAudioFileName()const +{ + return audioFileName_; +} + +void CreateVideoComposeTaskRequest::setAudioFileName(const std::string& audioFileName) +{ + audioFileName_ = audioFileName; + setBodyParameter("AudioFileName", audioFileName); } std::string CreateVideoComposeTaskRequest::getBucketName()const @@ -93,17 +104,6 @@ void CreateVideoComposeTaskRequest::setImageParameters(const std::string& imageP setBodyParameter("ImageParameters", imageParameters); } -std::string CreateVideoComposeTaskRequest::getVideoRate()const -{ - return videoRate_; -} - -void CreateVideoComposeTaskRequest::setVideoRate(const std::string& videoRate) -{ - videoRate_ = videoRate; - setBodyParameter("VideoRate", videoRate); -} - std::string CreateVideoComposeTaskRequest::getVideoFormat()const { return videoFormat_; diff --git a/vcs/src/model/CreateVideoComposeTaskResult.cc b/vcs/src/model/CreateVideoComposeTaskResult.cc index 17dc53462..91c187111 100644 --- a/vcs/src/model/CreateVideoComposeTaskResult.cc +++ b/vcs/src/model/CreateVideoComposeTaskResult.cc @@ -39,26 +39,30 @@ void CreateVideoComposeTaskResult::parse(const std::string &payload) Json::Value value; reader.parse(payload, value); setRequestId(value["RequestId"].asString()); - auto dataNode = value["Data"]; - if(!dataNode["DomainName"].isNull()) - data_.domainName = std::stoi(dataNode["DomainName"].asString()); - if(!dataNode["BucketName"].isNull()) - data_.bucketName = std::stoi(dataNode["BucketName"].asString()); if(!value["Code"].isNull()) code_ = value["Code"].asString(); if(!value["Message"].isNull()) message_ = value["Message"].asString(); + if(!value["DomainName"].isNull()) + domainName_ = value["DomainName"].asString(); + if(!value["BucketName"].isNull()) + bucketName_ = value["BucketName"].asString(); } +std::string CreateVideoComposeTaskResult::getBucketName()const +{ + return bucketName_; +} + std::string CreateVideoComposeTaskResult::getMessage()const { return message_; } -CreateVideoComposeTaskResult::Data CreateVideoComposeTaskResult::getData()const +std::string CreateVideoComposeTaskResult::getDomainName()const { - return data_; + return domainName_; } std::string CreateVideoComposeTaskResult::getCode()const diff --git a/vcs/src/model/GetVideoComposeResultResult.cc b/vcs/src/model/GetVideoComposeResultResult.cc index 64f0a1c61..9ac2eb60f 100644 --- a/vcs/src/model/GetVideoComposeResultResult.cc +++ b/vcs/src/model/GetVideoComposeResultResult.cc @@ -43,14 +43,28 @@ void GetVideoComposeResultResult::parse(const std::string &payload) message_ = value["Message"].asString(); if(!value["VideoUrl"].isNull()) videoUrl_ = value["VideoUrl"].asString(); + if(!value["Code"].isNull()) + code_ = value["Code"].asString(); + if(!value["Status"].isNull()) + status_ = value["Status"].asString(); } +std::string GetVideoComposeResultResult::getStatus()const +{ + return status_; +} + std::string GetVideoComposeResultResult::getMessage()const { return message_; } +std::string GetVideoComposeResultResult::getCode()const +{ + return code_; +} + std::string GetVideoComposeResultResult::getVideoUrl()const { return videoUrl_;