| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184 |
- 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) SubmitAnalysisJob(request *SubmitAnalysisJobRequest) (response *SubmitAnalysisJobResponse, err error) {
- response = CreateSubmitAnalysisJobResponse()
- err = client.DoAction(request, response)
- return
- }
- func (client *Client) SubmitAnalysisJobWithChan(request *SubmitAnalysisJobRequest) (<-chan *SubmitAnalysisJobResponse, <-chan error) {
- responseChan := make(chan *SubmitAnalysisJobResponse, 1)
- errChan := make(chan error, 1)
- err := client.AddAsyncTask(func() {
- defer close(responseChan)
- defer close(errChan)
- response, err := client.SubmitAnalysisJob(request)
- responseChan <- response
- errChan <- err
- })
- if err != nil {
- errChan <- err
- close(responseChan)
- close(errChan)
- }
- return responseChan, errChan
- }
- func (client *Client) SubmitAnalysisJobWithCallback(request *SubmitAnalysisJobRequest, callback func(response *SubmitAnalysisJobResponse, err error)) <-chan int {
- result := make(chan int, 1)
- err := client.AddAsyncTask(func() {
- var response *SubmitAnalysisJobResponse
- var err error
- defer close(result)
- response, err = client.SubmitAnalysisJob(request)
- callback(response, err)
- result <- 1
- })
- if err != nil {
- defer close(result)
- callback(nil, err)
- result <- 0
- }
- return result
- }
- type SubmitAnalysisJobRequest struct {
- *requests.RpcRequest
- Input string `position:"Query" name:"Input"`
- UserData string `position:"Query" name:"UserData"`
- ResourceOwnerId string `position:"Query" name:"ResourceOwnerId"`
- AnalysisConfig string `position:"Query" name:"AnalysisConfig"`
- ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"`
- OwnerAccount string `position:"Query" name:"OwnerAccount"`
- Action string `position:"Query" name:"Action"`
- OwnerId string `position:"Query" name:"OwnerId"`
- Priority string `position:"Query" name:"Priority"`
- AccessKeyId string `position:"Query" name:"AccessKeyId"`
- PipelineId string `position:"Query" name:"PipelineId"`
- }
- type SubmitAnalysisJobResponse struct {
- *responses.BaseResponse
- RequestId string `json:"RequestId"`
- AnalysisJob struct {
- Id string `json:"Id"`
- UserData string `json:"UserData"`
- State string `json:"State"`
- Code string `json:"Code"`
- Message string `json:"Message"`
- Percent int64 `json:"Percent"`
- CreationTime string `json:"CreationTime"`
- PipelineId string `json:"PipelineId"`
- Priority string `json:"Priority"`
- InputFile struct {
- Bucket string `json:"Bucket"`
- Location string `json:"Location"`
- Object string `json:"Object"`
- } `json:"InputFile"`
- AnalysisConfig struct {
- QualityControl struct {
- RateQuality string `json:"RateQuality"`
- MethodStreaming string `json:"MethodStreaming"`
- } `json:"QualityControl"`
- PropertiesControl struct {
- Deinterlace string `json:"Deinterlace"`
- Crop struct {
- Mode string `json:"Mode"`
- Width string `json:"Width"`
- Height string `json:"Height"`
- Top string `json:"Top"`
- Left string `json:"Left"`
- } `json:"Crop"`
- } `json:"PropertiesControl"`
- } `json:"AnalysisConfig"`
- MNSMessageResult struct {
- MessageId string `json:"MessageId"`
- ErrorMessage string `json:"ErrorMessage"`
- ErrorCode string `json:"ErrorCode"`
- } `json:"MNSMessageResult"`
- TemplateList []struct {
- Id string `json:"Id"`
- Name string `json:"Name"`
- State string `json:"State"`
- Container struct {
- Format string `json:"Format"`
- } `json:"Container"`
- 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"`
- BitrateBnd struct {
- Max string `json:"Max"`
- Min string `json:"Min"`
- } `json:"BitrateBnd"`
- } `json:"Video"`
- 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"`
- } `json:"Audio"`
- TransConfig struct {
- TransMode string `json:"TransMode"`
- } `json:"TransConfig"`
- MuxConfig struct {
- Segment struct {
- Duration string `json:"Duration"`
- } `json:"Segment"`
- Gif struct {
- Loop string `json:"Loop"`
- FinalDelay string `json:"FinalDelay"`
- } `json:"Gif"`
- } `json:"MuxConfig"`
- } `json:"TemplateList"`
- } `json:"AnalysisJob"`
- }
- func CreateSubmitAnalysisJobRequest() (request *SubmitAnalysisJobRequest) {
- request = &SubmitAnalysisJobRequest{
- RpcRequest: &requests.RpcRequest{},
- }
- request.InitWithApiInfo("Mts", "2014-06-18", "SubmitAnalysisJob", "", "")
- return
- }
- func CreateSubmitAnalysisJobResponse() (response *SubmitAnalysisJobResponse) {
- response = &SubmitAnalysisJobResponse{
- BaseResponse: &responses.BaseResponse{},
- }
- return
- }
|