diff --git a/CHANGELOG b/CHANGELOG index f8f5fcfd5..ad626ea4e 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +2020-12-02 Version: patch +- Release MergeVideoFace EnhanceVideoQuality. + 2020-12-02 Version: patch - Update SegmentHead. diff --git a/videoenhan/CMakeLists.txt b/videoenhan/CMakeLists.txt index 6da6622e4..c68ea34ed 100644 --- a/videoenhan/CMakeLists.txt +++ b/videoenhan/CMakeLists.txt @@ -29,6 +29,8 @@ set(videoenhan_public_header_model include/alibabacloud/videoenhan/model/AdjustVideoColorResult.h include/alibabacloud/videoenhan/model/ChangeVideoSizeRequest.h include/alibabacloud/videoenhan/model/ChangeVideoSizeResult.h + include/alibabacloud/videoenhan/model/EnhanceVideoQualityRequest.h + include/alibabacloud/videoenhan/model/EnhanceVideoQualityResult.h include/alibabacloud/videoenhan/model/EraseVideoLogoRequest.h include/alibabacloud/videoenhan/model/EraseVideoLogoResult.h include/alibabacloud/videoenhan/model/EraseVideoSubtitlesRequest.h @@ -37,6 +39,8 @@ set(videoenhan_public_header_model include/alibabacloud/videoenhan/model/GenerateVideoResult.h include/alibabacloud/videoenhan/model/GetAsyncJobResultRequest.h include/alibabacloud/videoenhan/model/GetAsyncJobResultResult.h + include/alibabacloud/videoenhan/model/MergeVideoFaceRequest.h + include/alibabacloud/videoenhan/model/MergeVideoFaceResult.h include/alibabacloud/videoenhan/model/SuperResolveVideoRequest.h include/alibabacloud/videoenhan/model/SuperResolveVideoResult.h ) @@ -50,6 +54,8 @@ set(videoenhan_src src/model/AdjustVideoColorResult.cc src/model/ChangeVideoSizeRequest.cc src/model/ChangeVideoSizeResult.cc + src/model/EnhanceVideoQualityRequest.cc + src/model/EnhanceVideoQualityResult.cc src/model/EraseVideoLogoRequest.cc src/model/EraseVideoLogoResult.cc src/model/EraseVideoSubtitlesRequest.cc @@ -58,6 +64,8 @@ set(videoenhan_src src/model/GenerateVideoResult.cc src/model/GetAsyncJobResultRequest.cc src/model/GetAsyncJobResultResult.cc + src/model/MergeVideoFaceRequest.cc + src/model/MergeVideoFaceResult.cc src/model/SuperResolveVideoRequest.cc src/model/SuperResolveVideoResult.cc ) diff --git a/videoenhan/include/alibabacloud/videoenhan/VideoenhanClient.h b/videoenhan/include/alibabacloud/videoenhan/VideoenhanClient.h index 82250c36e..a59336aaf 100644 --- a/videoenhan/include/alibabacloud/videoenhan/VideoenhanClient.h +++ b/videoenhan/include/alibabacloud/videoenhan/VideoenhanClient.h @@ -30,6 +30,8 @@ #include "model/AdjustVideoColorResult.h" #include "model/ChangeVideoSizeRequest.h" #include "model/ChangeVideoSizeResult.h" +#include "model/EnhanceVideoQualityRequest.h" +#include "model/EnhanceVideoQualityResult.h" #include "model/EraseVideoLogoRequest.h" #include "model/EraseVideoLogoResult.h" #include "model/EraseVideoSubtitlesRequest.h" @@ -38,6 +40,8 @@ #include "model/GenerateVideoResult.h" #include "model/GetAsyncJobResultRequest.h" #include "model/GetAsyncJobResultResult.h" +#include "model/MergeVideoFaceRequest.h" +#include "model/MergeVideoFaceResult.h" #include "model/SuperResolveVideoRequest.h" #include "model/SuperResolveVideoResult.h" @@ -61,6 +65,9 @@ namespace AlibabaCloud typedef Outcome ChangeVideoSizeOutcome; typedef std::future ChangeVideoSizeOutcomeCallable; typedef std::function&)> ChangeVideoSizeAsyncHandler; + typedef Outcome EnhanceVideoQualityOutcome; + typedef std::future EnhanceVideoQualityOutcomeCallable; + typedef std::function&)> EnhanceVideoQualityAsyncHandler; typedef Outcome EraseVideoLogoOutcome; typedef std::future EraseVideoLogoOutcomeCallable; typedef std::function&)> EraseVideoLogoAsyncHandler; @@ -73,6 +80,9 @@ namespace AlibabaCloud typedef Outcome GetAsyncJobResultOutcome; typedef std::future GetAsyncJobResultOutcomeCallable; typedef std::function&)> GetAsyncJobResultAsyncHandler; + typedef Outcome MergeVideoFaceOutcome; + typedef std::future MergeVideoFaceOutcomeCallable; + typedef std::function&)> MergeVideoFaceAsyncHandler; typedef Outcome SuperResolveVideoOutcome; typedef std::future SuperResolveVideoOutcomeCallable; typedef std::function&)> SuperResolveVideoAsyncHandler; @@ -93,6 +103,9 @@ namespace AlibabaCloud ChangeVideoSizeOutcome changeVideoSize(const Model::ChangeVideoSizeRequest &request)const; void changeVideoSizeAsync(const Model::ChangeVideoSizeRequest& request, const ChangeVideoSizeAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; ChangeVideoSizeOutcomeCallable changeVideoSizeCallable(const Model::ChangeVideoSizeRequest& request) const; + EnhanceVideoQualityOutcome enhanceVideoQuality(const Model::EnhanceVideoQualityRequest &request)const; + void enhanceVideoQualityAsync(const Model::EnhanceVideoQualityRequest& request, const EnhanceVideoQualityAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + EnhanceVideoQualityOutcomeCallable enhanceVideoQualityCallable(const Model::EnhanceVideoQualityRequest& request) const; EraseVideoLogoOutcome eraseVideoLogo(const Model::EraseVideoLogoRequest &request)const; void eraseVideoLogoAsync(const Model::EraseVideoLogoRequest& request, const EraseVideoLogoAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; EraseVideoLogoOutcomeCallable eraseVideoLogoCallable(const Model::EraseVideoLogoRequest& request) const; @@ -105,6 +118,9 @@ namespace AlibabaCloud GetAsyncJobResultOutcome getAsyncJobResult(const Model::GetAsyncJobResultRequest &request)const; void getAsyncJobResultAsync(const Model::GetAsyncJobResultRequest& request, const GetAsyncJobResultAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; GetAsyncJobResultOutcomeCallable getAsyncJobResultCallable(const Model::GetAsyncJobResultRequest& request) const; + MergeVideoFaceOutcome mergeVideoFace(const Model::MergeVideoFaceRequest &request)const; + void mergeVideoFaceAsync(const Model::MergeVideoFaceRequest& request, const MergeVideoFaceAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + MergeVideoFaceOutcomeCallable mergeVideoFaceCallable(const Model::MergeVideoFaceRequest& request) const; SuperResolveVideoOutcome superResolveVideo(const Model::SuperResolveVideoRequest &request)const; void superResolveVideoAsync(const Model::SuperResolveVideoRequest& request, const SuperResolveVideoAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; SuperResolveVideoOutcomeCallable superResolveVideoCallable(const Model::SuperResolveVideoRequest& request) const; diff --git a/videoenhan/include/alibabacloud/videoenhan/model/EnhanceVideoQualityRequest.h b/videoenhan/include/alibabacloud/videoenhan/model/EnhanceVideoQualityRequest.h new file mode 100644 index 000000000..cece2e1ec --- /dev/null +++ b/videoenhan/include/alibabacloud/videoenhan/model/EnhanceVideoQualityRequest.h @@ -0,0 +1,69 @@ +/* + * 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_VIDEOENHAN_MODEL_ENHANCEVIDEOQUALITYREQUEST_H_ +#define ALIBABACLOUD_VIDEOENHAN_MODEL_ENHANCEVIDEOQUALITYREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Videoenhan + { + namespace Model + { + class ALIBABACLOUD_VIDEOENHAN_EXPORT EnhanceVideoQualityRequest : public RpcServiceRequest + { + + public: + EnhanceVideoQualityRequest(); + ~EnhanceVideoQualityRequest(); + + std::string getHDRFormat()const; + void setHDRFormat(const std::string& hDRFormat); + int getFrameRate()const; + void setFrameRate(int frameRate); + int getMaxIlluminance()const; + void setMaxIlluminance(int maxIlluminance); + int getBitrate()const; + void setBitrate(int bitrate); + int getOutPutWidth()const; + void setOutPutWidth(int outPutWidth); + int getOutPutHeight()const; + void setOutPutHeight(int outPutHeight); + bool getAsync()const; + void setAsync(bool async); + std::string getVideoURL()const; + void setVideoURL(const std::string& videoURL); + + private: + std::string hDRFormat_; + int frameRate_; + int maxIlluminance_; + int bitrate_; + int outPutWidth_; + int outPutHeight_; + bool async_; + std::string videoURL_; + + }; + } + } +} +#endif // !ALIBABACLOUD_VIDEOENHAN_MODEL_ENHANCEVIDEOQUALITYREQUEST_H_ \ No newline at end of file diff --git a/videoenhan/include/alibabacloud/videoenhan/model/EnhanceVideoQualityResult.h b/videoenhan/include/alibabacloud/videoenhan/model/EnhanceVideoQualityResult.h new file mode 100644 index 000000000..0e69dd7af --- /dev/null +++ b/videoenhan/include/alibabacloud/videoenhan/model/EnhanceVideoQualityResult.h @@ -0,0 +1,55 @@ +/* + * 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_VIDEOENHAN_MODEL_ENHANCEVIDEOQUALITYRESULT_H_ +#define ALIBABACLOUD_VIDEOENHAN_MODEL_ENHANCEVIDEOQUALITYRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Videoenhan + { + namespace Model + { + class ALIBABACLOUD_VIDEOENHAN_EXPORT EnhanceVideoQualityResult : public ServiceResult + { + public: + struct Data + { + std::string videoURL; + }; + + + EnhanceVideoQualityResult(); + explicit EnhanceVideoQualityResult(const std::string &payload); + ~EnhanceVideoQualityResult(); + Data getData()const; + + protected: + void parse(const std::string &payload); + private: + Data data_; + + }; + } + } +} +#endif // !ALIBABACLOUD_VIDEOENHAN_MODEL_ENHANCEVIDEOQUALITYRESULT_H_ \ No newline at end of file diff --git a/videoenhan/include/alibabacloud/videoenhan/model/MergeVideoFaceRequest.h b/videoenhan/include/alibabacloud/videoenhan/model/MergeVideoFaceRequest.h new file mode 100644 index 000000000..76c1a4a6d --- /dev/null +++ b/videoenhan/include/alibabacloud/videoenhan/model/MergeVideoFaceRequest.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_VIDEOENHAN_MODEL_MERGEVIDEOFACEREQUEST_H_ +#define ALIBABACLOUD_VIDEOENHAN_MODEL_MERGEVIDEOFACEREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Videoenhan + { + namespace Model + { + class ALIBABACLOUD_VIDEOENHAN_EXPORT MergeVideoFaceRequest : public RpcServiceRequest + { + + public: + MergeVideoFaceRequest(); + ~MergeVideoFaceRequest(); + + std::string getPostURL()const; + void setPostURL(const std::string& postURL); + std::string getReferenceURL()const; + void setReferenceURL(const std::string& referenceURL); + bool getAsync()const; + void setAsync(bool async); + std::string getVideoURL()const; + void setVideoURL(const std::string& videoURL); + + private: + std::string postURL_; + std::string referenceURL_; + bool async_; + std::string videoURL_; + + }; + } + } +} +#endif // !ALIBABACLOUD_VIDEOENHAN_MODEL_MERGEVIDEOFACEREQUEST_H_ \ No newline at end of file diff --git a/videoenhan/include/alibabacloud/videoenhan/model/MergeVideoFaceResult.h b/videoenhan/include/alibabacloud/videoenhan/model/MergeVideoFaceResult.h new file mode 100644 index 000000000..236914f0c --- /dev/null +++ b/videoenhan/include/alibabacloud/videoenhan/model/MergeVideoFaceResult.h @@ -0,0 +1,55 @@ +/* + * 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_VIDEOENHAN_MODEL_MERGEVIDEOFACERESULT_H_ +#define ALIBABACLOUD_VIDEOENHAN_MODEL_MERGEVIDEOFACERESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Videoenhan + { + namespace Model + { + class ALIBABACLOUD_VIDEOENHAN_EXPORT MergeVideoFaceResult : public ServiceResult + { + public: + struct Data + { + std::string videoURL; + }; + + + MergeVideoFaceResult(); + explicit MergeVideoFaceResult(const std::string &payload); + ~MergeVideoFaceResult(); + Data getData()const; + + protected: + void parse(const std::string &payload); + private: + Data data_; + + }; + } + } +} +#endif // !ALIBABACLOUD_VIDEOENHAN_MODEL_MERGEVIDEOFACERESULT_H_ \ No newline at end of file diff --git a/videoenhan/src/VideoenhanClient.cc b/videoenhan/src/VideoenhanClient.cc index e8c5fbb03..5ea7bc402 100644 --- a/videoenhan/src/VideoenhanClient.cc +++ b/videoenhan/src/VideoenhanClient.cc @@ -195,6 +195,42 @@ VideoenhanClient::ChangeVideoSizeOutcomeCallable VideoenhanClient::changeVideoSi return task->get_future(); } +VideoenhanClient::EnhanceVideoQualityOutcome VideoenhanClient::enhanceVideoQuality(const EnhanceVideoQualityRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return EnhanceVideoQualityOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return EnhanceVideoQualityOutcome(EnhanceVideoQualityResult(outcome.result())); + else + return EnhanceVideoQualityOutcome(outcome.error()); +} + +void VideoenhanClient::enhanceVideoQualityAsync(const EnhanceVideoQualityRequest& request, const EnhanceVideoQualityAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, enhanceVideoQuality(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +VideoenhanClient::EnhanceVideoQualityOutcomeCallable VideoenhanClient::enhanceVideoQualityCallable(const EnhanceVideoQualityRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->enhanceVideoQuality(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + VideoenhanClient::EraseVideoLogoOutcome VideoenhanClient::eraseVideoLogo(const EraseVideoLogoRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -339,6 +375,42 @@ VideoenhanClient::GetAsyncJobResultOutcomeCallable VideoenhanClient::getAsyncJob return task->get_future(); } +VideoenhanClient::MergeVideoFaceOutcome VideoenhanClient::mergeVideoFace(const MergeVideoFaceRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return MergeVideoFaceOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return MergeVideoFaceOutcome(MergeVideoFaceResult(outcome.result())); + else + return MergeVideoFaceOutcome(outcome.error()); +} + +void VideoenhanClient::mergeVideoFaceAsync(const MergeVideoFaceRequest& request, const MergeVideoFaceAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, mergeVideoFace(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +VideoenhanClient::MergeVideoFaceOutcomeCallable VideoenhanClient::mergeVideoFaceCallable(const MergeVideoFaceRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->mergeVideoFace(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + VideoenhanClient::SuperResolveVideoOutcome VideoenhanClient::superResolveVideo(const SuperResolveVideoRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); diff --git a/videoenhan/src/model/EnhanceVideoQualityRequest.cc b/videoenhan/src/model/EnhanceVideoQualityRequest.cc new file mode 100644 index 000000000..de7172d2a --- /dev/null +++ b/videoenhan/src/model/EnhanceVideoQualityRequest.cc @@ -0,0 +1,117 @@ +/* + * 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::Videoenhan::Model::EnhanceVideoQualityRequest; + +EnhanceVideoQualityRequest::EnhanceVideoQualityRequest() : + RpcServiceRequest("videoenhan", "2020-03-20", "EnhanceVideoQuality") +{ + setMethod(HttpRequest::Method::Post); +} + +EnhanceVideoQualityRequest::~EnhanceVideoQualityRequest() +{} + +std::string EnhanceVideoQualityRequest::getHDRFormat()const +{ + return hDRFormat_; +} + +void EnhanceVideoQualityRequest::setHDRFormat(const std::string& hDRFormat) +{ + hDRFormat_ = hDRFormat; + setBodyParameter("HDRFormat", hDRFormat); +} + +int EnhanceVideoQualityRequest::getFrameRate()const +{ + return frameRate_; +} + +void EnhanceVideoQualityRequest::setFrameRate(int frameRate) +{ + frameRate_ = frameRate; + setBodyParameter("FrameRate", std::to_string(frameRate)); +} + +int EnhanceVideoQualityRequest::getMaxIlluminance()const +{ + return maxIlluminance_; +} + +void EnhanceVideoQualityRequest::setMaxIlluminance(int maxIlluminance) +{ + maxIlluminance_ = maxIlluminance; + setBodyParameter("MaxIlluminance", std::to_string(maxIlluminance)); +} + +int EnhanceVideoQualityRequest::getBitrate()const +{ + return bitrate_; +} + +void EnhanceVideoQualityRequest::setBitrate(int bitrate) +{ + bitrate_ = bitrate; + setBodyParameter("Bitrate", std::to_string(bitrate)); +} + +int EnhanceVideoQualityRequest::getOutPutWidth()const +{ + return outPutWidth_; +} + +void EnhanceVideoQualityRequest::setOutPutWidth(int outPutWidth) +{ + outPutWidth_ = outPutWidth; + setBodyParameter("OutPutWidth", std::to_string(outPutWidth)); +} + +int EnhanceVideoQualityRequest::getOutPutHeight()const +{ + return outPutHeight_; +} + +void EnhanceVideoQualityRequest::setOutPutHeight(int outPutHeight) +{ + outPutHeight_ = outPutHeight; + setBodyParameter("OutPutHeight", std::to_string(outPutHeight)); +} + +bool EnhanceVideoQualityRequest::getAsync()const +{ + return async_; +} + +void EnhanceVideoQualityRequest::setAsync(bool async) +{ + async_ = async; + setBodyParameter("Async", async ? "true" : "false"); +} + +std::string EnhanceVideoQualityRequest::getVideoURL()const +{ + return videoURL_; +} + +void EnhanceVideoQualityRequest::setVideoURL(const std::string& videoURL) +{ + videoURL_ = videoURL; + setBodyParameter("VideoURL", videoURL); +} + diff --git a/videoenhan/src/model/EnhanceVideoQualityResult.cc b/videoenhan/src/model/EnhanceVideoQualityResult.cc new file mode 100644 index 000000000..a9e278c78 --- /dev/null +++ b/videoenhan/src/model/EnhanceVideoQualityResult.cc @@ -0,0 +1,52 @@ +/* + * 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::Videoenhan; +using namespace AlibabaCloud::Videoenhan::Model; + +EnhanceVideoQualityResult::EnhanceVideoQualityResult() : + ServiceResult() +{} + +EnhanceVideoQualityResult::EnhanceVideoQualityResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +EnhanceVideoQualityResult::~EnhanceVideoQualityResult() +{} + +void EnhanceVideoQualityResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto dataNode = value["Data"]; + if(!dataNode["VideoURL"].isNull()) + data_.videoURL = dataNode["VideoURL"].asString(); + +} + +EnhanceVideoQualityResult::Data EnhanceVideoQualityResult::getData()const +{ + return data_; +} + diff --git a/videoenhan/src/model/MergeVideoFaceRequest.cc b/videoenhan/src/model/MergeVideoFaceRequest.cc new file mode 100644 index 000000000..fbf41640c --- /dev/null +++ b/videoenhan/src/model/MergeVideoFaceRequest.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::Videoenhan::Model::MergeVideoFaceRequest; + +MergeVideoFaceRequest::MergeVideoFaceRequest() : + RpcServiceRequest("videoenhan", "2020-03-20", "MergeVideoFace") +{ + setMethod(HttpRequest::Method::Post); +} + +MergeVideoFaceRequest::~MergeVideoFaceRequest() +{} + +std::string MergeVideoFaceRequest::getPostURL()const +{ + return postURL_; +} + +void MergeVideoFaceRequest::setPostURL(const std::string& postURL) +{ + postURL_ = postURL; + setBodyParameter("PostURL", postURL); +} + +std::string MergeVideoFaceRequest::getReferenceURL()const +{ + return referenceURL_; +} + +void MergeVideoFaceRequest::setReferenceURL(const std::string& referenceURL) +{ + referenceURL_ = referenceURL; + setBodyParameter("ReferenceURL", referenceURL); +} + +bool MergeVideoFaceRequest::getAsync()const +{ + return async_; +} + +void MergeVideoFaceRequest::setAsync(bool async) +{ + async_ = async; + setBodyParameter("Async", async ? "true" : "false"); +} + +std::string MergeVideoFaceRequest::getVideoURL()const +{ + return videoURL_; +} + +void MergeVideoFaceRequest::setVideoURL(const std::string& videoURL) +{ + videoURL_ = videoURL; + setBodyParameter("VideoURL", videoURL); +} + diff --git a/videoenhan/src/model/MergeVideoFaceResult.cc b/videoenhan/src/model/MergeVideoFaceResult.cc new file mode 100644 index 000000000..1e037f1cf --- /dev/null +++ b/videoenhan/src/model/MergeVideoFaceResult.cc @@ -0,0 +1,52 @@ +/* + * 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::Videoenhan; +using namespace AlibabaCloud::Videoenhan::Model; + +MergeVideoFaceResult::MergeVideoFaceResult() : + ServiceResult() +{} + +MergeVideoFaceResult::MergeVideoFaceResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +MergeVideoFaceResult::~MergeVideoFaceResult() +{} + +void MergeVideoFaceResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto dataNode = value["Data"]; + if(!dataNode["VideoURL"].isNull()) + data_.videoURL = dataNode["VideoURL"].asString(); + +} + +MergeVideoFaceResult::Data MergeVideoFaceResult::getData()const +{ + return data_; +} +