Update to support new apis.

This commit is contained in:
sdk-team
2024-08-06 09:44:30 +00:00
parent 5fcbeb4782
commit 776a55cf64
8 changed files with 78 additions and 31 deletions

View File

@@ -118,6 +118,10 @@ namespace AlibabaCloud
PassThrough passThrough;
std::string payloadType;
};
struct MultiStreamURLItem
{
std::string uRL;
};
std::string taskId;
std::string mixMode;
std::string appId;
@@ -126,6 +130,7 @@ namespace AlibabaCloud
SingleSubParams singleSubParams;
TranscodeParams transcodeParams;
std::string channelId;
std::vector<MpuTask::MultiStreamURLItem> multiStreamURL;
std::string streamURL;
};

View File

@@ -33,6 +33,9 @@ public:
std::string sourceType;
std::string userId;
};
struct MultiStreamURL {
std::string uRL;
};
struct SeiParams {
std::string payloadType;
struct LayoutVolume {
@@ -106,6 +109,12 @@ public:
~StartLiveMPUTaskRequest();
SingleSubParams getSingleSubParams() const;
void setSingleSubParams(const SingleSubParams &singleSubParams);
std::string getTaskId() const;
void setTaskId(const std::string &taskId);
std::string getStreamURL() const;
void setStreamURL(const std::string &streamURL);
std::vector<MultiStreamURL> getMultiStreamURL() const;
void setMultiStreamURL(const std::vector<MultiStreamURL> &multiStreamURL);
SeiParams getSeiParams() const;
void setSeiParams(const SeiParams &seiParams);
TranscodeParams getTranscodeParams() const;
@@ -118,21 +127,18 @@ public:
void setMixMode(const std::string &mixMode);
std::string getChannelId() const;
void setChannelId(const std::string &channelId);
std::string getTaskId() const;
void setTaskId(const std::string &taskId);
std::string getStreamURL() const;
void setStreamURL(const std::string &streamURL);
private:
SingleSubParams singleSubParams_;
std::string taskId_;
std::string streamURL_;
std::vector<MultiStreamURL> multiStreamURL_;
SeiParams seiParams_;
TranscodeParams transcodeParams_;
std::string appId_;
std::string region_;
std::string mixMode_;
std::string channelId_;
std::string taskId_;
std::string streamURL_;
};
} // namespace Model
} // namespace Live

View File

@@ -28,6 +28,9 @@ namespace Live {
namespace Model {
class ALIBABACLOUD_LIVE_EXPORT UpdateLiveMPUTaskRequest : public RpcServiceRequest {
public:
struct MultiStreamURL {
std::string uRL;
};
struct SingleSubParams {
std::string streamType;
std::string sourceType;
@@ -103,6 +106,8 @@ public:
};
UpdateLiveMPUTaskRequest();
~UpdateLiveMPUTaskRequest();
std::vector<MultiStreamURL> getMultiStreamURL() const;
void setMultiStreamURL(const std::vector<MultiStreamURL> &multiStreamURL);
SingleSubParams getSingleSubParams() const;
void setSingleSubParams(const SingleSubParams &singleSubParams);
SeiParams getSeiParams() const;
@@ -121,6 +126,7 @@ public:
void setStreamURL(const std::string &streamURL);
private:
std::vector<MultiStreamURL> multiStreamURL_;
SingleSubParams singleSubParams_;
SeiParams seiParams_;
TranscodeParams transcodeParams_;

View File

@@ -47,20 +47,20 @@ void ListLiveMessageAppsResult::parse(const std::string &payload)
appListObject.appId = valueAppListApps["AppId"].asString();
if(!valueAppListApps["AppKey"].isNull())
appListObject.appKey = valueAppListApps["AppKey"].asString();
if(!valueAppListApps["AppName"].isNull())
appListObject.appName = valueAppListApps["AppName"].asString();
if(!valueAppListApps["AppSign"].isNull())
appListObject.appSign = valueAppListApps["AppSign"].asString();
if(!valueAppListApps["CreateTime"].isNull())
appListObject.createTime = std::stol(valueAppListApps["CreateTime"].asString());
if(!valueAppListApps["DataCenter"].isNull())
appListObject.dataCenter = valueAppListApps["DataCenter"].asString();
if(!valueAppListApps["Disable"].isNull())
appListObject.disable = valueAppListApps["Disable"].asString();
if(!valueAppListApps["AppName"].isNull())
appListObject.appName = valueAppListApps["AppName"].asString();
if(!valueAppListApps["CreateTime"].isNull())
appListObject.createTime = std::stol(valueAppListApps["CreateTime"].asString());
if(!valueAppListApps["ModifyTime"].isNull())
appListObject.modifyTime = std::stol(valueAppListApps["ModifyTime"].asString());
if(!valueAppListApps["MsgLifeCycle"].isNull())
appListObject.msgLifeCycle = std::stoi(valueAppListApps["MsgLifeCycle"].asString());
if(!valueAppListApps["DataCenter"].isNull())
appListObject.dataCenter = valueAppListApps["DataCenter"].asString();
appList_.push_back(appListObject);
}
if(!value["HasMore"].isNull())

View File

@@ -55,6 +55,14 @@ void ListRtcMPUTaskDetailResult::parse(const std::string &payload)
mPUTasksObject.streamURL = valueMPUTasksmpuTask["StreamURL"].asString();
if(!valueMPUTasksmpuTask["Region"].isNull())
mPUTasksObject.region = valueMPUTasksmpuTask["Region"].asString();
auto allMultiStreamURLNode = valueMPUTasksmpuTask["MultiStreamURL"]["MultiStreamURLItem"];
for (auto valueMPUTasksmpuTaskMultiStreamURLMultiStreamURLItem : allMultiStreamURLNode)
{
MpuTask::MultiStreamURLItem multiStreamURLObject;
if(!valueMPUTasksmpuTaskMultiStreamURLMultiStreamURLItem["URL"].isNull())
multiStreamURLObject.uRL = valueMPUTasksmpuTaskMultiStreamURLMultiStreamURLItem["URL"].asString();
mPUTasksObject.multiStreamURL.push_back(multiStreamURLObject);
}
auto singleSubParamsNode = value["SingleSubParams"];
if(!singleSubParamsNode["SourceType"].isNull())
mPUTasksObject.singleSubParams.sourceType = singleSubParamsNode["SourceType"].asString();

View File

@@ -36,6 +36,35 @@ void StartLiveMPUTaskRequest::setSingleSubParams(const StartLiveMPUTaskRequest::
setParameter(std::string("SingleSubParams") + ".UserId", singleSubParams.userId);
}
std::string StartLiveMPUTaskRequest::getTaskId() const {
return taskId_;
}
void StartLiveMPUTaskRequest::setTaskId(const std::string &taskId) {
taskId_ = taskId;
setParameter(std::string("TaskId"), taskId);
}
std::string StartLiveMPUTaskRequest::getStreamURL() const {
return streamURL_;
}
void StartLiveMPUTaskRequest::setStreamURL(const std::string &streamURL) {
streamURL_ = streamURL;
setParameter(std::string("StreamURL"), streamURL);
}
std::vector<StartLiveMPUTaskRequest::MultiStreamURL> StartLiveMPUTaskRequest::getMultiStreamURL() const {
return multiStreamURL_;
}
void StartLiveMPUTaskRequest::setMultiStreamURL(const std::vector<StartLiveMPUTaskRequest::MultiStreamURL> &multiStreamURL) {
multiStreamURL_ = multiStreamURL;
for(int dep1 = 0; dep1 != multiStreamURL.size(); dep1++) {
setParameter(std::string("MultiStreamURL") + "." + std::to_string(dep1 + 1) + ".URL", multiStreamURL[dep1].uRL);
}
}
StartLiveMPUTaskRequest::SeiParams StartLiveMPUTaskRequest::getSeiParams() const {
return seiParams_;
}
@@ -128,21 +157,3 @@ void StartLiveMPUTaskRequest::setChannelId(const std::string &channelId) {
setParameter(std::string("ChannelId"), channelId);
}
std::string StartLiveMPUTaskRequest::getTaskId() const {
return taskId_;
}
void StartLiveMPUTaskRequest::setTaskId(const std::string &taskId) {
taskId_ = taskId;
setParameter(std::string("TaskId"), taskId);
}
std::string StartLiveMPUTaskRequest::getStreamURL() const {
return streamURL_;
}
void StartLiveMPUTaskRequest::setStreamURL(const std::string &streamURL) {
streamURL_ = streamURL;
setParameter(std::string("StreamURL"), streamURL);
}

View File

@@ -25,6 +25,17 @@ UpdateLiveMPUTaskRequest::UpdateLiveMPUTaskRequest()
UpdateLiveMPUTaskRequest::~UpdateLiveMPUTaskRequest() {}
std::vector<UpdateLiveMPUTaskRequest::MultiStreamURL> UpdateLiveMPUTaskRequest::getMultiStreamURL() const {
return multiStreamURL_;
}
void UpdateLiveMPUTaskRequest::setMultiStreamURL(const std::vector<UpdateLiveMPUTaskRequest::MultiStreamURL> &multiStreamURL) {
multiStreamURL_ = multiStreamURL;
for(int dep1 = 0; dep1 != multiStreamURL.size(); dep1++) {
setParameter(std::string("MultiStreamURL") + "." + std::to_string(dep1 + 1) + ".URL", multiStreamURL[dep1].uRL);
}
}
UpdateLiveMPUTaskRequest::SingleSubParams UpdateLiveMPUTaskRequest::getSingleSubParams() const {
return singleSubParams_;
}