Update water-mark params.

This commit is contained in:
sdk-team
2025-05-14 03:38:22 +00:00
parent 9f1edb0b33
commit b4df698c3e
17 changed files with 707 additions and 626 deletions

View File

@@ -1 +1 @@
1.36.2066 1.36.2067

View File

@@ -38,10 +38,14 @@ public:
void setIndustry(const std::string &industry); void setIndustry(const std::string &industry);
std::string getLabelVersion() const; std::string getLabelVersion() const;
void setLabelVersion(const std::string &labelVersion); void setLabelVersion(const std::string &labelVersion);
std::string getLabelCustomParamsConfig() const;
void setLabelCustomParamsConfig(const std::string &labelCustomParamsConfig);
std::string getAccessKeyId() const; std::string getAccessKeyId() const;
void setAccessKeyId(const std::string &accessKeyId); void setAccessKeyId(const std::string &accessKeyId);
std::string getScene() const; std::string getScene() const;
void setScene(const std::string &scene); void setScene(const std::string &scene);
std::string getTemplateConfig() const;
void setTemplateConfig(const std::string &templateConfig);
std::string getFaceCustomParamsConfig() const; std::string getFaceCustomParamsConfig() const;
void setFaceCustomParamsConfig(const std::string &faceCustomParamsConfig); void setFaceCustomParamsConfig(const std::string &faceCustomParamsConfig);
std::string getTemplateName() const; std::string getTemplateName() const;
@@ -58,6 +62,8 @@ public:
void setResourceOwnerAccount(const std::string &resourceOwnerAccount); void setResourceOwnerAccount(const std::string &resourceOwnerAccount);
std::string getOwnerAccount() const; std::string getOwnerAccount() const;
void setOwnerAccount(const std::string &ownerAccount); void setOwnerAccount(const std::string &ownerAccount);
std::string getLabelCustomCategoryIds() const;
void setLabelCustomCategoryIds(const std::string &labelCustomCategoryIds);
std::string getObjectGroupIds() const; std::string getObjectGroupIds() const;
void setObjectGroupIds(const std::string &objectGroupIds); void setObjectGroupIds(const std::string &objectGroupIds);
long getOwnerId() const; long getOwnerId() const;
@@ -72,8 +78,10 @@ private:
std::string knowledgeConfig_; std::string knowledgeConfig_;
std::string industry_; std::string industry_;
std::string labelVersion_; std::string labelVersion_;
std::string labelCustomParamsConfig_;
std::string accessKeyId_; std::string accessKeyId_;
std::string scene_; std::string scene_;
std::string templateConfig_;
std::string faceCustomParamsConfig_; std::string faceCustomParamsConfig_;
std::string templateName_; std::string templateName_;
bool isDefault_; bool isDefault_;
@@ -82,6 +90,7 @@ private:
std::string landmarkGroupIds_; std::string landmarkGroupIds_;
std::string resourceOwnerAccount_; std::string resourceOwnerAccount_;
std::string ownerAccount_; std::string ownerAccount_;
std::string labelCustomCategoryIds_;
std::string objectGroupIds_; std::string objectGroupIds_;
long ownerId_; long ownerId_;
std::string analyseTypes_; std::string analyseTypes_;

View File

@@ -43,6 +43,7 @@ namespace AlibabaCloud
explicit QuerySmarttagJobResult(const std::string &payload); explicit QuerySmarttagJobResult(const std::string &payload);
~QuerySmarttagJobResult(); ~QuerySmarttagJobResult();
std::string getJobStatus()const; std::string getJobStatus()const;
std::string getMessage()const;
std::vector<Result> getResults()const; std::vector<Result> getResults()const;
std::string getUserData()const; std::string getUserData()const;
@@ -50,6 +51,7 @@ namespace AlibabaCloud
void parse(const std::string &payload); void parse(const std::string &payload);
private: private:
std::string jobStatus_; std::string jobStatus_;
std::string message_;
std::vector<Result> results_; std::vector<Result> results_;
std::string userData_; std::string userData_;

View File

@@ -38,6 +38,8 @@ public:
void setPersonId(const std::string &personId); void setPersonId(const std::string &personId);
std::string getCategoryId() const; std::string getCategoryId() const;
void setCategoryId(const std::string &categoryId); void setCategoryId(const std::string &categoryId);
std::string getPersonName() const;
void setPersonName(const std::string &personName);
std::string getResourceOwnerAccount() const; std::string getResourceOwnerAccount() const;
void setResourceOwnerAccount(const std::string &resourceOwnerAccount); void setResourceOwnerAccount(const std::string &resourceOwnerAccount);
std::string getOwnerAccount() const; std::string getOwnerAccount() const;
@@ -52,6 +54,7 @@ private:
std::string accessKeyId_; std::string accessKeyId_;
std::string personId_; std::string personId_;
std::string categoryId_; std::string categoryId_;
std::string personName_;
std::string resourceOwnerAccount_; std::string resourceOwnerAccount_;
std::string ownerAccount_; std::string ownerAccount_;
long ownerId_; long ownerId_;

View File

@@ -32,6 +32,8 @@ public:
~RegisterCustomViewRequest(); ~RegisterCustomViewRequest();
long getResourceOwnerId() const; long getResourceOwnerId() const;
void setResourceOwnerId(long resourceOwnerId); void setResourceOwnerId(long resourceOwnerId);
std::string getLabelPrompt() const;
void setLabelPrompt(const std::string &labelPrompt);
std::string getAccessKeyId() const; std::string getAccessKeyId() const;
void setAccessKeyId(const std::string &accessKeyId); void setAccessKeyId(const std::string &accessKeyId);
std::string getAlgorithm() const; std::string getAlgorithm() const;
@@ -51,6 +53,7 @@ public:
private: private:
long resourceOwnerId_; long resourceOwnerId_;
std::string labelPrompt_;
std::string accessKeyId_; std::string accessKeyId_;
std::string algorithm_; std::string algorithm_;
std::string customGroupId_; std::string customGroupId_;

View File

@@ -34,8 +34,8 @@ public:
void setVisibleMessage(const std::string &visibleMessage); void setVisibleMessage(const std::string &visibleMessage);
std::string getDescription() const; std::string getDescription() const;
void setDescription(const std::string &description); void setDescription(const std::string &description);
std::string getStartTime() const; long getStartTime() const;
void setStartTime(const std::string &startTime); void setStartTime(long startTime);
std::string getOutput() const; std::string getOutput() const;
void setOutput(const std::string &output); void setOutput(const std::string &output);
std::string getUserData() const; std::string getUserData() const;
@@ -50,15 +50,15 @@ public:
void setUrl(const std::string &url); void setUrl(const std::string &url);
std::string getInput() const; std::string getInput() const;
void setInput(const std::string &input); void setInput(const std::string &input);
std::string getTotalTime() const; long getTotalTime() const;
void setTotalTime(const std::string &totalTime); void setTotalTime(long totalTime);
std::string getCallBack() const; std::string getCallBack() const;
void setCallBack(const std::string &callBack); void setCallBack(const std::string &callBack);
private: private:
std::string visibleMessage_; std::string visibleMessage_;
std::string description_; std::string description_;
std::string startTime_; long startTime_;
std::string output_; std::string output_;
std::string userData_; std::string userData_;
long level_; long level_;
@@ -66,7 +66,7 @@ private:
std::string params_; std::string params_;
std::string url_; std::string url_;
std::string input_; std::string input_;
std::string totalTime_; long totalTime_;
std::string callBack_; std::string callBack_;
}; };
} // namespace Model } // namespace Model

View File

@@ -36,46 +36,59 @@ namespace AlibabaCloud
{ {
struct Job struct Job
{ {
struct Input
{
std::string bucket;
std::string object;
std::string location;
};
struct MNSMessageResult
{
std::string errorCode;
std::string errorMessage;
std::string messageId;
};
struct Output struct Output
{ {
struct Video struct Audio
{ {
struct BitrateBnd struct Volume
{ {
std::string min; std::string level;
std::string max; std::string method;
}; };
std::string bufsize;
std::string qscale;
std::string scanMode;
std::string preset;
std::string fps;
std::string gop;
BitrateBnd bitrateBnd;
std::string pixFmt;
std::string bitrate;
std::string profile;
std::string crop;
std::string pad;
std::string codec; std::string codec;
std::string maxrate; std::string qscale;
std::string maxFps; Volume volume;
std::string crf; std::string bitrate;
std::string height; std::string samplerate;
std::string degrain; std::string channels;
std::string width; std::string profile;
std::string resoPriority;
}; };
struct TransConfig struct Clip
{ {
std::string isCheckAudioBitrate; struct TimeSpan
std::string adjDarMethod; {
std::string isCheckAudioBitrateFail; std::string duration;
std::string isCheckVideoBitrateFail; std::string seek;
std::string isCheckReso; };
std::string isCheckVideoBitrate; TimeSpan timeSpan;
std::string transMode; };
std::string isCheckResoFail; struct Container
{
std::string format;
};
struct DigiWaterMark
{
struct InputFile1
{
std::string bucket;
std::string object;
std::string location;
};
std::string type;
InputFile1 inputFile1;
std::string alpha;
}; };
struct Encryption struct Encryption
{ {
@@ -90,68 +103,13 @@ namespace AlibabaCloud
{ {
struct TS struct TS
{ {
bool sizeSupport;
bool md5Support; bool md5Support;
bool sizeSupport;
}; };
TS tS; TS tS;
}; };
struct Audio
{
struct Volume
{
std::string level;
std::string method;
};
std::string codec;
std::string qscale;
Volume volume;
std::string samplerate;
std::string bitrate;
std::string profile;
std::string channels;
};
struct SuperReso
{
std::string isHalfSample;
};
struct DigiWaterMark
{
struct InputFile1
{
std::string bucket;
std::string object;
std::string location;
};
std::string type;
InputFile1 inputFile1;
std::string alpha;
};
struct OutputFile
{
std::string bucket;
std::string object;
std::string roleArn;
std::string location;
};
struct Container
{
std::string format;
};
struct Clip
{
struct TimeSpan
{
std::string duration;
std::string seek;
};
TimeSpan timeSpan;
};
struct MuxConfig struct MuxConfig
{ {
struct Webp
{
std::string loop;
};
struct Gif struct Gif
{ {
std::string finalDelay; std::string finalDelay;
@@ -163,10 +121,106 @@ namespace AlibabaCloud
{ {
std::string duration; std::string duration;
}; };
Webp webp; struct Webp
{
std::string loop;
};
Gif gif; Gif gif;
Webp webp;
Segment segment; Segment segment;
}; };
struct OutputFile
{
std::string bucket;
std::string object;
std::string roleArn;
std::string location;
};
struct Properties
{
struct Format
{
std::string numPrograms;
std::string size;
std::string formatLongName;
std::string startTime;
std::string formatName;
std::string numStreams;
std::string duration;
std::string bitrate;
};
struct Streams
{
struct AudioStream
{
std::string codecTag;
std::string codecTimeBase;
std::string channelLayout;
std::string startTime;
std::string duration;
std::string index;
std::string lang;
std::string sampleFmt;
std::string bitrate;
std::string codecName;
std::string samplerate;
std::string channels;
std::string timebase;
std::string codecTagString;
std::string codecLongName;
std::string numFrames;
};
struct SubtitleStream
{
std::string index;
std::string lang;
};
struct VideoStream
{
struct NetworkCost
{
std::string avgBitrate;
std::string preloadTime;
std::string costBandwidth;
};
std::string codecTag;
std::string codecTimeBase;
std::string sar;
std::string fps;
std::string startTime;
std::string duration;
std::string index;
std::string lang;
std::string pixFmt;
NetworkCost networkCost;
std::string bitrate;
std::string codecName;
std::string avgFPS;
std::string profile;
std::string timebase;
std::string codecTagString;
std::string hasBFrames;
std::string dar;
std::string codecLongName;
std::string height;
std::string level;
std::string numFrames;
std::string width;
};
std::vector<SubtitleStream> subtitleStreamList;
std::vector<VideoStream> videoStreamList;
std::vector<AudioStream> audioStreamList;
};
Format format;
std::string fps;
std::string duration;
std::string height;
std::string fileFormat;
std::string bitrate;
std::string width;
Streams streams;
std::string fileSize;
};
struct SubtitleConfig struct SubtitleConfig
{ {
struct ExtSubtitle struct ExtSubtitle
@@ -188,90 +242,94 @@ namespace AlibabaCloud
std::vector<ExtSubtitle> extSubtitleList; std::vector<ExtSubtitle> extSubtitleList;
std::vector<Subtitle> subtitleList; std::vector<Subtitle> subtitleList;
}; };
struct Properties struct SuperReso
{ {
struct Streams std::string isHalfSample;
};
struct TransConfig
{
std::string isCheckAudioBitrate;
std::string adjDarMethod;
std::string isCheckAudioBitrateFail;
std::string isCheckVideoBitrateFail;
std::string isCheckReso;
std::string isCheckVideoBitrate;
std::string transMode;
std::string isCheckResoFail;
};
struct Video
{
struct BitrateBnd
{ {
struct VideoStream std::string min;
{ std::string max;
struct NetworkCost
{
std::string avgBitrate;
std::string preloadTime;
std::string costBandwidth;
};
std::string codecTag;
std::string codecTimeBase;
std::string sar;
std::string startTime;
std::string fps;
std::string index;
std::string lang;
std::string duration;
std::string pixFmt;
NetworkCost networkCost;
std::string bitrate;
std::string codecName;
std::string avgFPS;
std::string profile;
std::string timebase;
std::string codecTagString;
std::string hasBFrames;
std::string dar;
std::string codecLongName;
std::string height;
std::string level;
std::string numFrames;
std::string width;
};
struct AudioStream
{
std::string codecTag;
std::string codecTimeBase;
std::string channelLayout;
std::string startTime;
std::string index;
std::string lang;
std::string duration;
std::string sampleFmt;
std::string samplerate;
std::string bitrate;
std::string codecName;
std::string channels;
std::string timebase;
std::string codecTagString;
std::string codecLongName;
std::string numFrames;
};
struct SubtitleStream
{
std::string index;
std::string lang;
};
std::vector<VideoStream> videoStreamList;
std::vector<SubtitleStream> subtitleStreamList;
std::vector<AudioStream> audioStreamList;
}; };
struct Format std::string bufsize;
{ std::string qscale;
std::string numPrograms; std::string scanMode;
std::string size; std::string preset;
std::string formatLongName;
std::string startTime;
std::string numStreams;
std::string formatName;
std::string duration;
std::string bitrate;
};
Format format;
std::string fps; std::string fps;
std::string height; std::string gop;
std::string duration; BitrateBnd bitrateBnd;
std::string fileFormat; std::string pixFmt;
std::string width;
std::string bitrate; std::string bitrate;
Streams streams; std::string profile;
std::string fileSize; std::string crop;
std::string codec;
std::string maxrate;
std::string pad;
std::string crf;
std::string maxFps;
std::string height;
std::string degrain;
std::string resoPriority;
std::string width;
};
struct Amix
{
std::string amixURL;
std::string start;
std::string mixDurMode;
std::string duration;
std::string map;
};
struct Merge
{
std::string mergeURL;
std::string start;
std::string duration;
std::string roleArn;
};
struct Opening
{
std::string start;
std::string openUrl;
std::string height;
std::string width;
};
struct OutSubtitle
{
struct OutSubtitleFile
{
std::string bucket;
std::string object;
std::string roleArn;
std::string location;
};
std::string message;
OutSubtitleFile outSubtitleFile;
std::string map;
bool success;
};
struct TailSlate
{
std::string tailUrl;
std::string start;
std::string blendDuration;
std::string height;
std::string bgColor;
std::string width;
bool isMergeAudio;
}; };
struct WaterMark struct WaterMark
{ {
@@ -290,59 +348,13 @@ namespace AlibabaCloud
std::string width; std::string width;
InputFile inputFile; InputFile inputFile;
}; };
struct Merge
{
std::string start;
std::string mergeURL;
std::string duration;
std::string roleArn;
};
struct OutSubtitle
{
struct OutSubtitleFile
{
std::string bucket;
std::string object;
std::string roleArn;
std::string location;
};
std::string message;
OutSubtitleFile outSubtitleFile;
std::string map;
bool success;
};
struct Amix
{
std::string amixURL;
std::string start;
std::string mixDurMode;
std::string duration;
std::string map;
};
struct Opening
{
std::string start;
std::string openUrl;
std::string height;
std::string width;
};
struct TailSlate
{
std::string tailUrl;
std::string start;
std::string blendDuration;
std::string height;
std::string bgColor;
std::string width;
bool isMergeAudio;
};
std::string rotate; std::string rotate;
DigiWaterMark digiWaterMark; DigiWaterMark digiWaterMark;
std::string userData; std::string userData;
Encryption encryption; Encryption encryption;
Properties properties; Properties properties;
SuperReso superReso;
Clip clip; Clip clip;
SuperReso superReso;
std::vector<WaterMark> waterMarkList; std::vector<WaterMark> waterMarkList;
Container container; Container container;
TransConfig transConfig; TransConfig transConfig;
@@ -365,18 +377,6 @@ namespace AlibabaCloud
Audio audio; Audio audio;
std::vector<Merge> mergeList; std::vector<Merge> mergeList;
}; };
struct Input
{
std::string bucket;
std::string object;
std::string location;
};
struct MNSMessageResult
{
std::string errorCode;
std::string errorMessage;
std::string messageId;
};
Input input; Input input;
std::string finishTime; std::string finishTime;
std::string message; std::string message;

View File

@@ -30,8 +30,8 @@ class ALIBABACLOUD_MTS_EXPORT SubmitTraceAbJobRequest : public RpcServiceRequest
public: public:
SubmitTraceAbJobRequest(); SubmitTraceAbJobRequest();
~SubmitTraceAbJobRequest(); ~SubmitTraceAbJobRequest();
std::string getStartTime() const; long getStartTime() const;
void setStartTime(const std::string &startTime); void setStartTime(long startTime);
std::string getOutput() const; std::string getOutput() const;
void setOutput(const std::string &output); void setOutput(const std::string &output);
std::string getUserData() const; std::string getUserData() const;
@@ -44,20 +44,20 @@ public:
void setUrl(const std::string &url); void setUrl(const std::string &url);
std::string getInput() const; std::string getInput() const;
void setInput(const std::string &input); void setInput(const std::string &input);
std::string getTotalTime() const; long getTotalTime() const;
void setTotalTime(const std::string &totalTime); void setTotalTime(long totalTime);
std::string getCallBack() const; std::string getCallBack() const;
void setCallBack(const std::string &callBack); void setCallBack(const std::string &callBack);
private: private:
std::string startTime_; long startTime_;
std::string output_; std::string output_;
std::string userData_; std::string userData_;
std::string cipherBase64ed_; std::string cipherBase64ed_;
long level_; long level_;
std::string url_; std::string url_;
std::string input_; std::string input_;
std::string totalTime_; long totalTime_;
std::string callBack_; std::string callBack_;
}; };
} // namespace Model } // namespace Model

View File

@@ -42,6 +42,8 @@ public:
void setAccessKeyId(const std::string &accessKeyId); void setAccessKeyId(const std::string &accessKeyId);
std::string getScene() const; std::string getScene() const;
void setScene(const std::string &scene); void setScene(const std::string &scene);
std::string getTemplateConfig() const;
void setTemplateConfig(const std::string &templateConfig);
std::string getFaceCustomParamsConfig() const; std::string getFaceCustomParamsConfig() const;
void setFaceCustomParamsConfig(const std::string &faceCustomParamsConfig); void setFaceCustomParamsConfig(const std::string &faceCustomParamsConfig);
std::string getTemplateName() const; std::string getTemplateName() const;
@@ -76,6 +78,7 @@ private:
std::string labelVersion_; std::string labelVersion_;
std::string accessKeyId_; std::string accessKeyId_;
std::string scene_; std::string scene_;
std::string templateConfig_;
std::string faceCustomParamsConfig_; std::string faceCustomParamsConfig_;
std::string templateName_; std::string templateName_;
bool isDefault_; bool isDefault_;

View File

@@ -61,6 +61,15 @@ void AddSmarttagTemplateRequest::setLabelVersion(const std::string &labelVersion
setParameter(std::string("LabelVersion"), labelVersion); setParameter(std::string("LabelVersion"), labelVersion);
} }
std::string AddSmarttagTemplateRequest::getLabelCustomParamsConfig() const {
return labelCustomParamsConfig_;
}
void AddSmarttagTemplateRequest::setLabelCustomParamsConfig(const std::string &labelCustomParamsConfig) {
labelCustomParamsConfig_ = labelCustomParamsConfig;
setParameter(std::string("LabelCustomParamsConfig"), labelCustomParamsConfig);
}
std::string AddSmarttagTemplateRequest::getAccessKeyId() const { std::string AddSmarttagTemplateRequest::getAccessKeyId() const {
return accessKeyId_; return accessKeyId_;
} }
@@ -79,6 +88,15 @@ void AddSmarttagTemplateRequest::setScene(const std::string &scene) {
setParameter(std::string("Scene"), scene); setParameter(std::string("Scene"), scene);
} }
std::string AddSmarttagTemplateRequest::getTemplateConfig() const {
return templateConfig_;
}
void AddSmarttagTemplateRequest::setTemplateConfig(const std::string &templateConfig) {
templateConfig_ = templateConfig;
setParameter(std::string("TemplateConfig"), templateConfig);
}
std::string AddSmarttagTemplateRequest::getFaceCustomParamsConfig() const { std::string AddSmarttagTemplateRequest::getFaceCustomParamsConfig() const {
return faceCustomParamsConfig_; return faceCustomParamsConfig_;
} }
@@ -151,6 +169,15 @@ void AddSmarttagTemplateRequest::setOwnerAccount(const std::string &ownerAccount
setParameter(std::string("OwnerAccount"), ownerAccount); setParameter(std::string("OwnerAccount"), ownerAccount);
} }
std::string AddSmarttagTemplateRequest::getLabelCustomCategoryIds() const {
return labelCustomCategoryIds_;
}
void AddSmarttagTemplateRequest::setLabelCustomCategoryIds(const std::string &labelCustomCategoryIds) {
labelCustomCategoryIds_ = labelCustomCategoryIds;
setParameter(std::string("LabelCustomCategoryIds"), labelCustomCategoryIds);
}
std::string AddSmarttagTemplateRequest::getObjectGroupIds() const { std::string AddSmarttagTemplateRequest::getObjectGroupIds() const {
return objectGroupIds_; return objectGroupIds_;
} }

View File

@@ -43,14 +43,16 @@ void QuerySmarttagJobResult::parse(const std::string &payload)
for (auto valueResultsResult : allResultsNode) for (auto valueResultsResult : allResultsNode)
{ {
Result resultsObject; Result resultsObject;
if(!valueResultsResult["Type"].isNull())
resultsObject.type = valueResultsResult["Type"].asString();
if(!valueResultsResult["Data"].isNull()) if(!valueResultsResult["Data"].isNull())
resultsObject.data = valueResultsResult["Data"].asString(); resultsObject.data = valueResultsResult["Data"].asString();
if(!valueResultsResult["Type"].isNull())
resultsObject.type = valueResultsResult["Type"].asString();
results_.push_back(resultsObject); results_.push_back(resultsObject);
} }
if(!value["JobStatus"].isNull()) if(!value["JobStatus"].isNull())
jobStatus_ = value["JobStatus"].asString(); jobStatus_ = value["JobStatus"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["UserData"].isNull()) if(!value["UserData"].isNull())
userData_ = value["UserData"].asString(); userData_ = value["UserData"].asString();
@@ -61,6 +63,11 @@ std::string QuerySmarttagJobResult::getJobStatus()const
return jobStatus_; return jobStatus_;
} }
std::string QuerySmarttagJobResult::getMessage()const
{
return message_;
}
std::vector<QuerySmarttagJobResult::Result> QuerySmarttagJobResult::getResults()const std::vector<QuerySmarttagJobResult::Result> QuerySmarttagJobResult::getResults()const
{ {
return results_; return results_;

View File

@@ -61,6 +61,15 @@ void RegisterCustomFaceRequest::setCategoryId(const std::string &categoryId) {
setParameter(std::string("CategoryId"), categoryId); setParameter(std::string("CategoryId"), categoryId);
} }
std::string RegisterCustomFaceRequest::getPersonName() const {
return personName_;
}
void RegisterCustomFaceRequest::setPersonName(const std::string &personName) {
personName_ = personName;
setParameter(std::string("PersonName"), personName);
}
std::string RegisterCustomFaceRequest::getResourceOwnerAccount() const { std::string RegisterCustomFaceRequest::getResourceOwnerAccount() const {
return resourceOwnerAccount_; return resourceOwnerAccount_;
} }

View File

@@ -34,6 +34,15 @@ void RegisterCustomViewRequest::setResourceOwnerId(long resourceOwnerId) {
setParameter(std::string("ResourceOwnerId"), std::to_string(resourceOwnerId)); setParameter(std::string("ResourceOwnerId"), std::to_string(resourceOwnerId));
} }
std::string RegisterCustomViewRequest::getLabelPrompt() const {
return labelPrompt_;
}
void RegisterCustomViewRequest::setLabelPrompt(const std::string &labelPrompt) {
labelPrompt_ = labelPrompt;
setParameter(std::string("LabelPrompt"), labelPrompt);
}
std::string RegisterCustomViewRequest::getAccessKeyId() const { std::string RegisterCustomViewRequest::getAccessKeyId() const {
return accessKeyId_; return accessKeyId_;
} }

View File

@@ -43,13 +43,13 @@ void SubmitCopyrightJobRequest::setDescription(const std::string &description) {
setParameter(std::string("Description"), description); setParameter(std::string("Description"), description);
} }
std::string SubmitCopyrightJobRequest::getStartTime() const { long SubmitCopyrightJobRequest::getStartTime() const {
return startTime_; return startTime_;
} }
void SubmitCopyrightJobRequest::setStartTime(const std::string &startTime) { void SubmitCopyrightJobRequest::setStartTime(long startTime) {
startTime_ = startTime; startTime_ = startTime;
setParameter(std::string("StartTime"), startTime); setParameter(std::string("StartTime"), std::to_string(startTime));
} }
std::string SubmitCopyrightJobRequest::getOutput() const { std::string SubmitCopyrightJobRequest::getOutput() const {
@@ -115,13 +115,13 @@ void SubmitCopyrightJobRequest::setInput(const std::string &input) {
setParameter(std::string("Input"), input); setParameter(std::string("Input"), input);
} }
std::string SubmitCopyrightJobRequest::getTotalTime() const { long SubmitCopyrightJobRequest::getTotalTime() const {
return totalTime_; return totalTime_;
} }
void SubmitCopyrightJobRequest::setTotalTime(const std::string &totalTime) { void SubmitCopyrightJobRequest::setTotalTime(long totalTime) {
totalTime_ = totalTime; totalTime_ = totalTime;
setParameter(std::string("TotalTime"), totalTime); setParameter(std::string("TotalTime"), std::to_string(totalTime));
} }
std::string SubmitCopyrightJobRequest::getCallBack() const { std::string SubmitCopyrightJobRequest::getCallBack() const {

View File

@@ -43,442 +43,326 @@ void SubmitJobsResult::parse(const std::string &payload)
for (auto valueJobResultListJobResult : allJobResultListNode) for (auto valueJobResultListJobResult : allJobResultListNode)
{ {
JobResult jobResultListObject; JobResult jobResultListObject;
if(!valueJobResultListJobResult["Success"].isNull())
jobResultListObject.success = valueJobResultListJobResult["Success"].asString() == "true";
if(!valueJobResultListJobResult["Code"].isNull()) if(!valueJobResultListJobResult["Code"].isNull())
jobResultListObject.code = valueJobResultListJobResult["Code"].asString(); jobResultListObject.code = valueJobResultListJobResult["Code"].asString();
if(!valueJobResultListJobResult["Message"].isNull()) if(!valueJobResultListJobResult["Message"].isNull())
jobResultListObject.message = valueJobResultListJobResult["Message"].asString(); jobResultListObject.message = valueJobResultListJobResult["Message"].asString();
if(!valueJobResultListJobResult["Success"].isNull())
jobResultListObject.success = valueJobResultListJobResult["Success"].asString() == "true";
auto jobNode = value["Job"]; auto jobNode = value["Job"];
if(!jobNode["CreationTime"].isNull())
jobResultListObject.job.creationTime = jobNode["CreationTime"].asString();
if(!jobNode["Percent"].isNull())
jobResultListObject.job.percent = std::stol(jobNode["Percent"].asString());
if(!jobNode["FinishTime"].isNull())
jobResultListObject.job.finishTime = jobNode["FinishTime"].asString();
if(!jobNode["State"].isNull())
jobResultListObject.job.state = jobNode["State"].asString();
if(!jobNode["JobId"].isNull())
jobResultListObject.job.jobId = jobNode["JobId"].asString();
if(!jobNode["Code"].isNull()) if(!jobNode["Code"].isNull())
jobResultListObject.job.code = jobNode["Code"].asString(); jobResultListObject.job.code = jobNode["Code"].asString();
if(!jobNode["CreationTime"].isNull())
jobResultListObject.job.creationTime = jobNode["CreationTime"].asString();
if(!jobNode["FinishTime"].isNull())
jobResultListObject.job.finishTime = jobNode["FinishTime"].asString();
if(!jobNode["JobId"].isNull())
jobResultListObject.job.jobId = jobNode["JobId"].asString();
if(!jobNode["Message"].isNull()) if(!jobNode["Message"].isNull())
jobResultListObject.job.message = jobNode["Message"].asString(); jobResultListObject.job.message = jobNode["Message"].asString();
if(!jobNode["Percent"].isNull())
jobResultListObject.job.percent = std::stol(jobNode["Percent"].asString());
if(!jobNode["PipelineId"].isNull()) if(!jobNode["PipelineId"].isNull())
jobResultListObject.job.pipelineId = jobNode["PipelineId"].asString(); jobResultListObject.job.pipelineId = jobNode["PipelineId"].asString();
if(!jobNode["State"].isNull())
jobResultListObject.job.state = jobNode["State"].asString();
auto inputNode = jobNode["Input"];
if(!inputNode["Bucket"].isNull())
jobResultListObject.job.input.bucket = inputNode["Bucket"].asString();
if(!inputNode["Location"].isNull())
jobResultListObject.job.input.location = inputNode["Location"].asString();
if(!inputNode["Object"].isNull())
jobResultListObject.job.input.object = inputNode["Object"].asString();
auto mNSMessageResultNode = jobNode["MNSMessageResult"];
if(!mNSMessageResultNode["ErrorCode"].isNull())
jobResultListObject.job.mNSMessageResult.errorCode = mNSMessageResultNode["ErrorCode"].asString();
if(!mNSMessageResultNode["ErrorMessage"].isNull())
jobResultListObject.job.mNSMessageResult.errorMessage = mNSMessageResultNode["ErrorMessage"].asString();
if(!mNSMessageResultNode["MessageId"].isNull())
jobResultListObject.job.mNSMessageResult.messageId = mNSMessageResultNode["MessageId"].asString();
auto outputNode = jobNode["Output"]; auto outputNode = jobNode["Output"];
if(!outputNode["WaterMarkConfigUrl"].isNull())
jobResultListObject.job.output.waterMarkConfigUrl = outputNode["WaterMarkConfigUrl"].asString();
if(!outputNode["DeWatermark"].isNull())
jobResultListObject.job.output.deWatermark = outputNode["DeWatermark"].asString();
if(!outputNode["Priority"].isNull())
jobResultListObject.job.output.priority = outputNode["Priority"].asString();
if(!outputNode["AudioStreamMap"].isNull()) if(!outputNode["AudioStreamMap"].isNull())
jobResultListObject.job.output.audioStreamMap = outputNode["AudioStreamMap"].asString(); jobResultListObject.job.output.audioStreamMap = outputNode["AudioStreamMap"].asString();
if(!outputNode["DeWatermark"].isNull())
jobResultListObject.job.output.deWatermark = outputNode["DeWatermark"].asString();
if(!outputNode["MergeConfigUrl"].isNull())
jobResultListObject.job.output.mergeConfigUrl = outputNode["MergeConfigUrl"].asString();
if(!outputNode["Priority"].isNull())
jobResultListObject.job.output.priority = outputNode["Priority"].asString();
if(!outputNode["Rotate"].isNull())
jobResultListObject.job.output.rotate = outputNode["Rotate"].asString();
if(!outputNode["TemplateId"].isNull())
jobResultListObject.job.output.templateId = outputNode["TemplateId"].asString();
if(!outputNode["UserData"].isNull()) if(!outputNode["UserData"].isNull())
jobResultListObject.job.output.userData = outputNode["UserData"].asString(); jobResultListObject.job.output.userData = outputNode["UserData"].asString();
if(!outputNode["VideoStreamMap"].isNull()) if(!outputNode["VideoStreamMap"].isNull())
jobResultListObject.job.output.videoStreamMap = outputNode["VideoStreamMap"].asString(); jobResultListObject.job.output.videoStreamMap = outputNode["VideoStreamMap"].asString();
if(!outputNode["Rotate"].isNull()) if(!outputNode["WaterMarkConfigUrl"].isNull())
jobResultListObject.job.output.rotate = outputNode["Rotate"].asString(); jobResultListObject.job.output.waterMarkConfigUrl = outputNode["WaterMarkConfigUrl"].asString();
if(!outputNode["MergeConfigUrl"].isNull()) auto allAmixListNode = outputNode["AmixList"]["Amix"];
jobResultListObject.job.output.mergeConfigUrl = outputNode["MergeConfigUrl"].asString(); for (auto outputNodeAmixListAmix : allAmixListNode)
if(!outputNode["TemplateId"].isNull())
jobResultListObject.job.output.templateId = outputNode["TemplateId"].asString();
auto allWaterMarkListNode = outputNode["WaterMarkList"]["WaterMark"];
for (auto outputNodeWaterMarkListWaterMark : allWaterMarkListNode)
{ {
JobResult::Job::Output::WaterMark waterMarkObject; JobResult::Job::Output::Amix amixObject;
if(!outputNodeWaterMarkListWaterMark["Type"].isNull()) if(!outputNodeAmixListAmix["AmixURL"].isNull())
waterMarkObject.type = outputNodeWaterMarkListWaterMark["Type"].asString(); amixObject.amixURL = outputNodeAmixListAmix["AmixURL"].asString();
if(!outputNodeWaterMarkListWaterMark["ReferPos"].isNull()) if(!outputNodeAmixListAmix["Duration"].isNull())
waterMarkObject.referPos = outputNodeWaterMarkListWaterMark["ReferPos"].asString(); amixObject.duration = outputNodeAmixListAmix["Duration"].asString();
if(!outputNodeWaterMarkListWaterMark["Dx"].isNull()) if(!outputNodeAmixListAmix["Map"].isNull())
waterMarkObject.dx = outputNodeWaterMarkListWaterMark["Dx"].asString(); amixObject.map = outputNodeAmixListAmix["Map"].asString();
if(!outputNodeWaterMarkListWaterMark["Width"].isNull()) if(!outputNodeAmixListAmix["MixDurMode"].isNull())
waterMarkObject.width = outputNodeWaterMarkListWaterMark["Width"].asString(); amixObject.mixDurMode = outputNodeAmixListAmix["MixDurMode"].asString();
if(!outputNodeWaterMarkListWaterMark["Height"].isNull()) if(!outputNodeAmixListAmix["Start"].isNull())
waterMarkObject.height = outputNodeWaterMarkListWaterMark["Height"].asString(); amixObject.start = outputNodeAmixListAmix["Start"].asString();
if(!outputNodeWaterMarkListWaterMark["WaterMarkTemplateId"].isNull()) jobResultListObject.job.output.amixList.push_back(amixObject);
waterMarkObject.waterMarkTemplateId = outputNodeWaterMarkListWaterMark["WaterMarkTemplateId"].asString();
if(!outputNodeWaterMarkListWaterMark["Dy"].isNull())
waterMarkObject.dy = outputNodeWaterMarkListWaterMark["Dy"].asString();
auto inputFileNode = value["InputFile"];
if(!inputFileNode["Object"].isNull())
waterMarkObject.inputFile.object = inputFileNode["Object"].asString();
if(!inputFileNode["Location"].isNull())
waterMarkObject.inputFile.location = inputFileNode["Location"].asString();
if(!inputFileNode["Bucket"].isNull())
waterMarkObject.inputFile.bucket = inputFileNode["Bucket"].asString();
jobResultListObject.job.output.waterMarkList.push_back(waterMarkObject);
} }
auto allMergeListNode = outputNode["MergeList"]["Merge"]; auto allMergeListNode = outputNode["MergeList"]["Merge"];
for (auto outputNodeMergeListMerge : allMergeListNode) for (auto outputNodeMergeListMerge : allMergeListNode)
{ {
JobResult::Job::Output::Merge mergeObject; JobResult::Job::Output::Merge mergeObject;
if(!outputNodeMergeListMerge["Start"].isNull())
mergeObject.start = outputNodeMergeListMerge["Start"].asString();
if(!outputNodeMergeListMerge["RoleArn"].isNull())
mergeObject.roleArn = outputNodeMergeListMerge["RoleArn"].asString();
if(!outputNodeMergeListMerge["MergeURL"].isNull())
mergeObject.mergeURL = outputNodeMergeListMerge["MergeURL"].asString();
if(!outputNodeMergeListMerge["Duration"].isNull()) if(!outputNodeMergeListMerge["Duration"].isNull())
mergeObject.duration = outputNodeMergeListMerge["Duration"].asString(); mergeObject.duration = outputNodeMergeListMerge["Duration"].asString();
if(!outputNodeMergeListMerge["MergeURL"].isNull())
mergeObject.mergeURL = outputNodeMergeListMerge["MergeURL"].asString();
if(!outputNodeMergeListMerge["RoleArn"].isNull())
mergeObject.roleArn = outputNodeMergeListMerge["RoleArn"].asString();
if(!outputNodeMergeListMerge["Start"].isNull())
mergeObject.start = outputNodeMergeListMerge["Start"].asString();
jobResultListObject.job.output.mergeList.push_back(mergeObject); jobResultListObject.job.output.mergeList.push_back(mergeObject);
} }
auto allOpeningListNode = outputNode["OpeningList"]["Opening"];
for (auto outputNodeOpeningListOpening : allOpeningListNode)
{
JobResult::Job::Output::Opening openingObject;
if(!outputNodeOpeningListOpening["Height"].isNull())
openingObject.height = outputNodeOpeningListOpening["Height"].asString();
if(!outputNodeOpeningListOpening["Start"].isNull())
openingObject.start = outputNodeOpeningListOpening["Start"].asString();
if(!outputNodeOpeningListOpening["Width"].isNull())
openingObject.width = outputNodeOpeningListOpening["Width"].asString();
if(!outputNodeOpeningListOpening["openUrl"].isNull())
openingObject.openUrl = outputNodeOpeningListOpening["openUrl"].asString();
jobResultListObject.job.output.openingList.push_back(openingObject);
}
auto allOutSubtitleListNode = outputNode["OutSubtitleList"]["OutSubtitle"]; auto allOutSubtitleListNode = outputNode["OutSubtitleList"]["OutSubtitle"];
for (auto outputNodeOutSubtitleListOutSubtitle : allOutSubtitleListNode) for (auto outputNodeOutSubtitleListOutSubtitle : allOutSubtitleListNode)
{ {
JobResult::Job::Output::OutSubtitle outSubtitleObject; JobResult::Job::Output::OutSubtitle outSubtitleObject;
if(!outputNodeOutSubtitleListOutSubtitle["Map"].isNull()) if(!outputNodeOutSubtitleListOutSubtitle["Map"].isNull())
outSubtitleObject.map = outputNodeOutSubtitleListOutSubtitle["Map"].asString(); outSubtitleObject.map = outputNodeOutSubtitleListOutSubtitle["Map"].asString();
if(!outputNodeOutSubtitleListOutSubtitle["Success"].isNull())
outSubtitleObject.success = outputNodeOutSubtitleListOutSubtitle["Success"].asString() == "true";
if(!outputNodeOutSubtitleListOutSubtitle["Message"].isNull()) if(!outputNodeOutSubtitleListOutSubtitle["Message"].isNull())
outSubtitleObject.message = outputNodeOutSubtitleListOutSubtitle["Message"].asString(); outSubtitleObject.message = outputNodeOutSubtitleListOutSubtitle["Message"].asString();
if(!outputNodeOutSubtitleListOutSubtitle["Success"].isNull())
outSubtitleObject.success = outputNodeOutSubtitleListOutSubtitle["Success"].asString() == "true";
auto outSubtitleFileNode = value["OutSubtitleFile"]; auto outSubtitleFileNode = value["OutSubtitleFile"];
if(!outSubtitleFileNode["RoleArn"].isNull())
outSubtitleObject.outSubtitleFile.roleArn = outSubtitleFileNode["RoleArn"].asString();
if(!outSubtitleFileNode["Object"].isNull())
outSubtitleObject.outSubtitleFile.object = outSubtitleFileNode["Object"].asString();
if(!outSubtitleFileNode["Location"].isNull())
outSubtitleObject.outSubtitleFile.location = outSubtitleFileNode["Location"].asString();
if(!outSubtitleFileNode["Bucket"].isNull()) if(!outSubtitleFileNode["Bucket"].isNull())
outSubtitleObject.outSubtitleFile.bucket = outSubtitleFileNode["Bucket"].asString(); outSubtitleObject.outSubtitleFile.bucket = outSubtitleFileNode["Bucket"].asString();
if(!outSubtitleFileNode["Location"].isNull())
outSubtitleObject.outSubtitleFile.location = outSubtitleFileNode["Location"].asString();
if(!outSubtitleFileNode["Object"].isNull())
outSubtitleObject.outSubtitleFile.object = outSubtitleFileNode["Object"].asString();
if(!outSubtitleFileNode["RoleArn"].isNull())
outSubtitleObject.outSubtitleFile.roleArn = outSubtitleFileNode["RoleArn"].asString();
jobResultListObject.job.output.outSubtitleList.push_back(outSubtitleObject); jobResultListObject.job.output.outSubtitleList.push_back(outSubtitleObject);
} }
auto allAmixListNode = outputNode["AmixList"]["Amix"];
for (auto outputNodeAmixListAmix : allAmixListNode)
{
JobResult::Job::Output::Amix amixObject;
if(!outputNodeAmixListAmix["Map"].isNull())
amixObject.map = outputNodeAmixListAmix["Map"].asString();
if(!outputNodeAmixListAmix["Start"].isNull())
amixObject.start = outputNodeAmixListAmix["Start"].asString();
if(!outputNodeAmixListAmix["AmixURL"].isNull())
amixObject.amixURL = outputNodeAmixListAmix["AmixURL"].asString();
if(!outputNodeAmixListAmix["Duration"].isNull())
amixObject.duration = outputNodeAmixListAmix["Duration"].asString();
if(!outputNodeAmixListAmix["MixDurMode"].isNull())
amixObject.mixDurMode = outputNodeAmixListAmix["MixDurMode"].asString();
jobResultListObject.job.output.amixList.push_back(amixObject);
}
auto allOpeningListNode = outputNode["OpeningList"]["Opening"];
for (auto outputNodeOpeningListOpening : allOpeningListNode)
{
JobResult::Job::Output::Opening openingObject;
if(!outputNodeOpeningListOpening["openUrl"].isNull())
openingObject.openUrl = outputNodeOpeningListOpening["openUrl"].asString();
if(!outputNodeOpeningListOpening["Start"].isNull())
openingObject.start = outputNodeOpeningListOpening["Start"].asString();
if(!outputNodeOpeningListOpening["Width"].isNull())
openingObject.width = outputNodeOpeningListOpening["Width"].asString();
if(!outputNodeOpeningListOpening["Height"].isNull())
openingObject.height = outputNodeOpeningListOpening["Height"].asString();
jobResultListObject.job.output.openingList.push_back(openingObject);
}
auto allTailSlateListNode = outputNode["TailSlateList"]["TailSlate"]; auto allTailSlateListNode = outputNode["TailSlateList"]["TailSlate"];
for (auto outputNodeTailSlateListTailSlate : allTailSlateListNode) for (auto outputNodeTailSlateListTailSlate : allTailSlateListNode)
{ {
JobResult::Job::Output::TailSlate tailSlateObject; JobResult::Job::Output::TailSlate tailSlateObject;
if(!outputNodeTailSlateListTailSlate["Start"].isNull())
tailSlateObject.start = outputNodeTailSlateListTailSlate["Start"].asString();
if(!outputNodeTailSlateListTailSlate["BgColor"].isNull()) if(!outputNodeTailSlateListTailSlate["BgColor"].isNull())
tailSlateObject.bgColor = outputNodeTailSlateListTailSlate["BgColor"].asString(); tailSlateObject.bgColor = outputNodeTailSlateListTailSlate["BgColor"].asString();
if(!outputNodeTailSlateListTailSlate["IsMergeAudio"].isNull())
tailSlateObject.isMergeAudio = outputNodeTailSlateListTailSlate["IsMergeAudio"].asString() == "true";
if(!outputNodeTailSlateListTailSlate["Width"].isNull())
tailSlateObject.width = outputNodeTailSlateListTailSlate["Width"].asString();
if(!outputNodeTailSlateListTailSlate["Height"].isNull())
tailSlateObject.height = outputNodeTailSlateListTailSlate["Height"].asString();
if(!outputNodeTailSlateListTailSlate["BlendDuration"].isNull()) if(!outputNodeTailSlateListTailSlate["BlendDuration"].isNull())
tailSlateObject.blendDuration = outputNodeTailSlateListTailSlate["BlendDuration"].asString(); tailSlateObject.blendDuration = outputNodeTailSlateListTailSlate["BlendDuration"].asString();
if(!outputNodeTailSlateListTailSlate["Height"].isNull())
tailSlateObject.height = outputNodeTailSlateListTailSlate["Height"].asString();
if(!outputNodeTailSlateListTailSlate["IsMergeAudio"].isNull())
tailSlateObject.isMergeAudio = outputNodeTailSlateListTailSlate["IsMergeAudio"].asString() == "true";
if(!outputNodeTailSlateListTailSlate["Start"].isNull())
tailSlateObject.start = outputNodeTailSlateListTailSlate["Start"].asString();
if(!outputNodeTailSlateListTailSlate["TailUrl"].isNull()) if(!outputNodeTailSlateListTailSlate["TailUrl"].isNull())
tailSlateObject.tailUrl = outputNodeTailSlateListTailSlate["TailUrl"].asString(); tailSlateObject.tailUrl = outputNodeTailSlateListTailSlate["TailUrl"].asString();
if(!outputNodeTailSlateListTailSlate["Width"].isNull())
tailSlateObject.width = outputNodeTailSlateListTailSlate["Width"].asString();
jobResultListObject.job.output.tailSlateList.push_back(tailSlateObject); jobResultListObject.job.output.tailSlateList.push_back(tailSlateObject);
} }
auto videoNode = outputNode["Video"]; auto allWaterMarkListNode = outputNode["WaterMarkList"]["WaterMark"];
if(!videoNode["Bufsize"].isNull()) for (auto outputNodeWaterMarkListWaterMark : allWaterMarkListNode)
jobResultListObject.job.output.video.bufsize = videoNode["Bufsize"].asString(); {
if(!videoNode["Degrain"].isNull()) JobResult::Job::Output::WaterMark waterMarkObject;
jobResultListObject.job.output.video.degrain = videoNode["Degrain"].asString(); if(!outputNodeWaterMarkListWaterMark["Dx"].isNull())
if(!videoNode["PixFmt"].isNull()) waterMarkObject.dx = outputNodeWaterMarkListWaterMark["Dx"].asString();
jobResultListObject.job.output.video.pixFmt = videoNode["PixFmt"].asString(); if(!outputNodeWaterMarkListWaterMark["Dy"].isNull())
if(!videoNode["Pad"].isNull()) waterMarkObject.dy = outputNodeWaterMarkListWaterMark["Dy"].asString();
jobResultListObject.job.output.video.pad = videoNode["Pad"].asString(); if(!outputNodeWaterMarkListWaterMark["Height"].isNull())
if(!videoNode["Codec"].isNull()) waterMarkObject.height = outputNodeWaterMarkListWaterMark["Height"].asString();
jobResultListObject.job.output.video.codec = videoNode["Codec"].asString(); if(!outputNodeWaterMarkListWaterMark["ReferPos"].isNull())
if(!videoNode["Height"].isNull()) waterMarkObject.referPos = outputNodeWaterMarkListWaterMark["ReferPos"].asString();
jobResultListObject.job.output.video.height = videoNode["Height"].asString(); if(!outputNodeWaterMarkListWaterMark["Type"].isNull())
if(!videoNode["Qscale"].isNull()) waterMarkObject.type = outputNodeWaterMarkListWaterMark["Type"].asString();
jobResultListObject.job.output.video.qscale = videoNode["Qscale"].asString(); if(!outputNodeWaterMarkListWaterMark["WaterMarkTemplateId"].isNull())
if(!videoNode["Crop"].isNull()) waterMarkObject.waterMarkTemplateId = outputNodeWaterMarkListWaterMark["WaterMarkTemplateId"].asString();
jobResultListObject.job.output.video.crop = videoNode["Crop"].asString(); if(!outputNodeWaterMarkListWaterMark["Width"].isNull())
if(!videoNode["Bitrate"].isNull()) waterMarkObject.width = outputNodeWaterMarkListWaterMark["Width"].asString();
jobResultListObject.job.output.video.bitrate = videoNode["Bitrate"].asString(); auto inputFileNode = value["InputFile"];
if(!videoNode["Maxrate"].isNull()) if(!inputFileNode["Bucket"].isNull())
jobResultListObject.job.output.video.maxrate = videoNode["Maxrate"].asString(); waterMarkObject.inputFile.bucket = inputFileNode["Bucket"].asString();
if(!videoNode["MaxFps"].isNull()) if(!inputFileNode["Location"].isNull())
jobResultListObject.job.output.video.maxFps = videoNode["MaxFps"].asString(); waterMarkObject.inputFile.location = inputFileNode["Location"].asString();
if(!videoNode["Profile"].isNull()) if(!inputFileNode["Object"].isNull())
jobResultListObject.job.output.video.profile = videoNode["Profile"].asString(); waterMarkObject.inputFile.object = inputFileNode["Object"].asString();
if(!videoNode["Crf"].isNull()) jobResultListObject.job.output.waterMarkList.push_back(waterMarkObject);
jobResultListObject.job.output.video.crf = videoNode["Crf"].asString(); }
if(!videoNode["Gop"].isNull()) auto audioNode = outputNode["Audio"];
jobResultListObject.job.output.video.gop = videoNode["Gop"].asString(); if(!audioNode["Bitrate"].isNull())
if(!videoNode["Width"].isNull()) jobResultListObject.job.output.audio.bitrate = audioNode["Bitrate"].asString();
jobResultListObject.job.output.video.width = videoNode["Width"].asString(); if(!audioNode["Channels"].isNull())
if(!videoNode["Fps"].isNull()) jobResultListObject.job.output.audio.channels = audioNode["Channels"].asString();
jobResultListObject.job.output.video.fps = videoNode["Fps"].asString(); if(!audioNode["Codec"].isNull())
if(!videoNode["Preset"].isNull()) jobResultListObject.job.output.audio.codec = audioNode["Codec"].asString();
jobResultListObject.job.output.video.preset = videoNode["Preset"].asString(); if(!audioNode["Profile"].isNull())
if(!videoNode["ScanMode"].isNull()) jobResultListObject.job.output.audio.profile = audioNode["Profile"].asString();
jobResultListObject.job.output.video.scanMode = videoNode["ScanMode"].asString(); if(!audioNode["Qscale"].isNull())
if(!videoNode["ResoPriority"].isNull()) jobResultListObject.job.output.audio.qscale = audioNode["Qscale"].asString();
jobResultListObject.job.output.video.resoPriority = videoNode["ResoPriority"].asString(); if(!audioNode["Samplerate"].isNull())
auto bitrateBndNode = videoNode["BitrateBnd"]; jobResultListObject.job.output.audio.samplerate = audioNode["Samplerate"].asString();
if(!bitrateBndNode["Max"].isNull()) auto volumeNode = audioNode["Volume"];
jobResultListObject.job.output.video.bitrateBnd.max = bitrateBndNode["Max"].asString(); if(!volumeNode["Level"].isNull())
if(!bitrateBndNode["Min"].isNull()) jobResultListObject.job.output.audio.volume.level = volumeNode["Level"].asString();
jobResultListObject.job.output.video.bitrateBnd.min = bitrateBndNode["Min"].asString(); if(!volumeNode["Method"].isNull())
auto transConfigNode = outputNode["TransConfig"]; jobResultListObject.job.output.audio.volume.method = volumeNode["Method"].asString();
if(!transConfigNode["IsCheckAudioBitrate"].isNull()) auto clipNode = outputNode["Clip"];
jobResultListObject.job.output.transConfig.isCheckAudioBitrate = transConfigNode["IsCheckAudioBitrate"].asString(); auto timeSpanNode = clipNode["TimeSpan"];
if(!transConfigNode["TransMode"].isNull()) if(!timeSpanNode["Duration"].isNull())
jobResultListObject.job.output.transConfig.transMode = transConfigNode["TransMode"].asString(); jobResultListObject.job.output.clip.timeSpan.duration = timeSpanNode["Duration"].asString();
if(!transConfigNode["IsCheckReso"].isNull()) if(!timeSpanNode["Seek"].isNull())
jobResultListObject.job.output.transConfig.isCheckReso = transConfigNode["IsCheckReso"].asString(); jobResultListObject.job.output.clip.timeSpan.seek = timeSpanNode["Seek"].asString();
if(!transConfigNode["IsCheckVideoBitrateFail"].isNull()) auto containerNode = outputNode["Container"];
jobResultListObject.job.output.transConfig.isCheckVideoBitrateFail = transConfigNode["IsCheckVideoBitrateFail"].asString(); if(!containerNode["Format"].isNull())
if(!transConfigNode["AdjDarMethod"].isNull()) jobResultListObject.job.output.container.format = containerNode["Format"].asString();
jobResultListObject.job.output.transConfig.adjDarMethod = transConfigNode["AdjDarMethod"].asString(); auto digiWaterMarkNode = outputNode["DigiWaterMark"];
if(!transConfigNode["IsCheckVideoBitrate"].isNull()) if(!digiWaterMarkNode["Alpha"].isNull())
jobResultListObject.job.output.transConfig.isCheckVideoBitrate = transConfigNode["IsCheckVideoBitrate"].asString(); jobResultListObject.job.output.digiWaterMark.alpha = digiWaterMarkNode["Alpha"].asString();
if(!transConfigNode["IsCheckResoFail"].isNull()) if(!digiWaterMarkNode["Type"].isNull())
jobResultListObject.job.output.transConfig.isCheckResoFail = transConfigNode["IsCheckResoFail"].asString(); jobResultListObject.job.output.digiWaterMark.type = digiWaterMarkNode["Type"].asString();
if(!transConfigNode["IsCheckAudioBitrateFail"].isNull()) auto inputFile1Node = digiWaterMarkNode["InputFile"];
jobResultListObject.job.output.transConfig.isCheckAudioBitrateFail = transConfigNode["IsCheckAudioBitrateFail"].asString(); if(!inputFile1Node["Bucket"].isNull())
jobResultListObject.job.output.digiWaterMark.inputFile1.bucket = inputFile1Node["Bucket"].asString();
if(!inputFile1Node["Location"].isNull())
jobResultListObject.job.output.digiWaterMark.inputFile1.location = inputFile1Node["Location"].asString();
if(!inputFile1Node["Object"].isNull())
jobResultListObject.job.output.digiWaterMark.inputFile1.object = inputFile1Node["Object"].asString();
auto encryptionNode = outputNode["Encryption"]; auto encryptionNode = outputNode["Encryption"];
if(!encryptionNode["Type"].isNull()) if(!encryptionNode["Id"].isNull())
jobResultListObject.job.output.encryption.type = encryptionNode["Type"].asString(); jobResultListObject.job.output.encryption.id = encryptionNode["Id"].asString();
if(!encryptionNode["Key"].isNull()) if(!encryptionNode["Key"].isNull())
jobResultListObject.job.output.encryption.key = encryptionNode["Key"].asString(); jobResultListObject.job.output.encryption.key = encryptionNode["Key"].asString();
if(!encryptionNode["KeyType"].isNull()) if(!encryptionNode["KeyType"].isNull())
jobResultListObject.job.output.encryption.keyType = encryptionNode["KeyType"].asString(); jobResultListObject.job.output.encryption.keyType = encryptionNode["KeyType"].asString();
if(!encryptionNode["Id"].isNull())
jobResultListObject.job.output.encryption.id = encryptionNode["Id"].asString();
if(!encryptionNode["KeyUri"].isNull()) if(!encryptionNode["KeyUri"].isNull())
jobResultListObject.job.output.encryption.keyUri = encryptionNode["KeyUri"].asString(); jobResultListObject.job.output.encryption.keyUri = encryptionNode["KeyUri"].asString();
if(!encryptionNode["SkipCnt"].isNull()) if(!encryptionNode["SkipCnt"].isNull())
jobResultListObject.job.output.encryption.skipCnt = encryptionNode["SkipCnt"].asString(); jobResultListObject.job.output.encryption.skipCnt = encryptionNode["SkipCnt"].asString();
if(!encryptionNode["Type"].isNull())
jobResultListObject.job.output.encryption.type = encryptionNode["Type"].asString();
auto m3U8NonStandardSupportNode = outputNode["M3U8NonStandardSupport"]; auto m3U8NonStandardSupportNode = outputNode["M3U8NonStandardSupport"];
auto tSNode = m3U8NonStandardSupportNode["TS"]; auto tSNode = m3U8NonStandardSupportNode["TS"];
if(!tSNode["SizeSupport"].isNull())
jobResultListObject.job.output.m3U8NonStandardSupport.tS.sizeSupport = tSNode["SizeSupport"].asString() == "true";
if(!tSNode["Md5Support"].isNull()) if(!tSNode["Md5Support"].isNull())
jobResultListObject.job.output.m3U8NonStandardSupport.tS.md5Support = tSNode["Md5Support"].asString() == "true"; jobResultListObject.job.output.m3U8NonStandardSupport.tS.md5Support = tSNode["Md5Support"].asString() == "true";
auto audioNode = outputNode["Audio"]; if(!tSNode["SizeSupport"].isNull())
if(!audioNode["Profile"].isNull()) jobResultListObject.job.output.m3U8NonStandardSupport.tS.sizeSupport = tSNode["SizeSupport"].asString() == "true";
jobResultListObject.job.output.audio.profile = audioNode["Profile"].asString();
if(!audioNode["Codec"].isNull())
jobResultListObject.job.output.audio.codec = audioNode["Codec"].asString();
if(!audioNode["Samplerate"].isNull())
jobResultListObject.job.output.audio.samplerate = audioNode["Samplerate"].asString();
if(!audioNode["Qscale"].isNull())
jobResultListObject.job.output.audio.qscale = audioNode["Qscale"].asString();
if(!audioNode["Channels"].isNull())
jobResultListObject.job.output.audio.channels = audioNode["Channels"].asString();
if(!audioNode["Bitrate"].isNull())
jobResultListObject.job.output.audio.bitrate = audioNode["Bitrate"].asString();
auto volumeNode = audioNode["Volume"];
if(!volumeNode["Method"].isNull())
jobResultListObject.job.output.audio.volume.method = volumeNode["Method"].asString();
if(!volumeNode["Level"].isNull())
jobResultListObject.job.output.audio.volume.level = volumeNode["Level"].asString();
auto superResoNode = outputNode["SuperReso"];
if(!superResoNode["IsHalfSample"].isNull())
jobResultListObject.job.output.superReso.isHalfSample = superResoNode["IsHalfSample"].asString();
auto digiWaterMarkNode = outputNode["DigiWaterMark"];
if(!digiWaterMarkNode["Type"].isNull())
jobResultListObject.job.output.digiWaterMark.type = digiWaterMarkNode["Type"].asString();
if(!digiWaterMarkNode["Alpha"].isNull())
jobResultListObject.job.output.digiWaterMark.alpha = digiWaterMarkNode["Alpha"].asString();
auto inputFile1Node = digiWaterMarkNode["InputFile"];
if(!inputFile1Node["Object"].isNull())
jobResultListObject.job.output.digiWaterMark.inputFile1.object = inputFile1Node["Object"].asString();
if(!inputFile1Node["Location"].isNull())
jobResultListObject.job.output.digiWaterMark.inputFile1.location = inputFile1Node["Location"].asString();
if(!inputFile1Node["Bucket"].isNull())
jobResultListObject.job.output.digiWaterMark.inputFile1.bucket = inputFile1Node["Bucket"].asString();
auto outputFileNode = outputNode["OutputFile"];
if(!outputFileNode["RoleArn"].isNull())
jobResultListObject.job.output.outputFile.roleArn = outputFileNode["RoleArn"].asString();
if(!outputFileNode["Object"].isNull())
jobResultListObject.job.output.outputFile.object = outputFileNode["Object"].asString();
if(!outputFileNode["Location"].isNull())
jobResultListObject.job.output.outputFile.location = outputFileNode["Location"].asString();
if(!outputFileNode["Bucket"].isNull())
jobResultListObject.job.output.outputFile.bucket = outputFileNode["Bucket"].asString();
auto containerNode = outputNode["Container"];
if(!containerNode["Format"].isNull())
jobResultListObject.job.output.container.format = containerNode["Format"].asString();
auto clipNode = outputNode["Clip"];
auto timeSpanNode = clipNode["TimeSpan"];
if(!timeSpanNode["Seek"].isNull())
jobResultListObject.job.output.clip.timeSpan.seek = timeSpanNode["Seek"].asString();
if(!timeSpanNode["Duration"].isNull())
jobResultListObject.job.output.clip.timeSpan.duration = timeSpanNode["Duration"].asString();
auto muxConfigNode = outputNode["MuxConfig"]; auto muxConfigNode = outputNode["MuxConfig"];
auto webpNode = muxConfigNode["Webp"];
if(!webpNode["Loop"].isNull())
jobResultListObject.job.output.muxConfig.webp.loop = webpNode["Loop"].asString();
auto gifNode = muxConfigNode["Gif"]; auto gifNode = muxConfigNode["Gif"];
if(!gifNode["FinalDelay"].isNull())
jobResultListObject.job.output.muxConfig.gif.finalDelay = gifNode["FinalDelay"].asString();
if(!gifNode["DitherMode"].isNull()) if(!gifNode["DitherMode"].isNull())
jobResultListObject.job.output.muxConfig.gif.ditherMode = gifNode["DitherMode"].asString(); jobResultListObject.job.output.muxConfig.gif.ditherMode = gifNode["DitherMode"].asString();
if(!gifNode["Loop"].isNull()) if(!gifNode["FinalDelay"].isNull())
jobResultListObject.job.output.muxConfig.gif.loop = gifNode["Loop"].asString(); jobResultListObject.job.output.muxConfig.gif.finalDelay = gifNode["FinalDelay"].asString();
if(!gifNode["IsCustomPalette"].isNull()) if(!gifNode["IsCustomPalette"].isNull())
jobResultListObject.job.output.muxConfig.gif.isCustomPalette = gifNode["IsCustomPalette"].asString(); jobResultListObject.job.output.muxConfig.gif.isCustomPalette = gifNode["IsCustomPalette"].asString();
if(!gifNode["Loop"].isNull())
jobResultListObject.job.output.muxConfig.gif.loop = gifNode["Loop"].asString();
auto segmentNode = muxConfigNode["Segment"]; auto segmentNode = muxConfigNode["Segment"];
if(!segmentNode["Duration"].isNull()) if(!segmentNode["Duration"].isNull())
jobResultListObject.job.output.muxConfig.segment.duration = segmentNode["Duration"].asString(); jobResultListObject.job.output.muxConfig.segment.duration = segmentNode["Duration"].asString();
auto subtitleConfigNode = outputNode["SubtitleConfig"]; auto webpNode = muxConfigNode["Webp"];
auto allExtSubtitleListNode = subtitleConfigNode["ExtSubtitleList"]["ExtSubtitle"]; if(!webpNode["Loop"].isNull())
for (auto subtitleConfigNodeExtSubtitleListExtSubtitle : allExtSubtitleListNode) jobResultListObject.job.output.muxConfig.webp.loop = webpNode["Loop"].asString();
{ auto outputFileNode = outputNode["OutputFile"];
JobResult::Job::Output::SubtitleConfig::ExtSubtitle extSubtitleObject; if(!outputFileNode["Bucket"].isNull())
if(!subtitleConfigNodeExtSubtitleListExtSubtitle["CharEnc"].isNull()) jobResultListObject.job.output.outputFile.bucket = outputFileNode["Bucket"].asString();
extSubtitleObject.charEnc = subtitleConfigNodeExtSubtitleListExtSubtitle["CharEnc"].asString(); if(!outputFileNode["Location"].isNull())
if(!subtitleConfigNodeExtSubtitleListExtSubtitle["FontName"].isNull()) jobResultListObject.job.output.outputFile.location = outputFileNode["Location"].asString();
extSubtitleObject.fontName = subtitleConfigNodeExtSubtitleListExtSubtitle["FontName"].asString(); if(!outputFileNode["Object"].isNull())
auto input2Node = value["Input"]; jobResultListObject.job.output.outputFile.object = outputFileNode["Object"].asString();
if(!input2Node["Object"].isNull()) if(!outputFileNode["RoleArn"].isNull())
extSubtitleObject.input2.object = input2Node["Object"].asString(); jobResultListObject.job.output.outputFile.roleArn = outputFileNode["RoleArn"].asString();
if(!input2Node["Location"].isNull())
extSubtitleObject.input2.location = input2Node["Location"].asString();
if(!input2Node["Bucket"].isNull())
extSubtitleObject.input2.bucket = input2Node["Bucket"].asString();
jobResultListObject.job.output.subtitleConfig.extSubtitleList.push_back(extSubtitleObject);
}
auto allSubtitleListNode = subtitleConfigNode["SubtitleList"]["Subtitle"];
for (auto subtitleConfigNodeSubtitleListSubtitle : allSubtitleListNode)
{
JobResult::Job::Output::SubtitleConfig::Subtitle subtitleObject;
if(!subtitleConfigNodeSubtitleListSubtitle["Map"].isNull())
subtitleObject.map = subtitleConfigNodeSubtitleListSubtitle["Map"].asString();
jobResultListObject.job.output.subtitleConfig.subtitleList.push_back(subtitleObject);
}
auto propertiesNode = outputNode["Properties"]; auto propertiesNode = outputNode["Properties"];
if(!propertiesNode["Width"].isNull())
jobResultListObject.job.output.properties.width = propertiesNode["Width"].asString();
if(!propertiesNode["Height"].isNull())
jobResultListObject.job.output.properties.height = propertiesNode["Height"].asString();
if(!propertiesNode["Duration"].isNull())
jobResultListObject.job.output.properties.duration = propertiesNode["Duration"].asString();
if(!propertiesNode["Fps"].isNull())
jobResultListObject.job.output.properties.fps = propertiesNode["Fps"].asString();
if(!propertiesNode["Bitrate"].isNull()) if(!propertiesNode["Bitrate"].isNull())
jobResultListObject.job.output.properties.bitrate = propertiesNode["Bitrate"].asString(); jobResultListObject.job.output.properties.bitrate = propertiesNode["Bitrate"].asString();
if(!propertiesNode["Duration"].isNull())
jobResultListObject.job.output.properties.duration = propertiesNode["Duration"].asString();
if(!propertiesNode["FileFormat"].isNull()) if(!propertiesNode["FileFormat"].isNull())
jobResultListObject.job.output.properties.fileFormat = propertiesNode["FileFormat"].asString(); jobResultListObject.job.output.properties.fileFormat = propertiesNode["FileFormat"].asString();
if(!propertiesNode["FileSize"].isNull()) if(!propertiesNode["FileSize"].isNull())
jobResultListObject.job.output.properties.fileSize = propertiesNode["FileSize"].asString(); jobResultListObject.job.output.properties.fileSize = propertiesNode["FileSize"].asString();
if(!propertiesNode["Fps"].isNull())
jobResultListObject.job.output.properties.fps = propertiesNode["Fps"].asString();
if(!propertiesNode["Height"].isNull())
jobResultListObject.job.output.properties.height = propertiesNode["Height"].asString();
if(!propertiesNode["Width"].isNull())
jobResultListObject.job.output.properties.width = propertiesNode["Width"].asString();
auto formatNode = propertiesNode["Format"];
if(!formatNode["Bitrate"].isNull())
jobResultListObject.job.output.properties.format.bitrate = formatNode["Bitrate"].asString();
if(!formatNode["Duration"].isNull())
jobResultListObject.job.output.properties.format.duration = formatNode["Duration"].asString();
if(!formatNode["FormatLongName"].isNull())
jobResultListObject.job.output.properties.format.formatLongName = formatNode["FormatLongName"].asString();
if(!formatNode["FormatName"].isNull())
jobResultListObject.job.output.properties.format.formatName = formatNode["FormatName"].asString();
if(!formatNode["NumPrograms"].isNull())
jobResultListObject.job.output.properties.format.numPrograms = formatNode["NumPrograms"].asString();
if(!formatNode["NumStreams"].isNull())
jobResultListObject.job.output.properties.format.numStreams = formatNode["NumStreams"].asString();
if(!formatNode["Size"].isNull())
jobResultListObject.job.output.properties.format.size = formatNode["Size"].asString();
if(!formatNode["StartTime"].isNull())
jobResultListObject.job.output.properties.format.startTime = formatNode["StartTime"].asString();
auto streamsNode = propertiesNode["Streams"]; auto streamsNode = propertiesNode["Streams"];
auto allVideoStreamListNode = streamsNode["VideoStreamList"]["VideoStream"];
for (auto streamsNodeVideoStreamListVideoStream : allVideoStreamListNode)
{
JobResult::Job::Output::Properties::Streams::VideoStream videoStreamObject;
if(!streamsNodeVideoStreamListVideoStream["Index"].isNull())
videoStreamObject.index = streamsNodeVideoStreamListVideoStream["Index"].asString();
if(!streamsNodeVideoStreamListVideoStream["Timebase"].isNull())
videoStreamObject.timebase = streamsNodeVideoStreamListVideoStream["Timebase"].asString();
if(!streamsNodeVideoStreamListVideoStream["AvgFPS"].isNull())
videoStreamObject.avgFPS = streamsNodeVideoStreamListVideoStream["AvgFPS"].asString();
if(!streamsNodeVideoStreamListVideoStream["PixFmt"].isNull())
videoStreamObject.pixFmt = streamsNodeVideoStreamListVideoStream["PixFmt"].asString();
if(!streamsNodeVideoStreamListVideoStream["Sar"].isNull())
videoStreamObject.sar = streamsNodeVideoStreamListVideoStream["Sar"].asString();
if(!streamsNodeVideoStreamListVideoStream["Lang"].isNull())
videoStreamObject.lang = streamsNodeVideoStreamListVideoStream["Lang"].asString();
if(!streamsNodeVideoStreamListVideoStream["CodecLongName"].isNull())
videoStreamObject.codecLongName = streamsNodeVideoStreamListVideoStream["CodecLongName"].asString();
if(!streamsNodeVideoStreamListVideoStream["Height"].isNull())
videoStreamObject.height = streamsNodeVideoStreamListVideoStream["Height"].asString();
if(!streamsNodeVideoStreamListVideoStream["NumFrames"].isNull())
videoStreamObject.numFrames = streamsNodeVideoStreamListVideoStream["NumFrames"].asString();
if(!streamsNodeVideoStreamListVideoStream["Bitrate"].isNull())
videoStreamObject.bitrate = streamsNodeVideoStreamListVideoStream["Bitrate"].asString();
if(!streamsNodeVideoStreamListVideoStream["CodecTagString"].isNull())
videoStreamObject.codecTagString = streamsNodeVideoStreamListVideoStream["CodecTagString"].asString();
if(!streamsNodeVideoStreamListVideoStream["HasBFrames"].isNull())
videoStreamObject.hasBFrames = streamsNodeVideoStreamListVideoStream["HasBFrames"].asString();
if(!streamsNodeVideoStreamListVideoStream["Profile"].isNull())
videoStreamObject.profile = streamsNodeVideoStreamListVideoStream["Profile"].asString();
if(!streamsNodeVideoStreamListVideoStream["StartTime"].isNull())
videoStreamObject.startTime = streamsNodeVideoStreamListVideoStream["StartTime"].asString();
if(!streamsNodeVideoStreamListVideoStream["Dar"].isNull())
videoStreamObject.dar = streamsNodeVideoStreamListVideoStream["Dar"].asString();
if(!streamsNodeVideoStreamListVideoStream["CodecName"].isNull())
videoStreamObject.codecName = streamsNodeVideoStreamListVideoStream["CodecName"].asString();
if(!streamsNodeVideoStreamListVideoStream["Width"].isNull())
videoStreamObject.width = streamsNodeVideoStreamListVideoStream["Width"].asString();
if(!streamsNodeVideoStreamListVideoStream["Duration"].isNull())
videoStreamObject.duration = streamsNodeVideoStreamListVideoStream["Duration"].asString();
if(!streamsNodeVideoStreamListVideoStream["Fps"].isNull())
videoStreamObject.fps = streamsNodeVideoStreamListVideoStream["Fps"].asString();
if(!streamsNodeVideoStreamListVideoStream["CodecTag"].isNull())
videoStreamObject.codecTag = streamsNodeVideoStreamListVideoStream["CodecTag"].asString();
if(!streamsNodeVideoStreamListVideoStream["CodecTimeBase"].isNull())
videoStreamObject.codecTimeBase = streamsNodeVideoStreamListVideoStream["CodecTimeBase"].asString();
if(!streamsNodeVideoStreamListVideoStream["Level"].isNull())
videoStreamObject.level = streamsNodeVideoStreamListVideoStream["Level"].asString();
auto networkCostNode = value["NetworkCost"];
if(!networkCostNode["PreloadTime"].isNull())
videoStreamObject.networkCost.preloadTime = networkCostNode["PreloadTime"].asString();
if(!networkCostNode["AvgBitrate"].isNull())
videoStreamObject.networkCost.avgBitrate = networkCostNode["AvgBitrate"].asString();
if(!networkCostNode["CostBandwidth"].isNull())
videoStreamObject.networkCost.costBandwidth = networkCostNode["CostBandwidth"].asString();
jobResultListObject.job.output.properties.streams.videoStreamList.push_back(videoStreamObject);
}
auto allAudioStreamListNode = streamsNode["AudioStreamList"]["AudioStream"]; auto allAudioStreamListNode = streamsNode["AudioStreamList"]["AudioStream"];
for (auto streamsNodeAudioStreamListAudioStream : allAudioStreamListNode) for (auto streamsNodeAudioStreamListAudioStream : allAudioStreamListNode)
{ {
JobResult::Job::Output::Properties::Streams::AudioStream audioStreamObject; JobResult::Job::Output::Properties::Streams::AudioStream audioStreamObject;
if(!streamsNodeAudioStreamListAudioStream["Timebase"].isNull())
audioStreamObject.timebase = streamsNodeAudioStreamListAudioStream["Timebase"].asString();
if(!streamsNodeAudioStreamListAudioStream["Index"].isNull())
audioStreamObject.index = streamsNodeAudioStreamListAudioStream["Index"].asString();
if(!streamsNodeAudioStreamListAudioStream["SampleFmt"].isNull())
audioStreamObject.sampleFmt = streamsNodeAudioStreamListAudioStream["SampleFmt"].asString();
if(!streamsNodeAudioStreamListAudioStream["ChannelLayout"].isNull())
audioStreamObject.channelLayout = streamsNodeAudioStreamListAudioStream["ChannelLayout"].asString();
if(!streamsNodeAudioStreamListAudioStream["Lang"].isNull())
audioStreamObject.lang = streamsNodeAudioStreamListAudioStream["Lang"].asString();
if(!streamsNodeAudioStreamListAudioStream["Samplerate"].isNull())
audioStreamObject.samplerate = streamsNodeAudioStreamListAudioStream["Samplerate"].asString();
if(!streamsNodeAudioStreamListAudioStream["CodecLongName"].isNull())
audioStreamObject.codecLongName = streamsNodeAudioStreamListAudioStream["CodecLongName"].asString();
if(!streamsNodeAudioStreamListAudioStream["Channels"].isNull())
audioStreamObject.channels = streamsNodeAudioStreamListAudioStream["Channels"].asString();
if(!streamsNodeAudioStreamListAudioStream["NumFrames"].isNull())
audioStreamObject.numFrames = streamsNodeAudioStreamListAudioStream["NumFrames"].asString();
if(!streamsNodeAudioStreamListAudioStream["Bitrate"].isNull()) if(!streamsNodeAudioStreamListAudioStream["Bitrate"].isNull())
audioStreamObject.bitrate = streamsNodeAudioStreamListAudioStream["Bitrate"].asString(); audioStreamObject.bitrate = streamsNodeAudioStreamListAudioStream["Bitrate"].asString();
if(!streamsNodeAudioStreamListAudioStream["CodecTagString"].isNull()) if(!streamsNodeAudioStreamListAudioStream["ChannelLayout"].isNull())
audioStreamObject.codecTagString = streamsNodeAudioStreamListAudioStream["CodecTagString"].asString(); audioStreamObject.channelLayout = streamsNodeAudioStreamListAudioStream["ChannelLayout"].asString();
if(!streamsNodeAudioStreamListAudioStream["StartTime"].isNull()) if(!streamsNodeAudioStreamListAudioStream["Channels"].isNull())
audioStreamObject.startTime = streamsNodeAudioStreamListAudioStream["StartTime"].asString(); audioStreamObject.channels = streamsNodeAudioStreamListAudioStream["Channels"].asString();
if(!streamsNodeAudioStreamListAudioStream["CodecLongName"].isNull())
audioStreamObject.codecLongName = streamsNodeAudioStreamListAudioStream["CodecLongName"].asString();
if(!streamsNodeAudioStreamListAudioStream["CodecName"].isNull()) if(!streamsNodeAudioStreamListAudioStream["CodecName"].isNull())
audioStreamObject.codecName = streamsNodeAudioStreamListAudioStream["CodecName"].asString(); audioStreamObject.codecName = streamsNodeAudioStreamListAudioStream["CodecName"].asString();
if(!streamsNodeAudioStreamListAudioStream["Duration"].isNull())
audioStreamObject.duration = streamsNodeAudioStreamListAudioStream["Duration"].asString();
if(!streamsNodeAudioStreamListAudioStream["CodecTag"].isNull()) if(!streamsNodeAudioStreamListAudioStream["CodecTag"].isNull())
audioStreamObject.codecTag = streamsNodeAudioStreamListAudioStream["CodecTag"].asString(); audioStreamObject.codecTag = streamsNodeAudioStreamListAudioStream["CodecTag"].asString();
if(!streamsNodeAudioStreamListAudioStream["CodecTagString"].isNull())
audioStreamObject.codecTagString = streamsNodeAudioStreamListAudioStream["CodecTagString"].asString();
if(!streamsNodeAudioStreamListAudioStream["CodecTimeBase"].isNull()) if(!streamsNodeAudioStreamListAudioStream["CodecTimeBase"].isNull())
audioStreamObject.codecTimeBase = streamsNodeAudioStreamListAudioStream["CodecTimeBase"].asString(); audioStreamObject.codecTimeBase = streamsNodeAudioStreamListAudioStream["CodecTimeBase"].asString();
if(!streamsNodeAudioStreamListAudioStream["Duration"].isNull())
audioStreamObject.duration = streamsNodeAudioStreamListAudioStream["Duration"].asString();
if(!streamsNodeAudioStreamListAudioStream["Index"].isNull())
audioStreamObject.index = streamsNodeAudioStreamListAudioStream["Index"].asString();
if(!streamsNodeAudioStreamListAudioStream["Lang"].isNull())
audioStreamObject.lang = streamsNodeAudioStreamListAudioStream["Lang"].asString();
if(!streamsNodeAudioStreamListAudioStream["NumFrames"].isNull())
audioStreamObject.numFrames = streamsNodeAudioStreamListAudioStream["NumFrames"].asString();
if(!streamsNodeAudioStreamListAudioStream["SampleFmt"].isNull())
audioStreamObject.sampleFmt = streamsNodeAudioStreamListAudioStream["SampleFmt"].asString();
if(!streamsNodeAudioStreamListAudioStream["Samplerate"].isNull())
audioStreamObject.samplerate = streamsNodeAudioStreamListAudioStream["Samplerate"].asString();
if(!streamsNodeAudioStreamListAudioStream["StartTime"].isNull())
audioStreamObject.startTime = streamsNodeAudioStreamListAudioStream["StartTime"].asString();
if(!streamsNodeAudioStreamListAudioStream["Timebase"].isNull())
audioStreamObject.timebase = streamsNodeAudioStreamListAudioStream["Timebase"].asString();
jobResultListObject.job.output.properties.streams.audioStreamList.push_back(audioStreamObject); jobResultListObject.job.output.properties.streams.audioStreamList.push_back(audioStreamObject);
} }
auto allSubtitleStreamListNode = streamsNode["SubtitleStreamList"]["SubtitleStream"]; auto allSubtitleStreamListNode = streamsNode["SubtitleStreamList"]["SubtitleStream"];
@@ -491,37 +375,153 @@ void SubmitJobsResult::parse(const std::string &payload)
subtitleStreamObject.lang = streamsNodeSubtitleStreamListSubtitleStream["Lang"].asString(); subtitleStreamObject.lang = streamsNodeSubtitleStreamListSubtitleStream["Lang"].asString();
jobResultListObject.job.output.properties.streams.subtitleStreamList.push_back(subtitleStreamObject); jobResultListObject.job.output.properties.streams.subtitleStreamList.push_back(subtitleStreamObject);
} }
auto formatNode = propertiesNode["Format"]; auto allVideoStreamListNode = streamsNode["VideoStreamList"]["VideoStream"];
if(!formatNode["StartTime"].isNull()) for (auto streamsNodeVideoStreamListVideoStream : allVideoStreamListNode)
jobResultListObject.job.output.properties.format.startTime = formatNode["StartTime"].asString(); {
if(!formatNode["NumPrograms"].isNull()) JobResult::Job::Output::Properties::Streams::VideoStream videoStreamObject;
jobResultListObject.job.output.properties.format.numPrograms = formatNode["NumPrograms"].asString(); if(!streamsNodeVideoStreamListVideoStream["AvgFPS"].isNull())
if(!formatNode["Size"].isNull()) videoStreamObject.avgFPS = streamsNodeVideoStreamListVideoStream["AvgFPS"].asString();
jobResultListObject.job.output.properties.format.size = formatNode["Size"].asString(); if(!streamsNodeVideoStreamListVideoStream["Bitrate"].isNull())
if(!formatNode["NumStreams"].isNull()) videoStreamObject.bitrate = streamsNodeVideoStreamListVideoStream["Bitrate"].asString();
jobResultListObject.job.output.properties.format.numStreams = formatNode["NumStreams"].asString(); if(!streamsNodeVideoStreamListVideoStream["CodecLongName"].isNull())
if(!formatNode["FormatLongName"].isNull()) videoStreamObject.codecLongName = streamsNodeVideoStreamListVideoStream["CodecLongName"].asString();
jobResultListObject.job.output.properties.format.formatLongName = formatNode["FormatLongName"].asString(); if(!streamsNodeVideoStreamListVideoStream["CodecName"].isNull())
if(!formatNode["Duration"].isNull()) videoStreamObject.codecName = streamsNodeVideoStreamListVideoStream["CodecName"].asString();
jobResultListObject.job.output.properties.format.duration = formatNode["Duration"].asString(); if(!streamsNodeVideoStreamListVideoStream["CodecTag"].isNull())
if(!formatNode["Bitrate"].isNull()) videoStreamObject.codecTag = streamsNodeVideoStreamListVideoStream["CodecTag"].asString();
jobResultListObject.job.output.properties.format.bitrate = formatNode["Bitrate"].asString(); if(!streamsNodeVideoStreamListVideoStream["CodecTagString"].isNull())
if(!formatNode["FormatName"].isNull()) videoStreamObject.codecTagString = streamsNodeVideoStreamListVideoStream["CodecTagString"].asString();
jobResultListObject.job.output.properties.format.formatName = formatNode["FormatName"].asString(); if(!streamsNodeVideoStreamListVideoStream["CodecTimeBase"].isNull())
auto inputNode = jobNode["Input"]; videoStreamObject.codecTimeBase = streamsNodeVideoStreamListVideoStream["CodecTimeBase"].asString();
if(!inputNode["Object"].isNull()) if(!streamsNodeVideoStreamListVideoStream["Dar"].isNull())
jobResultListObject.job.input.object = inputNode["Object"].asString(); videoStreamObject.dar = streamsNodeVideoStreamListVideoStream["Dar"].asString();
if(!inputNode["Location"].isNull()) if(!streamsNodeVideoStreamListVideoStream["Duration"].isNull())
jobResultListObject.job.input.location = inputNode["Location"].asString(); videoStreamObject.duration = streamsNodeVideoStreamListVideoStream["Duration"].asString();
if(!inputNode["Bucket"].isNull()) if(!streamsNodeVideoStreamListVideoStream["Fps"].isNull())
jobResultListObject.job.input.bucket = inputNode["Bucket"].asString(); videoStreamObject.fps = streamsNodeVideoStreamListVideoStream["Fps"].asString();
auto mNSMessageResultNode = jobNode["MNSMessageResult"]; if(!streamsNodeVideoStreamListVideoStream["HasBFrames"].isNull())
if(!mNSMessageResultNode["MessageId"].isNull()) videoStreamObject.hasBFrames = streamsNodeVideoStreamListVideoStream["HasBFrames"].asString();
jobResultListObject.job.mNSMessageResult.messageId = mNSMessageResultNode["MessageId"].asString(); if(!streamsNodeVideoStreamListVideoStream["Height"].isNull())
if(!mNSMessageResultNode["ErrorMessage"].isNull()) videoStreamObject.height = streamsNodeVideoStreamListVideoStream["Height"].asString();
jobResultListObject.job.mNSMessageResult.errorMessage = mNSMessageResultNode["ErrorMessage"].asString(); if(!streamsNodeVideoStreamListVideoStream["Index"].isNull())
if(!mNSMessageResultNode["ErrorCode"].isNull()) videoStreamObject.index = streamsNodeVideoStreamListVideoStream["Index"].asString();
jobResultListObject.job.mNSMessageResult.errorCode = mNSMessageResultNode["ErrorCode"].asString(); if(!streamsNodeVideoStreamListVideoStream["Lang"].isNull())
videoStreamObject.lang = streamsNodeVideoStreamListVideoStream["Lang"].asString();
if(!streamsNodeVideoStreamListVideoStream["Level"].isNull())
videoStreamObject.level = streamsNodeVideoStreamListVideoStream["Level"].asString();
if(!streamsNodeVideoStreamListVideoStream["NumFrames"].isNull())
videoStreamObject.numFrames = streamsNodeVideoStreamListVideoStream["NumFrames"].asString();
if(!streamsNodeVideoStreamListVideoStream["PixFmt"].isNull())
videoStreamObject.pixFmt = streamsNodeVideoStreamListVideoStream["PixFmt"].asString();
if(!streamsNodeVideoStreamListVideoStream["Profile"].isNull())
videoStreamObject.profile = streamsNodeVideoStreamListVideoStream["Profile"].asString();
if(!streamsNodeVideoStreamListVideoStream["Sar"].isNull())
videoStreamObject.sar = streamsNodeVideoStreamListVideoStream["Sar"].asString();
if(!streamsNodeVideoStreamListVideoStream["StartTime"].isNull())
videoStreamObject.startTime = streamsNodeVideoStreamListVideoStream["StartTime"].asString();
if(!streamsNodeVideoStreamListVideoStream["Timebase"].isNull())
videoStreamObject.timebase = streamsNodeVideoStreamListVideoStream["Timebase"].asString();
if(!streamsNodeVideoStreamListVideoStream["Width"].isNull())
videoStreamObject.width = streamsNodeVideoStreamListVideoStream["Width"].asString();
auto networkCostNode = value["NetworkCost"];
if(!networkCostNode["AvgBitrate"].isNull())
videoStreamObject.networkCost.avgBitrate = networkCostNode["AvgBitrate"].asString();
if(!networkCostNode["CostBandwidth"].isNull())
videoStreamObject.networkCost.costBandwidth = networkCostNode["CostBandwidth"].asString();
if(!networkCostNode["PreloadTime"].isNull())
videoStreamObject.networkCost.preloadTime = networkCostNode["PreloadTime"].asString();
jobResultListObject.job.output.properties.streams.videoStreamList.push_back(videoStreamObject);
}
auto subtitleConfigNode = outputNode["SubtitleConfig"];
auto allExtSubtitleListNode = subtitleConfigNode["ExtSubtitleList"]["ExtSubtitle"];
for (auto subtitleConfigNodeExtSubtitleListExtSubtitle : allExtSubtitleListNode)
{
JobResult::Job::Output::SubtitleConfig::ExtSubtitle extSubtitleObject;
if(!subtitleConfigNodeExtSubtitleListExtSubtitle["CharEnc"].isNull())
extSubtitleObject.charEnc = subtitleConfigNodeExtSubtitleListExtSubtitle["CharEnc"].asString();
if(!subtitleConfigNodeExtSubtitleListExtSubtitle["FontName"].isNull())
extSubtitleObject.fontName = subtitleConfigNodeExtSubtitleListExtSubtitle["FontName"].asString();
auto input2Node = value["Input"];
if(!input2Node["Bucket"].isNull())
extSubtitleObject.input2.bucket = input2Node["Bucket"].asString();
if(!input2Node["Location"].isNull())
extSubtitleObject.input2.location = input2Node["Location"].asString();
if(!input2Node["Object"].isNull())
extSubtitleObject.input2.object = input2Node["Object"].asString();
jobResultListObject.job.output.subtitleConfig.extSubtitleList.push_back(extSubtitleObject);
}
auto allSubtitleListNode = subtitleConfigNode["SubtitleList"]["Subtitle"];
for (auto subtitleConfigNodeSubtitleListSubtitle : allSubtitleListNode)
{
JobResult::Job::Output::SubtitleConfig::Subtitle subtitleObject;
if(!subtitleConfigNodeSubtitleListSubtitle["Map"].isNull())
subtitleObject.map = subtitleConfigNodeSubtitleListSubtitle["Map"].asString();
jobResultListObject.job.output.subtitleConfig.subtitleList.push_back(subtitleObject);
}
auto superResoNode = outputNode["SuperReso"];
if(!superResoNode["IsHalfSample"].isNull())
jobResultListObject.job.output.superReso.isHalfSample = superResoNode["IsHalfSample"].asString();
auto transConfigNode = outputNode["TransConfig"];
if(!transConfigNode["AdjDarMethod"].isNull())
jobResultListObject.job.output.transConfig.adjDarMethod = transConfigNode["AdjDarMethod"].asString();
if(!transConfigNode["IsCheckAudioBitrate"].isNull())
jobResultListObject.job.output.transConfig.isCheckAudioBitrate = transConfigNode["IsCheckAudioBitrate"].asString();
if(!transConfigNode["IsCheckAudioBitrateFail"].isNull())
jobResultListObject.job.output.transConfig.isCheckAudioBitrateFail = transConfigNode["IsCheckAudioBitrateFail"].asString();
if(!transConfigNode["IsCheckReso"].isNull())
jobResultListObject.job.output.transConfig.isCheckReso = transConfigNode["IsCheckReso"].asString();
if(!transConfigNode["IsCheckResoFail"].isNull())
jobResultListObject.job.output.transConfig.isCheckResoFail = transConfigNode["IsCheckResoFail"].asString();
if(!transConfigNode["IsCheckVideoBitrate"].isNull())
jobResultListObject.job.output.transConfig.isCheckVideoBitrate = transConfigNode["IsCheckVideoBitrate"].asString();
if(!transConfigNode["IsCheckVideoBitrateFail"].isNull())
jobResultListObject.job.output.transConfig.isCheckVideoBitrateFail = transConfigNode["IsCheckVideoBitrateFail"].asString();
if(!transConfigNode["TransMode"].isNull())
jobResultListObject.job.output.transConfig.transMode = transConfigNode["TransMode"].asString();
auto videoNode = outputNode["Video"];
if(!videoNode["Bitrate"].isNull())
jobResultListObject.job.output.video.bitrate = videoNode["Bitrate"].asString();
if(!videoNode["Bufsize"].isNull())
jobResultListObject.job.output.video.bufsize = videoNode["Bufsize"].asString();
if(!videoNode["Codec"].isNull())
jobResultListObject.job.output.video.codec = videoNode["Codec"].asString();
if(!videoNode["Crf"].isNull())
jobResultListObject.job.output.video.crf = videoNode["Crf"].asString();
if(!videoNode["Crop"].isNull())
jobResultListObject.job.output.video.crop = videoNode["Crop"].asString();
if(!videoNode["Degrain"].isNull())
jobResultListObject.job.output.video.degrain = videoNode["Degrain"].asString();
if(!videoNode["Fps"].isNull())
jobResultListObject.job.output.video.fps = videoNode["Fps"].asString();
if(!videoNode["Gop"].isNull())
jobResultListObject.job.output.video.gop = videoNode["Gop"].asString();
if(!videoNode["Height"].isNull())
jobResultListObject.job.output.video.height = videoNode["Height"].asString();
if(!videoNode["MaxFps"].isNull())
jobResultListObject.job.output.video.maxFps = videoNode["MaxFps"].asString();
if(!videoNode["Maxrate"].isNull())
jobResultListObject.job.output.video.maxrate = videoNode["Maxrate"].asString();
if(!videoNode["Pad"].isNull())
jobResultListObject.job.output.video.pad = videoNode["Pad"].asString();
if(!videoNode["PixFmt"].isNull())
jobResultListObject.job.output.video.pixFmt = videoNode["PixFmt"].asString();
if(!videoNode["Preset"].isNull())
jobResultListObject.job.output.video.preset = videoNode["Preset"].asString();
if(!videoNode["Profile"].isNull())
jobResultListObject.job.output.video.profile = videoNode["Profile"].asString();
if(!videoNode["Qscale"].isNull())
jobResultListObject.job.output.video.qscale = videoNode["Qscale"].asString();
if(!videoNode["ResoPriority"].isNull())
jobResultListObject.job.output.video.resoPriority = videoNode["ResoPriority"].asString();
if(!videoNode["ScanMode"].isNull())
jobResultListObject.job.output.video.scanMode = videoNode["ScanMode"].asString();
if(!videoNode["Width"].isNull())
jobResultListObject.job.output.video.width = videoNode["Width"].asString();
auto bitrateBndNode = videoNode["BitrateBnd"];
if(!bitrateBndNode["Max"].isNull())
jobResultListObject.job.output.video.bitrateBnd.max = bitrateBndNode["Max"].asString();
if(!bitrateBndNode["Min"].isNull())
jobResultListObject.job.output.video.bitrateBnd.min = bitrateBndNode["Min"].asString();
jobResultList_.push_back(jobResultListObject); jobResultList_.push_back(jobResultListObject);
} }

View File

@@ -25,13 +25,13 @@ SubmitTraceAbJobRequest::SubmitTraceAbJobRequest()
SubmitTraceAbJobRequest::~SubmitTraceAbJobRequest() {} SubmitTraceAbJobRequest::~SubmitTraceAbJobRequest() {}
std::string SubmitTraceAbJobRequest::getStartTime() const { long SubmitTraceAbJobRequest::getStartTime() const {
return startTime_; return startTime_;
} }
void SubmitTraceAbJobRequest::setStartTime(const std::string &startTime) { void SubmitTraceAbJobRequest::setStartTime(long startTime) {
startTime_ = startTime; startTime_ = startTime;
setParameter(std::string("StartTime"), startTime); setParameter(std::string("StartTime"), std::to_string(startTime));
} }
std::string SubmitTraceAbJobRequest::getOutput() const { std::string SubmitTraceAbJobRequest::getOutput() const {
@@ -88,13 +88,13 @@ void SubmitTraceAbJobRequest::setInput(const std::string &input) {
setParameter(std::string("Input"), input); setParameter(std::string("Input"), input);
} }
std::string SubmitTraceAbJobRequest::getTotalTime() const { long SubmitTraceAbJobRequest::getTotalTime() const {
return totalTime_; return totalTime_;
} }
void SubmitTraceAbJobRequest::setTotalTime(const std::string &totalTime) { void SubmitTraceAbJobRequest::setTotalTime(long totalTime) {
totalTime_ = totalTime; totalTime_ = totalTime;
setParameter(std::string("TotalTime"), totalTime); setParameter(std::string("TotalTime"), std::to_string(totalTime));
} }
std::string SubmitTraceAbJobRequest::getCallBack() const { std::string SubmitTraceAbJobRequest::getCallBack() const {

View File

@@ -79,6 +79,15 @@ void UpdateSmarttagTemplateRequest::setScene(const std::string &scene) {
setParameter(std::string("Scene"), scene); setParameter(std::string("Scene"), scene);
} }
std::string UpdateSmarttagTemplateRequest::getTemplateConfig() const {
return templateConfig_;
}
void UpdateSmarttagTemplateRequest::setTemplateConfig(const std::string &templateConfig) {
templateConfig_ = templateConfig;
setParameter(std::string("TemplateConfig"), templateConfig);
}
std::string UpdateSmarttagTemplateRequest::getFaceCustomParamsConfig() const { std::string UpdateSmarttagTemplateRequest::getFaceCustomParamsConfig() const {
return faceCustomParamsConfig_; return faceCustomParamsConfig_;
} }