Release RecognizeVideoCastCrewList.

This commit is contained in:
sdk-team
2022-03-03 13:10:16 +00:00
parent 5fb8057a45
commit a1e11dbb5b
15 changed files with 320 additions and 43 deletions

View File

@@ -987,6 +987,42 @@ OcrClient::RecognizeVerificationcodeOutcomeCallable OcrClient::recognizeVerifica
return task->get_future();
}
OcrClient::RecognizeVideoCastCrewListOutcome OcrClient::recognizeVideoCastCrewList(const RecognizeVideoCastCrewListRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return RecognizeVideoCastCrewListOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return RecognizeVideoCastCrewListOutcome(RecognizeVideoCastCrewListResult(outcome.result()));
else
return RecognizeVideoCastCrewListOutcome(outcome.error());
}
void OcrClient::recognizeVideoCastCrewListAsync(const RecognizeVideoCastCrewListRequest& request, const RecognizeVideoCastCrewListAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, recognizeVideoCastCrewList(request), context);
};
asyncExecute(new Runnable(fn));
}
OcrClient::RecognizeVideoCastCrewListOutcomeCallable OcrClient::recognizeVideoCastCrewListCallable(const RecognizeVideoCastCrewListRequest &request) const
{
auto task = std::make_shared<std::packaged_task<RecognizeVideoCastCrewListOutcome()>>(
[this, request]()
{
return this->recognizeVideoCastCrewList(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
OcrClient::RecognizeVideoCharacterOutcome OcrClient::recognizeVideoCharacter(const RecognizeVideoCharacterRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View File

@@ -27,6 +27,28 @@ RecognizeQrCodeRequest::RecognizeQrCodeRequest() :
RecognizeQrCodeRequest::~RecognizeQrCodeRequest()
{}
bool RecognizeQrCodeRequest::getFormatResultToJson()const
{
return formatResultToJson_;
}
void RecognizeQrCodeRequest::setFormatResultToJson(bool formatResultToJson)
{
formatResultToJson_ = formatResultToJson;
setParameter("FormatResultToJson", formatResultToJson ? "true" : "false");
}
std::string RecognizeQrCodeRequest::getOssFile()const
{
return ossFile_;
}
void RecognizeQrCodeRequest::setOssFile(const std::string& ossFile)
{
ossFile_ = ossFile;
setParameter("OssFile", ossFile);
}
std::vector<RecognizeQrCodeRequest::Tasks> RecognizeQrCodeRequest::getTasks()const
{
return tasks_;
@@ -42,3 +64,14 @@ void RecognizeQrCodeRequest::setTasks(const std::vector<Tasks>& tasks)
}
}
std::string RecognizeQrCodeRequest::getRequestProxyBy()const
{
return requestProxyBy_;
}
void RecognizeQrCodeRequest::setRequestProxyBy(const std::string& requestProxyBy)
{
requestProxyBy_ = requestProxyBy;
setParameter("RequestProxyBy", requestProxyBy);
}

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/ocr/model/RecognizeVideoCastCrewListRequest.h>
using AlibabaCloud::Ocr::Model::RecognizeVideoCastCrewListRequest;
RecognizeVideoCastCrewListRequest::RecognizeVideoCastCrewListRequest() :
RpcServiceRequest("ocr", "2019-12-30", "RecognizeVideoCastCrewList")
{
setMethod(HttpRequest::Method::Post);
}
RecognizeVideoCastCrewListRequest::~RecognizeVideoCastCrewListRequest()
{}
Array RecognizeVideoCastCrewListRequest::getParams()const
{
return params_;
}
void RecognizeVideoCastCrewListRequest::setParams(const Array& params)
{
params_ = params;
setBodyParameter("Params", std::to_string(params));
}
bool RecognizeVideoCastCrewListRequest::getAsync()const
{
return async_;
}
void RecognizeVideoCastCrewListRequest::setAsync(bool async)
{
async_ = async;
setBodyParameter("Async", async ? "true" : "false");
}
std::string RecognizeVideoCastCrewListRequest::getRegisterUrl()const
{
return registerUrl_;
}
void RecognizeVideoCastCrewListRequest::setRegisterUrl(const std::string& registerUrl)
{
registerUrl_ = registerUrl;
setBodyParameter("RegisterUrl", registerUrl);
}
std::string RecognizeVideoCastCrewListRequest::getVideoUrl()const
{
return videoUrl_;
}
void RecognizeVideoCastCrewListRequest::setVideoUrl(const std::string& videoUrl)
{
videoUrl_ = videoUrl;
setBodyParameter("VideoUrl", videoUrl);
}

View File

@@ -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 <alibabacloud/ocr/model/RecognizeVideoCastCrewListResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Ocr;
using namespace AlibabaCloud::Ocr::Model;
RecognizeVideoCastCrewListResult::RecognizeVideoCastCrewListResult() :
ServiceResult()
{}
RecognizeVideoCastCrewListResult::RecognizeVideoCastCrewListResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
RecognizeVideoCastCrewListResult::~RecognizeVideoCastCrewListResult()
{}
void RecognizeVideoCastCrewListResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
}

View File

@@ -27,39 +27,6 @@ RecognizeVideoCharacterRequest::RecognizeVideoCharacterRequest() :
RecognizeVideoCharacterRequest::~RecognizeVideoCharacterRequest()
{}
bool RecognizeVideoCharacterRequest::getFormatResultToJson()const
{
return formatResultToJson_;
}
void RecognizeVideoCharacterRequest::setFormatResultToJson(bool formatResultToJson)
{
formatResultToJson_ = formatResultToJson;
setParameter("FormatResultToJson", formatResultToJson ? "true" : "false");
}
std::string RecognizeVideoCharacterRequest::getOssFile()const
{
return ossFile_;
}
void RecognizeVideoCharacterRequest::setOssFile(const std::string& ossFile)
{
ossFile_ = ossFile;
setParameter("OssFile", ossFile);
}
std::string RecognizeVideoCharacterRequest::getRequestProxyBy()const
{
return requestProxyBy_;
}
void RecognizeVideoCharacterRequest::setRequestProxyBy(const std::string& requestProxyBy)
{
requestProxyBy_ = requestProxyBy;
setParameter("RequestProxyBy", requestProxyBy);
}
bool RecognizeVideoCharacterRequest::getAsync()const
{
return async_;

View File

@@ -44,6 +44,8 @@ void RecognizeVideoCharacterResult::parse(const std::string &payload)
data_.width = std::stol(dataNode["Width"].asString());
if(!dataNode["Height"].isNull())
data_.height = std::stol(dataNode["Height"].asString());
if(!dataNode["InputFile"].isNull())
data_.inputFile = dataNode["InputFile"].asString();
auto allFramesNode = dataNode["Frames"]["Frame"];
for (auto dataNodeFramesFrame : allFramesNode)
{