Update to support new apis.

This commit is contained in:
sdk-team
2024-08-13 12:18:16 +00:00
parent 0329dcee47
commit ff4508956b
7 changed files with 22 additions and 1 deletions

View File

@@ -1 +1 @@
1.36.1971
1.36.1972

View File

@@ -68,6 +68,7 @@ namespace AlibabaCloud
std::string streamType;
std::string userId;
std::string sourceType;
std::string channelId;
};
struct UserPane
{
@@ -75,6 +76,7 @@ namespace AlibabaCloud
{
std::string userId;
std::string sourceType;
std::string channelId;
};
std::string backgroundImageUrl;
std::string renderMode;
@@ -94,6 +96,7 @@ namespace AlibabaCloud
std::string streamType;
std::string userId;
std::string sourceType;
std::string channelId;
};
Background background;
Layout layout;

View File

@@ -62,6 +62,7 @@ public:
struct UserInfo {
std::string sourceType;
std::string userId;
std::string channelId;
};
UserInfo userInfo;
std::string renderMode;
@@ -74,6 +75,7 @@ public:
std::string streamType;
std::string sourceType;
std::string userId;
std::string channelId;
};
MaxVideoUser maxVideoUser;
};
@@ -87,6 +89,7 @@ public:
std::string streamType;
std::string sourceType;
std::string userId;
std::string channelId;
};
UserInfosItem userInfosItem;
std::vector<UserInfosItem> userInfos;

View File

@@ -61,6 +61,7 @@ public:
struct UserInfo {
std::string sourceType;
std::string userId;
std::string channelId;
};
UserInfo userInfo;
std::string renderMode;
@@ -73,6 +74,7 @@ public:
std::string streamType;
std::string sourceType;
std::string userId;
std::string channelId;
};
MaxVideoUser maxVideoUser;
};
@@ -86,6 +88,7 @@ public:
std::string streamType;
std::string sourceType;
std::string userId;
std::string channelId;
};
UserInfosItem userInfosItem;
std::vector<UserInfosItem> userInfos;

View File

@@ -75,6 +75,8 @@ void ListRtcMPUTaskDetailResult::parse(const std::string &payload)
for (auto transcodeParamsNodeUserInfosUserInfo : allUserInfosNode)
{
MpuTask::TranscodeParams::UserInfo userInfoObject;
if(!transcodeParamsNodeUserInfosUserInfo["ChannelId"].isNull())
userInfoObject.channelId = transcodeParamsNodeUserInfosUserInfo["ChannelId"].asString();
if(!transcodeParamsNodeUserInfosUserInfo["UserId"].isNull())
userInfoObject.userId = transcodeParamsNodeUserInfosUserInfo["UserId"].asString();
if(!transcodeParamsNodeUserInfosUserInfo["SourceType"].isNull())
@@ -135,6 +137,8 @@ void ListRtcMPUTaskDetailResult::parse(const std::string &payload)
auto userInfo1Node = value["UserInfo"];
if(!userInfo1Node["SourceType"].isNull())
userPaneObject.userInfo1.sourceType = userInfo1Node["SourceType"].asString();
if(!userInfo1Node["ChannelId"].isNull())
userPaneObject.userInfo1.channelId = userInfo1Node["ChannelId"].asString();
if(!userInfo1Node["UserId"].isNull())
userPaneObject.userInfo1.userId = userInfo1Node["UserId"].asString();
mPUTasksObject.transcodeParams.layout.userPanes.push_back(userPaneObject);
@@ -144,6 +148,8 @@ void ListRtcMPUTaskDetailResult::parse(const std::string &payload)
mPUTasksObject.transcodeParams.layout.maxVideoUser.sourceType = maxVideoUserNode["SourceType"].asString();
if(!maxVideoUserNode["StreamType"].isNull())
mPUTasksObject.transcodeParams.layout.maxVideoUser.streamType = maxVideoUserNode["StreamType"].asString();
if(!maxVideoUserNode["ChannelId"].isNull())
mPUTasksObject.transcodeParams.layout.maxVideoUser.channelId = maxVideoUserNode["ChannelId"].asString();
if(!maxVideoUserNode["UserId"].isNull())
mPUTasksObject.transcodeParams.layout.maxVideoUser.userId = maxVideoUserNode["UserId"].asString();
auto seiParamsNode = value["SeiParams"];

View File

@@ -94,6 +94,7 @@ void StartLiveMPUTaskRequest::setTranscodeParams(const StartLiveMPUTaskRequest::
setParameter(std::string("TranscodeParams") + ".Layout.UserPanes." + std::to_string(dep1 + 1) + ".Y", transcodeParams.layout.userPanes[dep1].y);
setParameter(std::string("TranscodeParams") + ".Layout.UserPanes." + std::to_string(dep1 + 1) + ".UserInfo.SourceType", transcodeParams.layout.userPanes[dep1].userInfo.sourceType);
setParameter(std::string("TranscodeParams") + ".Layout.UserPanes." + std::to_string(dep1 + 1) + ".UserInfo.UserId", transcodeParams.layout.userPanes[dep1].userInfo.userId);
setParameter(std::string("TranscodeParams") + ".Layout.UserPanes." + std::to_string(dep1 + 1) + ".UserInfo.ChannelId", transcodeParams.layout.userPanes[dep1].userInfo.channelId);
setParameter(std::string("TranscodeParams") + ".Layout.UserPanes." + std::to_string(dep1 + 1) + ".RenderMode", transcodeParams.layout.userPanes[dep1].renderMode);
setParameter(std::string("TranscodeParams") + ".Layout.UserPanes." + std::to_string(dep1 + 1) + ".Height", transcodeParams.layout.userPanes[dep1].height);
}
@@ -101,12 +102,14 @@ void StartLiveMPUTaskRequest::setTranscodeParams(const StartLiveMPUTaskRequest::
setParameter(std::string("TranscodeParams") + ".Layout.MaxVideoUser.StreamType", transcodeParams.layout.maxVideoUser.streamType);
setParameter(std::string("TranscodeParams") + ".Layout.MaxVideoUser.SourceType", transcodeParams.layout.maxVideoUser.sourceType);
setParameter(std::string("TranscodeParams") + ".Layout.MaxVideoUser.UserId", transcodeParams.layout.maxVideoUser.userId);
setParameter(std::string("TranscodeParams") + ".Layout.MaxVideoUser.ChannelId", transcodeParams.layout.maxVideoUser.channelId);
setParameter(std::string("TranscodeParams") + ".Background.RenderMode", transcodeParams.background.renderMode);
setParameter(std::string("TranscodeParams") + ".Background.URL", transcodeParams.background.uRL);
for(int dep1 = 0; dep1 != transcodeParams.userInfos.size(); dep1++) {
setParameter(std::string("TranscodeParams") + ".UserInfos." + std::to_string(dep1 + 1) + ".StreamType", transcodeParams.userInfos[dep1].streamType);
setParameter(std::string("TranscodeParams") + ".UserInfos." + std::to_string(dep1 + 1) + ".SourceType", transcodeParams.userInfos[dep1].sourceType);
setParameter(std::string("TranscodeParams") + ".UserInfos." + std::to_string(dep1 + 1) + ".UserId", transcodeParams.userInfos[dep1].userId);
setParameter(std::string("TranscodeParams") + ".UserInfos." + std::to_string(dep1 + 1) + ".ChannelId", transcodeParams.userInfos[dep1].channelId);
}
setParameter(std::string("TranscodeParams") + ".EncodeParams.AudioOnly", transcodeParams.encodeParams.audioOnly);
setParameter(std::string("TranscodeParams") + ".EncodeParams.VideoWidth", transcodeParams.encodeParams.videoWidth);

View File

@@ -75,6 +75,7 @@ void UpdateLiveMPUTaskRequest::setTranscodeParams(const UpdateLiveMPUTaskRequest
setParameter(std::string("TranscodeParams") + ".Layout.UserPanes." + std::to_string(dep1 + 1) + ".Y", transcodeParams.layout.userPanes[dep1].y);
setParameter(std::string("TranscodeParams") + ".Layout.UserPanes." + std::to_string(dep1 + 1) + ".UserInfo.SourceType", transcodeParams.layout.userPanes[dep1].userInfo.sourceType);
setParameter(std::string("TranscodeParams") + ".Layout.UserPanes." + std::to_string(dep1 + 1) + ".UserInfo.UserId", transcodeParams.layout.userPanes[dep1].userInfo.userId);
setParameter(std::string("TranscodeParams") + ".Layout.UserPanes." + std::to_string(dep1 + 1) + ".UserInfo.ChannelId", transcodeParams.layout.userPanes[dep1].userInfo.channelId);
setParameter(std::string("TranscodeParams") + ".Layout.UserPanes." + std::to_string(dep1 + 1) + ".RenderMode", transcodeParams.layout.userPanes[dep1].renderMode);
setParameter(std::string("TranscodeParams") + ".Layout.UserPanes." + std::to_string(dep1 + 1) + ".Height", transcodeParams.layout.userPanes[dep1].height);
}
@@ -82,12 +83,14 @@ void UpdateLiveMPUTaskRequest::setTranscodeParams(const UpdateLiveMPUTaskRequest
setParameter(std::string("TranscodeParams") + ".Layout.MaxVideoUser.StreamType", transcodeParams.layout.maxVideoUser.streamType);
setParameter(std::string("TranscodeParams") + ".Layout.MaxVideoUser.SourceType", transcodeParams.layout.maxVideoUser.sourceType);
setParameter(std::string("TranscodeParams") + ".Layout.MaxVideoUser.UserId", transcodeParams.layout.maxVideoUser.userId);
setParameter(std::string("TranscodeParams") + ".Layout.MaxVideoUser.ChannelId", transcodeParams.layout.maxVideoUser.channelId);
setParameter(std::string("TranscodeParams") + ".Background.RenderMode", transcodeParams.background.renderMode);
setParameter(std::string("TranscodeParams") + ".Background.URL", transcodeParams.background.uRL);
for(int dep1 = 0; dep1 != transcodeParams.userInfos.size(); dep1++) {
setParameter(std::string("TranscodeParams") + ".UserInfos." + std::to_string(dep1 + 1) + ".StreamType", transcodeParams.userInfos[dep1].streamType);
setParameter(std::string("TranscodeParams") + ".UserInfos." + std::to_string(dep1 + 1) + ".SourceType", transcodeParams.userInfos[dep1].sourceType);
setParameter(std::string("TranscodeParams") + ".UserInfos." + std::to_string(dep1 + 1) + ".UserId", transcodeParams.userInfos[dep1].userId);
setParameter(std::string("TranscodeParams") + ".UserInfos." + std::to_string(dep1 + 1) + ".ChannelId", transcodeParams.userInfos[dep1].channelId);
}
setParameter(std::string("TranscodeParams") + ".EncodeParams.AudioOnly", transcodeParams.encodeParams.audioOnly);
setParameter(std::string("TranscodeParams") + ".EncodeParams.VideoWidth", transcodeParams.encodeParams.videoWidth);