diff --git a/CHANGELOG b/CHANGELOG index 7111c4b94..fe2acd4f2 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,7 @@ +2021-03-21 Version: 1.36.647 +- Support watermark. +- Support pdf preview. + 2021-03-19 Version: 1.36.646 - StateConfiguration in CreateStateConfigurationResponse changes from list to single object. diff --git a/VERSION b/VERSION index c6ca3d42b..a12f9282d 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.646 \ No newline at end of file +1.36.647 \ No newline at end of file diff --git a/imm/2017-09-06/CreateGroupFacesJob.xml b/imm/2017-09-06/CreateGroupFacesJob.xml index 2c1832e4c..ce1bccc86 100644 --- a/imm/2017-09-06/CreateGroupFacesJob.xml +++ b/imm/2017-09-06/CreateGroupFacesJob.xml @@ -1 +1 @@ - + diff --git a/imm/2017-09-06/CreateStreamAnalyseTask.xml b/imm/2017-09-06/CreateStreamAnalyseTask.xml index aab33c865..c35344965 100644 --- a/imm/2017-09-06/CreateStreamAnalyseTask.xml +++ b/imm/2017-09-06/CreateStreamAnalyseTask.xml @@ -1 +1 @@ - + diff --git a/imm/2017-09-06/CreateVideoCompressTask.xml b/imm/2017-09-06/CreateVideoCompressTask.xml index c7e672e24..582a47e75 100644 --- a/imm/2017-09-06/CreateVideoCompressTask.xml +++ b/imm/2017-09-06/CreateVideoCompressTask.xml @@ -1 +1 @@ - + diff --git a/imm/2017-09-06/DeleteImage.xml b/imm/2017-09-06/DeleteImage.xml index 6c3ebaec1..7cf048714 100644 --- a/imm/2017-09-06/DeleteImage.xml +++ b/imm/2017-09-06/DeleteImage.xml @@ -1 +1 @@ - + diff --git a/imm/2017-09-06/GetImage.xml b/imm/2017-09-06/GetImage.xml index 25263e280..86d10309d 100644 --- a/imm/2017-09-06/GetImage.xml +++ b/imm/2017-09-06/GetImage.xml @@ -1 +1 @@ - + diff --git a/imm/2017-09-06/GetMediaMeta.xml b/imm/2017-09-06/GetMediaMeta.xml index 4b593b9ba..f081221d6 100644 --- a/imm/2017-09-06/GetMediaMeta.xml +++ b/imm/2017-09-06/GetMediaMeta.xml @@ -1 +1 @@ - + diff --git a/imm/2017-09-06/GetVideo.xml b/imm/2017-09-06/GetVideo.xml index d5abc549f..d81efeb12 100644 --- a/imm/2017-09-06/GetVideo.xml +++ b/imm/2017-09-06/GetVideo.xml @@ -1 +1 @@ - + diff --git a/imm/2017-09-06/GetWebofficeURL.xml b/imm/2017-09-06/GetWebofficeURL.xml index 49629d5a4..e7e6b6a1b 100644 --- a/imm/2017-09-06/GetWebofficeURL.xml +++ b/imm/2017-09-06/GetWebofficeURL.xml @@ -1 +1 @@ - + diff --git a/imm/2017-09-06/IndexImage.xml b/imm/2017-09-06/IndexImage.xml index 6ff9c30cf..f303f6b33 100644 --- a/imm/2017-09-06/IndexImage.xml +++ b/imm/2017-09-06/IndexImage.xml @@ -1 +1 @@ - + diff --git a/imm/2017-09-06/IndexVideo.xml b/imm/2017-09-06/IndexVideo.xml index 06448e934..3ecfeef1e 100644 --- a/imm/2017-09-06/IndexVideo.xml +++ b/imm/2017-09-06/IndexVideo.xml @@ -1 +1 @@ - + diff --git a/imm/2017-09-06/StopStreamAnalyseTask.xml b/imm/2017-09-06/StopStreamAnalyseTask.xml index 97864f480..3fe1ede4d 100644 --- a/imm/2017-09-06/StopStreamAnalyseTask.xml +++ b/imm/2017-09-06/StopStreamAnalyseTask.xml @@ -1 +1 @@ - + diff --git a/imm/CMakeLists.txt b/imm/CMakeLists.txt index ec74e02f0..9937ae4b3 100644 --- a/imm/CMakeLists.txt +++ b/imm/CMakeLists.txt @@ -39,8 +39,6 @@ set(imm_public_header_model include/alibabacloud/imm/model/CreateOfficeConversionTaskResult.h include/alibabacloud/imm/model/CreateSetRequest.h include/alibabacloud/imm/model/CreateSetResult.h - include/alibabacloud/imm/model/CreateStreamAnalyseTaskRequest.h - include/alibabacloud/imm/model/CreateStreamAnalyseTaskResult.h include/alibabacloud/imm/model/CreateVideoAbstractTaskRequest.h include/alibabacloud/imm/model/CreateVideoAbstractTaskResult.h include/alibabacloud/imm/model/CreateVideoAnalyseTaskRequest.h @@ -178,8 +176,6 @@ set(imm_src src/model/CreateOfficeConversionTaskResult.cc src/model/CreateSetRequest.cc src/model/CreateSetResult.cc - src/model/CreateStreamAnalyseTaskRequest.cc - src/model/CreateStreamAnalyseTaskResult.cc src/model/CreateVideoAbstractTaskRequest.cc src/model/CreateVideoAbstractTaskResult.cc src/model/CreateVideoAnalyseTaskRequest.cc diff --git a/imm/include/alibabacloud/imm/ImmClient.h b/imm/include/alibabacloud/imm/ImmClient.h index fe2bcb1ff..ff94eb718 100644 --- a/imm/include/alibabacloud/imm/ImmClient.h +++ b/imm/include/alibabacloud/imm/ImmClient.h @@ -40,8 +40,6 @@ #include "model/CreateOfficeConversionTaskResult.h" #include "model/CreateSetRequest.h" #include "model/CreateSetResult.h" -#include "model/CreateStreamAnalyseTaskRequest.h" -#include "model/CreateStreamAnalyseTaskResult.h" #include "model/CreateVideoAbstractTaskRequest.h" #include "model/CreateVideoAbstractTaskResult.h" #include "model/CreateVideoAnalyseTaskRequest.h" @@ -194,9 +192,6 @@ namespace AlibabaCloud typedef Outcome CreateSetOutcome; typedef std::future CreateSetOutcomeCallable; typedef std::function&)> CreateSetAsyncHandler; - typedef Outcome CreateStreamAnalyseTaskOutcome; - typedef std::future CreateStreamAnalyseTaskOutcomeCallable; - typedef std::function&)> CreateStreamAnalyseTaskAsyncHandler; typedef Outcome CreateVideoAbstractTaskOutcome; typedef std::future CreateVideoAbstractTaskOutcomeCallable; typedef std::function&)> CreateVideoAbstractTaskAsyncHandler; @@ -403,9 +398,6 @@ namespace AlibabaCloud CreateSetOutcome createSet(const Model::CreateSetRequest &request)const; void createSetAsync(const Model::CreateSetRequest& request, const CreateSetAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; CreateSetOutcomeCallable createSetCallable(const Model::CreateSetRequest& request) const; - CreateStreamAnalyseTaskOutcome createStreamAnalyseTask(const Model::CreateStreamAnalyseTaskRequest &request)const; - void createStreamAnalyseTaskAsync(const Model::CreateStreamAnalyseTaskRequest& request, const CreateStreamAnalyseTaskAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; - CreateStreamAnalyseTaskOutcomeCallable createStreamAnalyseTaskCallable(const Model::CreateStreamAnalyseTaskRequest& request) const; CreateVideoAbstractTaskOutcome createVideoAbstractTask(const Model::CreateVideoAbstractTaskRequest &request)const; void createVideoAbstractTaskAsync(const Model::CreateVideoAbstractTaskRequest& request, const CreateVideoAbstractTaskAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; CreateVideoAbstractTaskOutcomeCallable createVideoAbstractTaskCallable(const Model::CreateVideoAbstractTaskRequest& request) const; diff --git a/imm/include/alibabacloud/imm/model/CreateStreamAnalyseTaskRequest.h b/imm/include/alibabacloud/imm/model/CreateStreamAnalyseTaskRequest.h deleted file mode 100644 index 93e94b399..000000000 --- a/imm/include/alibabacloud/imm/model/CreateStreamAnalyseTaskRequest.h +++ /dev/null @@ -1,78 +0,0 @@ -/* - * 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_IMM_MODEL_CREATESTREAMANALYSETASKREQUEST_H_ -#define ALIBABACLOUD_IMM_MODEL_CREATESTREAMANALYSETASKREQUEST_H_ - -#include -#include -#include -#include - -namespace AlibabaCloud -{ - namespace Imm - { - namespace Model - { - class ALIBABACLOUD_IMM_EXPORT CreateStreamAnalyseTaskRequest : public RpcServiceRequest - { - - public: - CreateStreamAnalyseTaskRequest(); - ~CreateStreamAnalyseTaskRequest(); - - std::string getGrabType()const; - void setGrabType(const std::string& grabType); - std::string getProject()const; - void setProject(const std::string& project); - std::string getStartTime()const; - void setStartTime(const std::string& startTime); - std::string getAccessKeyId()const; - void setAccessKeyId(const std::string& accessKeyId); - std::string getNotifyEndpoint()const; - void setNotifyEndpoint(const std::string& notifyEndpoint); - std::string getStreamUri()const; - void setStreamUri(const std::string& streamUri); - std::string getNotifyTopicName()const; - void setNotifyTopicName(const std::string& notifyTopicName); - std::string getEndTime()const; - void setEndTime(const std::string& endTime); - bool getSaveType()const; - void setSaveType(bool saveType); - std::string getInterval()const; - void setInterval(const std::string& interval); - std::string getTgtUri()const; - void setTgtUri(const std::string& tgtUri); - - private: - std::string grabType_; - std::string project_; - std::string startTime_; - std::string accessKeyId_; - std::string notifyEndpoint_; - std::string streamUri_; - std::string notifyTopicName_; - std::string endTime_; - bool saveType_; - std::string interval_; - std::string tgtUri_; - - }; - } - } -} -#endif // !ALIBABACLOUD_IMM_MODEL_CREATESTREAMANALYSETASKREQUEST_H_ \ No newline at end of file diff --git a/imm/include/alibabacloud/imm/model/CreateStreamAnalyseTaskResult.h b/imm/include/alibabacloud/imm/model/CreateStreamAnalyseTaskResult.h deleted file mode 100644 index 6f4e66a0a..000000000 --- a/imm/include/alibabacloud/imm/model/CreateStreamAnalyseTaskResult.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * 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_IMM_MODEL_CREATESTREAMANALYSETASKRESULT_H_ -#define ALIBABACLOUD_IMM_MODEL_CREATESTREAMANALYSETASKRESULT_H_ - -#include -#include -#include -#include -#include - -namespace AlibabaCloud -{ - namespace Imm - { - namespace Model - { - class ALIBABACLOUD_IMM_EXPORT CreateStreamAnalyseTaskResult : public ServiceResult - { - public: - - - CreateStreamAnalyseTaskResult(); - explicit CreateStreamAnalyseTaskResult(const std::string &payload); - ~CreateStreamAnalyseTaskResult(); - std::string getTaskId()const; - std::string getTaskType()const; - - protected: - void parse(const std::string &payload); - private: - std::string taskId_; - std::string taskType_; - - }; - } - } -} -#endif // !ALIBABACLOUD_IMM_MODEL_CREATESTREAMANALYSETASKRESULT_H_ \ No newline at end of file diff --git a/imm/include/alibabacloud/imm/model/DeleteImageResult.h b/imm/include/alibabacloud/imm/model/DeleteImageResult.h index 9052196c2..74bd0f702 100644 --- a/imm/include/alibabacloud/imm/model/DeleteImageResult.h +++ b/imm/include/alibabacloud/imm/model/DeleteImageResult.h @@ -37,14 +37,14 @@ namespace AlibabaCloud DeleteImageResult(); explicit DeleteImageResult(const std::string &payload); ~DeleteImageResult(); - std::string getSetId()const; std::string getImageUri()const; + std::string getSetId()const; protected: void parse(const std::string &payload); private: - std::string setId_; std::string imageUri_; + std::string setId_; }; } diff --git a/imm/include/alibabacloud/imm/model/GetImageResult.h b/imm/include/alibabacloud/imm/model/GetImageResult.h index e3cb47181..e2e645603 100644 --- a/imm/include/alibabacloud/imm/model/GetImageResult.h +++ b/imm/include/alibabacloud/imm/model/GetImageResult.h @@ -69,6 +69,16 @@ namespace AlibabaCloud }; struct FacesItem { + struct EmotionDetails + { + float cALM; + float sCARED; + float hAPPY; + float sAD; + float sURPRISED; + float aNGRY; + float dISGUSTED; + }; struct FaceAttributes { struct FaceBoundary @@ -88,34 +98,31 @@ namespace AlibabaCloud std::string beard; float beardConfidence; HeadPose headPose; - std::string glasses; - std::string mask; float maskConfidence; + std::string mask; + std::string glasses; float glassesConfidence; }; - struct EmotionDetails - { - float cALM; - float sCARED; - float hAPPY; - float sAD; - float sURPRISED; - float aNGRY; - float dISGUSTED; - }; EmotionDetails emotionDetails; - std::string faceId; float faceConfidence; + std::string faceId; float attractive; float faceQuality; FaceAttributes faceAttributes; float genderConfidence; float emotionConfidence; - std::string gender; std::string emotion; + std::string gender; std::string age; std::string groupId; }; + struct TagsItem + { + float tagConfidence; + std::string tagName; + int tagLevel; + std::string parentTagName; + }; struct OCRItem { struct OCRBoundary @@ -129,13 +136,6 @@ namespace AlibabaCloud float oCRConfidence; std::string oCRContents; }; - struct TagsItem - { - std::string tagName; - float tagConfidence; - int tagLevel; - std::string parentTagName; - }; GetImageResult(); @@ -144,8 +144,8 @@ namespace AlibabaCloud ImageQuality getImageQuality()const; std::string getModifyTime()const; Address getAddress()const; - std::string getSourceType()const; std::string getSourceUri()const; + std::string getSourceType()const; std::string getFacesFailReason()const; std::string getCroppingSuggestionStatus()const; std::string getCroppingSuggestionFailReason()const; @@ -154,8 +154,8 @@ namespace AlibabaCloud std::string getRemarksB()const; std::string getAddressModifyTime()const; std::string getImageFormat()const; - std::string getTagsFailReason()const; std::string getRemarksArrayB()const; + std::string getTagsFailReason()const; std::string getExif()const; std::string getFacesModifyTime()const; std::string getRemarksC()const; @@ -169,24 +169,24 @@ namespace AlibabaCloud std::string getFacesStatus()const; std::string getImageQualityModifyTime()const; std::vector getCroppingSuggestion()const; - std::string getCreateTime()const; std::string getTagsModifyTime()const; std::string getExternalId()const; + std::string getCreateTime()const; std::string getImageQualityFailReason()const; std::string getImageUri()const; std::string getOrientation()const; std::string getOCRStatus()const; std::string getOCRModifyTime()const; - std::string getImageTime()const; std::string getCroppingSuggestionModifyTime()const; - int getImageHeight()const; + std::string getImageTime()const; std::string getTagsStatus()const; std::string getImageQualityStatus()const; + int getImageHeight()const; std::string getOCRFailReason()const; std::string getSetId()const; std::vector getOCR()const; - int getFileSize()const; std::string getLocation()const; + int getFileSize()const; protected: void parse(const std::string &payload); @@ -194,8 +194,8 @@ namespace AlibabaCloud ImageQuality imageQuality_; std::string modifyTime_; Address address_; - std::string sourceType_; std::string sourceUri_; + std::string sourceType_; std::string facesFailReason_; std::string croppingSuggestionStatus_; std::string croppingSuggestionFailReason_; @@ -204,8 +204,8 @@ namespace AlibabaCloud std::string remarksB_; std::string addressModifyTime_; std::string imageFormat_; - std::string tagsFailReason_; std::string remarksArrayB_; + std::string tagsFailReason_; std::string exif_; std::string facesModifyTime_; std::string remarksC_; @@ -219,24 +219,24 @@ namespace AlibabaCloud std::string facesStatus_; std::string imageQualityModifyTime_; std::vector croppingSuggestion_; - std::string createTime_; std::string tagsModifyTime_; std::string externalId_; + std::string createTime_; std::string imageQualityFailReason_; std::string imageUri_; std::string orientation_; std::string oCRStatus_; std::string oCRModifyTime_; - std::string imageTime_; std::string croppingSuggestionModifyTime_; - int imageHeight_; + std::string imageTime_; std::string tagsStatus_; std::string imageQualityStatus_; + int imageHeight_; std::string oCRFailReason_; std::string setId_; std::vector oCR_; - int fileSize_; std::string location_; + int fileSize_; }; } diff --git a/imm/include/alibabacloud/imm/model/GetMediaMetaResult.h b/imm/include/alibabacloud/imm/model/GetMediaMetaResult.h index f523f00da..32ca53f01 100644 --- a/imm/include/alibabacloud/imm/model/GetMediaMetaResult.h +++ b/imm/include/alibabacloud/imm/model/GetMediaMetaResult.h @@ -52,13 +52,13 @@ namespace AlibabaCloud std::string performer; std::string language; std::string creationTime; - std::string album; std::string title; + std::string album; std::string albumArtist; }; Address address; - int numberStreams; std::string size; + int numberStreams; std::string formatLongName; std::string startTime; std::string creationTime; @@ -66,8 +66,8 @@ namespace AlibabaCloud std::string duration; Tag tag; std::string bitrate; - int numberPrograms; std::string location; + int numberPrograms; }; struct MediaStreams { @@ -79,24 +79,29 @@ namespace AlibabaCloud std::string rotate; std::string sampleAspectRatio; std::string startTime; - int index; std::string duration; + int index; std::string codecName; std::string bitrate; std::string profile; std::string displayAspectRatio; - std::string codecTagString; int hasBFrames; + std::string codecTagString; std::string averageFrameRate; std::string language; std::string codecLongName; - int height; std::string pixelFormat; int level; + int height; std::string frameRrate; int width; std::string timeBase; }; + struct SubtitleStream + { + std::string language; + int index; + }; struct AudioStream { std::string codecTag; @@ -104,8 +109,8 @@ namespace AlibabaCloud std::string codecTimeBase; std::string channelLayout; std::string startTime; - int index; std::string duration; + int index; std::string codecName; std::string bitrate; std::string sampleFormat; @@ -116,11 +121,6 @@ namespace AlibabaCloud std::string codecLongName; std::string timeBase; }; - struct SubtitleStream - { - std::string language; - int index; - }; std::vector videoStreams; std::vector subtitleStreams; std::vector audioStreams; diff --git a/imm/include/alibabacloud/imm/model/GetVideoResult.h b/imm/include/alibabacloud/imm/model/GetVideoResult.h index a6ba066fd..5bb72be34 100644 --- a/imm/include/alibabacloud/imm/model/GetVideoResult.h +++ b/imm/include/alibabacloud/imm/model/GetVideoResult.h @@ -32,16 +32,10 @@ namespace AlibabaCloud class ALIBABACLOUD_IMM_EXPORT GetVideoResult : public ServiceResult { public: - struct CelebrityItem - { - std::string celebrityName; - int celebrityNum; - std::string celebrityLibraryName; - }; struct VideoTagsItem { - std::string tagName; float tagConfidence; + std::string tagName; int tagLevel; std::string parentTagName; }; @@ -53,6 +47,12 @@ namespace AlibabaCloud int age; float ageConfidence; }; + struct CelebrityItem + { + std::string celebrityName; + int celebrityNum; + std::string celebrityLibraryName; + }; GetVideoResult(); @@ -61,16 +61,16 @@ namespace AlibabaCloud std::string getModifyTime()const; std::string getProcessStatus()const; int getVideoWidth()const; - std::string getSourceType()const; std::string getSourceUri()const; + std::string getSourceType()const; std::string getVideoInfo()const; std::string getRemarksA()const; std::string getVideoFrameTagsModifyTime()const; std::string getRemarksB()const; std::string getVideoFacesFailReason()const; std::string getVideoFacesStatus()const; - std::string getRemarksC()const; std::string getVideoOCRModifyTime()const; + std::string getRemarksC()const; std::string getRemarksD()const; int getVideoHeight()const; std::vector getPersons()const; @@ -82,12 +82,12 @@ namespace AlibabaCloud std::string getVideoTagsModifyTime()const; std::string getVideoOCRStatus()const; int getVideoFrames()const; - std::string getProcessModifyTime()const; std::string getVideoSTTModifyTime()const; + std::string getProcessModifyTime()const; std::string getProcessFailReason()const; - std::string getCreateTime()const; - std::string getExternalId()const; std::string getVideoSTTFailReason()const; + std::string getExternalId()const; + std::string getCreateTime()const; std::string getVideoUri()const; std::string getVideoFormat()const; std::string getVideoFrameTagsFailReason()const; @@ -97,8 +97,8 @@ namespace AlibabaCloud std::string getCelebrityModifyTime()const; float getVideoDuration()const; std::string getCelebrityFailReason()const; - std::string getSetId()const; std::string getCelebrityStatus()const; + std::string getSetId()const; std::string getVideoTagsStatus()const; int getFileSize()const; @@ -108,16 +108,16 @@ namespace AlibabaCloud std::string modifyTime_; std::string processStatus_; int videoWidth_; - std::string sourceType_; std::string sourceUri_; + std::string sourceType_; std::string videoInfo_; std::string remarksA_; std::string videoFrameTagsModifyTime_; std::string remarksB_; std::string videoFacesFailReason_; std::string videoFacesStatus_; - std::string remarksC_; std::string videoOCRModifyTime_; + std::string remarksC_; std::string remarksD_; int videoHeight_; std::vector persons_; @@ -129,12 +129,12 @@ namespace AlibabaCloud std::string videoTagsModifyTime_; std::string videoOCRStatus_; int videoFrames_; - std::string processModifyTime_; std::string videoSTTModifyTime_; + std::string processModifyTime_; std::string processFailReason_; - std::string createTime_; - std::string externalId_; std::string videoSTTFailReason_; + std::string externalId_; + std::string createTime_; std::string videoUri_; std::string videoFormat_; std::string videoFrameTagsFailReason_; @@ -144,8 +144,8 @@ namespace AlibabaCloud std::string celebrityModifyTime_; float videoDuration_; std::string celebrityFailReason_; - std::string setId_; std::string celebrityStatus_; + std::string setId_; std::string videoTagsStatus_; int fileSize_; diff --git a/imm/include/alibabacloud/imm/model/GetWebofficeURLRequest.h b/imm/include/alibabacloud/imm/model/GetWebofficeURLRequest.h index 8b2b71c4b..3b72afcc5 100644 --- a/imm/include/alibabacloud/imm/model/GetWebofficeURLRequest.h +++ b/imm/include/alibabacloud/imm/model/GetWebofficeURLRequest.h @@ -43,10 +43,14 @@ namespace AlibabaCloud void setAccessKeyId(const std::string& accessKeyId); std::string getFile()const; void setFile(const std::string& file); + bool getHidecmb()const; + void setHidecmb(bool hidecmb); std::string getNotifyEndpoint()const; void setNotifyEndpoint(const std::string& notifyEndpoint); std::string getFileID()const; void setFileID(const std::string& fileID); + std::string getWatermark()const; + void setWatermark(const std::string& watermark); std::string getNotifyTopicName()const; void setNotifyTopicName(const std::string& notifyTopicName); std::string getPermission()const; @@ -59,8 +63,10 @@ namespace AlibabaCloud std::string project_; std::string accessKeyId_; std::string file_; + bool hidecmb_; std::string notifyEndpoint_; std::string fileID_; + std::string watermark_; std::string notifyTopicName_; std::string permission_; std::string user_; diff --git a/imm/include/alibabacloud/imm/model/IndexImageResult.h b/imm/include/alibabacloud/imm/model/IndexImageResult.h index 9117ef329..0634b4731 100644 --- a/imm/include/alibabacloud/imm/model/IndexImageResult.h +++ b/imm/include/alibabacloud/imm/model/IndexImageResult.h @@ -41,9 +41,9 @@ namespace AlibabaCloud std::string getModifyTime()const; std::string getRemarksC()const; std::string getRemarksD()const; - std::string getCreateTime()const; - std::string getExternalId()const; std::string getRemarksArrayA()const; + std::string getExternalId()const; + std::string getCreateTime()const; std::string getSetId()const; std::string getImageUri()const; std::string getRemarksA()const; @@ -56,9 +56,9 @@ namespace AlibabaCloud std::string modifyTime_; std::string remarksC_; std::string remarksD_; - std::string createTime_; - std::string externalId_; std::string remarksArrayA_; + std::string externalId_; + std::string createTime_; std::string setId_; std::string imageUri_; std::string remarksA_; diff --git a/imm/include/alibabacloud/imm/model/IndexVideoResult.h b/imm/include/alibabacloud/imm/model/IndexVideoResult.h index 2cbaaf6c5..3402392ad 100644 --- a/imm/include/alibabacloud/imm/model/IndexVideoResult.h +++ b/imm/include/alibabacloud/imm/model/IndexVideoResult.h @@ -40,8 +40,8 @@ namespace AlibabaCloud std::string getModifyTime()const; std::string getEndTime()const; bool getSaveType()const; - std::string getCreateTime()const; std::string getExternalId()const; + std::string getCreateTime()const; std::string getStartTime()const; std::string getVideoUri()const; std::string getGrabType()const; @@ -59,8 +59,8 @@ namespace AlibabaCloud std::string modifyTime_; std::string endTime_; bool saveType_; - std::string createTime_; std::string externalId_; + std::string createTime_; std::string startTime_; std::string videoUri_; std::string grabType_; diff --git a/imm/src/ImmClient.cc b/imm/src/ImmClient.cc index 261e86990..ffb3ac3c7 100644 --- a/imm/src/ImmClient.cc +++ b/imm/src/ImmClient.cc @@ -375,42 +375,6 @@ ImmClient::CreateSetOutcomeCallable ImmClient::createSetCallable(const CreateSet return task->get_future(); } -ImmClient::CreateStreamAnalyseTaskOutcome ImmClient::createStreamAnalyseTask(const CreateStreamAnalyseTaskRequest &request) const -{ - auto endpointOutcome = endpointProvider_->getEndpoint(); - if (!endpointOutcome.isSuccess()) - return CreateStreamAnalyseTaskOutcome(endpointOutcome.error()); - - auto outcome = makeRequest(endpointOutcome.result(), request); - - if (outcome.isSuccess()) - return CreateStreamAnalyseTaskOutcome(CreateStreamAnalyseTaskResult(outcome.result())); - else - return CreateStreamAnalyseTaskOutcome(outcome.error()); -} - -void ImmClient::createStreamAnalyseTaskAsync(const CreateStreamAnalyseTaskRequest& request, const CreateStreamAnalyseTaskAsyncHandler& handler, const std::shared_ptr& context) const -{ - auto fn = [this, request, handler, context]() - { - handler(this, request, createStreamAnalyseTask(request), context); - }; - - asyncExecute(new Runnable(fn)); -} - -ImmClient::CreateStreamAnalyseTaskOutcomeCallable ImmClient::createStreamAnalyseTaskCallable(const CreateStreamAnalyseTaskRequest &request) const -{ - auto task = std::make_shared>( - [this, request]() - { - return this->createStreamAnalyseTask(request); - }); - - asyncExecute(new Runnable([task]() { (*task)(); })); - return task->get_future(); -} - ImmClient::CreateVideoAbstractTaskOutcome ImmClient::createVideoAbstractTask(const CreateVideoAbstractTaskRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); diff --git a/imm/src/model/CreateGroupFacesJobResult.cc b/imm/src/model/CreateGroupFacesJobResult.cc index 64250ba3e..72579b7dd 100644 --- a/imm/src/model/CreateGroupFacesJobResult.cc +++ b/imm/src/model/CreateGroupFacesJobResult.cc @@ -39,12 +39,12 @@ void CreateGroupFacesJobResult::parse(const std::string &payload) Json::Value value; reader.parse(payload, value); setRequestId(value["RequestId"].asString()); - if(!value["JobId"].isNull()) - jobId_ = value["JobId"].asString(); - if(!value["SetId"].isNull()) - setId_ = value["SetId"].asString(); if(!value["JobType"].isNull()) jobType_ = value["JobType"].asString(); + if(!value["SetId"].isNull()) + setId_ = value["SetId"].asString(); + if(!value["JobId"].isNull()) + jobId_ = value["JobId"].asString(); } diff --git a/imm/src/model/CreateStreamAnalyseTaskRequest.cc b/imm/src/model/CreateStreamAnalyseTaskRequest.cc deleted file mode 100644 index 794244bfd..000000000 --- a/imm/src/model/CreateStreamAnalyseTaskRequest.cc +++ /dev/null @@ -1,150 +0,0 @@ -/* - * 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::Imm::Model::CreateStreamAnalyseTaskRequest; - -CreateStreamAnalyseTaskRequest::CreateStreamAnalyseTaskRequest() : - RpcServiceRequest("imm", "2017-09-06", "CreateStreamAnalyseTask") -{ - setMethod(HttpRequest::Method::Post); -} - -CreateStreamAnalyseTaskRequest::~CreateStreamAnalyseTaskRequest() -{} - -std::string CreateStreamAnalyseTaskRequest::getGrabType()const -{ - return grabType_; -} - -void CreateStreamAnalyseTaskRequest::setGrabType(const std::string& grabType) -{ - grabType_ = grabType; - setParameter("GrabType", grabType); -} - -std::string CreateStreamAnalyseTaskRequest::getProject()const -{ - return project_; -} - -void CreateStreamAnalyseTaskRequest::setProject(const std::string& project) -{ - project_ = project; - setParameter("Project", project); -} - -std::string CreateStreamAnalyseTaskRequest::getStartTime()const -{ - return startTime_; -} - -void CreateStreamAnalyseTaskRequest::setStartTime(const std::string& startTime) -{ - startTime_ = startTime; - setParameter("StartTime", startTime); -} - -std::string CreateStreamAnalyseTaskRequest::getAccessKeyId()const -{ - return accessKeyId_; -} - -void CreateStreamAnalyseTaskRequest::setAccessKeyId(const std::string& accessKeyId) -{ - accessKeyId_ = accessKeyId; - setParameter("AccessKeyId", accessKeyId); -} - -std::string CreateStreamAnalyseTaskRequest::getNotifyEndpoint()const -{ - return notifyEndpoint_; -} - -void CreateStreamAnalyseTaskRequest::setNotifyEndpoint(const std::string& notifyEndpoint) -{ - notifyEndpoint_ = notifyEndpoint; - setParameter("NotifyEndpoint", notifyEndpoint); -} - -std::string CreateStreamAnalyseTaskRequest::getStreamUri()const -{ - return streamUri_; -} - -void CreateStreamAnalyseTaskRequest::setStreamUri(const std::string& streamUri) -{ - streamUri_ = streamUri; - setParameter("StreamUri", streamUri); -} - -std::string CreateStreamAnalyseTaskRequest::getNotifyTopicName()const -{ - return notifyTopicName_; -} - -void CreateStreamAnalyseTaskRequest::setNotifyTopicName(const std::string& notifyTopicName) -{ - notifyTopicName_ = notifyTopicName; - setParameter("NotifyTopicName", notifyTopicName); -} - -std::string CreateStreamAnalyseTaskRequest::getEndTime()const -{ - return endTime_; -} - -void CreateStreamAnalyseTaskRequest::setEndTime(const std::string& endTime) -{ - endTime_ = endTime; - setParameter("EndTime", endTime); -} - -bool CreateStreamAnalyseTaskRequest::getSaveType()const -{ - return saveType_; -} - -void CreateStreamAnalyseTaskRequest::setSaveType(bool saveType) -{ - saveType_ = saveType; - setParameter("SaveType", saveType ? "true" : "false"); -} - -std::string CreateStreamAnalyseTaskRequest::getInterval()const -{ - return interval_; -} - -void CreateStreamAnalyseTaskRequest::setInterval(const std::string& interval) -{ - interval_ = interval; - setParameter("Interval", interval); -} - -std::string CreateStreamAnalyseTaskRequest::getTgtUri()const -{ - return tgtUri_; -} - -void CreateStreamAnalyseTaskRequest::setTgtUri(const std::string& tgtUri) -{ - tgtUri_ = tgtUri; - setParameter("TgtUri", tgtUri); -} - diff --git a/imm/src/model/CreateStreamAnalyseTaskResult.cc b/imm/src/model/CreateStreamAnalyseTaskResult.cc deleted file mode 100644 index 234da96fc..000000000 --- a/imm/src/model/CreateStreamAnalyseTaskResult.cc +++ /dev/null @@ -1,58 +0,0 @@ -/* - * 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::Imm; -using namespace AlibabaCloud::Imm::Model; - -CreateStreamAnalyseTaskResult::CreateStreamAnalyseTaskResult() : - ServiceResult() -{} - -CreateStreamAnalyseTaskResult::CreateStreamAnalyseTaskResult(const std::string &payload) : - ServiceResult() -{ - parse(payload); -} - -CreateStreamAnalyseTaskResult::~CreateStreamAnalyseTaskResult() -{} - -void CreateStreamAnalyseTaskResult::parse(const std::string &payload) -{ - Json::Reader reader; - Json::Value value; - reader.parse(payload, value); - setRequestId(value["RequestId"].asString()); - if(!value["TaskId"].isNull()) - taskId_ = value["TaskId"].asString(); - if(!value["TaskType"].isNull()) - taskType_ = value["TaskType"].asString(); - -} - -std::string CreateStreamAnalyseTaskResult::getTaskId()const -{ - return taskId_; -} - -std::string CreateStreamAnalyseTaskResult::getTaskType()const -{ - return taskType_; -} - diff --git a/imm/src/model/DeleteImageResult.cc b/imm/src/model/DeleteImageResult.cc index 5231f1d6e..db5b51bce 100644 --- a/imm/src/model/DeleteImageResult.cc +++ b/imm/src/model/DeleteImageResult.cc @@ -39,20 +39,20 @@ void DeleteImageResult::parse(const std::string &payload) Json::Value value; reader.parse(payload, value); setRequestId(value["RequestId"].asString()); - if(!value["SetId"].isNull()) - setId_ = value["SetId"].asString(); if(!value["ImageUri"].isNull()) imageUri_ = value["ImageUri"].asString(); + if(!value["SetId"].isNull()) + setId_ = value["SetId"].asString(); } -std::string DeleteImageResult::getSetId()const -{ - return setId_; -} - std::string DeleteImageResult::getImageUri()const { return imageUri_; } +std::string DeleteImageResult::getSetId()const +{ + return setId_; +} + diff --git a/imm/src/model/GetImageResult.cc b/imm/src/model/GetImageResult.cc index bc5ebf597..ae09a2676 100644 --- a/imm/src/model/GetImageResult.cc +++ b/imm/src/model/GetImageResult.cc @@ -48,62 +48,77 @@ void GetImageResult::parse(const std::string &payload) if(!valueCroppingSuggestionCroppingSuggestionItem["Score"].isNull()) croppingSuggestionObject.score = std::stof(valueCroppingSuggestionCroppingSuggestionItem["Score"].asString()); auto croppingBoundaryNode = value["CroppingBoundary"]; - if(!croppingBoundaryNode["Width"].isNull()) - croppingSuggestionObject.croppingBoundary.width = std::stoi(croppingBoundaryNode["Width"].asString()); - if(!croppingBoundaryNode["Height"].isNull()) - croppingSuggestionObject.croppingBoundary.height = std::stoi(croppingBoundaryNode["Height"].asString()); if(!croppingBoundaryNode["Left"].isNull()) croppingSuggestionObject.croppingBoundary.left = std::stoi(croppingBoundaryNode["Left"].asString()); if(!croppingBoundaryNode["Top"].isNull()) croppingSuggestionObject.croppingBoundary.top = std::stoi(croppingBoundaryNode["Top"].asString()); + if(!croppingBoundaryNode["Height"].isNull()) + croppingSuggestionObject.croppingBoundary.height = std::stoi(croppingBoundaryNode["Height"].asString()); + if(!croppingBoundaryNode["Width"].isNull()) + croppingSuggestionObject.croppingBoundary.width = std::stoi(croppingBoundaryNode["Width"].asString()); croppingSuggestion_.push_back(croppingSuggestionObject); } auto allFacesNode = value["Faces"]["FacesItem"]; for (auto valueFacesFacesItem : allFacesNode) { FacesItem facesObject; - if(!valueFacesFacesItem["FaceId"].isNull()) - facesObject.faceId = valueFacesFacesItem["FaceId"].asString(); if(!valueFacesFacesItem["FaceConfidence"].isNull()) facesObject.faceConfidence = std::stof(valueFacesFacesItem["FaceConfidence"].asString()); - if(!valueFacesFacesItem["Age"].isNull()) - facesObject.age = valueFacesFacesItem["Age"].asString(); - if(!valueFacesFacesItem["Gender"].isNull()) - facesObject.gender = valueFacesFacesItem["Gender"].asString(); - if(!valueFacesFacesItem["Emotion"].isNull()) - facesObject.emotion = valueFacesFacesItem["Emotion"].asString(); + if(!valueFacesFacesItem["FaceId"].isNull()) + facesObject.faceId = valueFacesFacesItem["FaceId"].asString(); if(!valueFacesFacesItem["Attractive"].isNull()) facesObject.attractive = std::stof(valueFacesFacesItem["Attractive"].asString()); - if(!valueFacesFacesItem["GenderConfidence"].isNull()) - facesObject.genderConfidence = std::stof(valueFacesFacesItem["GenderConfidence"].asString()); - if(!valueFacesFacesItem["GroupId"].isNull()) - facesObject.groupId = valueFacesFacesItem["GroupId"].asString(); if(!valueFacesFacesItem["FaceQuality"].isNull()) facesObject.faceQuality = std::stof(valueFacesFacesItem["FaceQuality"].asString()); + if(!valueFacesFacesItem["GenderConfidence"].isNull()) + facesObject.genderConfidence = std::stof(valueFacesFacesItem["GenderConfidence"].asString()); if(!valueFacesFacesItem["EmotionConfidence"].isNull()) facesObject.emotionConfidence = std::stof(valueFacesFacesItem["EmotionConfidence"].asString()); + if(!valueFacesFacesItem["Emotion"].isNull()) + facesObject.emotion = valueFacesFacesItem["Emotion"].asString(); + if(!valueFacesFacesItem["Gender"].isNull()) + facesObject.gender = valueFacesFacesItem["Gender"].asString(); + if(!valueFacesFacesItem["Age"].isNull()) + facesObject.age = valueFacesFacesItem["Age"].asString(); + if(!valueFacesFacesItem["GroupId"].isNull()) + facesObject.groupId = valueFacesFacesItem["GroupId"].asString(); + auto emotionDetailsNode = value["EmotionDetails"]; + if(!emotionDetailsNode["CALM"].isNull()) + facesObject.emotionDetails.cALM = std::stof(emotionDetailsNode["CALM"].asString()); + if(!emotionDetailsNode["SCARED"].isNull()) + facesObject.emotionDetails.sCARED = std::stof(emotionDetailsNode["SCARED"].asString()); + if(!emotionDetailsNode["HAPPY"].isNull()) + facesObject.emotionDetails.hAPPY = std::stof(emotionDetailsNode["HAPPY"].asString()); + if(!emotionDetailsNode["SAD"].isNull()) + facesObject.emotionDetails.sAD = std::stof(emotionDetailsNode["SAD"].asString()); + if(!emotionDetailsNode["SURPRISED"].isNull()) + facesObject.emotionDetails.sURPRISED = std::stof(emotionDetailsNode["SURPRISED"].asString()); + if(!emotionDetailsNode["ANGRY"].isNull()) + facesObject.emotionDetails.aNGRY = std::stof(emotionDetailsNode["ANGRY"].asString()); + if(!emotionDetailsNode["DISGUSTED"].isNull()) + facesObject.emotionDetails.dISGUSTED = std::stof(emotionDetailsNode["DISGUSTED"].asString()); auto faceAttributesNode = value["FaceAttributes"]; - if(!faceAttributesNode["Glasses"].isNull()) - facesObject.faceAttributes.glasses = faceAttributesNode["Glasses"].asString(); if(!faceAttributesNode["Beard"].isNull()) facesObject.faceAttributes.beard = faceAttributesNode["Beard"].asString(); - if(!faceAttributesNode["Mask"].isNull()) - facesObject.faceAttributes.mask = faceAttributesNode["Mask"].asString(); - if(!faceAttributesNode["GlassesConfidence"].isNull()) - facesObject.faceAttributes.glassesConfidence = std::stof(faceAttributesNode["GlassesConfidence"].asString()); if(!faceAttributesNode["BeardConfidence"].isNull()) facesObject.faceAttributes.beardConfidence = std::stof(faceAttributesNode["BeardConfidence"].asString()); if(!faceAttributesNode["MaskConfidence"].isNull()) facesObject.faceAttributes.maskConfidence = std::stof(faceAttributesNode["MaskConfidence"].asString()); + if(!faceAttributesNode["Mask"].isNull()) + facesObject.faceAttributes.mask = faceAttributesNode["Mask"].asString(); + if(!faceAttributesNode["Glasses"].isNull()) + facesObject.faceAttributes.glasses = faceAttributesNode["Glasses"].asString(); + if(!faceAttributesNode["GlassesConfidence"].isNull()) + facesObject.faceAttributes.glassesConfidence = std::stof(faceAttributesNode["GlassesConfidence"].asString()); auto faceBoundaryNode = faceAttributesNode["FaceBoundary"]; if(!faceBoundaryNode["Left"].isNull()) facesObject.faceAttributes.faceBoundary.left = std::stoi(faceBoundaryNode["Left"].asString()); if(!faceBoundaryNode["Top"].isNull()) facesObject.faceAttributes.faceBoundary.top = std::stoi(faceBoundaryNode["Top"].asString()); - if(!faceBoundaryNode["Width"].isNull()) - facesObject.faceAttributes.faceBoundary.width = std::stoi(faceBoundaryNode["Width"].asString()); if(!faceBoundaryNode["Height"].isNull()) facesObject.faceAttributes.faceBoundary.height = std::stoi(faceBoundaryNode["Height"].asString()); + if(!faceBoundaryNode["Width"].isNull()) + facesObject.faceAttributes.faceBoundary.width = std::stoi(faceBoundaryNode["Width"].asString()); auto headPoseNode = faceAttributesNode["HeadPose"]; if(!headPoseNode["Pitch"].isNull()) facesObject.faceAttributes.headPose.pitch = std::stof(headPoseNode["Pitch"].asString()); @@ -111,170 +126,155 @@ void GetImageResult::parse(const std::string &payload) facesObject.faceAttributes.headPose.roll = std::stof(headPoseNode["Roll"].asString()); if(!headPoseNode["Yaw"].isNull()) facesObject.faceAttributes.headPose.yaw = std::stof(headPoseNode["Yaw"].asString()); - auto emotionDetailsNode = value["EmotionDetails"]; - if(!emotionDetailsNode["HAPPY"].isNull()) - facesObject.emotionDetails.hAPPY = std::stof(emotionDetailsNode["HAPPY"].asString()); - if(!emotionDetailsNode["SAD"].isNull()) - facesObject.emotionDetails.sAD = std::stof(emotionDetailsNode["SAD"].asString()); - if(!emotionDetailsNode["ANGRY"].isNull()) - facesObject.emotionDetails.aNGRY = std::stof(emotionDetailsNode["ANGRY"].asString()); - if(!emotionDetailsNode["SURPRISED"].isNull()) - facesObject.emotionDetails.sURPRISED = std::stof(emotionDetailsNode["SURPRISED"].asString()); - if(!emotionDetailsNode["SCARED"].isNull()) - facesObject.emotionDetails.sCARED = std::stof(emotionDetailsNode["SCARED"].asString()); - if(!emotionDetailsNode["DISGUSTED"].isNull()) - facesObject.emotionDetails.dISGUSTED = std::stof(emotionDetailsNode["DISGUSTED"].asString()); - if(!emotionDetailsNode["CALM"].isNull()) - facesObject.emotionDetails.cALM = std::stof(emotionDetailsNode["CALM"].asString()); faces_.push_back(facesObject); } - auto allOCRNode = value["OCR"]["OCRItem"]; - for (auto valueOCROCRItem : allOCRNode) - { - OCRItem oCRObject; - if(!valueOCROCRItem["OCRContents"].isNull()) - oCRObject.oCRContents = valueOCROCRItem["OCRContents"].asString(); - if(!valueOCROCRItem["OCRConfidence"].isNull()) - oCRObject.oCRConfidence = std::stof(valueOCROCRItem["OCRConfidence"].asString()); - auto oCRBoundaryNode = value["OCRBoundary"]; - if(!oCRBoundaryNode["Left"].isNull()) - oCRObject.oCRBoundary.left = std::stoi(oCRBoundaryNode["Left"].asString()); - if(!oCRBoundaryNode["Top"].isNull()) - oCRObject.oCRBoundary.top = std::stoi(oCRBoundaryNode["Top"].asString()); - if(!oCRBoundaryNode["Width"].isNull()) - oCRObject.oCRBoundary.width = std::stoi(oCRBoundaryNode["Width"].asString()); - if(!oCRBoundaryNode["Height"].isNull()) - oCRObject.oCRBoundary.height = std::stoi(oCRBoundaryNode["Height"].asString()); - oCR_.push_back(oCRObject); - } auto allTagsNode = value["Tags"]["TagsItem"]; for (auto valueTagsTagsItem : allTagsNode) { TagsItem tagsObject; - if(!valueTagsTagsItem["TagName"].isNull()) - tagsObject.tagName = valueTagsTagsItem["TagName"].asString(); if(!valueTagsTagsItem["TagConfidence"].isNull()) tagsObject.tagConfidence = std::stof(valueTagsTagsItem["TagConfidence"].asString()); + if(!valueTagsTagsItem["TagName"].isNull()) + tagsObject.tagName = valueTagsTagsItem["TagName"].asString(); if(!valueTagsTagsItem["TagLevel"].isNull()) tagsObject.tagLevel = std::stoi(valueTagsTagsItem["TagLevel"].asString()); if(!valueTagsTagsItem["ParentTagName"].isNull()) tagsObject.parentTagName = valueTagsTagsItem["ParentTagName"].asString(); tags_.push_back(tagsObject); } + auto allOCRNode = value["OCR"]["OCRItem"]; + for (auto valueOCROCRItem : allOCRNode) + { + OCRItem oCRObject; + if(!valueOCROCRItem["OCRConfidence"].isNull()) + oCRObject.oCRConfidence = std::stof(valueOCROCRItem["OCRConfidence"].asString()); + if(!valueOCROCRItem["OCRContents"].isNull()) + oCRObject.oCRContents = valueOCROCRItem["OCRContents"].asString(); + auto oCRBoundaryNode = value["OCRBoundary"]; + if(!oCRBoundaryNode["Left"].isNull()) + oCRObject.oCRBoundary.left = std::stoi(oCRBoundaryNode["Left"].asString()); + if(!oCRBoundaryNode["Top"].isNull()) + oCRObject.oCRBoundary.top = std::stoi(oCRBoundaryNode["Top"].asString()); + if(!oCRBoundaryNode["Height"].isNull()) + oCRObject.oCRBoundary.height = std::stoi(oCRBoundaryNode["Height"].asString()); + if(!oCRBoundaryNode["Width"].isNull()) + oCRObject.oCRBoundary.width = std::stoi(oCRBoundaryNode["Width"].asString()); + oCR_.push_back(oCRObject); + } auto imageQualityNode = value["ImageQuality"]; - if(!imageQualityNode["OverallScore"].isNull()) - imageQuality_.overallScore = std::stof(imageQualityNode["OverallScore"].asString()); if(!imageQualityNode["ClarityScore"].isNull()) imageQuality_.clarityScore = std::stof(imageQualityNode["ClarityScore"].asString()); - if(!imageQualityNode["Clarity"].isNull()) - imageQuality_.clarity = std::stof(imageQualityNode["Clarity"].asString()); - if(!imageQualityNode["ExposureScore"].isNull()) - imageQuality_.exposureScore = std::stof(imageQualityNode["ExposureScore"].asString()); - if(!imageQualityNode["Exposure"].isNull()) - imageQuality_.exposure = std::stof(imageQualityNode["Exposure"].asString()); - if(!imageQualityNode["ContrastScore"].isNull()) - imageQuality_.contrastScore = std::stof(imageQualityNode["ContrastScore"].asString()); - if(!imageQualityNode["Contrast"].isNull()) - imageQuality_.contrast = std::stof(imageQualityNode["Contrast"].asString()); - if(!imageQualityNode["ColorScore"].isNull()) - imageQuality_.colorScore = std::stof(imageQualityNode["ColorScore"].asString()); - if(!imageQualityNode["Color"].isNull()) - imageQuality_.color = std::stof(imageQualityNode["Color"].asString()); if(!imageQualityNode["CompositionScore"].isNull()) imageQuality_.compositionScore = std::stof(imageQualityNode["CompositionScore"].asString()); + if(!imageQualityNode["ContrastScore"].isNull()) + imageQuality_.contrastScore = std::stof(imageQualityNode["ContrastScore"].asString()); + if(!imageQualityNode["Color"].isNull()) + imageQuality_.color = std::stof(imageQualityNode["Color"].asString()); + if(!imageQualityNode["Exposure"].isNull()) + imageQuality_.exposure = std::stof(imageQualityNode["Exposure"].asString()); + if(!imageQualityNode["OverallScore"].isNull()) + imageQuality_.overallScore = std::stof(imageQualityNode["OverallScore"].asString()); + if(!imageQualityNode["Clarity"].isNull()) + imageQuality_.clarity = std::stof(imageQualityNode["Clarity"].asString()); + if(!imageQualityNode["Contrast"].isNull()) + imageQuality_.contrast = std::stof(imageQualityNode["Contrast"].asString()); + if(!imageQualityNode["ExposureScore"].isNull()) + imageQuality_.exposureScore = std::stof(imageQualityNode["ExposureScore"].asString()); + if(!imageQualityNode["ColorScore"].isNull()) + imageQuality_.colorScore = std::stof(imageQualityNode["ColorScore"].asString()); auto addressNode = value["Address"]; + if(!addressNode["Township"].isNull()) + address_.township = addressNode["Township"].asString(); if(!addressNode["AddressLine"].isNull()) address_.addressLine = addressNode["AddressLine"].asString(); if(!addressNode["Country"].isNull()) address_.country = addressNode["Country"].asString(); - if(!addressNode["Province"].isNull()) - address_.province = addressNode["Province"].asString(); if(!addressNode["City"].isNull()) address_.city = addressNode["City"].asString(); if(!addressNode["District"].isNull()) address_.district = addressNode["District"].asString(); - if(!addressNode["Township"].isNull()) - address_.township = addressNode["Township"].asString(); - if(!value["SetId"].isNull()) - setId_ = value["SetId"].asString(); - if(!value["ImageUri"].isNull()) - imageUri_ = value["ImageUri"].asString(); - if(!value["RemarksA"].isNull()) - remarksA_ = value["RemarksA"].asString(); - if(!value["RemarksB"].isNull()) - remarksB_ = value["RemarksB"].asString(); - if(!value["CreateTime"].isNull()) - createTime_ = value["CreateTime"].asString(); + if(!addressNode["Province"].isNull()) + address_.province = addressNode["Province"].asString(); if(!value["ModifyTime"].isNull()) modifyTime_ = value["ModifyTime"].asString(); - if(!value["ImageWidth"].isNull()) - imageWidth_ = std::stoi(value["ImageWidth"].asString()); - if(!value["ImageHeight"].isNull()) - imageHeight_ = std::stoi(value["ImageHeight"].asString()); - if(!value["ImageFormat"].isNull()) - imageFormat_ = value["ImageFormat"].asString(); - if(!value["Exif"].isNull()) - exif_ = value["Exif"].asString(); - if(!value["FileSize"].isNull()) - fileSize_ = std::stoi(value["FileSize"].asString()); - if(!value["ImageTime"].isNull()) - imageTime_ = value["ImageTime"].asString(); - if(!value["Orientation"].isNull()) - orientation_ = value["Orientation"].asString(); - if(!value["SourceType"].isNull()) - sourceType_ = value["SourceType"].asString(); if(!value["SourceUri"].isNull()) sourceUri_ = value["SourceUri"].asString(); - if(!value["SourcePosition"].isNull()) - sourcePosition_ = value["SourcePosition"].asString(); - if(!value["FacesStatus"].isNull()) - facesStatus_ = value["FacesStatus"].asString(); - if(!value["FacesModifyTime"].isNull()) - facesModifyTime_ = value["FacesModifyTime"].asString(); - if(!value["Location"].isNull()) - location_ = value["Location"].asString(); - if(!value["OCRStatus"].isNull()) - oCRStatus_ = value["OCRStatus"].asString(); - if(!value["OCRModifyTime"].isNull()) - oCRModifyTime_ = value["OCRModifyTime"].asString(); - if(!value["OCRFailReason"].isNull()) - oCRFailReason_ = value["OCRFailReason"].asString(); + if(!value["SourceType"].isNull()) + sourceType_ = value["SourceType"].asString(); if(!value["FacesFailReason"].isNull()) facesFailReason_ = value["FacesFailReason"].asString(); - if(!value["TagsFailReason"].isNull()) - tagsFailReason_ = value["TagsFailReason"].asString(); - if(!value["TagsModifyTime"].isNull()) - tagsModifyTime_ = value["TagsModifyTime"].asString(); - if(!value["TagsStatus"].isNull()) - tagsStatus_ = value["TagsStatus"].asString(); - if(!value["RemarksC"].isNull()) - remarksC_ = value["RemarksC"].asString(); - if(!value["RemarksD"].isNull()) - remarksD_ = value["RemarksD"].asString(); - if(!value["ExternalId"].isNull()) - externalId_ = value["ExternalId"].asString(); - if(!value["AddressModifyTime"].isNull()) - addressModifyTime_ = value["AddressModifyTime"].asString(); - if(!value["AddressStatus"].isNull()) - addressStatus_ = value["AddressStatus"].asString(); - if(!value["AddressFailReason"].isNull()) - addressFailReason_ = value["AddressFailReason"].asString(); - if(!value["RemarksArrayA"].isNull()) - remarksArrayA_ = value["RemarksArrayA"].asString(); - if(!value["RemarksArrayB"].isNull()) - remarksArrayB_ = value["RemarksArrayB"].asString(); - if(!value["ImageQualityModifyTime"].isNull()) - imageQualityModifyTime_ = value["ImageQualityModifyTime"].asString(); - if(!value["ImageQualityFailReason"].isNull()) - imageQualityFailReason_ = value["ImageQualityFailReason"].asString(); - if(!value["ImageQualityStatus"].isNull()) - imageQualityStatus_ = value["ImageQualityStatus"].asString(); if(!value["CroppingSuggestionStatus"].isNull()) croppingSuggestionStatus_ = value["CroppingSuggestionStatus"].asString(); if(!value["CroppingSuggestionFailReason"].isNull()) croppingSuggestionFailReason_ = value["CroppingSuggestionFailReason"].asString(); + if(!value["RemarksA"].isNull()) + remarksA_ = value["RemarksA"].asString(); + if(!value["AddressFailReason"].isNull()) + addressFailReason_ = value["AddressFailReason"].asString(); + if(!value["RemarksB"].isNull()) + remarksB_ = value["RemarksB"].asString(); + if(!value["AddressModifyTime"].isNull()) + addressModifyTime_ = value["AddressModifyTime"].asString(); + if(!value["ImageFormat"].isNull()) + imageFormat_ = value["ImageFormat"].asString(); + if(!value["RemarksArrayB"].isNull()) + remarksArrayB_ = value["RemarksArrayB"].asString(); + if(!value["TagsFailReason"].isNull()) + tagsFailReason_ = value["TagsFailReason"].asString(); + if(!value["Exif"].isNull()) + exif_ = value["Exif"].asString(); + if(!value["FacesModifyTime"].isNull()) + facesModifyTime_ = value["FacesModifyTime"].asString(); + if(!value["RemarksC"].isNull()) + remarksC_ = value["RemarksC"].asString(); + if(!value["RemarksD"].isNull()) + remarksD_ = value["RemarksD"].asString(); + if(!value["ImageWidth"].isNull()) + imageWidth_ = std::stoi(value["ImageWidth"].asString()); + if(!value["SourcePosition"].isNull()) + sourcePosition_ = value["SourcePosition"].asString(); + if(!value["RemarksArrayA"].isNull()) + remarksArrayA_ = value["RemarksArrayA"].asString(); + if(!value["AddressStatus"].isNull()) + addressStatus_ = value["AddressStatus"].asString(); + if(!value["FacesStatus"].isNull()) + facesStatus_ = value["FacesStatus"].asString(); + if(!value["ImageQualityModifyTime"].isNull()) + imageQualityModifyTime_ = value["ImageQualityModifyTime"].asString(); + if(!value["TagsModifyTime"].isNull()) + tagsModifyTime_ = value["TagsModifyTime"].asString(); + if(!value["ExternalId"].isNull()) + externalId_ = value["ExternalId"].asString(); + if(!value["CreateTime"].isNull()) + createTime_ = value["CreateTime"].asString(); + if(!value["ImageQualityFailReason"].isNull()) + imageQualityFailReason_ = value["ImageQualityFailReason"].asString(); + if(!value["ImageUri"].isNull()) + imageUri_ = value["ImageUri"].asString(); + if(!value["Orientation"].isNull()) + orientation_ = value["Orientation"].asString(); + if(!value["OCRStatus"].isNull()) + oCRStatus_ = value["OCRStatus"].asString(); + if(!value["OCRModifyTime"].isNull()) + oCRModifyTime_ = value["OCRModifyTime"].asString(); if(!value["CroppingSuggestionModifyTime"].isNull()) croppingSuggestionModifyTime_ = value["CroppingSuggestionModifyTime"].asString(); + if(!value["ImageTime"].isNull()) + imageTime_ = value["ImageTime"].asString(); + if(!value["TagsStatus"].isNull()) + tagsStatus_ = value["TagsStatus"].asString(); + if(!value["ImageQualityStatus"].isNull()) + imageQualityStatus_ = value["ImageQualityStatus"].asString(); + if(!value["ImageHeight"].isNull()) + imageHeight_ = std::stoi(value["ImageHeight"].asString()); + if(!value["OCRFailReason"].isNull()) + oCRFailReason_ = value["OCRFailReason"].asString(); + if(!value["SetId"].isNull()) + setId_ = value["SetId"].asString(); + if(!value["Location"].isNull()) + location_ = value["Location"].asString(); + if(!value["FileSize"].isNull()) + fileSize_ = std::stoi(value["FileSize"].asString()); } @@ -293,16 +293,16 @@ GetImageResult::Address GetImageResult::getAddress()const return address_; } -std::string GetImageResult::getSourceType()const -{ - return sourceType_; -} - std::string GetImageResult::getSourceUri()const { return sourceUri_; } +std::string GetImageResult::getSourceType()const +{ + return sourceType_; +} + std::string GetImageResult::getFacesFailReason()const { return facesFailReason_; @@ -343,16 +343,16 @@ std::string GetImageResult::getImageFormat()const return imageFormat_; } -std::string GetImageResult::getTagsFailReason()const -{ - return tagsFailReason_; -} - std::string GetImageResult::getRemarksArrayB()const { return remarksArrayB_; } +std::string GetImageResult::getTagsFailReason()const +{ + return tagsFailReason_; +} + std::string GetImageResult::getExif()const { return exif_; @@ -418,11 +418,6 @@ std::vector GetImageResult::getCroppingS return croppingSuggestion_; } -std::string GetImageResult::getCreateTime()const -{ - return createTime_; -} - std::string GetImageResult::getTagsModifyTime()const { return tagsModifyTime_; @@ -433,6 +428,11 @@ std::string GetImageResult::getExternalId()const return externalId_; } +std::string GetImageResult::getCreateTime()const +{ + return createTime_; +} + std::string GetImageResult::getImageQualityFailReason()const { return imageQualityFailReason_; @@ -458,19 +458,14 @@ std::string GetImageResult::getOCRModifyTime()const return oCRModifyTime_; } -std::string GetImageResult::getImageTime()const -{ - return imageTime_; -} - std::string GetImageResult::getCroppingSuggestionModifyTime()const { return croppingSuggestionModifyTime_; } -int GetImageResult::getImageHeight()const +std::string GetImageResult::getImageTime()const { - return imageHeight_; + return imageTime_; } std::string GetImageResult::getTagsStatus()const @@ -483,6 +478,11 @@ std::string GetImageResult::getImageQualityStatus()const return imageQualityStatus_; } +int GetImageResult::getImageHeight()const +{ + return imageHeight_; +} + std::string GetImageResult::getOCRFailReason()const { return oCRFailReason_; @@ -498,13 +498,13 @@ std::vector GetImageResult::getOCR()const return oCR_; } -int GetImageResult::getFileSize()const -{ - return fileSize_; -} - std::string GetImageResult::getLocation()const { return location_; } +int GetImageResult::getFileSize()const +{ + return fileSize_; +} + diff --git a/imm/src/model/GetMediaMetaResult.cc b/imm/src/model/GetMediaMetaResult.cc index 239772e82..9ec61e2a5 100644 --- a/imm/src/model/GetMediaMetaResult.cc +++ b/imm/src/model/GetMediaMetaResult.cc @@ -41,157 +41,157 @@ void GetMediaMetaResult::parse(const std::string &payload) setRequestId(value["RequestId"].asString()); auto mediaMetaNode = value["MediaMeta"]; auto mediaFormatNode = mediaMetaNode["MediaFormat"]; - if(!mediaFormatNode["NumberStreams"].isNull()) - mediaMeta_.mediaFormat.numberStreams = std::stoi(mediaFormatNode["NumberStreams"].asString()); - if(!mediaFormatNode["NumberPrograms"].isNull()) - mediaMeta_.mediaFormat.numberPrograms = std::stoi(mediaFormatNode["NumberPrograms"].asString()); - if(!mediaFormatNode["FormatName"].isNull()) - mediaMeta_.mediaFormat.formatName = mediaFormatNode["FormatName"].asString(); - if(!mediaFormatNode["FormatLongName"].isNull()) - mediaMeta_.mediaFormat.formatLongName = mediaFormatNode["FormatLongName"].asString(); if(!mediaFormatNode["Size"].isNull()) mediaMeta_.mediaFormat.size = mediaFormatNode["Size"].asString(); - if(!mediaFormatNode["Duration"].isNull()) - mediaMeta_.mediaFormat.duration = mediaFormatNode["Duration"].asString(); + if(!mediaFormatNode["NumberStreams"].isNull()) + mediaMeta_.mediaFormat.numberStreams = std::stoi(mediaFormatNode["NumberStreams"].asString()); + if(!mediaFormatNode["FormatLongName"].isNull()) + mediaMeta_.mediaFormat.formatLongName = mediaFormatNode["FormatLongName"].asString(); if(!mediaFormatNode["StartTime"].isNull()) mediaMeta_.mediaFormat.startTime = mediaFormatNode["StartTime"].asString(); - if(!mediaFormatNode["Bitrate"].isNull()) - mediaMeta_.mediaFormat.bitrate = mediaFormatNode["Bitrate"].asString(); if(!mediaFormatNode["CreationTime"].isNull()) mediaMeta_.mediaFormat.creationTime = mediaFormatNode["CreationTime"].asString(); + if(!mediaFormatNode["FormatName"].isNull()) + mediaMeta_.mediaFormat.formatName = mediaFormatNode["FormatName"].asString(); + if(!mediaFormatNode["Duration"].isNull()) + mediaMeta_.mediaFormat.duration = mediaFormatNode["Duration"].asString(); + if(!mediaFormatNode["Bitrate"].isNull()) + mediaMeta_.mediaFormat.bitrate = mediaFormatNode["Bitrate"].asString(); if(!mediaFormatNode["Location"].isNull()) mediaMeta_.mediaFormat.location = mediaFormatNode["Location"].asString(); + if(!mediaFormatNode["NumberPrograms"].isNull()) + mediaMeta_.mediaFormat.numberPrograms = std::stoi(mediaFormatNode["NumberPrograms"].asString()); auto addressNode = mediaFormatNode["Address"]; + if(!addressNode["Township"].isNull()) + mediaMeta_.mediaFormat.address.township = addressNode["Township"].asString(); if(!addressNode["AddressLine"].isNull()) mediaMeta_.mediaFormat.address.addressLine = addressNode["AddressLine"].asString(); if(!addressNode["Country"].isNull()) mediaMeta_.mediaFormat.address.country = addressNode["Country"].asString(); - if(!addressNode["Province"].isNull()) - mediaMeta_.mediaFormat.address.province = addressNode["Province"].asString(); if(!addressNode["City"].isNull()) mediaMeta_.mediaFormat.address.city = addressNode["City"].asString(); if(!addressNode["District"].isNull()) mediaMeta_.mediaFormat.address.district = addressNode["District"].asString(); - if(!addressNode["Township"].isNull()) - mediaMeta_.mediaFormat.address.township = addressNode["Township"].asString(); + if(!addressNode["Province"].isNull()) + mediaMeta_.mediaFormat.address.province = addressNode["Province"].asString(); auto tagNode = mediaFormatNode["Tag"]; - if(!tagNode["Language"].isNull()) - mediaMeta_.mediaFormat.tag.language = tagNode["Language"].asString(); - if(!tagNode["CreationTime"].isNull()) - mediaMeta_.mediaFormat.tag.creationTime = tagNode["CreationTime"].asString(); - if(!tagNode["Album"].isNull()) - mediaMeta_.mediaFormat.tag.album = tagNode["Album"].asString(); - if(!tagNode["AlbumArtist"].isNull()) - mediaMeta_.mediaFormat.tag.albumArtist = tagNode["AlbumArtist"].asString(); if(!tagNode["Artist"].isNull()) mediaMeta_.mediaFormat.tag.artist = tagNode["Artist"].asString(); if(!tagNode["Composer"].isNull()) mediaMeta_.mediaFormat.tag.composer = tagNode["Composer"].asString(); - if(!tagNode["Title"].isNull()) - mediaMeta_.mediaFormat.tag.title = tagNode["Title"].asString(); if(!tagNode["Performer"].isNull()) mediaMeta_.mediaFormat.tag.performer = tagNode["Performer"].asString(); + if(!tagNode["Language"].isNull()) + mediaMeta_.mediaFormat.tag.language = tagNode["Language"].asString(); + if(!tagNode["CreationTime"].isNull()) + mediaMeta_.mediaFormat.tag.creationTime = tagNode["CreationTime"].asString(); + if(!tagNode["Title"].isNull()) + mediaMeta_.mediaFormat.tag.title = tagNode["Title"].asString(); + if(!tagNode["Album"].isNull()) + mediaMeta_.mediaFormat.tag.album = tagNode["Album"].asString(); + if(!tagNode["AlbumArtist"].isNull()) + mediaMeta_.mediaFormat.tag.albumArtist = tagNode["AlbumArtist"].asString(); auto mediaStreamsNode = mediaMetaNode["MediaStreams"]; auto allVideoStreamsNode = mediaStreamsNode["VideoStreams"]["VideoStream"]; for (auto mediaStreamsNodeVideoStreamsVideoStream : allVideoStreamsNode) { MediaMeta::MediaStreams::VideoStream videoStreamObject; - if(!mediaStreamsNodeVideoStreamsVideoStream["Index"].isNull()) - videoStreamObject.index = std::stoi(mediaStreamsNodeVideoStreamsVideoStream["Index"].asString()); - if(!mediaStreamsNodeVideoStreamsVideoStream["Language"].isNull()) - videoStreamObject.language = mediaStreamsNodeVideoStreamsVideoStream["Language"].asString(); - if(!mediaStreamsNodeVideoStreamsVideoStream["CodecName"].isNull()) - videoStreamObject.codecName = mediaStreamsNodeVideoStreamsVideoStream["CodecName"].asString(); - if(!mediaStreamsNodeVideoStreamsVideoStream["CodecLongName"].isNull()) - videoStreamObject.codecLongName = mediaStreamsNodeVideoStreamsVideoStream["CodecLongName"].asString(); - if(!mediaStreamsNodeVideoStreamsVideoStream["Profile"].isNull()) - videoStreamObject.profile = mediaStreamsNodeVideoStreamsVideoStream["Profile"].asString(); - if(!mediaStreamsNodeVideoStreamsVideoStream["CodecTimeBase"].isNull()) - videoStreamObject.codecTimeBase = mediaStreamsNodeVideoStreamsVideoStream["CodecTimeBase"].asString(); - if(!mediaStreamsNodeVideoStreamsVideoStream["CodecTagString"].isNull()) - videoStreamObject.codecTagString = mediaStreamsNodeVideoStreamsVideoStream["CodecTagString"].asString(); if(!mediaStreamsNodeVideoStreamsVideoStream["CodecTag"].isNull()) videoStreamObject.codecTag = mediaStreamsNodeVideoStreamsVideoStream["CodecTag"].asString(); - if(!mediaStreamsNodeVideoStreamsVideoStream["Width"].isNull()) - videoStreamObject.width = std::stoi(mediaStreamsNodeVideoStreamsVideoStream["Width"].asString()); - if(!mediaStreamsNodeVideoStreamsVideoStream["Height"].isNull()) - videoStreamObject.height = std::stoi(mediaStreamsNodeVideoStreamsVideoStream["Height"].asString()); - if(!mediaStreamsNodeVideoStreamsVideoStream["HasBFrames"].isNull()) - videoStreamObject.hasBFrames = std::stoi(mediaStreamsNodeVideoStreamsVideoStream["HasBFrames"].asString()); + if(!mediaStreamsNodeVideoStreamsVideoStream["Frames"].isNull()) + videoStreamObject.frames = mediaStreamsNodeVideoStreamsVideoStream["Frames"].asString(); + if(!mediaStreamsNodeVideoStreamsVideoStream["CodecTimeBase"].isNull()) + videoStreamObject.codecTimeBase = mediaStreamsNodeVideoStreamsVideoStream["CodecTimeBase"].asString(); + if(!mediaStreamsNodeVideoStreamsVideoStream["Rotate"].isNull()) + videoStreamObject.rotate = mediaStreamsNodeVideoStreamsVideoStream["Rotate"].asString(); if(!mediaStreamsNodeVideoStreamsVideoStream["SampleAspectRatio"].isNull()) videoStreamObject.sampleAspectRatio = mediaStreamsNodeVideoStreamsVideoStream["SampleAspectRatio"].asString(); - if(!mediaStreamsNodeVideoStreamsVideoStream["DisplayAspectRatio"].isNull()) - videoStreamObject.displayAspectRatio = mediaStreamsNodeVideoStreamsVideoStream["DisplayAspectRatio"].asString(); - if(!mediaStreamsNodeVideoStreamsVideoStream["PixelFormat"].isNull()) - videoStreamObject.pixelFormat = mediaStreamsNodeVideoStreamsVideoStream["PixelFormat"].asString(); - if(!mediaStreamsNodeVideoStreamsVideoStream["Level"].isNull()) - videoStreamObject.level = std::stoi(mediaStreamsNodeVideoStreamsVideoStream["Level"].asString()); - if(!mediaStreamsNodeVideoStreamsVideoStream["FrameRrate"].isNull()) - videoStreamObject.frameRrate = mediaStreamsNodeVideoStreamsVideoStream["FrameRrate"].asString(); - if(!mediaStreamsNodeVideoStreamsVideoStream["AverageFrameRate"].isNull()) - videoStreamObject.averageFrameRate = mediaStreamsNodeVideoStreamsVideoStream["AverageFrameRate"].asString(); - if(!mediaStreamsNodeVideoStreamsVideoStream["TimeBase"].isNull()) - videoStreamObject.timeBase = mediaStreamsNodeVideoStreamsVideoStream["TimeBase"].asString(); if(!mediaStreamsNodeVideoStreamsVideoStream["StartTime"].isNull()) videoStreamObject.startTime = mediaStreamsNodeVideoStreamsVideoStream["StartTime"].asString(); if(!mediaStreamsNodeVideoStreamsVideoStream["Duration"].isNull()) videoStreamObject.duration = mediaStreamsNodeVideoStreamsVideoStream["Duration"].asString(); + if(!mediaStreamsNodeVideoStreamsVideoStream["Index"].isNull()) + videoStreamObject.index = std::stoi(mediaStreamsNodeVideoStreamsVideoStream["Index"].asString()); + if(!mediaStreamsNodeVideoStreamsVideoStream["CodecName"].isNull()) + videoStreamObject.codecName = mediaStreamsNodeVideoStreamsVideoStream["CodecName"].asString(); if(!mediaStreamsNodeVideoStreamsVideoStream["Bitrate"].isNull()) videoStreamObject.bitrate = mediaStreamsNodeVideoStreamsVideoStream["Bitrate"].asString(); - if(!mediaStreamsNodeVideoStreamsVideoStream["Frames"].isNull()) - videoStreamObject.frames = mediaStreamsNodeVideoStreamsVideoStream["Frames"].asString(); - if(!mediaStreamsNodeVideoStreamsVideoStream["Rotate"].isNull()) - videoStreamObject.rotate = mediaStreamsNodeVideoStreamsVideoStream["Rotate"].asString(); + if(!mediaStreamsNodeVideoStreamsVideoStream["Profile"].isNull()) + videoStreamObject.profile = mediaStreamsNodeVideoStreamsVideoStream["Profile"].asString(); + if(!mediaStreamsNodeVideoStreamsVideoStream["DisplayAspectRatio"].isNull()) + videoStreamObject.displayAspectRatio = mediaStreamsNodeVideoStreamsVideoStream["DisplayAspectRatio"].asString(); + if(!mediaStreamsNodeVideoStreamsVideoStream["HasBFrames"].isNull()) + videoStreamObject.hasBFrames = std::stoi(mediaStreamsNodeVideoStreamsVideoStream["HasBFrames"].asString()); + if(!mediaStreamsNodeVideoStreamsVideoStream["CodecTagString"].isNull()) + videoStreamObject.codecTagString = mediaStreamsNodeVideoStreamsVideoStream["CodecTagString"].asString(); + if(!mediaStreamsNodeVideoStreamsVideoStream["AverageFrameRate"].isNull()) + videoStreamObject.averageFrameRate = mediaStreamsNodeVideoStreamsVideoStream["AverageFrameRate"].asString(); + if(!mediaStreamsNodeVideoStreamsVideoStream["Language"].isNull()) + videoStreamObject.language = mediaStreamsNodeVideoStreamsVideoStream["Language"].asString(); + if(!mediaStreamsNodeVideoStreamsVideoStream["CodecLongName"].isNull()) + videoStreamObject.codecLongName = mediaStreamsNodeVideoStreamsVideoStream["CodecLongName"].asString(); + if(!mediaStreamsNodeVideoStreamsVideoStream["PixelFormat"].isNull()) + videoStreamObject.pixelFormat = mediaStreamsNodeVideoStreamsVideoStream["PixelFormat"].asString(); + if(!mediaStreamsNodeVideoStreamsVideoStream["Level"].isNull()) + videoStreamObject.level = std::stoi(mediaStreamsNodeVideoStreamsVideoStream["Level"].asString()); + if(!mediaStreamsNodeVideoStreamsVideoStream["Height"].isNull()) + videoStreamObject.height = std::stoi(mediaStreamsNodeVideoStreamsVideoStream["Height"].asString()); + if(!mediaStreamsNodeVideoStreamsVideoStream["FrameRrate"].isNull()) + videoStreamObject.frameRrate = mediaStreamsNodeVideoStreamsVideoStream["FrameRrate"].asString(); + if(!mediaStreamsNodeVideoStreamsVideoStream["Width"].isNull()) + videoStreamObject.width = std::stoi(mediaStreamsNodeVideoStreamsVideoStream["Width"].asString()); + if(!mediaStreamsNodeVideoStreamsVideoStream["TimeBase"].isNull()) + videoStreamObject.timeBase = mediaStreamsNodeVideoStreamsVideoStream["TimeBase"].asString(); mediaMeta_.mediaStreams.videoStreams.push_back(videoStreamObject); } - auto allAudioStreamsNode = mediaStreamsNode["AudioStreams"]["AudioStream"]; - for (auto mediaStreamsNodeAudioStreamsAudioStream : allAudioStreamsNode) - { - MediaMeta::MediaStreams::AudioStream audioStreamObject; - if(!mediaStreamsNodeAudioStreamsAudioStream["Index"].isNull()) - audioStreamObject.index = std::stoi(mediaStreamsNodeAudioStreamsAudioStream["Index"].asString()); - if(!mediaStreamsNodeAudioStreamsAudioStream["CodecName"].isNull()) - audioStreamObject.codecName = mediaStreamsNodeAudioStreamsAudioStream["CodecName"].asString(); - if(!mediaStreamsNodeAudioStreamsAudioStream["CodecLongName"].isNull()) - audioStreamObject.codecLongName = mediaStreamsNodeAudioStreamsAudioStream["CodecLongName"].asString(); - if(!mediaStreamsNodeAudioStreamsAudioStream["CodecTimeBase"].isNull()) - audioStreamObject.codecTimeBase = mediaStreamsNodeAudioStreamsAudioStream["CodecTimeBase"].asString(); - if(!mediaStreamsNodeAudioStreamsAudioStream["CodecTagString"].isNull()) - audioStreamObject.codecTagString = mediaStreamsNodeAudioStreamsAudioStream["CodecTagString"].asString(); - if(!mediaStreamsNodeAudioStreamsAudioStream["CodecTag"].isNull()) - audioStreamObject.codecTag = mediaStreamsNodeAudioStreamsAudioStream["CodecTag"].asString(); - if(!mediaStreamsNodeAudioStreamsAudioStream["SampleFormat"].isNull()) - audioStreamObject.sampleFormat = mediaStreamsNodeAudioStreamsAudioStream["SampleFormat"].asString(); - if(!mediaStreamsNodeAudioStreamsAudioStream["SampleRate"].isNull()) - audioStreamObject.sampleRate = mediaStreamsNodeAudioStreamsAudioStream["SampleRate"].asString(); - if(!mediaStreamsNodeAudioStreamsAudioStream["Channels"].isNull()) - audioStreamObject.channels = std::stoi(mediaStreamsNodeAudioStreamsAudioStream["Channels"].asString()); - if(!mediaStreamsNodeAudioStreamsAudioStream["ChannelLayout"].isNull()) - audioStreamObject.channelLayout = mediaStreamsNodeAudioStreamsAudioStream["ChannelLayout"].asString(); - if(!mediaStreamsNodeAudioStreamsAudioStream["TimeBase"].isNull()) - audioStreamObject.timeBase = mediaStreamsNodeAudioStreamsAudioStream["TimeBase"].asString(); - if(!mediaStreamsNodeAudioStreamsAudioStream["StartTime"].isNull()) - audioStreamObject.startTime = mediaStreamsNodeAudioStreamsAudioStream["StartTime"].asString(); - if(!mediaStreamsNodeAudioStreamsAudioStream["Duration"].isNull()) - audioStreamObject.duration = mediaStreamsNodeAudioStreamsAudioStream["Duration"].asString(); - if(!mediaStreamsNodeAudioStreamsAudioStream["Bitrate"].isNull()) - audioStreamObject.bitrate = mediaStreamsNodeAudioStreamsAudioStream["Bitrate"].asString(); - if(!mediaStreamsNodeAudioStreamsAudioStream["Frames"].isNull()) - audioStreamObject.frames = mediaStreamsNodeAudioStreamsAudioStream["Frames"].asString(); - if(!mediaStreamsNodeAudioStreamsAudioStream["Language"].isNull()) - audioStreamObject.language = mediaStreamsNodeAudioStreamsAudioStream["Language"].asString(); - mediaMeta_.mediaStreams.audioStreams.push_back(audioStreamObject); - } auto allSubtitleStreamsNode = mediaStreamsNode["SubtitleStreams"]["SubtitleStream"]; for (auto mediaStreamsNodeSubtitleStreamsSubtitleStream : allSubtitleStreamsNode) { MediaMeta::MediaStreams::SubtitleStream subtitleStreamObject; - if(!mediaStreamsNodeSubtitleStreamsSubtitleStream["Index"].isNull()) - subtitleStreamObject.index = std::stoi(mediaStreamsNodeSubtitleStreamsSubtitleStream["Index"].asString()); if(!mediaStreamsNodeSubtitleStreamsSubtitleStream["Language"].isNull()) subtitleStreamObject.language = mediaStreamsNodeSubtitleStreamsSubtitleStream["Language"].asString(); + if(!mediaStreamsNodeSubtitleStreamsSubtitleStream["Index"].isNull()) + subtitleStreamObject.index = std::stoi(mediaStreamsNodeSubtitleStreamsSubtitleStream["Index"].asString()); mediaMeta_.mediaStreams.subtitleStreams.push_back(subtitleStreamObject); } + auto allAudioStreamsNode = mediaStreamsNode["AudioStreams"]["AudioStream"]; + for (auto mediaStreamsNodeAudioStreamsAudioStream : allAudioStreamsNode) + { + MediaMeta::MediaStreams::AudioStream audioStreamObject; + if(!mediaStreamsNodeAudioStreamsAudioStream["CodecTag"].isNull()) + audioStreamObject.codecTag = mediaStreamsNodeAudioStreamsAudioStream["CodecTag"].asString(); + if(!mediaStreamsNodeAudioStreamsAudioStream["Frames"].isNull()) + audioStreamObject.frames = mediaStreamsNodeAudioStreamsAudioStream["Frames"].asString(); + if(!mediaStreamsNodeAudioStreamsAudioStream["CodecTimeBase"].isNull()) + audioStreamObject.codecTimeBase = mediaStreamsNodeAudioStreamsAudioStream["CodecTimeBase"].asString(); + if(!mediaStreamsNodeAudioStreamsAudioStream["ChannelLayout"].isNull()) + audioStreamObject.channelLayout = mediaStreamsNodeAudioStreamsAudioStream["ChannelLayout"].asString(); + if(!mediaStreamsNodeAudioStreamsAudioStream["StartTime"].isNull()) + audioStreamObject.startTime = mediaStreamsNodeAudioStreamsAudioStream["StartTime"].asString(); + if(!mediaStreamsNodeAudioStreamsAudioStream["Duration"].isNull()) + audioStreamObject.duration = mediaStreamsNodeAudioStreamsAudioStream["Duration"].asString(); + if(!mediaStreamsNodeAudioStreamsAudioStream["Index"].isNull()) + audioStreamObject.index = std::stoi(mediaStreamsNodeAudioStreamsAudioStream["Index"].asString()); + if(!mediaStreamsNodeAudioStreamsAudioStream["CodecName"].isNull()) + audioStreamObject.codecName = mediaStreamsNodeAudioStreamsAudioStream["CodecName"].asString(); + if(!mediaStreamsNodeAudioStreamsAudioStream["Bitrate"].isNull()) + audioStreamObject.bitrate = mediaStreamsNodeAudioStreamsAudioStream["Bitrate"].asString(); + if(!mediaStreamsNodeAudioStreamsAudioStream["SampleFormat"].isNull()) + audioStreamObject.sampleFormat = mediaStreamsNodeAudioStreamsAudioStream["SampleFormat"].asString(); + if(!mediaStreamsNodeAudioStreamsAudioStream["Channels"].isNull()) + audioStreamObject.channels = std::stoi(mediaStreamsNodeAudioStreamsAudioStream["Channels"].asString()); + if(!mediaStreamsNodeAudioStreamsAudioStream["CodecTagString"].isNull()) + audioStreamObject.codecTagString = mediaStreamsNodeAudioStreamsAudioStream["CodecTagString"].asString(); + if(!mediaStreamsNodeAudioStreamsAudioStream["SampleRate"].isNull()) + audioStreamObject.sampleRate = mediaStreamsNodeAudioStreamsAudioStream["SampleRate"].asString(); + if(!mediaStreamsNodeAudioStreamsAudioStream["Language"].isNull()) + audioStreamObject.language = mediaStreamsNodeAudioStreamsAudioStream["Language"].asString(); + if(!mediaStreamsNodeAudioStreamsAudioStream["CodecLongName"].isNull()) + audioStreamObject.codecLongName = mediaStreamsNodeAudioStreamsAudioStream["CodecLongName"].asString(); + if(!mediaStreamsNodeAudioStreamsAudioStream["TimeBase"].isNull()) + audioStreamObject.timeBase = mediaStreamsNodeAudioStreamsAudioStream["TimeBase"].asString(); + mediaMeta_.mediaStreams.audioStreams.push_back(audioStreamObject); + } if(!value["MediaUri"].isNull()) mediaUri_ = value["MediaUri"].asString(); diff --git a/imm/src/model/GetVideoResult.cc b/imm/src/model/GetVideoResult.cc index 636d965fd..940a2bc2d 100644 --- a/imm/src/model/GetVideoResult.cc +++ b/imm/src/model/GetVideoResult.cc @@ -39,6 +39,36 @@ void GetVideoResult::parse(const std::string &payload) Json::Value value; reader.parse(payload, value); setRequestId(value["RequestId"].asString()); + auto allVideoTagsNode = value["VideoTags"]["VideoTagsItem"]; + for (auto valueVideoTagsVideoTagsItem : allVideoTagsNode) + { + VideoTagsItem videoTagsObject; + if(!valueVideoTagsVideoTagsItem["TagConfidence"].isNull()) + videoTagsObject.tagConfidence = std::stof(valueVideoTagsVideoTagsItem["TagConfidence"].asString()); + if(!valueVideoTagsVideoTagsItem["TagName"].isNull()) + videoTagsObject.tagName = valueVideoTagsVideoTagsItem["TagName"].asString(); + if(!valueVideoTagsVideoTagsItem["TagLevel"].isNull()) + videoTagsObject.tagLevel = std::stoi(valueVideoTagsVideoTagsItem["TagLevel"].asString()); + if(!valueVideoTagsVideoTagsItem["ParentTagName"].isNull()) + videoTagsObject.parentTagName = valueVideoTagsVideoTagsItem["ParentTagName"].asString(); + videoTags_.push_back(videoTagsObject); + } + auto allPersonsNode = value["Persons"]["PersonsItem"]; + for (auto valuePersonsPersonsItem : allPersonsNode) + { + PersonsItem personsObject; + if(!valuePersonsPersonsItem["PersonId"].isNull()) + personsObject.personId = valuePersonsPersonsItem["PersonId"].asString(); + if(!valuePersonsPersonsItem["GenderConfidence"].isNull()) + personsObject.genderConfidence = std::stof(valuePersonsPersonsItem["GenderConfidence"].asString()); + if(!valuePersonsPersonsItem["Gender"].isNull()) + personsObject.gender = valuePersonsPersonsItem["Gender"].asString(); + if(!valuePersonsPersonsItem["Age"].isNull()) + personsObject.age = std::stoi(valuePersonsPersonsItem["Age"].asString()); + if(!valuePersonsPersonsItem["AgeConfidence"].isNull()) + personsObject.ageConfidence = std::stof(valuePersonsPersonsItem["AgeConfidence"].asString()); + persons_.push_back(personsObject); + } auto allCelebrityNode = value["Celebrity"]["CelebrityItem"]; for (auto valueCelebrityCelebrityItem : allCelebrityNode) { @@ -51,116 +81,86 @@ void GetVideoResult::parse(const std::string &payload) celebrityObject.celebrityLibraryName = valueCelebrityCelebrityItem["CelebrityLibraryName"].asString(); celebrity_.push_back(celebrityObject); } - auto allVideoTagsNode = value["VideoTags"]["VideoTagsItem"]; - for (auto valueVideoTagsVideoTagsItem : allVideoTagsNode) - { - VideoTagsItem videoTagsObject; - if(!valueVideoTagsVideoTagsItem["TagName"].isNull()) - videoTagsObject.tagName = valueVideoTagsVideoTagsItem["TagName"].asString(); - if(!valueVideoTagsVideoTagsItem["ParentTagName"].isNull()) - videoTagsObject.parentTagName = valueVideoTagsVideoTagsItem["ParentTagName"].asString(); - if(!valueVideoTagsVideoTagsItem["TagConfidence"].isNull()) - videoTagsObject.tagConfidence = std::stof(valueVideoTagsVideoTagsItem["TagConfidence"].asString()); - if(!valueVideoTagsVideoTagsItem["TagLevel"].isNull()) - videoTagsObject.tagLevel = std::stoi(valueVideoTagsVideoTagsItem["TagLevel"].asString()); - videoTags_.push_back(videoTagsObject); - } - auto allPersonsNode = value["Persons"]["PersonsItem"]; - for (auto valuePersonsPersonsItem : allPersonsNode) - { - PersonsItem personsObject; - if(!valuePersonsPersonsItem["PersonId"].isNull()) - personsObject.personId = valuePersonsPersonsItem["PersonId"].asString(); - if(!valuePersonsPersonsItem["Age"].isNull()) - personsObject.age = std::stoi(valuePersonsPersonsItem["Age"].asString()); - if(!valuePersonsPersonsItem["AgeConfidence"].isNull()) - personsObject.ageConfidence = std::stof(valuePersonsPersonsItem["AgeConfidence"].asString()); - if(!valuePersonsPersonsItem["Gender"].isNull()) - personsObject.gender = valuePersonsPersonsItem["Gender"].asString(); - if(!valuePersonsPersonsItem["GenderConfidence"].isNull()) - personsObject.genderConfidence = std::stof(valuePersonsPersonsItem["GenderConfidence"].asString()); - persons_.push_back(personsObject); - } - if(!value["SetId"].isNull()) - setId_ = value["SetId"].asString(); - if(!value["VideoUri"].isNull()) - videoUri_ = value["VideoUri"].asString(); - if(!value["RemarksA"].isNull()) - remarksA_ = value["RemarksA"].asString(); - if(!value["RemarksB"].isNull()) - remarksB_ = value["RemarksB"].asString(); - if(!value["CreateTime"].isNull()) - createTime_ = value["CreateTime"].asString(); if(!value["ModifyTime"].isNull()) modifyTime_ = value["ModifyTime"].asString(); - if(!value["VideoWidth"].isNull()) - videoWidth_ = std::stoi(value["VideoWidth"].asString()); - if(!value["VideoHeight"].isNull()) - videoHeight_ = std::stoi(value["VideoHeight"].asString()); - if(!value["VideoFormat"].isNull()) - videoFormat_ = value["VideoFormat"].asString(); - if(!value["VideoDuration"].isNull()) - videoDuration_ = std::stof(value["VideoDuration"].asString()); - if(!value["FileSize"].isNull()) - fileSize_ = std::stoi(value["FileSize"].asString()); - if(!value["VideoFrames"].isNull()) - videoFrames_ = std::stoi(value["VideoFrames"].asString()); - if(!value["SourceType"].isNull()) - sourceType_ = value["SourceType"].asString(); - if(!value["SourceUri"].isNull()) - sourceUri_ = value["SourceUri"].asString(); - if(!value["SourcePosition"].isNull()) - sourcePosition_ = value["SourcePosition"].asString(); if(!value["ProcessStatus"].isNull()) processStatus_ = value["ProcessStatus"].asString(); - if(!value["ProcessModifyTime"].isNull()) - processModifyTime_ = value["ProcessModifyTime"].asString(); - if(!value["VideoTagsStatus"].isNull()) - videoTagsStatus_ = value["VideoTagsStatus"].asString(); - if(!value["VideoTagsModifyTime"].isNull()) - videoTagsModifyTime_ = value["VideoTagsModifyTime"].asString(); - if(!value["CelebrityStatus"].isNull()) - celebrityStatus_ = value["CelebrityStatus"].asString(); - if(!value["CelebrityModifyTime"].isNull()) - celebrityModifyTime_ = value["CelebrityModifyTime"].asString(); - if(!value["ProcessFailReason"].isNull()) - processFailReason_ = value["ProcessFailReason"].asString(); - if(!value["VideoTagsFailReason"].isNull()) - videoTagsFailReason_ = value["VideoTagsFailReason"].asString(); - if(!value["CelebrityFailReason"].isNull()) - celebrityFailReason_ = value["CelebrityFailReason"].asString(); + if(!value["VideoWidth"].isNull()) + videoWidth_ = std::stoi(value["VideoWidth"].asString()); + if(!value["SourceUri"].isNull()) + sourceUri_ = value["SourceUri"].asString(); + if(!value["SourceType"].isNull()) + sourceType_ = value["SourceType"].asString(); + if(!value["VideoInfo"].isNull()) + videoInfo_ = value["VideoInfo"].asString(); + if(!value["RemarksA"].isNull()) + remarksA_ = value["RemarksA"].asString(); + if(!value["VideoFrameTagsModifyTime"].isNull()) + videoFrameTagsModifyTime_ = value["VideoFrameTagsModifyTime"].asString(); + if(!value["RemarksB"].isNull()) + remarksB_ = value["RemarksB"].asString(); + if(!value["VideoFacesFailReason"].isNull()) + videoFacesFailReason_ = value["VideoFacesFailReason"].asString(); + if(!value["VideoFacesStatus"].isNull()) + videoFacesStatus_ = value["VideoFacesStatus"].asString(); + if(!value["VideoOCRModifyTime"].isNull()) + videoOCRModifyTime_ = value["VideoOCRModifyTime"].asString(); if(!value["RemarksC"].isNull()) remarksC_ = value["RemarksC"].asString(); if(!value["RemarksD"].isNull()) remarksD_ = value["RemarksD"].asString(); - if(!value["ExternalId"].isNull()) - externalId_ = value["ExternalId"].asString(); - if(!value["VideoFacesStatus"].isNull()) - videoFacesStatus_ = value["VideoFacesStatus"].asString(); - if(!value["VideoFacesFailReason"].isNull()) - videoFacesFailReason_ = value["VideoFacesFailReason"].asString(); - if(!value["VideoFacesModifyTime"].isNull()) - videoFacesModifyTime_ = value["VideoFacesModifyTime"].asString(); - if(!value["VideoFrameTagsStatus"].isNull()) - videoFrameTagsStatus_ = value["VideoFrameTagsStatus"].asString(); - if(!value["VideoFrameTagsFailReason"].isNull()) - videoFrameTagsFailReason_ = value["VideoFrameTagsFailReason"].asString(); - if(!value["VideoFrameTagsModifyTime"].isNull()) - videoFrameTagsModifyTime_ = value["VideoFrameTagsModifyTime"].asString(); - if(!value["VideoSTTStatus"].isNull()) - videoSTTStatus_ = value["VideoSTTStatus"].asString(); - if(!value["VideoSTTFailReason"].isNull()) - videoSTTFailReason_ = value["VideoSTTFailReason"].asString(); - if(!value["VideoSTTModifyTime"].isNull()) - videoSTTModifyTime_ = value["VideoSTTModifyTime"].asString(); - if(!value["VideoOCRStatus"].isNull()) - videoOCRStatus_ = value["VideoOCRStatus"].asString(); + if(!value["VideoHeight"].isNull()) + videoHeight_ = std::stoi(value["VideoHeight"].asString()); + if(!value["SourcePosition"].isNull()) + sourcePosition_ = value["SourcePosition"].asString(); if(!value["VideoOCRFailReason"].isNull()) videoOCRFailReason_ = value["VideoOCRFailReason"].asString(); - if(!value["VideoOCRModifyTime"].isNull()) - videoOCRModifyTime_ = value["VideoOCRModifyTime"].asString(); - if(!value["VideoInfo"].isNull()) - videoInfo_ = value["VideoInfo"].asString(); + if(!value["VideoFrameTagsStatus"].isNull()) + videoFrameTagsStatus_ = value["VideoFrameTagsStatus"].asString(); + if(!value["VideoTagsFailReason"].isNull()) + videoTagsFailReason_ = value["VideoTagsFailReason"].asString(); + if(!value["VideoTagsModifyTime"].isNull()) + videoTagsModifyTime_ = value["VideoTagsModifyTime"].asString(); + if(!value["VideoOCRStatus"].isNull()) + videoOCRStatus_ = value["VideoOCRStatus"].asString(); + if(!value["VideoFrames"].isNull()) + videoFrames_ = std::stoi(value["VideoFrames"].asString()); + if(!value["VideoSTTModifyTime"].isNull()) + videoSTTModifyTime_ = value["VideoSTTModifyTime"].asString(); + if(!value["ProcessModifyTime"].isNull()) + processModifyTime_ = value["ProcessModifyTime"].asString(); + if(!value["ProcessFailReason"].isNull()) + processFailReason_ = value["ProcessFailReason"].asString(); + if(!value["VideoSTTFailReason"].isNull()) + videoSTTFailReason_ = value["VideoSTTFailReason"].asString(); + if(!value["ExternalId"].isNull()) + externalId_ = value["ExternalId"].asString(); + if(!value["CreateTime"].isNull()) + createTime_ = value["CreateTime"].asString(); + if(!value["VideoUri"].isNull()) + videoUri_ = value["VideoUri"].asString(); + if(!value["VideoFormat"].isNull()) + videoFormat_ = value["VideoFormat"].asString(); + if(!value["VideoFrameTagsFailReason"].isNull()) + videoFrameTagsFailReason_ = value["VideoFrameTagsFailReason"].asString(); + if(!value["VideoSTTStatus"].isNull()) + videoSTTStatus_ = value["VideoSTTStatus"].asString(); + if(!value["VideoFacesModifyTime"].isNull()) + videoFacesModifyTime_ = value["VideoFacesModifyTime"].asString(); + if(!value["CelebrityModifyTime"].isNull()) + celebrityModifyTime_ = value["CelebrityModifyTime"].asString(); + if(!value["VideoDuration"].isNull()) + videoDuration_ = std::stof(value["VideoDuration"].asString()); + if(!value["CelebrityFailReason"].isNull()) + celebrityFailReason_ = value["CelebrityFailReason"].asString(); + if(!value["CelebrityStatus"].isNull()) + celebrityStatus_ = value["CelebrityStatus"].asString(); + if(!value["SetId"].isNull()) + setId_ = value["SetId"].asString(); + if(!value["VideoTagsStatus"].isNull()) + videoTagsStatus_ = value["VideoTagsStatus"].asString(); + if(!value["FileSize"].isNull()) + fileSize_ = std::stoi(value["FileSize"].asString()); } @@ -179,16 +179,16 @@ int GetVideoResult::getVideoWidth()const return videoWidth_; } -std::string GetVideoResult::getSourceType()const -{ - return sourceType_; -} - std::string GetVideoResult::getSourceUri()const { return sourceUri_; } +std::string GetVideoResult::getSourceType()const +{ + return sourceType_; +} + std::string GetVideoResult::getVideoInfo()const { return videoInfo_; @@ -219,16 +219,16 @@ std::string GetVideoResult::getVideoFacesStatus()const return videoFacesStatus_; } -std::string GetVideoResult::getRemarksC()const -{ - return remarksC_; -} - std::string GetVideoResult::getVideoOCRModifyTime()const { return videoOCRModifyTime_; } +std::string GetVideoResult::getRemarksC()const +{ + return remarksC_; +} + std::string GetVideoResult::getRemarksD()const { return remarksD_; @@ -284,24 +284,24 @@ int GetVideoResult::getVideoFrames()const return videoFrames_; } -std::string GetVideoResult::getProcessModifyTime()const -{ - return processModifyTime_; -} - std::string GetVideoResult::getVideoSTTModifyTime()const { return videoSTTModifyTime_; } +std::string GetVideoResult::getProcessModifyTime()const +{ + return processModifyTime_; +} + std::string GetVideoResult::getProcessFailReason()const { return processFailReason_; } -std::string GetVideoResult::getCreateTime()const +std::string GetVideoResult::getVideoSTTFailReason()const { - return createTime_; + return videoSTTFailReason_; } std::string GetVideoResult::getExternalId()const @@ -309,9 +309,9 @@ std::string GetVideoResult::getExternalId()const return externalId_; } -std::string GetVideoResult::getVideoSTTFailReason()const +std::string GetVideoResult::getCreateTime()const { - return videoSTTFailReason_; + return createTime_; } std::string GetVideoResult::getVideoUri()const @@ -359,16 +359,16 @@ std::string GetVideoResult::getCelebrityFailReason()const return celebrityFailReason_; } -std::string GetVideoResult::getSetId()const -{ - return setId_; -} - std::string GetVideoResult::getCelebrityStatus()const { return celebrityStatus_; } +std::string GetVideoResult::getSetId()const +{ + return setId_; +} + std::string GetVideoResult::getVideoTagsStatus()const { return videoTagsStatus_; diff --git a/imm/src/model/GetWebofficeURLRequest.cc b/imm/src/model/GetWebofficeURLRequest.cc index a3dd1490c..a482b6a41 100644 --- a/imm/src/model/GetWebofficeURLRequest.cc +++ b/imm/src/model/GetWebofficeURLRequest.cc @@ -71,6 +71,17 @@ void GetWebofficeURLRequest::setFile(const std::string& file) setParameter("File", file); } +bool GetWebofficeURLRequest::getHidecmb()const +{ + return hidecmb_; +} + +void GetWebofficeURLRequest::setHidecmb(bool hidecmb) +{ + hidecmb_ = hidecmb; + setParameter("Hidecmb", hidecmb ? "true" : "false"); +} + std::string GetWebofficeURLRequest::getNotifyEndpoint()const { return notifyEndpoint_; @@ -93,6 +104,17 @@ void GetWebofficeURLRequest::setFileID(const std::string& fileID) setParameter("FileID", fileID); } +std::string GetWebofficeURLRequest::getWatermark()const +{ + return watermark_; +} + +void GetWebofficeURLRequest::setWatermark(const std::string& watermark) +{ + watermark_ = watermark; + setParameter("Watermark", watermark); +} + std::string GetWebofficeURLRequest::getNotifyTopicName()const { return notifyTopicName_; diff --git a/imm/src/model/GetWebofficeURLResult.cc b/imm/src/model/GetWebofficeURLResult.cc index cf6ea6444..94e1ca95f 100644 --- a/imm/src/model/GetWebofficeURLResult.cc +++ b/imm/src/model/GetWebofficeURLResult.cc @@ -39,16 +39,16 @@ void GetWebofficeURLResult::parse(const std::string &payload) Json::Value value; reader.parse(payload, value); setRequestId(value["RequestId"].asString()); - if(!value["WebofficeURL"].isNull()) - webofficeURL_ = value["WebofficeURL"].asString(); - if(!value["AccessToken"].isNull()) - accessToken_ = value["AccessToken"].asString(); if(!value["RefreshToken"].isNull()) refreshToken_ = value["RefreshToken"].asString(); - if(!value["AccessTokenExpiredTime"].isNull()) - accessTokenExpiredTime_ = value["AccessTokenExpiredTime"].asString(); + if(!value["AccessToken"].isNull()) + accessToken_ = value["AccessToken"].asString(); if(!value["RefreshTokenExpiredTime"].isNull()) refreshTokenExpiredTime_ = value["RefreshTokenExpiredTime"].asString(); + if(!value["WebofficeURL"].isNull()) + webofficeURL_ = value["WebofficeURL"].asString(); + if(!value["AccessTokenExpiredTime"].isNull()) + accessTokenExpiredTime_ = value["AccessTokenExpiredTime"].asString(); } diff --git a/imm/src/model/IndexImageResult.cc b/imm/src/model/IndexImageResult.cc index 8c730afbb..5a300e883 100644 --- a/imm/src/model/IndexImageResult.cc +++ b/imm/src/model/IndexImageResult.cc @@ -39,6 +39,20 @@ void IndexImageResult::parse(const std::string &payload) Json::Value value; reader.parse(payload, value); setRequestId(value["RequestId"].asString()); + if(!value["RemarksArrayB"].isNull()) + remarksArrayB_ = value["RemarksArrayB"].asString(); + if(!value["ModifyTime"].isNull()) + modifyTime_ = value["ModifyTime"].asString(); + if(!value["RemarksC"].isNull()) + remarksC_ = value["RemarksC"].asString(); + if(!value["RemarksD"].isNull()) + remarksD_ = value["RemarksD"].asString(); + if(!value["RemarksArrayA"].isNull()) + remarksArrayA_ = value["RemarksArrayA"].asString(); + if(!value["ExternalId"].isNull()) + externalId_ = value["ExternalId"].asString(); + if(!value["CreateTime"].isNull()) + createTime_ = value["CreateTime"].asString(); if(!value["SetId"].isNull()) setId_ = value["SetId"].asString(); if(!value["ImageUri"].isNull()) @@ -47,20 +61,6 @@ void IndexImageResult::parse(const std::string &payload) remarksA_ = value["RemarksA"].asString(); if(!value["RemarksB"].isNull()) remarksB_ = value["RemarksB"].asString(); - if(!value["CreateTime"].isNull()) - createTime_ = value["CreateTime"].asString(); - if(!value["ModifyTime"].isNull()) - modifyTime_ = value["ModifyTime"].asString(); - if(!value["RemarksC"].isNull()) - remarksC_ = value["RemarksC"].asString(); - if(!value["RemarksD"].isNull()) - remarksD_ = value["RemarksD"].asString(); - if(!value["ExternalId"].isNull()) - externalId_ = value["ExternalId"].asString(); - if(!value["RemarksArrayA"].isNull()) - remarksArrayA_ = value["RemarksArrayA"].asString(); - if(!value["RemarksArrayB"].isNull()) - remarksArrayB_ = value["RemarksArrayB"].asString(); } @@ -84,9 +84,9 @@ std::string IndexImageResult::getRemarksD()const return remarksD_; } -std::string IndexImageResult::getCreateTime()const +std::string IndexImageResult::getRemarksArrayA()const { - return createTime_; + return remarksArrayA_; } std::string IndexImageResult::getExternalId()const @@ -94,9 +94,9 @@ std::string IndexImageResult::getExternalId()const return externalId_; } -std::string IndexImageResult::getRemarksArrayA()const +std::string IndexImageResult::getCreateTime()const { - return remarksArrayA_; + return createTime_; } std::string IndexImageResult::getSetId()const diff --git a/imm/src/model/IndexVideoResult.cc b/imm/src/model/IndexVideoResult.cc index e5e5718c4..7bf791a45 100644 --- a/imm/src/model/IndexVideoResult.cc +++ b/imm/src/model/IndexVideoResult.cc @@ -39,36 +39,36 @@ void IndexVideoResult::parse(const std::string &payload) Json::Value value; reader.parse(payload, value); setRequestId(value["RequestId"].asString()); - if(!value["SetId"].isNull()) - setId_ = value["SetId"].asString(); - if(!value["VideoUri"].isNull()) - videoUri_ = value["VideoUri"].asString(); - if(!value["RemarksA"].isNull()) - remarksA_ = value["RemarksA"].asString(); - if(!value["RemarksB"].isNull()) - remarksB_ = value["RemarksB"].asString(); - if(!value["CreateTime"].isNull()) - createTime_ = value["CreateTime"].asString(); if(!value["ModifyTime"].isNull()) modifyTime_ = value["ModifyTime"].asString(); - if(!value["Interval"].isNull()) - interval_ = std::stof(value["Interval"].asString()); - if(!value["GrabType"].isNull()) - grabType_ = value["GrabType"].asString(); - if(!value["StartTime"].isNull()) - startTime_ = value["StartTime"].asString(); if(!value["EndTime"].isNull()) endTime_ = value["EndTime"].asString(); if(!value["SaveType"].isNull()) saveType_ = value["SaveType"].asString() == "true"; - if(!value["TgtUri"].isNull()) - tgtUri_ = value["TgtUri"].asString(); - if(!value["RemarksC"].isNull()) - remarksC_ = value["RemarksC"].asString(); - if(!value["RemarksD"].isNull()) - remarksD_ = value["RemarksD"].asString(); if(!value["ExternalId"].isNull()) externalId_ = value["ExternalId"].asString(); + if(!value["CreateTime"].isNull()) + createTime_ = value["CreateTime"].asString(); + if(!value["StartTime"].isNull()) + startTime_ = value["StartTime"].asString(); + if(!value["VideoUri"].isNull()) + videoUri_ = value["VideoUri"].asString(); + if(!value["GrabType"].isNull()) + grabType_ = value["GrabType"].asString(); + if(!value["RemarksA"].isNull()) + remarksA_ = value["RemarksA"].asString(); + if(!value["RemarksB"].isNull()) + remarksB_ = value["RemarksB"].asString(); + if(!value["RemarksC"].isNull()) + remarksC_ = value["RemarksC"].asString(); + if(!value["TgtUri"].isNull()) + tgtUri_ = value["TgtUri"].asString(); + if(!value["RemarksD"].isNull()) + remarksD_ = value["RemarksD"].asString(); + if(!value["SetId"].isNull()) + setId_ = value["SetId"].asString(); + if(!value["Interval"].isNull()) + interval_ = std::stof(value["Interval"].asString()); } @@ -87,16 +87,16 @@ bool IndexVideoResult::getSaveType()const return saveType_; } -std::string IndexVideoResult::getCreateTime()const -{ - return createTime_; -} - std::string IndexVideoResult::getExternalId()const { return externalId_; } +std::string IndexVideoResult::getCreateTime()const +{ + return createTime_; +} + std::string IndexVideoResult::getStartTime()const { return startTime_;