submit_editing_jobs.go 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416
  1. package mts
  2. //Licensed under the Apache License, Version 2.0 (the "License");
  3. //you may not use this file except in compliance with the License.
  4. //You may obtain a copy of the License at
  5. //
  6. //http://www.apache.org/licenses/LICENSE-2.0
  7. //
  8. //Unless required by applicable law or agreed to in writing, software
  9. //distributed under the License is distributed on an "AS IS" BASIS,
  10. //WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  11. //See the License for the specific language governing permissions and
  12. //limitations under the License.
  13. //
  14. // Code generated by Alibaba Cloud SDK Code Generator.
  15. // Changes may cause incorrect behavior and will be lost if the code is regenerated.
  16. import (
  17. "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
  18. "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
  19. )
  20. func (client *Client) SubmitEditingJobs(request *SubmitEditingJobsRequest) (response *SubmitEditingJobsResponse, err error) {
  21. response = CreateSubmitEditingJobsResponse()
  22. err = client.DoAction(request, response)
  23. return
  24. }
  25. func (client *Client) SubmitEditingJobsWithChan(request *SubmitEditingJobsRequest) (<-chan *SubmitEditingJobsResponse, <-chan error) {
  26. responseChan := make(chan *SubmitEditingJobsResponse, 1)
  27. errChan := make(chan error, 1)
  28. err := client.AddAsyncTask(func() {
  29. defer close(responseChan)
  30. defer close(errChan)
  31. response, err := client.SubmitEditingJobs(request)
  32. responseChan <- response
  33. errChan <- err
  34. })
  35. if err != nil {
  36. errChan <- err
  37. close(responseChan)
  38. close(errChan)
  39. }
  40. return responseChan, errChan
  41. }
  42. func (client *Client) SubmitEditingJobsWithCallback(request *SubmitEditingJobsRequest, callback func(response *SubmitEditingJobsResponse, err error)) <-chan int {
  43. result := make(chan int, 1)
  44. err := client.AddAsyncTask(func() {
  45. var response *SubmitEditingJobsResponse
  46. var err error
  47. defer close(result)
  48. response, err = client.SubmitEditingJobs(request)
  49. callback(response, err)
  50. result <- 1
  51. })
  52. if err != nil {
  53. defer close(result)
  54. callback(nil, err)
  55. result <- 0
  56. }
  57. return result
  58. }
  59. type SubmitEditingJobsRequest struct {
  60. *requests.RpcRequest
  61. OutputBucket string `position:"Query" name:"OutputBucket"`
  62. ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"`
  63. EditingJobOutputs string `position:"Query" name:"EditingJobOutputs"`
  64. ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"`
  65. OwnerAccount string `position:"Query" name:"OwnerAccount"`
  66. OutputLocation string `position:"Query" name:"OutputLocation"`
  67. OwnerId requests.Integer `position:"Query" name:"OwnerId"`
  68. EditingInputs string `position:"Query" name:"EditingInputs"`
  69. PipelineId string `position:"Query" name:"PipelineId"`
  70. }
  71. type SubmitEditingJobsResponse struct {
  72. *responses.BaseResponse
  73. RequestId string `json:"RequestId" xml:"RequestId"`
  74. JobResultList struct {
  75. JobResult []struct {
  76. Success bool `json:"Success" xml:"Success"`
  77. Code string `json:"Code" xml:"Code"`
  78. Message string `json:"Message" xml:"Message"`
  79. Job struct {
  80. JobId string `json:"JobId" xml:"JobId"`
  81. State string `json:"State" xml:"State"`
  82. Code string `json:"Code" xml:"Code"`
  83. Message string `json:"Message" xml:"Message"`
  84. Percent int `json:"Percent" xml:"Percent"`
  85. PipelineId string `json:"PipelineId" xml:"PipelineId"`
  86. CreationTime string `json:"CreationTime" xml:"CreationTime"`
  87. FinishTime string `json:"FinishTime" xml:"FinishTime"`
  88. EditingConfig struct {
  89. TemplateId string `json:"TemplateId" xml:"TemplateId"`
  90. UserData string `json:"UserData" xml:"UserData"`
  91. Rotate string `json:"Rotate" xml:"Rotate"`
  92. VideoStreamMap string `json:"VideoStreamMap" xml:"VideoStreamMap"`
  93. AudioStreamMap string `json:"AudioStreamMap" xml:"AudioStreamMap"`
  94. DeWatermark string `json:"DeWatermark" xml:"DeWatermark"`
  95. Priority string `json:"Priority" xml:"Priority"`
  96. WaterMarkConfigUrl string `json:"WaterMarkConfigUrl" xml:"WaterMarkConfigUrl"`
  97. MergeConfigUrl string `json:"MergeConfigUrl" xml:"MergeConfigUrl"`
  98. DigiWaterMark struct {
  99. Type string `json:"Type" xml:"Type"`
  100. Alpha string `json:"Alpha" xml:"Alpha"`
  101. InputFile2 struct {
  102. Bucket string `json:"Bucket" xml:"Bucket"`
  103. Location string `json:"Location" xml:"Location"`
  104. Object string `json:"Object" xml:"Object"`
  105. } `json:"InputFile" xml:"InputFile"`
  106. } `json:"DigiWaterMark" xml:"DigiWaterMark"`
  107. OutputFile struct {
  108. Bucket string `json:"Bucket" xml:"Bucket"`
  109. Location string `json:"Location" xml:"Location"`
  110. Object string `json:"Object" xml:"Object"`
  111. RoleArn string `json:"RoleArn" xml:"RoleArn"`
  112. } `json:"OutputFile" xml:"OutputFile"`
  113. M3U8NonStandardSupport struct {
  114. TS struct {
  115. Md5Support bool `json:"Md5Support" xml:"Md5Support"`
  116. SizeSupport bool `json:"SizeSupport" xml:"SizeSupport"`
  117. } `json:"TS" xml:"TS"`
  118. } `json:"M3U8NonStandardSupport" xml:"M3U8NonStandardSupport"`
  119. Properties struct {
  120. Width string `json:"Width" xml:"Width"`
  121. Height string `json:"Height" xml:"Height"`
  122. Bitrate string `json:"Bitrate" xml:"Bitrate"`
  123. Duration string `json:"Duration" xml:"Duration"`
  124. Fps string `json:"Fps" xml:"Fps"`
  125. FileSize string `json:"FileSize" xml:"FileSize"`
  126. FileFormat string `json:"FileFormat" xml:"FileFormat"`
  127. Streams struct {
  128. VideoStreamList struct {
  129. VideoStream []struct {
  130. Index string `json:"Index" xml:"Index"`
  131. CodecName string `json:"CodecName" xml:"CodecName"`
  132. CodecLongName string `json:"CodecLongName" xml:"CodecLongName"`
  133. Profile string `json:"Profile" xml:"Profile"`
  134. CodecTimeBase string `json:"CodecTimeBase" xml:"CodecTimeBase"`
  135. CodecTagString string `json:"CodecTagString" xml:"CodecTagString"`
  136. CodecTag string `json:"CodecTag" xml:"CodecTag"`
  137. Width string `json:"Width" xml:"Width"`
  138. Height string `json:"Height" xml:"Height"`
  139. HasBFrames string `json:"HasBFrames" xml:"HasBFrames"`
  140. Sar string `json:"Sar" xml:"Sar"`
  141. Dar string `json:"Dar" xml:"Dar"`
  142. PixFmt string `json:"PixFmt" xml:"PixFmt"`
  143. Level string `json:"Level" xml:"Level"`
  144. Fps string `json:"Fps" xml:"Fps"`
  145. AvgFPS string `json:"AvgFPS" xml:"AvgFPS"`
  146. Timebase string `json:"Timebase" xml:"Timebase"`
  147. StartTime string `json:"StartTime" xml:"StartTime"`
  148. Duration string `json:"Duration" xml:"Duration"`
  149. Bitrate string `json:"Bitrate" xml:"Bitrate"`
  150. NumFrames string `json:"NumFrames" xml:"NumFrames"`
  151. Lang string `json:"Lang" xml:"Lang"`
  152. NetworkCost struct {
  153. PreloadTime string `json:"PreloadTime" xml:"PreloadTime"`
  154. CostBandwidth string `json:"CostBandwidth" xml:"CostBandwidth"`
  155. AvgBitrate string `json:"AvgBitrate" xml:"AvgBitrate"`
  156. } `json:"NetworkCost" xml:"NetworkCost"`
  157. } `json:"VideoStream" xml:"VideoStream"`
  158. } `json:"VideoStreamList" xml:"VideoStreamList"`
  159. AudioStreamList struct {
  160. AudioStream []struct {
  161. Index string `json:"Index" xml:"Index"`
  162. CodecName string `json:"CodecName" xml:"CodecName"`
  163. CodecTimeBase string `json:"CodecTimeBase" xml:"CodecTimeBase"`
  164. CodecLongName string `json:"CodecLongName" xml:"CodecLongName"`
  165. CodecTagString string `json:"CodecTagString" xml:"CodecTagString"`
  166. CodecTag string `json:"CodecTag" xml:"CodecTag"`
  167. SampleFmt string `json:"SampleFmt" xml:"SampleFmt"`
  168. Samplerate string `json:"Samplerate" xml:"Samplerate"`
  169. Channels string `json:"Channels" xml:"Channels"`
  170. ChannelLayout string `json:"ChannelLayout" xml:"ChannelLayout"`
  171. Timebase string `json:"Timebase" xml:"Timebase"`
  172. StartTime string `json:"StartTime" xml:"StartTime"`
  173. Duration string `json:"Duration" xml:"Duration"`
  174. Bitrate string `json:"Bitrate" xml:"Bitrate"`
  175. NumFrames string `json:"NumFrames" xml:"NumFrames"`
  176. Lang string `json:"Lang" xml:"Lang"`
  177. } `json:"AudioStream" xml:"AudioStream"`
  178. } `json:"AudioStreamList" xml:"AudioStreamList"`
  179. SubtitleStreamList struct {
  180. SubtitleStream []struct {
  181. Index string `json:"Index" xml:"Index"`
  182. Lang string `json:"Lang" xml:"Lang"`
  183. } `json:"SubtitleStream" xml:"SubtitleStream"`
  184. } `json:"SubtitleStreamList" xml:"SubtitleStreamList"`
  185. } `json:"Streams" xml:"Streams"`
  186. Format struct {
  187. NumStreams string `json:"NumStreams" xml:"NumStreams"`
  188. NumPrograms string `json:"NumPrograms" xml:"NumPrograms"`
  189. FormatName string `json:"FormatName" xml:"FormatName"`
  190. FormatLongName string `json:"FormatLongName" xml:"FormatLongName"`
  191. StartTime string `json:"StartTime" xml:"StartTime"`
  192. Duration string `json:"Duration" xml:"Duration"`
  193. Size string `json:"Size" xml:"Size"`
  194. Bitrate string `json:"Bitrate" xml:"Bitrate"`
  195. } `json:"Format" xml:"Format"`
  196. } `json:"Properties" xml:"Properties"`
  197. Clip struct {
  198. TimeSpan struct {
  199. Seek string `json:"Seek" xml:"Seek"`
  200. Duration string `json:"Duration" xml:"Duration"`
  201. } `json:"TimeSpan" xml:"TimeSpan"`
  202. } `json:"Clip" xml:"Clip"`
  203. SuperReso struct {
  204. IsHalfSample string `json:"IsHalfSample" xml:"IsHalfSample"`
  205. } `json:"SuperReso" xml:"SuperReso"`
  206. SubtitleConfig struct {
  207. SubtitleList struct {
  208. Subtitle []struct {
  209. Map string `json:"Map" xml:"Map"`
  210. } `json:"Subtitle" xml:"Subtitle"`
  211. } `json:"SubtitleList" xml:"SubtitleList"`
  212. ExtSubtitleList struct {
  213. ExtSubtitle []struct {
  214. FontName string `json:"FontName" xml:"FontName"`
  215. CharEnc string `json:"CharEnc" xml:"CharEnc"`
  216. Input struct {
  217. Bucket string `json:"Bucket" xml:"Bucket"`
  218. Location string `json:"Location" xml:"Location"`
  219. Object string `json:"Object" xml:"Object"`
  220. } `json:"Input" xml:"Input"`
  221. } `json:"ExtSubtitle" xml:"ExtSubtitle"`
  222. } `json:"ExtSubtitleList" xml:"ExtSubtitleList"`
  223. } `json:"SubtitleConfig" xml:"SubtitleConfig"`
  224. TransConfig struct {
  225. TransMode string `json:"TransMode" xml:"TransMode"`
  226. IsCheckReso string `json:"IsCheckReso" xml:"IsCheckReso"`
  227. IsCheckResoFail string `json:"IsCheckResoFail" xml:"IsCheckResoFail"`
  228. IsCheckVideoBitrate string `json:"IsCheckVideoBitrate" xml:"IsCheckVideoBitrate"`
  229. IsCheckAudioBitrate string `json:"IsCheckAudioBitrate" xml:"IsCheckAudioBitrate"`
  230. AdjDarMethod string `json:"AdjDarMethod" xml:"AdjDarMethod"`
  231. IsCheckVideoBitrateFail string `json:"IsCheckVideoBitrateFail" xml:"IsCheckVideoBitrateFail"`
  232. IsCheckAudioBitrateFail string `json:"IsCheckAudioBitrateFail" xml:"IsCheckAudioBitrateFail"`
  233. Duration string `json:"Duration" xml:"Duration"`
  234. } `json:"TransConfig" xml:"TransConfig"`
  235. MuxConfig struct {
  236. Segment struct {
  237. Duration string `json:"Duration" xml:"Duration"`
  238. } `json:"Segment" xml:"Segment"`
  239. Gif struct {
  240. Loop string `json:"Loop" xml:"Loop"`
  241. FinalDelay string `json:"FinalDelay" xml:"FinalDelay"`
  242. IsCustomPalette string `json:"IsCustomPalette" xml:"IsCustomPalette"`
  243. DitherMode string `json:"DitherMode" xml:"DitherMode"`
  244. } `json:"Gif" xml:"Gif"`
  245. } `json:"MuxConfig" xml:"MuxConfig"`
  246. Audio struct {
  247. Codec string `json:"Codec" xml:"Codec"`
  248. Profile string `json:"Profile" xml:"Profile"`
  249. Samplerate string `json:"Samplerate" xml:"Samplerate"`
  250. Bitrate string `json:"Bitrate" xml:"Bitrate"`
  251. Channels string `json:"Channels" xml:"Channels"`
  252. Qscale string `json:"Qscale" xml:"Qscale"`
  253. Volume struct {
  254. Level string `json:"Level" xml:"Level"`
  255. Method string `json:"Method" xml:"Method"`
  256. } `json:"Volume" xml:"Volume"`
  257. } `json:"Audio" xml:"Audio"`
  258. Video struct {
  259. Codec string `json:"Codec" xml:"Codec"`
  260. Profile string `json:"Profile" xml:"Profile"`
  261. Bitrate string `json:"Bitrate" xml:"Bitrate"`
  262. Crf string `json:"Crf" xml:"Crf"`
  263. Width string `json:"Width" xml:"Width"`
  264. Height string `json:"Height" xml:"Height"`
  265. Fps string `json:"Fps" xml:"Fps"`
  266. Gop string `json:"Gop" xml:"Gop"`
  267. Preset string `json:"Preset" xml:"Preset"`
  268. ScanMode string `json:"ScanMode" xml:"ScanMode"`
  269. Bufsize string `json:"Bufsize" xml:"Bufsize"`
  270. Maxrate string `json:"Maxrate" xml:"Maxrate"`
  271. PixFmt string `json:"PixFmt" xml:"PixFmt"`
  272. Degrain string `json:"Degrain" xml:"Degrain"`
  273. Qscale string `json:"Qscale" xml:"Qscale"`
  274. Crop string `json:"Crop" xml:"Crop"`
  275. Pad string `json:"Pad" xml:"Pad"`
  276. MaxFps string `json:"MaxFps" xml:"MaxFps"`
  277. BitrateBnd struct {
  278. Max string `json:"Max" xml:"Max"`
  279. Min string `json:"Min" xml:"Min"`
  280. } `json:"BitrateBnd" xml:"BitrateBnd"`
  281. } `json:"Video" xml:"Video"`
  282. Container struct {
  283. Format string `json:"Format" xml:"Format"`
  284. } `json:"Container" xml:"Container"`
  285. Encryption struct {
  286. Type string `json:"Type" xml:"Type"`
  287. Id string `json:"Id" xml:"Id"`
  288. Key string `json:"Key" xml:"Key"`
  289. KeyUri string `json:"KeyUri" xml:"KeyUri"`
  290. KeyType string `json:"KeyType" xml:"KeyType"`
  291. SkipCnt string `json:"SkipCnt" xml:"SkipCnt"`
  292. } `json:"Encryption" xml:"Encryption"`
  293. Editing struct {
  294. Timeline struct {
  295. TimelineConfig struct {
  296. TimelineConfigVideo struct {
  297. Width string `json:"Width" xml:"Width"`
  298. Height string `json:"Height" xml:"Height"`
  299. BgColor string `json:"BgColor" xml:"BgColor"`
  300. Fps string `json:"Fps" xml:"Fps"`
  301. } `json:"TimelineConfigVideo" xml:"TimelineConfigVideo"`
  302. TimelineConfigAudio struct {
  303. Samplerate string `json:"Samplerate" xml:"Samplerate"`
  304. ChannelLayout string `json:"ChannelLayout" xml:"ChannelLayout"`
  305. Channels string `json:"Channels" xml:"Channels"`
  306. } `json:"TimelineConfigAudio" xml:"TimelineConfigAudio"`
  307. } `json:"TimelineConfig" xml:"TimelineConfig"`
  308. TrackList struct {
  309. Track []struct {
  310. Id string `json:"Id" xml:"Id"`
  311. Type string `json:"Type" xml:"Type"`
  312. Order string `json:"Order" xml:"Order"`
  313. Clips struct {
  314. Clip []struct {
  315. ClipID string `json:"clipID" xml:"clipID"`
  316. In string `json:"In" xml:"In"`
  317. Out string `json:"Out" xml:"Out"`
  318. ClipsConfig struct {
  319. ClipsConfigVideo struct {
  320. L string `json:"L" xml:"L"`
  321. T string `json:"T" xml:"T"`
  322. } `json:"ClipsConfigVideo" xml:"ClipsConfigVideo"`
  323. } `json:"ClipsConfig" xml:"ClipsConfig"`
  324. } `json:"Clip" xml:"Clip"`
  325. } `json:"Clips" xml:"Clips"`
  326. } `json:"Track" xml:"Track"`
  327. } `json:"TrackList" xml:"TrackList"`
  328. } `json:"Timeline" xml:"Timeline"`
  329. ClipList struct {
  330. Clip []struct {
  331. Id string `json:"Id" xml:"Id"`
  332. Type string `json:"Type" xml:"Type"`
  333. SourceType string `json:"SourceType" xml:"SourceType"`
  334. SourceID string `json:"SourceID" xml:"SourceID"`
  335. SourceStrmMap string `json:"SourceStrmMap" xml:"SourceStrmMap"`
  336. In string `json:"In" xml:"In"`
  337. Out string `json:"Out" xml:"Out"`
  338. Effects struct {
  339. Effect []struct {
  340. Effect string `json:"Effect" xml:"Effect"`
  341. EffectConfig string `json:"EffectConfig" xml:"EffectConfig"`
  342. } `json:"Effect" xml:"Effect"`
  343. } `json:"Effects" xml:"Effects"`
  344. } `json:"Clip" xml:"Clip"`
  345. } `json:"ClipList" xml:"ClipList"`
  346. } `json:"Editing" xml:"Editing"`
  347. WaterMarkList struct {
  348. WaterMark []struct {
  349. WaterMarkTemplateId string `json:"WaterMarkTemplateId" xml:"WaterMarkTemplateId"`
  350. Width string `json:"Width" xml:"Width"`
  351. Height string `json:"Height" xml:"Height"`
  352. Dx string `json:"Dx" xml:"Dx"`
  353. Dy string `json:"Dy" xml:"Dy"`
  354. ReferPos string `json:"ReferPos" xml:"ReferPos"`
  355. Type string `json:"Type" xml:"Type"`
  356. InputFile1 struct {
  357. Bucket string `json:"Bucket" xml:"Bucket"`
  358. Location string `json:"Location" xml:"Location"`
  359. Object string `json:"Object" xml:"Object"`
  360. } `json:"InputFile" xml:"InputFile"`
  361. } `json:"WaterMark" xml:"WaterMark"`
  362. } `json:"WaterMarkList" xml:"WaterMarkList"`
  363. MergeList struct {
  364. Merge []struct {
  365. MergeURL string `json:"MergeURL" xml:"MergeURL"`
  366. Start string `json:"Start" xml:"Start"`
  367. Duration string `json:"Duration" xml:"Duration"`
  368. RoleArn string `json:"RoleArn" xml:"RoleArn"`
  369. } `json:"Merge" xml:"Merge"`
  370. } `json:"MergeList" xml:"MergeList"`
  371. } `json:"EditingConfig" xml:"EditingConfig"`
  372. MNSMessageResult struct {
  373. MessageId string `json:"MessageId" xml:"MessageId"`
  374. ErrorMessage string `json:"ErrorMessage" xml:"ErrorMessage"`
  375. ErrorCode string `json:"ErrorCode" xml:"ErrorCode"`
  376. } `json:"MNSMessageResult" xml:"MNSMessageResult"`
  377. EditingInputs struct {
  378. EditingInput []struct {
  379. Id string `json:"Id" xml:"Id"`
  380. InputFile struct {
  381. Bucket string `json:"Bucket" xml:"Bucket"`
  382. Location string `json:"Location" xml:"Location"`
  383. Object string `json:"Object" xml:"Object"`
  384. } `json:"InputFile" xml:"InputFile"`
  385. InputConfig struct {
  386. DeinterlaceMethod string `json:"DeinterlaceMethod" xml:"DeinterlaceMethod"`
  387. IsNormalSar string `json:"IsNormalSar" xml:"IsNormalSar"`
  388. } `json:"InputConfig" xml:"InputConfig"`
  389. } `json:"EditingInput" xml:"EditingInput"`
  390. } `json:"EditingInputs" xml:"EditingInputs"`
  391. } `json:"Job" xml:"Job"`
  392. } `json:"JobResult" xml:"JobResult"`
  393. } `json:"JobResultList" xml:"JobResultList"`
  394. }
  395. func CreateSubmitEditingJobsRequest() (request *SubmitEditingJobsRequest) {
  396. request = &SubmitEditingJobsRequest{
  397. RpcRequest: &requests.RpcRequest{},
  398. }
  399. request.InitWithApiInfo("Mts", "2014-06-18", "SubmitEditingJobs", "mts", "openAPI")
  400. return
  401. }
  402. func CreateSubmitEditingJobsResponse() (response *SubmitEditingJobsResponse) {
  403. response = &SubmitEditingJobsResponse{
  404. BaseResponse: &responses.BaseResponse{},
  405. }
  406. return
  407. }