query_media_info_job_list.go 6.8 KB

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