Release InterpolateVideoFrame ToneSdrVideo ConvertHdrVideo.

This commit is contained in:
sdk-team
2020-12-22 07:55:53 +00:00
parent e70f8f2d10
commit 55c2e91e9f
16 changed files with 874 additions and 2 deletions

View File

@@ -1,3 +1,6 @@
2020-12-22 Version: patch
- Release InterpolateVideoFrame ToneSdrVideo ConvertHdrVideo.
2020-12-22 Version: patch
- Release InterpolateVideoFrame.

View File

@@ -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/ConvertHdrVideoRequest.h
include/alibabacloud/videoenhan/model/ConvertHdrVideoResult.h
include/alibabacloud/videoenhan/model/EnhanceVideoQualityRequest.h
include/alibabacloud/videoenhan/model/EnhanceVideoQualityResult.h
include/alibabacloud/videoenhan/model/EraseVideoLogoRequest.h
@@ -39,10 +41,14 @@ 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/InterpolateVideoFrameRequest.h
include/alibabacloud/videoenhan/model/InterpolateVideoFrameResult.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 )
include/alibabacloud/videoenhan/model/SuperResolveVideoResult.h
include/alibabacloud/videoenhan/model/ToneSdrVideoRequest.h
include/alibabacloud/videoenhan/model/ToneSdrVideoResult.h )
set(videoenhan_src
src/VideoenhanClient.cc
@@ -54,6 +60,8 @@ set(videoenhan_src
src/model/AdjustVideoColorResult.cc
src/model/ChangeVideoSizeRequest.cc
src/model/ChangeVideoSizeResult.cc
src/model/ConvertHdrVideoRequest.cc
src/model/ConvertHdrVideoResult.cc
src/model/EnhanceVideoQualityRequest.cc
src/model/EnhanceVideoQualityResult.cc
src/model/EraseVideoLogoRequest.cc
@@ -64,10 +72,14 @@ set(videoenhan_src
src/model/GenerateVideoResult.cc
src/model/GetAsyncJobResultRequest.cc
src/model/GetAsyncJobResultResult.cc
src/model/InterpolateVideoFrameRequest.cc
src/model/InterpolateVideoFrameResult.cc
src/model/MergeVideoFaceRequest.cc
src/model/MergeVideoFaceResult.cc
src/model/SuperResolveVideoRequest.cc
src/model/SuperResolveVideoResult.cc )
src/model/SuperResolveVideoResult.cc
src/model/ToneSdrVideoRequest.cc
src/model/ToneSdrVideoResult.cc )
add_library(videoenhan ${LIB_TYPE}
${videoenhan_public_header}

View File

@@ -30,6 +30,8 @@
#include "model/AdjustVideoColorResult.h"
#include "model/ChangeVideoSizeRequest.h"
#include "model/ChangeVideoSizeResult.h"
#include "model/ConvertHdrVideoRequest.h"
#include "model/ConvertHdrVideoResult.h"
#include "model/EnhanceVideoQualityRequest.h"
#include "model/EnhanceVideoQualityResult.h"
#include "model/EraseVideoLogoRequest.h"
@@ -40,10 +42,14 @@
#include "model/GenerateVideoResult.h"
#include "model/GetAsyncJobResultRequest.h"
#include "model/GetAsyncJobResultResult.h"
#include "model/InterpolateVideoFrameRequest.h"
#include "model/InterpolateVideoFrameResult.h"
#include "model/MergeVideoFaceRequest.h"
#include "model/MergeVideoFaceResult.h"
#include "model/SuperResolveVideoRequest.h"
#include "model/SuperResolveVideoResult.h"
#include "model/ToneSdrVideoRequest.h"
#include "model/ToneSdrVideoResult.h"
namespace AlibabaCloud
@@ -65,6 +71,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::ChangeVideoSizeResult> ChangeVideoSizeOutcome;
typedef std::future<ChangeVideoSizeOutcome> ChangeVideoSizeOutcomeCallable;
typedef std::function<void(const VideoenhanClient*, const Model::ChangeVideoSizeRequest&, const ChangeVideoSizeOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ChangeVideoSizeAsyncHandler;
typedef Outcome<Error, Model::ConvertHdrVideoResult> ConvertHdrVideoOutcome;
typedef std::future<ConvertHdrVideoOutcome> ConvertHdrVideoOutcomeCallable;
typedef std::function<void(const VideoenhanClient*, const Model::ConvertHdrVideoRequest&, const ConvertHdrVideoOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ConvertHdrVideoAsyncHandler;
typedef Outcome<Error, Model::EnhanceVideoQualityResult> EnhanceVideoQualityOutcome;
typedef std::future<EnhanceVideoQualityOutcome> EnhanceVideoQualityOutcomeCallable;
typedef std::function<void(const VideoenhanClient*, const Model::EnhanceVideoQualityRequest&, const EnhanceVideoQualityOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> EnhanceVideoQualityAsyncHandler;
@@ -80,12 +89,18 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::GetAsyncJobResultResult> GetAsyncJobResultOutcome;
typedef std::future<GetAsyncJobResultOutcome> GetAsyncJobResultOutcomeCallable;
typedef std::function<void(const VideoenhanClient*, const Model::GetAsyncJobResultRequest&, const GetAsyncJobResultOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetAsyncJobResultAsyncHandler;
typedef Outcome<Error, Model::InterpolateVideoFrameResult> InterpolateVideoFrameOutcome;
typedef std::future<InterpolateVideoFrameOutcome> InterpolateVideoFrameOutcomeCallable;
typedef std::function<void(const VideoenhanClient*, const Model::InterpolateVideoFrameRequest&, const InterpolateVideoFrameOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> InterpolateVideoFrameAsyncHandler;
typedef Outcome<Error, Model::MergeVideoFaceResult> MergeVideoFaceOutcome;
typedef std::future<MergeVideoFaceOutcome> MergeVideoFaceOutcomeCallable;
typedef std::function<void(const VideoenhanClient*, const Model::MergeVideoFaceRequest&, const MergeVideoFaceOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> MergeVideoFaceAsyncHandler;
typedef Outcome<Error, Model::SuperResolveVideoResult> SuperResolveVideoOutcome;
typedef std::future<SuperResolveVideoOutcome> SuperResolveVideoOutcomeCallable;
typedef std::function<void(const VideoenhanClient*, const Model::SuperResolveVideoRequest&, const SuperResolveVideoOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> SuperResolveVideoAsyncHandler;
typedef Outcome<Error, Model::ToneSdrVideoResult> ToneSdrVideoOutcome;
typedef std::future<ToneSdrVideoOutcome> ToneSdrVideoOutcomeCallable;
typedef std::function<void(const VideoenhanClient*, const Model::ToneSdrVideoRequest&, const ToneSdrVideoOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ToneSdrVideoAsyncHandler;
VideoenhanClient(const Credentials &credentials, const ClientConfiguration &configuration);
VideoenhanClient(const std::shared_ptr<CredentialsProvider> &credentialsProvider, const ClientConfiguration &configuration);
@@ -103,6 +118,9 @@ namespace AlibabaCloud
ChangeVideoSizeOutcome changeVideoSize(const Model::ChangeVideoSizeRequest &request)const;
void changeVideoSizeAsync(const Model::ChangeVideoSizeRequest& request, const ChangeVideoSizeAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ChangeVideoSizeOutcomeCallable changeVideoSizeCallable(const Model::ChangeVideoSizeRequest& request) const;
ConvertHdrVideoOutcome convertHdrVideo(const Model::ConvertHdrVideoRequest &request)const;
void convertHdrVideoAsync(const Model::ConvertHdrVideoRequest& request, const ConvertHdrVideoAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ConvertHdrVideoOutcomeCallable convertHdrVideoCallable(const Model::ConvertHdrVideoRequest& request) const;
EnhanceVideoQualityOutcome enhanceVideoQuality(const Model::EnhanceVideoQualityRequest &request)const;
void enhanceVideoQualityAsync(const Model::EnhanceVideoQualityRequest& request, const EnhanceVideoQualityAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
EnhanceVideoQualityOutcomeCallable enhanceVideoQualityCallable(const Model::EnhanceVideoQualityRequest& request) const;
@@ -118,12 +136,18 @@ namespace AlibabaCloud
GetAsyncJobResultOutcome getAsyncJobResult(const Model::GetAsyncJobResultRequest &request)const;
void getAsyncJobResultAsync(const Model::GetAsyncJobResultRequest& request, const GetAsyncJobResultAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
GetAsyncJobResultOutcomeCallable getAsyncJobResultCallable(const Model::GetAsyncJobResultRequest& request) const;
InterpolateVideoFrameOutcome interpolateVideoFrame(const Model::InterpolateVideoFrameRequest &request)const;
void interpolateVideoFrameAsync(const Model::InterpolateVideoFrameRequest& request, const InterpolateVideoFrameAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
InterpolateVideoFrameOutcomeCallable interpolateVideoFrameCallable(const Model::InterpolateVideoFrameRequest& request) const;
MergeVideoFaceOutcome mergeVideoFace(const Model::MergeVideoFaceRequest &request)const;
void mergeVideoFaceAsync(const Model::MergeVideoFaceRequest& request, const MergeVideoFaceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& 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<const AsyncCallerContext>& context = nullptr) const;
SuperResolveVideoOutcomeCallable superResolveVideoCallable(const Model::SuperResolveVideoRequest& request) const;
ToneSdrVideoOutcome toneSdrVideo(const Model::ToneSdrVideoRequest &request)const;
void toneSdrVideoAsync(const Model::ToneSdrVideoRequest& request, const ToneSdrVideoAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ToneSdrVideoOutcomeCallable toneSdrVideoCallable(const Model::ToneSdrVideoRequest& request) const;
private:
std::shared_ptr<EndpointProvider> endpointProvider_;

View File

@@ -0,0 +1,60 @@
/*
* 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_CONVERTHDRVIDEOREQUEST_H_
#define ALIBABACLOUD_VIDEOENHAN_MODEL_CONVERTHDRVIDEOREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/videoenhan/VideoenhanExport.h>
namespace AlibabaCloud
{
namespace Videoenhan
{
namespace Model
{
class ALIBABACLOUD_VIDEOENHAN_EXPORT ConvertHdrVideoRequest : public RpcServiceRequest
{
public:
ConvertHdrVideoRequest();
~ConvertHdrVideoRequest();
std::string getHDRFormat()const;
void setHDRFormat(const std::string& hDRFormat);
int getMaxIlluminance()const;
void setMaxIlluminance(int maxIlluminance);
int getBitrate()const;
void setBitrate(int bitrate);
bool getAsync()const;
void setAsync(bool async);
std::string getVideoURL()const;
void setVideoURL(const std::string& videoURL);
private:
std::string hDRFormat_;
int maxIlluminance_;
int bitrate_;
bool async_;
std::string videoURL_;
};
}
}
}
#endif // !ALIBABACLOUD_VIDEOENHAN_MODEL_CONVERTHDRVIDEOREQUEST_H_

View File

@@ -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_CONVERTHDRVIDEORESULT_H_
#define ALIBABACLOUD_VIDEOENHAN_MODEL_CONVERTHDRVIDEORESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/videoenhan/VideoenhanExport.h>
namespace AlibabaCloud
{
namespace Videoenhan
{
namespace Model
{
class ALIBABACLOUD_VIDEOENHAN_EXPORT ConvertHdrVideoResult : public ServiceResult
{
public:
struct Data
{
std::string videoURL;
};
ConvertHdrVideoResult();
explicit ConvertHdrVideoResult(const std::string &payload);
~ConvertHdrVideoResult();
Data getData()const;
protected:
void parse(const std::string &payload);
private:
Data data_;
};
}
}
}
#endif // !ALIBABACLOUD_VIDEOENHAN_MODEL_CONVERTHDRVIDEORESULT_H_

View File

@@ -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_INTERPOLATEVIDEOFRAMEREQUEST_H_
#define ALIBABACLOUD_VIDEOENHAN_MODEL_INTERPOLATEVIDEOFRAMEREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/videoenhan/VideoenhanExport.h>
namespace AlibabaCloud
{
namespace Videoenhan
{
namespace Model
{
class ALIBABACLOUD_VIDEOENHAN_EXPORT InterpolateVideoFrameRequest : public RpcServiceRequest
{
public:
InterpolateVideoFrameRequest();
~InterpolateVideoFrameRequest();
int getFrameRate()const;
void setFrameRate(int frameRate);
int getBitrate()const;
void setBitrate(int bitrate);
bool getAsync()const;
void setAsync(bool async);
std::string getVideoURL()const;
void setVideoURL(const std::string& videoURL);
private:
int frameRate_;
int bitrate_;
bool async_;
std::string videoURL_;
};
}
}
}
#endif // !ALIBABACLOUD_VIDEOENHAN_MODEL_INTERPOLATEVIDEOFRAMEREQUEST_H_

View File

@@ -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_INTERPOLATEVIDEOFRAMERESULT_H_
#define ALIBABACLOUD_VIDEOENHAN_MODEL_INTERPOLATEVIDEOFRAMERESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/videoenhan/VideoenhanExport.h>
namespace AlibabaCloud
{
namespace Videoenhan
{
namespace Model
{
class ALIBABACLOUD_VIDEOENHAN_EXPORT InterpolateVideoFrameResult : public ServiceResult
{
public:
struct Data
{
std::string videoURL;
};
InterpolateVideoFrameResult();
explicit InterpolateVideoFrameResult(const std::string &payload);
~InterpolateVideoFrameResult();
Data getData()const;
protected:
void parse(const std::string &payload);
private:
Data data_;
};
}
}
}
#endif // !ALIBABACLOUD_VIDEOENHAN_MODEL_INTERPOLATEVIDEOFRAMERESULT_H_

View File

@@ -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_TONESDRVIDEOREQUEST_H_
#define ALIBABACLOUD_VIDEOENHAN_MODEL_TONESDRVIDEOREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/videoenhan/VideoenhanExport.h>
namespace AlibabaCloud
{
namespace Videoenhan
{
namespace Model
{
class ALIBABACLOUD_VIDEOENHAN_EXPORT ToneSdrVideoRequest : public RpcServiceRequest
{
public:
ToneSdrVideoRequest();
~ToneSdrVideoRequest();
std::string getRecolorModel()const;
void setRecolorModel(const std::string& recolorModel);
int getBitrate()const;
void setBitrate(int bitrate);
bool getAsync()const;
void setAsync(bool async);
std::string getVideoURL()const;
void setVideoURL(const std::string& videoURL);
private:
std::string recolorModel_;
int bitrate_;
bool async_;
std::string videoURL_;
};
}
}
}
#endif // !ALIBABACLOUD_VIDEOENHAN_MODEL_TONESDRVIDEOREQUEST_H_

View File

@@ -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_TONESDRVIDEORESULT_H_
#define ALIBABACLOUD_VIDEOENHAN_MODEL_TONESDRVIDEORESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/videoenhan/VideoenhanExport.h>
namespace AlibabaCloud
{
namespace Videoenhan
{
namespace Model
{
class ALIBABACLOUD_VIDEOENHAN_EXPORT ToneSdrVideoResult : public ServiceResult
{
public:
struct Data
{
std::string videoURL;
};
ToneSdrVideoResult();
explicit ToneSdrVideoResult(const std::string &payload);
~ToneSdrVideoResult();
Data getData()const;
protected:
void parse(const std::string &payload);
private:
Data data_;
};
}
}
}
#endif // !ALIBABACLOUD_VIDEOENHAN_MODEL_TONESDRVIDEORESULT_H_

View File

@@ -195,6 +195,42 @@ VideoenhanClient::ChangeVideoSizeOutcomeCallable VideoenhanClient::changeVideoSi
return task->get_future();
}
VideoenhanClient::ConvertHdrVideoOutcome VideoenhanClient::convertHdrVideo(const ConvertHdrVideoRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ConvertHdrVideoOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ConvertHdrVideoOutcome(ConvertHdrVideoResult(outcome.result()));
else
return ConvertHdrVideoOutcome(outcome.error());
}
void VideoenhanClient::convertHdrVideoAsync(const ConvertHdrVideoRequest& request, const ConvertHdrVideoAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, convertHdrVideo(request), context);
};
asyncExecute(new Runnable(fn));
}
VideoenhanClient::ConvertHdrVideoOutcomeCallable VideoenhanClient::convertHdrVideoCallable(const ConvertHdrVideoRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ConvertHdrVideoOutcome()>>(
[this, request]()
{
return this->convertHdrVideo(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
VideoenhanClient::EnhanceVideoQualityOutcome VideoenhanClient::enhanceVideoQuality(const EnhanceVideoQualityRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -375,6 +411,42 @@ VideoenhanClient::GetAsyncJobResultOutcomeCallable VideoenhanClient::getAsyncJob
return task->get_future();
}
VideoenhanClient::InterpolateVideoFrameOutcome VideoenhanClient::interpolateVideoFrame(const InterpolateVideoFrameRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return InterpolateVideoFrameOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return InterpolateVideoFrameOutcome(InterpolateVideoFrameResult(outcome.result()));
else
return InterpolateVideoFrameOutcome(outcome.error());
}
void VideoenhanClient::interpolateVideoFrameAsync(const InterpolateVideoFrameRequest& request, const InterpolateVideoFrameAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, interpolateVideoFrame(request), context);
};
asyncExecute(new Runnable(fn));
}
VideoenhanClient::InterpolateVideoFrameOutcomeCallable VideoenhanClient::interpolateVideoFrameCallable(const InterpolateVideoFrameRequest &request) const
{
auto task = std::make_shared<std::packaged_task<InterpolateVideoFrameOutcome()>>(
[this, request]()
{
return this->interpolateVideoFrame(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
VideoenhanClient::MergeVideoFaceOutcome VideoenhanClient::mergeVideoFace(const MergeVideoFaceRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -447,3 +519,39 @@ VideoenhanClient::SuperResolveVideoOutcomeCallable VideoenhanClient::superResolv
return task->get_future();
}
VideoenhanClient::ToneSdrVideoOutcome VideoenhanClient::toneSdrVideo(const ToneSdrVideoRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ToneSdrVideoOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ToneSdrVideoOutcome(ToneSdrVideoResult(outcome.result()));
else
return ToneSdrVideoOutcome(outcome.error());
}
void VideoenhanClient::toneSdrVideoAsync(const ToneSdrVideoRequest& request, const ToneSdrVideoAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, toneSdrVideo(request), context);
};
asyncExecute(new Runnable(fn));
}
VideoenhanClient::ToneSdrVideoOutcomeCallable VideoenhanClient::toneSdrVideoCallable(const ToneSdrVideoRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ToneSdrVideoOutcome()>>(
[this, request]()
{
return this->toneSdrVideo(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}

View File

@@ -0,0 +1,84 @@
/*
* 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/ConvertHdrVideoRequest.h>
using AlibabaCloud::Videoenhan::Model::ConvertHdrVideoRequest;
ConvertHdrVideoRequest::ConvertHdrVideoRequest() :
RpcServiceRequest("videoenhan", "2020-03-20", "ConvertHdrVideo")
{
setMethod(HttpRequest::Method::Post);
}
ConvertHdrVideoRequest::~ConvertHdrVideoRequest()
{}
std::string ConvertHdrVideoRequest::getHDRFormat()const
{
return hDRFormat_;
}
void ConvertHdrVideoRequest::setHDRFormat(const std::string& hDRFormat)
{
hDRFormat_ = hDRFormat;
setBodyParameter("HDRFormat", hDRFormat);
}
int ConvertHdrVideoRequest::getMaxIlluminance()const
{
return maxIlluminance_;
}
void ConvertHdrVideoRequest::setMaxIlluminance(int maxIlluminance)
{
maxIlluminance_ = maxIlluminance;
setBodyParameter("MaxIlluminance", std::to_string(maxIlluminance));
}
int ConvertHdrVideoRequest::getBitrate()const
{
return bitrate_;
}
void ConvertHdrVideoRequest::setBitrate(int bitrate)
{
bitrate_ = bitrate;
setBodyParameter("Bitrate", std::to_string(bitrate));
}
bool ConvertHdrVideoRequest::getAsync()const
{
return async_;
}
void ConvertHdrVideoRequest::setAsync(bool async)
{
async_ = async;
setBodyParameter("Async", async ? "true" : "false");
}
std::string ConvertHdrVideoRequest::getVideoURL()const
{
return videoURL_;
}
void ConvertHdrVideoRequest::setVideoURL(const std::string& videoURL)
{
videoURL_ = videoURL;
setBodyParameter("VideoURL", videoURL);
}

View File

@@ -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 <alibabacloud/videoenhan/model/ConvertHdrVideoResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Videoenhan;
using namespace AlibabaCloud::Videoenhan::Model;
ConvertHdrVideoResult::ConvertHdrVideoResult() :
ServiceResult()
{}
ConvertHdrVideoResult::ConvertHdrVideoResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ConvertHdrVideoResult::~ConvertHdrVideoResult()
{}
void ConvertHdrVideoResult::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();
}
ConvertHdrVideoResult::Data ConvertHdrVideoResult::getData()const
{
return data_;
}

View File

@@ -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 <alibabacloud/videoenhan/model/InterpolateVideoFrameRequest.h>
using AlibabaCloud::Videoenhan::Model::InterpolateVideoFrameRequest;
InterpolateVideoFrameRequest::InterpolateVideoFrameRequest() :
RpcServiceRequest("videoenhan", "2020-03-20", "InterpolateVideoFrame")
{
setMethod(HttpRequest::Method::Post);
}
InterpolateVideoFrameRequest::~InterpolateVideoFrameRequest()
{}
int InterpolateVideoFrameRequest::getFrameRate()const
{
return frameRate_;
}
void InterpolateVideoFrameRequest::setFrameRate(int frameRate)
{
frameRate_ = frameRate;
setBodyParameter("FrameRate", std::to_string(frameRate));
}
int InterpolateVideoFrameRequest::getBitrate()const
{
return bitrate_;
}
void InterpolateVideoFrameRequest::setBitrate(int bitrate)
{
bitrate_ = bitrate;
setBodyParameter("Bitrate", std::to_string(bitrate));
}
bool InterpolateVideoFrameRequest::getAsync()const
{
return async_;
}
void InterpolateVideoFrameRequest::setAsync(bool async)
{
async_ = async;
setBodyParameter("Async", async ? "true" : "false");
}
std::string InterpolateVideoFrameRequest::getVideoURL()const
{
return videoURL_;
}
void InterpolateVideoFrameRequest::setVideoURL(const std::string& videoURL)
{
videoURL_ = videoURL;
setBodyParameter("VideoURL", videoURL);
}

View File

@@ -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 <alibabacloud/videoenhan/model/InterpolateVideoFrameResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Videoenhan;
using namespace AlibabaCloud::Videoenhan::Model;
InterpolateVideoFrameResult::InterpolateVideoFrameResult() :
ServiceResult()
{}
InterpolateVideoFrameResult::InterpolateVideoFrameResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
InterpolateVideoFrameResult::~InterpolateVideoFrameResult()
{}
void InterpolateVideoFrameResult::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();
}
InterpolateVideoFrameResult::Data InterpolateVideoFrameResult::getData()const
{
return data_;
}

View File

@@ -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 <alibabacloud/videoenhan/model/ToneSdrVideoRequest.h>
using AlibabaCloud::Videoenhan::Model::ToneSdrVideoRequest;
ToneSdrVideoRequest::ToneSdrVideoRequest() :
RpcServiceRequest("videoenhan", "2020-03-20", "ToneSdrVideo")
{
setMethod(HttpRequest::Method::Post);
}
ToneSdrVideoRequest::~ToneSdrVideoRequest()
{}
std::string ToneSdrVideoRequest::getRecolorModel()const
{
return recolorModel_;
}
void ToneSdrVideoRequest::setRecolorModel(const std::string& recolorModel)
{
recolorModel_ = recolorModel;
setBodyParameter("RecolorModel", recolorModel);
}
int ToneSdrVideoRequest::getBitrate()const
{
return bitrate_;
}
void ToneSdrVideoRequest::setBitrate(int bitrate)
{
bitrate_ = bitrate;
setBodyParameter("Bitrate", std::to_string(bitrate));
}
bool ToneSdrVideoRequest::getAsync()const
{
return async_;
}
void ToneSdrVideoRequest::setAsync(bool async)
{
async_ = async;
setBodyParameter("Async", async ? "true" : "false");
}
std::string ToneSdrVideoRequest::getVideoURL()const
{
return videoURL_;
}
void ToneSdrVideoRequest::setVideoURL(const std::string& videoURL)
{
videoURL_ = videoURL;
setBodyParameter("VideoURL", videoURL);
}

View File

@@ -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 <alibabacloud/videoenhan/model/ToneSdrVideoResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Videoenhan;
using namespace AlibabaCloud::Videoenhan::Model;
ToneSdrVideoResult::ToneSdrVideoResult() :
ServiceResult()
{}
ToneSdrVideoResult::ToneSdrVideoResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ToneSdrVideoResult::~ToneSdrVideoResult()
{}
void ToneSdrVideoResult::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();
}
ToneSdrVideoResult::Data ToneSdrVideoResult::getData()const
{
return data_;
}