Release ReduceVideoNoise and EnhancePortraitVideo.
This commit is contained in:
@@ -303,6 +303,42 @@ VideoenhanClient::DeleteFaceVideoTemplateOutcomeCallable VideoenhanClient::delet
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
VideoenhanClient::EnhancePortraitVideoOutcome VideoenhanClient::enhancePortraitVideo(const EnhancePortraitVideoRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return EnhancePortraitVideoOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return EnhancePortraitVideoOutcome(EnhancePortraitVideoResult(outcome.result()));
|
||||
else
|
||||
return EnhancePortraitVideoOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void VideoenhanClient::enhancePortraitVideoAsync(const EnhancePortraitVideoRequest& request, const EnhancePortraitVideoAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, enhancePortraitVideo(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
VideoenhanClient::EnhancePortraitVideoOutcomeCallable VideoenhanClient::enhancePortraitVideoCallable(const EnhancePortraitVideoRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<EnhancePortraitVideoOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->enhancePortraitVideo(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
VideoenhanClient::EnhanceVideoQualityOutcome VideoenhanClient::enhanceVideoQuality(const EnhanceVideoQualityRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -663,6 +699,42 @@ VideoenhanClient::QueryFaceVideoTemplateOutcomeCallable VideoenhanClient::queryF
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
VideoenhanClient::ReduceVideoNoiseOutcome VideoenhanClient::reduceVideoNoise(const ReduceVideoNoiseRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ReduceVideoNoiseOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ReduceVideoNoiseOutcome(ReduceVideoNoiseResult(outcome.result()));
|
||||
else
|
||||
return ReduceVideoNoiseOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void VideoenhanClient::reduceVideoNoiseAsync(const ReduceVideoNoiseRequest& request, const ReduceVideoNoiseAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, reduceVideoNoise(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
VideoenhanClient::ReduceVideoNoiseOutcomeCallable VideoenhanClient::reduceVideoNoiseCallable(const ReduceVideoNoiseRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ReduceVideoNoiseOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->reduceVideoNoise(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
VideoenhanClient::SuperResolveVideoOutcome VideoenhanClient::superResolveVideo(const SuperResolveVideoRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
45
videoenhan/src/model/EnhancePortraitVideoRequest.cc
Normal file
45
videoenhan/src/model/EnhancePortraitVideoRequest.cc
Normal file
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/videoenhan/model/EnhancePortraitVideoRequest.h>
|
||||
|
||||
using AlibabaCloud::Videoenhan::Model::EnhancePortraitVideoRequest;
|
||||
|
||||
EnhancePortraitVideoRequest::EnhancePortraitVideoRequest()
|
||||
: RpcServiceRequest("videoenhan", "2020-03-20", "EnhancePortraitVideo") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
EnhancePortraitVideoRequest::~EnhancePortraitVideoRequest() {}
|
||||
|
||||
bool EnhancePortraitVideoRequest::getAsync() const {
|
||||
return async_;
|
||||
}
|
||||
|
||||
void EnhancePortraitVideoRequest::setAsync(bool async) {
|
||||
async_ = async;
|
||||
setBodyParameter(std::string("Async"), async ? "true" : "false");
|
||||
}
|
||||
|
||||
std::string EnhancePortraitVideoRequest::getVideoUrl() const {
|
||||
return videoUrl_;
|
||||
}
|
||||
|
||||
void EnhancePortraitVideoRequest::setVideoUrl(const std::string &videoUrl) {
|
||||
videoUrl_ = videoUrl;
|
||||
setBodyParameter(std::string("VideoUrl"), videoUrl);
|
||||
}
|
||||
|
||||
66
videoenhan/src/model/EnhancePortraitVideoResult.cc
Normal file
66
videoenhan/src/model/EnhancePortraitVideoResult.cc
Normal file
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/videoenhan/model/EnhancePortraitVideoResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Videoenhan;
|
||||
using namespace AlibabaCloud::Videoenhan::Model;
|
||||
|
||||
EnhancePortraitVideoResult::EnhancePortraitVideoResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
EnhancePortraitVideoResult::EnhancePortraitVideoResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
EnhancePortraitVideoResult::~EnhancePortraitVideoResult()
|
||||
{}
|
||||
|
||||
void EnhancePortraitVideoResult::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();
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string EnhancePortraitVideoResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
EnhancePortraitVideoResult::Data EnhancePortraitVideoResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string EnhancePortraitVideoResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
45
videoenhan/src/model/ReduceVideoNoiseRequest.cc
Normal file
45
videoenhan/src/model/ReduceVideoNoiseRequest.cc
Normal file
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/videoenhan/model/ReduceVideoNoiseRequest.h>
|
||||
|
||||
using AlibabaCloud::Videoenhan::Model::ReduceVideoNoiseRequest;
|
||||
|
||||
ReduceVideoNoiseRequest::ReduceVideoNoiseRequest()
|
||||
: RpcServiceRequest("videoenhan", "2020-03-20", "ReduceVideoNoise") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
ReduceVideoNoiseRequest::~ReduceVideoNoiseRequest() {}
|
||||
|
||||
bool ReduceVideoNoiseRequest::getAsync() const {
|
||||
return async_;
|
||||
}
|
||||
|
||||
void ReduceVideoNoiseRequest::setAsync(bool async) {
|
||||
async_ = async;
|
||||
setBodyParameter(std::string("Async"), async ? "true" : "false");
|
||||
}
|
||||
|
||||
std::string ReduceVideoNoiseRequest::getVideoUrl() const {
|
||||
return videoUrl_;
|
||||
}
|
||||
|
||||
void ReduceVideoNoiseRequest::setVideoUrl(const std::string &videoUrl) {
|
||||
videoUrl_ = videoUrl;
|
||||
setBodyParameter(std::string("VideoUrl"), videoUrl);
|
||||
}
|
||||
|
||||
66
videoenhan/src/model/ReduceVideoNoiseResult.cc
Normal file
66
videoenhan/src/model/ReduceVideoNoiseResult.cc
Normal file
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/videoenhan/model/ReduceVideoNoiseResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Videoenhan;
|
||||
using namespace AlibabaCloud::Videoenhan::Model;
|
||||
|
||||
ReduceVideoNoiseResult::ReduceVideoNoiseResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ReduceVideoNoiseResult::ReduceVideoNoiseResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ReduceVideoNoiseResult::~ReduceVideoNoiseResult()
|
||||
{}
|
||||
|
||||
void ReduceVideoNoiseResult::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();
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string ReduceVideoNoiseResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
ReduceVideoNoiseResult::Data ReduceVideoNoiseResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string ReduceVideoNoiseResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user