UpdateLiveMPUTaskRequest.cc 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. /*
  2. * Copyright 2009-2017 Alibaba Cloud All rights reserved.
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. #include <alibabacloud/live/model/UpdateLiveMPUTaskRequest.h>
  17. using AlibabaCloud::Live::Model::UpdateLiveMPUTaskRequest;
  18. UpdateLiveMPUTaskRequest::UpdateLiveMPUTaskRequest()
  19. : RpcServiceRequest("live", "2016-11-01", "UpdateLiveMPUTask") {
  20. setMethod(HttpRequest::Method::Post);
  21. }
  22. UpdateLiveMPUTaskRequest::~UpdateLiveMPUTaskRequest() {}
  23. UpdateLiveMPUTaskRequest::SingleSubParams UpdateLiveMPUTaskRequest::getSingleSubParams() const {
  24. return singleSubParams_;
  25. }
  26. void UpdateLiveMPUTaskRequest::setSingleSubParams(const UpdateLiveMPUTaskRequest::SingleSubParams &singleSubParams) {
  27. singleSubParams_ = singleSubParams;
  28. setParameter(std::string("SingleSubParams") + ".StreamType", singleSubParams.streamType);
  29. setParameter(std::string("SingleSubParams") + ".SourceType", singleSubParams.sourceType);
  30. setParameter(std::string("SingleSubParams") + ".UserId", singleSubParams.userId);
  31. }
  32. UpdateLiveMPUTaskRequest::SeiParams UpdateLiveMPUTaskRequest::getSeiParams() const {
  33. return seiParams_;
  34. }
  35. void UpdateLiveMPUTaskRequest::setSeiParams(const UpdateLiveMPUTaskRequest::SeiParams &seiParams) {
  36. seiParams_ = seiParams;
  37. setParameter(std::string("SeiParams") + ".LayoutVolume.FollowIdr", seiParams.layoutVolume.followIdr);
  38. setParameter(std::string("SeiParams") + ".LayoutVolume.Interval", seiParams.layoutVolume.interval);
  39. setParameter(std::string("SeiParams") + ".PassThrough.FollowIdr", seiParams.passThrough.followIdr);
  40. setParameter(std::string("SeiParams") + ".PassThrough.PayloadContentKey", seiParams.passThrough.payloadContentKey);
  41. setParameter(std::string("SeiParams") + ".PassThrough.PayloadContent", seiParams.passThrough.payloadContent);
  42. setParameter(std::string("SeiParams") + ".PassThrough.Interval", seiParams.passThrough.interval);
  43. }
  44. UpdateLiveMPUTaskRequest::TranscodeParams UpdateLiveMPUTaskRequest::getTranscodeParams() const {
  45. return transcodeParams_;
  46. }
  47. void UpdateLiveMPUTaskRequest::setTranscodeParams(const UpdateLiveMPUTaskRequest::TranscodeParams &transcodeParams) {
  48. transcodeParams_ = transcodeParams;
  49. for(int dep1 = 0; dep1 != transcodeParams.layout.userPanes.size(); dep1++) {
  50. setParameter(std::string("TranscodeParams") + ".Layout.UserPanes." + std::to_string(dep1 + 1) + ".BackgroundImageUrl", transcodeParams.layout.userPanes[dep1].backgroundImageUrl);
  51. setParameter(std::string("TranscodeParams") + ".Layout.UserPanes." + std::to_string(dep1 + 1) + ".ZOrder", transcodeParams.layout.userPanes[dep1].zOrder);
  52. setParameter(std::string("TranscodeParams") + ".Layout.UserPanes." + std::to_string(dep1 + 1) + ".Width", transcodeParams.layout.userPanes[dep1].width);
  53. setParameter(std::string("TranscodeParams") + ".Layout.UserPanes." + std::to_string(dep1 + 1) + ".X", transcodeParams.layout.userPanes[dep1].x);
  54. setParameter(std::string("TranscodeParams") + ".Layout.UserPanes." + std::to_string(dep1 + 1) + ".Y", transcodeParams.layout.userPanes[dep1].y);
  55. setParameter(std::string("TranscodeParams") + ".Layout.UserPanes." + std::to_string(dep1 + 1) + ".RenderMode", transcodeParams.layout.userPanes[dep1].renderMode);
  56. setParameter(std::string("TranscodeParams") + ".Layout.UserPanes." + std::to_string(dep1 + 1) + ".UserInfo.SourceType", transcodeParams.layout.userPanes[dep1].userInfo.sourceType);
  57. setParameter(std::string("TranscodeParams") + ".Layout.UserPanes." + std::to_string(dep1 + 1) + ".UserInfo.UserId", transcodeParams.layout.userPanes[dep1].userInfo.userId);
  58. setParameter(std::string("TranscodeParams") + ".Layout.UserPanes." + std::to_string(dep1 + 1) + ".Height", transcodeParams.layout.userPanes[dep1].height);
  59. }
  60. setParameter(std::string("TranscodeParams") + ".Layout.LayoutMode", transcodeParams.layout.layoutMode);
  61. setParameter(std::string("TranscodeParams") + ".Layout.MaxVideoUser.StreamType", transcodeParams.layout.maxVideoUser.streamType);
  62. setParameter(std::string("TranscodeParams") + ".Layout.MaxVideoUser.SourceType", transcodeParams.layout.maxVideoUser.sourceType);
  63. setParameter(std::string("TranscodeParams") + ".Layout.MaxVideoUser.UserId", transcodeParams.layout.maxVideoUser.userId);
  64. setParameter(std::string("TranscodeParams") + ".Background.RenderMode", transcodeParams.background.renderMode);
  65. setParameter(std::string("TranscodeParams") + ".Background.URL", transcodeParams.background.uRL);
  66. for(int dep1 = 0; dep1 != transcodeParams.userInfos.size(); dep1++) {
  67. setParameter(std::string("TranscodeParams") + ".UserInfos." + std::to_string(dep1 + 1) + ".StreamType", transcodeParams.userInfos[dep1].streamType);
  68. setParameter(std::string("TranscodeParams") + ".UserInfos." + std::to_string(dep1 + 1) + ".SourceType", transcodeParams.userInfos[dep1].sourceType);
  69. setParameter(std::string("TranscodeParams") + ".UserInfos." + std::to_string(dep1 + 1) + ".UserId", transcodeParams.userInfos[dep1].userId);
  70. }
  71. setParameter(std::string("TranscodeParams") + ".EncodeParams.AudioOnly", transcodeParams.encodeParams.audioOnly);
  72. setParameter(std::string("TranscodeParams") + ".EncodeParams.VideoWidth", transcodeParams.encodeParams.videoWidth);
  73. setParameter(std::string("TranscodeParams") + ".EncodeParams.AudioBitrate", transcodeParams.encodeParams.audioBitrate);
  74. setParameter(std::string("TranscodeParams") + ".EncodeParams.VideoFramerate", transcodeParams.encodeParams.videoFramerate);
  75. setParameter(std::string("TranscodeParams") + ".EncodeParams.VideoHeight", transcodeParams.encodeParams.videoHeight);
  76. setParameter(std::string("TranscodeParams") + ".EncodeParams.AudioSampleRate", transcodeParams.encodeParams.audioSampleRate);
  77. setParameter(std::string("TranscodeParams") + ".EncodeParams.VideoBitrate", transcodeParams.encodeParams.videoBitrate);
  78. setParameter(std::string("TranscodeParams") + ".EncodeParams.AudioChannels", transcodeParams.encodeParams.audioChannels);
  79. setParameter(std::string("TranscodeParams") + ".EncodeParams.VideoGop", transcodeParams.encodeParams.videoGop);
  80. }
  81. std::string UpdateLiveMPUTaskRequest::getAppId() const {
  82. return appId_;
  83. }
  84. void UpdateLiveMPUTaskRequest::setAppId(const std::string &appId) {
  85. appId_ = appId;
  86. setParameter(std::string("AppId"), appId);
  87. }
  88. std::string UpdateLiveMPUTaskRequest::getMixMode() const {
  89. return mixMode_;
  90. }
  91. void UpdateLiveMPUTaskRequest::setMixMode(const std::string &mixMode) {
  92. mixMode_ = mixMode;
  93. setParameter(std::string("MixMode"), mixMode);
  94. }
  95. std::string UpdateLiveMPUTaskRequest::getChannelId() const {
  96. return channelId_;
  97. }
  98. void UpdateLiveMPUTaskRequest::setChannelId(const std::string &channelId) {
  99. channelId_ = channelId;
  100. setParameter(std::string("ChannelId"), channelId);
  101. }
  102. std::string UpdateLiveMPUTaskRequest::getTaskId() const {
  103. return taskId_;
  104. }
  105. void UpdateLiveMPUTaskRequest::setTaskId(const std::string &taskId) {
  106. taskId_ = taskId;
  107. setParameter(std::string("TaskId"), taskId);
  108. }
  109. std::string UpdateLiveMPUTaskRequest::getStreamURL() const {
  110. return streamURL_;
  111. }
  112. void UpdateLiveMPUTaskRequest::setStreamURL(const std::string &streamURL) {
  113. streamURL_ = streamURL;
  114. setParameter(std::string("StreamURL"), streamURL);
  115. }