| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341 |
- package mts
- //Licensed under the Apache License, Version 2.0 (the "License");
- //you may not use this file except in compliance with the License.
- //You may obtain a copy of the License at
- //
- //http://www.apache.org/licenses/LICENSE-2.0
- //
- //Unless required by applicable law or agreed to in writing, software
- //distributed under the License is distributed on an "AS IS" BASIS,
- //WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- //See the License for the specific language governing permissions and
- //limitations under the License.
- //
- // Code generated by Alibaba Cloud SDK Code Generator.
- // Changes may cause incorrect behavior and will be lost if the code is regenerated.
- import (
- "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
- "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
- )
- func (client *Client) ListJob(request *ListJobRequest) (response *ListJobResponse, err error) {
- response = CreateListJobResponse()
- err = client.DoAction(request, response)
- return
- }
- func (client *Client) ListJobWithChan(request *ListJobRequest) (<-chan *ListJobResponse, <-chan error) {
- responseChan := make(chan *ListJobResponse, 1)
- errChan := make(chan error, 1)
- err := client.AddAsyncTask(func() {
- defer close(responseChan)
- defer close(errChan)
- response, err := client.ListJob(request)
- responseChan <- response
- errChan <- err
- })
- if err != nil {
- errChan <- err
- close(responseChan)
- close(errChan)
- }
- return responseChan, errChan
- }
- func (client *Client) ListJobWithCallback(request *ListJobRequest, callback func(response *ListJobResponse, err error)) <-chan int {
- result := make(chan int, 1)
- err := client.AddAsyncTask(func() {
- var response *ListJobResponse
- var err error
- defer close(result)
- response, err = client.ListJob(request)
- callback(response, err)
- result <- 1
- })
- if err != nil {
- defer close(result)
- callback(nil, err)
- result <- 0
- }
- return result
- }
- type ListJobRequest struct {
- *requests.RpcRequest
- ResourceOwnerId string `position:"Query" name:"ResourceOwnerId"`
- ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"`
- NextPageToken string `position:"Query" name:"NextPageToken"`
- StartOfJobCreatedTimeRange string `position:"Query" name:"StartOfJobCreatedTimeRange"`
- OwnerAccount string `position:"Query" name:"OwnerAccount"`
- Action string `position:"Query" name:"Action"`
- MaximumPageSize string `position:"Query" name:"MaximumPageSize"`
- State string `position:"Query" name:"State"`
- OwnerId string `position:"Query" name:"OwnerId"`
- AccessKeyId string `position:"Query" name:"AccessKeyId"`
- EndOfJobCreatedTimeRange string `position:"Query" name:"EndOfJobCreatedTimeRange"`
- PipelineId string `position:"Query" name:"PipelineId"`
- }
- type ListJobResponse struct {
- *responses.BaseResponse
- RequestId string `json:"RequestId"`
- NextPageToken string `json:"NextPageToken"`
- JobList []struct {
- JobId string `json:"JobId"`
- State string `json:"State"`
- Code string `json:"Code"`
- Message string `json:"Message"`
- Percent int64 `json:"Percent"`
- PipelineId string `json:"PipelineId"`
- CreationTime string `json:"CreationTime"`
- FinishTime string `json:"FinishTime"`
- Input struct {
- Bucket string `json:"Bucket"`
- Location string `json:"Location"`
- Object string `json:"Object"`
- } `json:"Input"`
- Output struct {
- TemplateId string `json:"TemplateId"`
- UserData string `json:"UserData"`
- Rotate string `json:"Rotate"`
- VideoStreamMap string `json:"VideoStreamMap"`
- AudioStreamMap string `json:"AudioStreamMap"`
- DeWatermark string `json:"DeWatermark"`
- Priority string `json:"Priority"`
- WaterMarkConfigUrl string `json:"WaterMarkConfigUrl"`
- MergeConfigUrl string `json:"MergeConfigUrl"`
- OutputFile struct {
- Bucket string `json:"Bucket"`
- Location string `json:"Location"`
- Object string `json:"Object"`
- RoleArn string `json:"RoleArn"`
- } `json:"OutputFile"`
- M3U8NonStandardSupport struct {
- TS struct {
- Md5Support bool `json:"Md5Support"`
- SizeSupport bool `json:"SizeSupport"`
- } `json:"TS"`
- } `json:"M3U8NonStandardSupport"`
- Properties struct {
- Width string `json:"Width"`
- Height string `json:"Height"`
- Bitrate string `json:"Bitrate"`
- Duration string `json:"Duration"`
- Fps string `json:"Fps"`
- FileSize string `json:"FileSize"`
- FileFormat string `json:"FileFormat"`
- Streams struct {
- VideoStreamList []struct {
- Index string `json:"Index"`
- CodecName string `json:"CodecName"`
- CodecLongName string `json:"CodecLongName"`
- Profile string `json:"Profile"`
- CodecTimeBase string `json:"CodecTimeBase"`
- CodecTagString string `json:"CodecTagString"`
- CodecTag string `json:"CodecTag"`
- Width string `json:"Width"`
- Height string `json:"Height"`
- HasBFrames string `json:"HasBFrames"`
- Sar string `json:"Sar"`
- Dar string `json:"Dar"`
- PixFmt string `json:"PixFmt"`
- Level string `json:"Level"`
- Fps string `json:"Fps"`
- AvgFPS string `json:"AvgFPS"`
- Timebase string `json:"Timebase"`
- StartTime string `json:"StartTime"`
- Duration string `json:"Duration"`
- Bitrate string `json:"Bitrate"`
- NumFrames string `json:"NumFrames"`
- Lang string `json:"Lang"`
- NetworkCost struct {
- PreloadTime string `json:"PreloadTime"`
- CostBandwidth string `json:"CostBandwidth"`
- AvgBitrate string `json:"AvgBitrate"`
- } `json:"NetworkCost"`
- } `json:"VideoStreamList"`
- AudioStreamList []struct {
- Index string `json:"Index"`
- CodecName string `json:"CodecName"`
- CodecTimeBase string `json:"CodecTimeBase"`
- CodecLongName string `json:"CodecLongName"`
- CodecTagString string `json:"CodecTagString"`
- CodecTag string `json:"CodecTag"`
- SampleFmt string `json:"SampleFmt"`
- Samplerate string `json:"Samplerate"`
- Channels string `json:"Channels"`
- ChannelLayout string `json:"ChannelLayout"`
- Timebase string `json:"Timebase"`
- StartTime string `json:"StartTime"`
- Duration string `json:"Duration"`
- Bitrate string `json:"Bitrate"`
- NumFrames string `json:"NumFrames"`
- Lang string `json:"Lang"`
- } `json:"AudioStreamList"`
- SubtitleStreamList []struct {
- Index string `json:"Index"`
- Lang string `json:"Lang"`
- } `json:"SubtitleStreamList"`
- } `json:"Streams"`
- Format struct {
- NumStreams string `json:"NumStreams"`
- NumPrograms string `json:"NumPrograms"`
- FormatName string `json:"FormatName"`
- FormatLongName string `json:"FormatLongName"`
- StartTime string `json:"StartTime"`
- Duration string `json:"Duration"`
- Size string `json:"Size"`
- Bitrate string `json:"Bitrate"`
- } `json:"Format"`
- } `json:"Properties"`
- Clip struct {
- TimeSpan struct {
- Seek string `json:"Seek"`
- Duration string `json:"Duration"`
- } `json:"TimeSpan"`
- } `json:"Clip"`
- SuperReso struct {
- IsHalfSample string `json:"IsHalfSample"`
- } `json:"SuperReso"`
- SubtitleConfig struct {
- SubtitleList []struct {
- Map string `json:"Map"`
- } `json:"SubtitleList"`
- ExtSubtitleList []struct {
- FontName string `json:"FontName"`
- CharEnc string `json:"CharEnc"`
- Input3 struct {
- Bucket string `json:"Bucket"`
- Location string `json:"Location"`
- Object string `json:"Object"`
- } `json:"Input"`
- } `json:"ExtSubtitleList"`
- } `json:"SubtitleConfig"`
- TransConfig struct {
- TransMode string `json:"TransMode"`
- IsCheckReso string `json:"IsCheckReso"`
- IsCheckResoFail string `json:"IsCheckResoFail"`
- IsCheckVideoBitrate string `json:"IsCheckVideoBitrate"`
- IsCheckAudioBitrate string `json:"IsCheckAudioBitrate"`
- AdjDarMethod string `json:"AdjDarMethod"`
- IsCheckVideoBitrateFail string `json:"IsCheckVideoBitrateFail"`
- IsCheckAudioBitrateFail string `json:"IsCheckAudioBitrateFail"`
- } `json:"TransConfig"`
- MuxConfig struct {
- Segment struct {
- Duration string `json:"Duration"`
- } `json:"Segment"`
- Gif struct {
- Loop string `json:"Loop"`
- FinalDelay string `json:"FinalDelay"`
- IsCustomPalette string `json:"IsCustomPalette"`
- DitherMode string `json:"DitherMode"`
- } `json:"Gif"`
- } `json:"MuxConfig"`
- Audio struct {
- Codec string `json:"Codec"`
- Profile string `json:"Profile"`
- Samplerate string `json:"Samplerate"`
- Bitrate string `json:"Bitrate"`
- Channels string `json:"Channels"`
- Qscale string `json:"Qscale"`
- Volume struct {
- Level string `json:"Level"`
- Method string `json:"Method"`
- } `json:"Volume"`
- } `json:"Audio"`
- Video struct {
- Codec string `json:"Codec"`
- Profile string `json:"Profile"`
- Bitrate string `json:"Bitrate"`
- Crf string `json:"Crf"`
- Width string `json:"Width"`
- Height string `json:"Height"`
- Fps string `json:"Fps"`
- Gop string `json:"Gop"`
- Preset string `json:"Preset"`
- ScanMode string `json:"ScanMode"`
- Bufsize string `json:"Bufsize"`
- Maxrate string `json:"Maxrate"`
- PixFmt string `json:"PixFmt"`
- Degrain string `json:"Degrain"`
- Qscale string `json:"Qscale"`
- Crop string `json:"Crop"`
- Pad string `json:"Pad"`
- MaxFps string `json:"MaxFps"`
- BitrateBnd struct {
- Max string `json:"Max"`
- Min string `json:"Min"`
- } `json:"BitrateBnd"`
- } `json:"Video"`
- Container struct {
- Format string `json:"Format"`
- } `json:"Container"`
- Encryption struct {
- Type string `json:"Type"`
- Id string `json:"Id"`
- Key string `json:"Key"`
- KeyUri string `json:"KeyUri"`
- KeyType string `json:"KeyType"`
- SkipCnt string `json:"SkipCnt"`
- } `json:"Encryption"`
- WaterMarkList []struct {
- WaterMarkTemplateId string `json:"WaterMarkTemplateId"`
- Width string `json:"Width"`
- Height string `json:"Height"`
- Dx string `json:"Dx"`
- Dy string `json:"Dy"`
- ReferPos string `json:"ReferPos"`
- Type string `json:"Type"`
- InputFile struct {
- Bucket string `json:"Bucket"`
- Location string `json:"Location"`
- Object string `json:"Object"`
- } `json:"InputFile"`
- } `json:"WaterMarkList"`
- MergeList []struct {
- MergeURL string `json:"MergeURL"`
- Start string `json:"Start"`
- Duration string `json:"Duration"`
- RoleArn string `json:"RoleArn"`
- } `json:"MergeList"`
- OpeningList []struct {
- OpenUrl string `json:"openUrl"`
- Start string `json:"Start"`
- Width string `json:"Width"`
- Height string `json:"Height"`
- } `json:"OpeningList"`
- TailSlateList []struct {
- TailUrl string `json:"TailUrl"`
- Start string `json:"Start"`
- BlendDuration string `json:"BlendDuration"`
- Width string `json:"Width"`
- Height string `json:"Height"`
- IsMergeAudio bool `json:"IsMergeAudio"`
- BgColor string `json:"BgColor"`
- } `json:"TailSlateList"`
- } `json:"Output"`
- MNSMessageResult struct {
- MessageId string `json:"MessageId"`
- ErrorMessage string `json:"ErrorMessage"`
- ErrorCode string `json:"ErrorCode"`
- } `json:"MNSMessageResult"`
- } `json:"JobList"`
- }
- func CreateListJobRequest() (request *ListJobRequest) {
- request = &ListJobRequest{
- RpcRequest: &requests.RpcRequest{},
- }
- request.InitWithApiInfo("Mts", "2014-06-18", "ListJob", "", "")
- return
- }
- func CreateListJobResponse() (response *ListJobResponse) {
- response = &ListJobResponse{
- BaseResponse: &responses.BaseResponse{},
- }
- return
- }
|