submit_editing_jobs.go 19 KB

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