query_media_info_job_list.go 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  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) QueryMediaInfoJobList(request *QueryMediaInfoJobListRequest) (response *QueryMediaInfoJobListResponse, err error) {
  21. response = CreateQueryMediaInfoJobListResponse()
  22. err = client.DoAction(request, response)
  23. return
  24. }
  25. func (client *Client) QueryMediaInfoJobListWithChan(request *QueryMediaInfoJobListRequest) (<-chan *QueryMediaInfoJobListResponse, <-chan error) {
  26. responseChan := make(chan *QueryMediaInfoJobListResponse, 1)
  27. errChan := make(chan error, 1)
  28. err := client.AddAsyncTask(func() {
  29. defer close(responseChan)
  30. defer close(errChan)
  31. response, err := client.QueryMediaInfoJobList(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) QueryMediaInfoJobListWithCallback(request *QueryMediaInfoJobListRequest, callback func(response *QueryMediaInfoJobListResponse, err error)) <-chan int {
  46. result := make(chan int, 1)
  47. err := client.AddAsyncTask(func() {
  48. var response *QueryMediaInfoJobListResponse
  49. var err error
  50. defer close(result)
  51. response, err = client.QueryMediaInfoJobList(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 QueryMediaInfoJobListRequest struct {
  63. *requests.RpcRequest
  64. ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"`
  65. MediaInfoJobIds string `position:"Query" name:"MediaInfoJobIds"`
  66. ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"`
  67. OwnerAccount string `position:"Query" name:"OwnerAccount"`
  68. OwnerId requests.Integer `position:"Query" name:"OwnerId"`
  69. }
  70. type QueryMediaInfoJobListResponse struct {
  71. *responses.BaseResponse
  72. RequestId string `json:"RequestId" xml:"RequestId"`
  73. NonExistMediaInfoJobIds struct {
  74. String []string `json:"String" xml:"String"`
  75. } `json:"NonExistMediaInfoJobIds" xml:"NonExistMediaInfoJobIds"`
  76. MediaInfoJobList struct {
  77. MediaInfoJob []struct {
  78. JobId string `json:"JobId" xml:"JobId"`
  79. UserData string `json:"UserData" xml:"UserData"`
  80. PipelineId string `json:"PipelineId" xml:"PipelineId"`
  81. State string `json:"State" xml:"State"`
  82. Code string `json:"Code" xml:"Code"`
  83. Message string `json:"Message" xml:"Message"`
  84. CreationTime string `json:"CreationTime" xml:"CreationTime"`
  85. Input struct {
  86. Bucket string `json:"Bucket" xml:"Bucket"`
  87. Location string `json:"Location" xml:"Location"`
  88. Object string `json:"Object" xml:"Object"`
  89. } `json:"Input" xml:"Input"`
  90. Properties struct {
  91. Width string `json:"Width" xml:"Width"`
  92. Height string `json:"Height" xml:"Height"`
  93. Bitrate string `json:"Bitrate" xml:"Bitrate"`
  94. Duration string `json:"Duration" xml:"Duration"`
  95. Fps string `json:"Fps" xml:"Fps"`
  96. FileSize string `json:"FileSize" xml:"FileSize"`
  97. FileFormat string `json:"FileFormat" xml:"FileFormat"`
  98. Streams struct {
  99. VideoStreamList struct {
  100. VideoStream []struct {
  101. Index string `json:"Index" xml:"Index"`
  102. CodecName string `json:"CodecName" xml:"CodecName"`
  103. CodecLongName string `json:"CodecLongName" xml:"CodecLongName"`
  104. Profile string `json:"Profile" xml:"Profile"`
  105. CodecTimeBase string `json:"CodecTimeBase" xml:"CodecTimeBase"`
  106. CodecTagString string `json:"CodecTagString" xml:"CodecTagString"`
  107. CodecTag string `json:"CodecTag" xml:"CodecTag"`
  108. Width string `json:"Width" xml:"Width"`
  109. Height string `json:"Height" xml:"Height"`
  110. HasBFrames string `json:"HasBFrames" xml:"HasBFrames"`
  111. Sar string `json:"Sar" xml:"Sar"`
  112. Dar string `json:"Dar" xml:"Dar"`
  113. PixFmt string `json:"PixFmt" xml:"PixFmt"`
  114. Level string `json:"Level" xml:"Level"`
  115. Fps string `json:"Fps" xml:"Fps"`
  116. AvgFPS string `json:"AvgFPS" xml:"AvgFPS"`
  117. Timebase string `json:"Timebase" xml:"Timebase"`
  118. StartTime string `json:"StartTime" xml:"StartTime"`
  119. Duration string `json:"Duration" xml:"Duration"`
  120. Bitrate string `json:"Bitrate" xml:"Bitrate"`
  121. NumFrames string `json:"NumFrames" xml:"NumFrames"`
  122. Lang string `json:"Lang" xml:"Lang"`
  123. Rotate string `json:"Rotate" xml:"Rotate"`
  124. NetworkCost struct {
  125. PreloadTime string `json:"PreloadTime" xml:"PreloadTime"`
  126. CostBandwidth string `json:"CostBandwidth" xml:"CostBandwidth"`
  127. AvgBitrate string `json:"AvgBitrate" xml:"AvgBitrate"`
  128. } `json:"NetworkCost" xml:"NetworkCost"`
  129. } `json:"VideoStream" xml:"VideoStream"`
  130. } `json:"VideoStreamList" xml:"VideoStreamList"`
  131. AudioStreamList struct {
  132. AudioStream []struct {
  133. Index string `json:"Index" xml:"Index"`
  134. CodecName string `json:"CodecName" xml:"CodecName"`
  135. CodecTimeBase string `json:"CodecTimeBase" xml:"CodecTimeBase"`
  136. CodecLongName string `json:"CodecLongName" xml:"CodecLongName"`
  137. CodecTagString string `json:"CodecTagString" xml:"CodecTagString"`
  138. CodecTag string `json:"CodecTag" xml:"CodecTag"`
  139. SampleFmt string `json:"SampleFmt" xml:"SampleFmt"`
  140. Samplerate string `json:"Samplerate" xml:"Samplerate"`
  141. Channels string `json:"Channels" xml:"Channels"`
  142. ChannelLayout string `json:"ChannelLayout" xml:"ChannelLayout"`
  143. Timebase string `json:"Timebase" xml:"Timebase"`
  144. StartTime string `json:"StartTime" xml:"StartTime"`
  145. Duration string `json:"Duration" xml:"Duration"`
  146. Bitrate string `json:"Bitrate" xml:"Bitrate"`
  147. NumFrames string `json:"NumFrames" xml:"NumFrames"`
  148. Lang string `json:"Lang" xml:"Lang"`
  149. } `json:"AudioStream" xml:"AudioStream"`
  150. } `json:"AudioStreamList" xml:"AudioStreamList"`
  151. SubtitleStreamList struct {
  152. SubtitleStream []struct {
  153. Index string `json:"Index" xml:"Index"`
  154. Lang string `json:"Lang" xml:"Lang"`
  155. } `json:"SubtitleStream" xml:"SubtitleStream"`
  156. } `json:"SubtitleStreamList" xml:"SubtitleStreamList"`
  157. } `json:"Streams" xml:"Streams"`
  158. Format struct {
  159. NumStreams string `json:"NumStreams" xml:"NumStreams"`
  160. NumPrograms string `json:"NumPrograms" xml:"NumPrograms"`
  161. FormatName string `json:"FormatName" xml:"FormatName"`
  162. FormatLongName string `json:"FormatLongName" xml:"FormatLongName"`
  163. StartTime string `json:"StartTime" xml:"StartTime"`
  164. Duration string `json:"Duration" xml:"Duration"`
  165. Size string `json:"Size" xml:"Size"`
  166. Bitrate string `json:"Bitrate" xml:"Bitrate"`
  167. } `json:"Format" xml:"Format"`
  168. } `json:"Properties" xml:"Properties"`
  169. MNSMessageResult struct {
  170. MessageId string `json:"MessageId" xml:"MessageId"`
  171. ErrorMessage string `json:"ErrorMessage" xml:"ErrorMessage"`
  172. ErrorCode string `json:"ErrorCode" xml:"ErrorCode"`
  173. } `json:"MNSMessageResult" xml:"MNSMessageResult"`
  174. } `json:"MediaInfoJob" xml:"MediaInfoJob"`
  175. } `json:"MediaInfoJobList" xml:"MediaInfoJobList"`
  176. }
  177. func CreateQueryMediaInfoJobListRequest() (request *QueryMediaInfoJobListRequest) {
  178. request = &QueryMediaInfoJobListRequest{
  179. RpcRequest: &requests.RpcRequest{},
  180. }
  181. request.InitWithApiInfo("Mts", "2014-06-18", "QueryMediaInfoJobList", "mts", "openAPI")
  182. return
  183. }
  184. func CreateQueryMediaInfoJobListResponse() (response *QueryMediaInfoJobListResponse) {
  185. response = &QueryMediaInfoJobListResponse{
  186. BaseResponse: &responses.BaseResponse{},
  187. }
  188. return
  189. }