CreateMediaConvertTaskRequest.h 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257
  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. #ifndef ALIBABACLOUD_IMM_MODEL_CREATEMEDIACONVERTTASKREQUEST_H_
  17. #define ALIBABACLOUD_IMM_MODEL_CREATEMEDIACONVERTTASKREQUEST_H_
  18. #include <alibabacloud/imm/ImmExport.h>
  19. #include <alibabacloud/core/RpcServiceRequest.h>
  20. #include <string>
  21. #include <vector>
  22. #include <map>
  23. namespace AlibabaCloud {
  24. namespace Imm {
  25. namespace Model {
  26. class ALIBABACLOUD_IMM_EXPORT CreateMediaConvertTaskRequest : public RpcServiceRequest {
  27. public:
  28. struct Sources {
  29. double duration;
  30. struct SubtitlesItem {
  31. double timeOffset;
  32. std::string language;
  33. std::string uRI;
  34. };
  35. SubtitlesItem subtitlesItem;
  36. std::vector<SubtitlesItem> subtitles;
  37. double startTime;
  38. std::string uRI;
  39. };
  40. struct Targets {
  41. std::string container;
  42. struct Image {
  43. struct SnapshotsItem {
  44. int number;
  45. std::string format;
  46. double width;
  47. double interval;
  48. double startTime;
  49. std::string scaleType;
  50. std::string uRI;
  51. double height;
  52. };
  53. SnapshotsItem snapshotsItem;
  54. std::vector<SnapshotsItem> snapshots;
  55. struct AnimationsItem {
  56. int number;
  57. double frameRate;
  58. std::string format;
  59. double width;
  60. double interval;
  61. double startTime;
  62. std::string scaleType;
  63. std::string uRI;
  64. double height;
  65. };
  66. AnimationsItem animationsItem;
  67. std::vector<AnimationsItem> animations;
  68. struct SpritesItem {
  69. int tileHeight;
  70. int number;
  71. int pad;
  72. int margin;
  73. float scaleWidth;
  74. std::string format;
  75. double interval;
  76. double startTime;
  77. std::string scaleType;
  78. float scaleHeight;
  79. std::string uRI;
  80. int tileWidth;
  81. };
  82. SpritesItem spritesItem;
  83. std::vector<SpritesItem> sprites;
  84. };
  85. Image image;
  86. struct Encryption {
  87. std::string protectionSystem;
  88. };
  89. Encryption encryption;
  90. struct Segment {
  91. double duration;
  92. std::string format;
  93. int startNumber;
  94. };
  95. Segment segment;
  96. struct Subtitle {
  97. bool disableSubtitle;
  98. int integer;
  99. std::vector<int> stream;
  100. struct ExtractSubtitle {
  101. std::string format;
  102. std::string uRI;
  103. };
  104. ExtractSubtitle extractSubtitle;
  105. };
  106. Subtitle subtitle;
  107. bool stripMetadata;
  108. struct Video {
  109. struct FilterVideo {
  110. struct DelogosItem {
  111. double duration;
  112. float dx;
  113. float dy;
  114. float width;
  115. std::string referPos;
  116. double startTime;
  117. float height;
  118. };
  119. DelogosItem delogosItem;
  120. std::vector<DelogosItem> delogos;
  121. struct WatermarksItem {
  122. float fontApha;
  123. int fontSize;
  124. double startTime;
  125. std::string type;
  126. std::string fontName;
  127. std::string uRI;
  128. std::string content;
  129. std::string borderColor;
  130. double duration;
  131. float dx;
  132. float dy;
  133. int borderWidth;
  134. float width;
  135. std::string fontColor;
  136. std::string referPos;
  137. float height;
  138. };
  139. WatermarksItem watermarksItem;
  140. std::vector<WatermarksItem> watermarks;
  141. };
  142. FilterVideo filterVideo;
  143. int integer;
  144. std::vector<int> stream;
  145. bool disableVideo;
  146. struct TranscodeVideo {
  147. std::string resolutionOption;
  148. int gOPSize;
  149. std::string pixelFormat;
  150. float frameRate;
  151. int rotation;
  152. int bitrate;
  153. int bufferSize;
  154. std::string resolution;
  155. int bFrames;
  156. int maxBitrate;
  157. std::string codec;
  158. std::string bitrateOption;
  159. int refs;
  160. float cRF;
  161. std::string scaleType;
  162. std::string frameRateOption;
  163. bool adaptiveResolutionDirection;
  164. };
  165. TranscodeVideo transcodeVideo;
  166. };
  167. Video video;
  168. struct Audio {
  169. long long;
  170. std::vector<long> stream;
  171. bool disableAudio;
  172. struct TranscodeAudio {
  173. std::string codec;
  174. std::string bitrateOption;
  175. int channel;
  176. int bitrate;
  177. std::string sampleRateOption;
  178. int quality;
  179. int sampleRate;
  180. };
  181. TranscodeAudio transcodeAudio;
  182. struct FilterAudio {
  183. bool mixing;
  184. };
  185. FilterAudio filterAudio;
  186. };
  187. Audio audio;
  188. std::string uRI;
  189. float speed;
  190. double pTSOffset;
  191. };
  192. struct Notification {
  193. struct MNS {
  194. std::string endpoint;
  195. std::string topicName;
  196. };
  197. MNS mNS;
  198. struct RocketMQ {
  199. std::string endpoint;
  200. std::string instanceId;
  201. std::string topicName;
  202. };
  203. RocketMQ rocketMQ;
  204. };
  205. struct CredentialConfig {
  206. struct ChainItem {
  207. std::string role;
  208. std::string roleType;
  209. std::string assumeRoleFor;
  210. };
  211. ChainItem chainItem;
  212. std::vector<ChainItem> chain;
  213. std::string serviceRole;
  214. std::string policy;
  215. };
  216. CreateMediaConvertTaskRequest();
  217. ~CreateMediaConvertTaskRequest();
  218. std::vector<Sources> getSources() const;
  219. void setSources(const std::vector<Sources> &sources);
  220. std::vector<Targets> getTargets() const;
  221. void setTargets(const std::vector<Targets> &targets);
  222. std::string getUserData() const;
  223. void setUserData(const std::string &userData);
  224. Notification getNotification() const;
  225. void setNotification(const Notification &notification);
  226. std::string getNotifyEndpoint() const;
  227. void setNotifyEndpoint(const std::string &notifyEndpoint);
  228. int getAlignmentIndex() const;
  229. void setAlignmentIndex(int alignmentIndex);
  230. std::string getProjectName() const;
  231. void setProjectName(const std::string &projectName);
  232. std::string getNotifyTopicName() const;
  233. void setNotifyTopicName(const std::string &notifyTopicName);
  234. CredentialConfig getCredentialConfig() const;
  235. void setCredentialConfig(const CredentialConfig &credentialConfig);
  236. std::map<std::string, std::string> getTags() const;
  237. void setTags(const std::map<std::string, std::string> &tags);
  238. private:
  239. std::vector<Sources> sources_;
  240. std::vector<Targets> targets_;
  241. std::string userData_;
  242. Notification notification_;
  243. std::string notifyEndpoint_;
  244. int alignmentIndex_;
  245. std::string projectName_;
  246. std::string notifyTopicName_;
  247. CredentialConfig credentialConfig_;
  248. std::map<std::string, std::string> tags_;
  249. };
  250. } // namespace Model
  251. } // namespace Imm
  252. } // namespace AlibabaCloud
  253. #endif // !ALIBABACLOUD_IMM_MODEL_CREATEMEDIACONVERTTASKREQUEST_H_