ModifyCasterLayoutRequest.cc 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  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/ModifyCasterLayoutRequest.h>
  17. using AlibabaCloud::Live::Model::ModifyCasterLayoutRequest;
  18. ModifyCasterLayoutRequest::ModifyCasterLayoutRequest() :
  19. RpcServiceRequest("live", "2016-11-01", "ModifyCasterLayout")
  20. {
  21. setMethod(HttpRequest::Method::Post);
  22. }
  23. ModifyCasterLayoutRequest::~ModifyCasterLayoutRequest()
  24. {}
  25. std::vector<std::string> ModifyCasterLayoutRequest::getBlendList()const
  26. {
  27. return blendList_;
  28. }
  29. void ModifyCasterLayoutRequest::setBlendList(const std::vector<std::string>& blendList)
  30. {
  31. blendList_ = blendList;
  32. for(int dep1 = 0; dep1!= blendList.size(); dep1++) {
  33. setParameter("BlendList."+ std::to_string(dep1), blendList.at(dep1));
  34. }
  35. }
  36. std::string ModifyCasterLayoutRequest::getLayoutId()const
  37. {
  38. return layoutId_;
  39. }
  40. void ModifyCasterLayoutRequest::setLayoutId(const std::string& layoutId)
  41. {
  42. layoutId_ = layoutId;
  43. setParameter("LayoutId", layoutId);
  44. }
  45. std::string ModifyCasterLayoutRequest::getCasterId()const
  46. {
  47. return casterId_;
  48. }
  49. void ModifyCasterLayoutRequest::setCasterId(const std::string& casterId)
  50. {
  51. casterId_ = casterId;
  52. setParameter("CasterId", casterId);
  53. }
  54. long ModifyCasterLayoutRequest::getOwnerId()const
  55. {
  56. return ownerId_;
  57. }
  58. void ModifyCasterLayoutRequest::setOwnerId(long ownerId)
  59. {
  60. ownerId_ = ownerId;
  61. setParameter("OwnerId", std::to_string(ownerId));
  62. }
  63. std::vector<ModifyCasterLayoutRequest::AudioLayer> ModifyCasterLayoutRequest::getAudioLayer()const
  64. {
  65. return audioLayer_;
  66. }
  67. void ModifyCasterLayoutRequest::setAudioLayer(const std::vector<AudioLayer>& audioLayer)
  68. {
  69. audioLayer_ = audioLayer;
  70. for(int dep1 = 0; dep1!= audioLayer.size(); dep1++) {
  71. auto audioLayerObj = audioLayer.at(dep1);
  72. std::string audioLayerObjStr = "AudioLayer." + std::to_string(dep1 + 1);
  73. setParameter(audioLayerObjStr + ".VolumeRate", std::to_string(audioLayerObj.volumeRate));
  74. setParameter(audioLayerObjStr + ".ValidChannel", audioLayerObj.validChannel);
  75. setParameter(audioLayerObjStr + ".FixedDelayDuration", std::to_string(audioLayerObj.fixedDelayDuration));
  76. }
  77. }
  78. std::vector<ModifyCasterLayoutRequest::VideoLayer> ModifyCasterLayoutRequest::getVideoLayer()const
  79. {
  80. return videoLayer_;
  81. }
  82. void ModifyCasterLayoutRequest::setVideoLayer(const std::vector<VideoLayer>& videoLayer)
  83. {
  84. videoLayer_ = videoLayer;
  85. for(int dep1 = 0; dep1!= videoLayer.size(); dep1++) {
  86. auto videoLayerObj = videoLayer.at(dep1);
  87. std::string videoLayerObjStr = "VideoLayer." + std::to_string(dep1 + 1);
  88. setParameter(videoLayerObjStr + ".FillMode", videoLayerObj.fillMode);
  89. setParameter(videoLayerObjStr + ".HeightNormalized", std::to_string(videoLayerObj.heightNormalized));
  90. setParameter(videoLayerObjStr + ".WidthNormalized", std::to_string(videoLayerObj.widthNormalized));
  91. setParameter(videoLayerObjStr + ".PositionRefer", videoLayerObj.positionRefer);
  92. for(int dep2 = 0; dep2!= videoLayerObj.positionNormalized.size(); dep2++) {
  93. setParameter(videoLayerObjStr + ".PositionNormalized."+ std::to_string(dep2), std::to_string(videoLayerObj.positionNormalized.at(dep2)));
  94. }
  95. setParameter(videoLayerObjStr + ".FixedDelayDuration", std::to_string(videoLayerObj.fixedDelayDuration));
  96. }
  97. }
  98. std::vector<std::string> ModifyCasterLayoutRequest::getMixList()const
  99. {
  100. return mixList_;
  101. }
  102. void ModifyCasterLayoutRequest::setMixList(const std::vector<std::string>& mixList)
  103. {
  104. mixList_ = mixList;
  105. for(int dep1 = 0; dep1!= mixList.size(); dep1++) {
  106. setParameter("MixList."+ std::to_string(dep1), mixList.at(dep1));
  107. }
  108. }