Release RecognizeVideoCastCrewList.
This commit is contained in:
@@ -73,6 +73,8 @@ set(ocr_public_header_model
|
||||
include/alibabacloud/ocr/model/RecognizeVINCodeResult.h
|
||||
include/alibabacloud/ocr/model/RecognizeVerificationcodeRequest.h
|
||||
include/alibabacloud/ocr/model/RecognizeVerificationcodeResult.h
|
||||
include/alibabacloud/ocr/model/RecognizeVideoCastCrewListRequest.h
|
||||
include/alibabacloud/ocr/model/RecognizeVideoCastCrewListResult.h
|
||||
include/alibabacloud/ocr/model/RecognizeVideoCharacterRequest.h
|
||||
include/alibabacloud/ocr/model/RecognizeVideoCharacterResult.h
|
||||
include/alibabacloud/ocr/model/TrimDocumentRequest.h
|
||||
@@ -132,6 +134,8 @@ set(ocr_src
|
||||
src/model/RecognizeVINCodeResult.cc
|
||||
src/model/RecognizeVerificationcodeRequest.cc
|
||||
src/model/RecognizeVerificationcodeResult.cc
|
||||
src/model/RecognizeVideoCastCrewListRequest.cc
|
||||
src/model/RecognizeVideoCastCrewListResult.cc
|
||||
src/model/RecognizeVideoCharacterRequest.cc
|
||||
src/model/RecognizeVideoCharacterResult.cc
|
||||
src/model/TrimDocumentRequest.cc
|
||||
|
||||
@@ -74,6 +74,8 @@
|
||||
#include "model/RecognizeVINCodeResult.h"
|
||||
#include "model/RecognizeVerificationcodeRequest.h"
|
||||
#include "model/RecognizeVerificationcodeResult.h"
|
||||
#include "model/RecognizeVideoCastCrewListRequest.h"
|
||||
#include "model/RecognizeVideoCastCrewListResult.h"
|
||||
#include "model/RecognizeVideoCharacterRequest.h"
|
||||
#include "model/RecognizeVideoCharacterResult.h"
|
||||
#include "model/TrimDocumentRequest.h"
|
||||
@@ -165,6 +167,9 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::RecognizeVerificationcodeResult> RecognizeVerificationcodeOutcome;
|
||||
typedef std::future<RecognizeVerificationcodeOutcome> RecognizeVerificationcodeOutcomeCallable;
|
||||
typedef std::function<void(const OcrClient*, const Model::RecognizeVerificationcodeRequest&, const RecognizeVerificationcodeOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> RecognizeVerificationcodeAsyncHandler;
|
||||
typedef Outcome<Error, Model::RecognizeVideoCastCrewListResult> RecognizeVideoCastCrewListOutcome;
|
||||
typedef std::future<RecognizeVideoCastCrewListOutcome> RecognizeVideoCastCrewListOutcomeCallable;
|
||||
typedef std::function<void(const OcrClient*, const Model::RecognizeVideoCastCrewListRequest&, const RecognizeVideoCastCrewListOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> RecognizeVideoCastCrewListAsyncHandler;
|
||||
typedef Outcome<Error, Model::RecognizeVideoCharacterResult> RecognizeVideoCharacterOutcome;
|
||||
typedef std::future<RecognizeVideoCharacterOutcome> RecognizeVideoCharacterOutcomeCallable;
|
||||
typedef std::function<void(const OcrClient*, const Model::RecognizeVideoCharacterRequest&, const RecognizeVideoCharacterOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> RecognizeVideoCharacterAsyncHandler;
|
||||
@@ -254,6 +259,9 @@ namespace AlibabaCloud
|
||||
RecognizeVerificationcodeOutcome recognizeVerificationcode(const Model::RecognizeVerificationcodeRequest &request)const;
|
||||
void recognizeVerificationcodeAsync(const Model::RecognizeVerificationcodeRequest& request, const RecognizeVerificationcodeAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
RecognizeVerificationcodeOutcomeCallable recognizeVerificationcodeCallable(const Model::RecognizeVerificationcodeRequest& request) const;
|
||||
RecognizeVideoCastCrewListOutcome recognizeVideoCastCrewList(const Model::RecognizeVideoCastCrewListRequest &request)const;
|
||||
void recognizeVideoCastCrewListAsync(const Model::RecognizeVideoCastCrewListRequest& request, const RecognizeVideoCastCrewListAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
RecognizeVideoCastCrewListOutcomeCallable recognizeVideoCastCrewListCallable(const Model::RecognizeVideoCastCrewListRequest& request) const;
|
||||
RecognizeVideoCharacterOutcome recognizeVideoCharacter(const Model::RecognizeVideoCharacterRequest &request)const;
|
||||
void recognizeVideoCharacterAsync(const Model::RecognizeVideoCharacterRequest& request, const RecognizeVideoCharacterAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
RecognizeVideoCharacterOutcomeCallable recognizeVideoCharacterCallable(const Model::RecognizeVideoCharacterRequest& request) const;
|
||||
|
||||
@@ -40,11 +40,20 @@ namespace AlibabaCloud
|
||||
RecognizeQrCodeRequest();
|
||||
~RecognizeQrCodeRequest();
|
||||
|
||||
bool getFormatResultToJson()const;
|
||||
void setFormatResultToJson(bool formatResultToJson);
|
||||
std::string getOssFile()const;
|
||||
void setOssFile(const std::string& ossFile);
|
||||
std::vector<Tasks> getTasks()const;
|
||||
void setTasks(const std::vector<Tasks>& tasks);
|
||||
std::string getRequestProxyBy()const;
|
||||
void setRequestProxyBy(const std::string& requestProxyBy);
|
||||
|
||||
private:
|
||||
bool formatResultToJson_;
|
||||
std::string ossFile_;
|
||||
std::vector<Tasks> tasks_;
|
||||
std::string requestProxyBy_;
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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_OCR_MODEL_RECOGNIZEVIDEOCASTCREWLISTREQUEST_H_
|
||||
#define ALIBABACLOUD_OCR_MODEL_RECOGNIZEVIDEOCASTCREWLISTREQUEST_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <alibabacloud/ocr/OcrExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Ocr
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_OCR_EXPORT RecognizeVideoCastCrewListRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
RecognizeVideoCastCrewListRequest();
|
||||
~RecognizeVideoCastCrewListRequest();
|
||||
|
||||
Array getParams()const;
|
||||
void setParams(const Array& params);
|
||||
bool getAsync()const;
|
||||
void setAsync(bool async);
|
||||
std::string getRegisterUrl()const;
|
||||
void setRegisterUrl(const std::string& registerUrl);
|
||||
std::string getVideoUrl()const;
|
||||
void setVideoUrl(const std::string& videoUrl);
|
||||
|
||||
private:
|
||||
Array params_;
|
||||
bool async_;
|
||||
std::string registerUrl_;
|
||||
std::string videoUrl_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_OCR_MODEL_RECOGNIZEVIDEOCASTCREWLISTREQUEST_H_
|
||||
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* 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_OCR_MODEL_RECOGNIZEVIDEOCASTCREWLISTRESULT_H_
|
||||
#define ALIBABACLOUD_OCR_MODEL_RECOGNIZEVIDEOCASTCREWLISTRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/ocr/OcrExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Ocr
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_OCR_EXPORT RecognizeVideoCastCrewListResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
RecognizeVideoCastCrewListResult();
|
||||
explicit RecognizeVideoCastCrewListResult(const std::string &payload);
|
||||
~RecognizeVideoCastCrewListResult();
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_OCR_MODEL_RECOGNIZEVIDEOCASTCREWLISTRESULT_H_
|
||||
@@ -35,21 +35,12 @@ namespace AlibabaCloud
|
||||
RecognizeVideoCharacterRequest();
|
||||
~RecognizeVideoCharacterRequest();
|
||||
|
||||
bool getFormatResultToJson()const;
|
||||
void setFormatResultToJson(bool formatResultToJson);
|
||||
std::string getOssFile()const;
|
||||
void setOssFile(const std::string& ossFile);
|
||||
std::string getRequestProxyBy()const;
|
||||
void setRequestProxyBy(const std::string& requestProxyBy);
|
||||
bool getAsync()const;
|
||||
void setAsync(bool async);
|
||||
std::string getVideoURL()const;
|
||||
void setVideoURL(const std::string& videoURL);
|
||||
|
||||
private:
|
||||
bool formatResultToJson_;
|
||||
std::string ossFile_;
|
||||
std::string requestProxyBy_;
|
||||
bool async_;
|
||||
std::string videoURL_;
|
||||
|
||||
|
||||
@@ -56,6 +56,7 @@ namespace AlibabaCloud
|
||||
std::vector<Frame> frames;
|
||||
long height;
|
||||
long width;
|
||||
std::string inputFile;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
73
ocr/src/model/RecognizeVideoCastCrewListRequest.cc
Normal file
73
ocr/src/model/RecognizeVideoCastCrewListRequest.cc
Normal 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);
|
||||
}
|
||||
|
||||
44
ocr/src/model/RecognizeVideoCastCrewListResult.cc
Normal file
44
ocr/src/model/RecognizeVideoCastCrewListResult.cc
Normal 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());
|
||||
|
||||
}
|
||||
|
||||
@@ -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_;
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user