Browse Source

Supported GetMediaMeta for IMM.

sdk-team 6 years ago
parent
commit
b7868d3d70

+ 3 - 0
ChangeLog.txt

@@ -1,3 +1,6 @@
+2019-08-06 Version: 1.60.87
+- Supported GetMediaMeta for IMM.
+
 2019-08-06 Version: 1.60.86
 2019-08-06 Version: 1.60.86
 - Enhencement for CostOptimized scaling group.
 - Enhencement for CostOptimized scaling group.
 
 

+ 106 - 0
services/imm/get_media_meta.go

@@ -0,0 +1,106 @@
+package imm
+
+//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"
+)
+
+// GetMediaMeta invokes the imm.GetMediaMeta API synchronously
+// api document: https://help.aliyun.com/api/imm/getmediameta.html
+func (client *Client) GetMediaMeta(request *GetMediaMetaRequest) (response *GetMediaMetaResponse, err error) {
+	response = CreateGetMediaMetaResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// GetMediaMetaWithChan invokes the imm.GetMediaMeta API asynchronously
+// api document: https://help.aliyun.com/api/imm/getmediameta.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) GetMediaMetaWithChan(request *GetMediaMetaRequest) (<-chan *GetMediaMetaResponse, <-chan error) {
+	responseChan := make(chan *GetMediaMetaResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.GetMediaMeta(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// GetMediaMetaWithCallback invokes the imm.GetMediaMeta API asynchronously
+// api document: https://help.aliyun.com/api/imm/getmediameta.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) GetMediaMetaWithCallback(request *GetMediaMetaRequest, callback func(response *GetMediaMetaResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *GetMediaMetaResponse
+		var err error
+		defer close(result)
+		response, err = client.GetMediaMeta(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// GetMediaMetaRequest is the request struct for api GetMediaMeta
+type GetMediaMetaRequest struct {
+	*requests.RpcRequest
+	MediaUri string `position:"Query" name:"MediaUri"`
+	Project  string `position:"Query" name:"Project"`
+}
+
+// GetMediaMetaResponse is the response struct for api GetMediaMeta
+type GetMediaMetaResponse struct {
+	*responses.BaseResponse
+	RequestId string    `json:"RequestId" xml:"RequestId"`
+	MediaUri  string    `json:"MediaUri" xml:"MediaUri"`
+	MediaMeta MediaMeta `json:"MediaMeta" xml:"MediaMeta"`
+}
+
+// CreateGetMediaMetaRequest creates a request to invoke GetMediaMeta API
+func CreateGetMediaMetaRequest() (request *GetMediaMetaRequest) {
+	request = &GetMediaMetaRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("imm", "2017-09-06", "GetMediaMeta", "imm", "openAPI")
+	return
+}
+
+// CreateGetMediaMetaResponse creates a response to parse from GetMediaMeta response
+func CreateGetMediaMetaResponse() (response *GetMediaMetaResponse) {
+	response = &GetMediaMetaResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 105 - 0
services/imm/list_project_ap_is.go

@@ -0,0 +1,105 @@
+package imm
+
+//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"
+)
+
+// ListProjectAPIs invokes the imm.ListProjectAPIs API synchronously
+// api document: https://help.aliyun.com/api/imm/listprojectapis.html
+func (client *Client) ListProjectAPIs(request *ListProjectAPIsRequest) (response *ListProjectAPIsResponse, err error) {
+	response = CreateListProjectAPIsResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// ListProjectAPIsWithChan invokes the imm.ListProjectAPIs API asynchronously
+// api document: https://help.aliyun.com/api/imm/listprojectapis.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) ListProjectAPIsWithChan(request *ListProjectAPIsRequest) (<-chan *ListProjectAPIsResponse, <-chan error) {
+	responseChan := make(chan *ListProjectAPIsResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.ListProjectAPIs(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// ListProjectAPIsWithCallback invokes the imm.ListProjectAPIs API asynchronously
+// api document: https://help.aliyun.com/api/imm/listprojectapis.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) ListProjectAPIsWithCallback(request *ListProjectAPIsRequest, callback func(response *ListProjectAPIsResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *ListProjectAPIsResponse
+		var err error
+		defer close(result)
+		response, err = client.ListProjectAPIs(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// ListProjectAPIsRequest is the request struct for api ListProjectAPIs
+type ListProjectAPIsRequest struct {
+	*requests.RpcRequest
+	Project string `position:"Query" name:"Project"`
+}
+
+// ListProjectAPIsResponse is the response struct for api ListProjectAPIs
+type ListProjectAPIsResponse struct {
+	*responses.BaseResponse
+	RequestId string   `json:"RequestId" xml:"RequestId"`
+	Project   string   `json:"Project" xml:"Project"`
+	APIs      []string `json:"APIs" xml:"APIs"`
+}
+
+// CreateListProjectAPIsRequest creates a request to invoke ListProjectAPIs API
+func CreateListProjectAPIsRequest() (request *ListProjectAPIsRequest) {
+	request = &ListProjectAPIsRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("imm", "2017-09-06", "ListProjectAPIs", "imm", "openAPI")
+	return
+}
+
+// CreateListProjectAPIsResponse creates a response to parse from ListProjectAPIs response
+func CreateListProjectAPIsResponse() (response *ListProjectAPIsResponse) {
+	response = &ListProjectAPIsResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 21 - 0
services/imm/struct_ap_is.go

@@ -0,0 +1,21 @@
+package imm
+
+//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.
+
+// APIs is a nested struct in imm response
+type APIs struct {
+	APIs []string `json:"APIs" xml:"APIs"`
+}

+ 36 - 0
services/imm/struct_audio_stream.go

@@ -0,0 +1,36 @@
+package imm
+
+//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.
+
+// AudioStream is a nested struct in imm response
+type AudioStream struct {
+	Index          int    `json:"Index" xml:"Index"`
+	CodecName      string `json:"CodecName" xml:"CodecName"`
+	CodecLongName  string `json:"CodecLongName" xml:"CodecLongName"`
+	CodecTimeBase  string `json:"CodecTimeBase" xml:"CodecTimeBase"`
+	CodecTagString string `json:"CodecTagString" xml:"CodecTagString"`
+	CodecTag       string `json:"CodecTag" xml:"CodecTag"`
+	SampleFormat   string `json:"SampleFormat" xml:"SampleFormat"`
+	SampleRate     string `json:"SampleRate" xml:"SampleRate"`
+	Channels       int    `json:"Channels" xml:"Channels"`
+	ChannelLayout  string `json:"ChannelLayout" xml:"ChannelLayout"`
+	TimeBase       string `json:"TimeBase" xml:"TimeBase"`
+	StartTime      string `json:"StartTime" xml:"StartTime"`
+	Duration       string `json:"Duration" xml:"Duration"`
+	Bitrate        string `json:"Bitrate" xml:"Bitrate"`
+	Frames         string `json:"Frames" xml:"Frames"`
+	Language       string `json:"Language" xml:"Language"`
+}

+ 21 - 0
services/imm/struct_audio_streams.go

@@ -0,0 +1,21 @@
+package imm
+
+//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.
+
+// AudioStreams is a nested struct in imm response
+type AudioStreams struct {
+	AudioStream []AudioStream `json:"AudioStream" xml:"AudioStream"`
+}

+ 30 - 0
services/imm/struct_media_format.go

@@ -0,0 +1,30 @@
+package imm
+
+//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.
+
+// MediaFormat is a nested struct in imm response
+type MediaFormat struct {
+	NumberStreams  int    `json:"NumberStreams" xml:"NumberStreams"`
+	NumberPrograms int    `json:"NumberPrograms" xml:"NumberPrograms"`
+	FormatName     string `json:"FormatName" xml:"FormatName"`
+	FormatLongName string `json:"FormatLongName" xml:"FormatLongName"`
+	Size           string `json:"Size" xml:"Size"`
+	Duration       string `json:"Duration" xml:"Duration"`
+	StartTime      string `json:"StartTime" xml:"StartTime"`
+	Bitrate        string `json:"Bitrate" xml:"Bitrate"`
+	CreationTime   string `json:"CreationTime" xml:"CreationTime"`
+	Location       string `json:"Location" xml:"Location"`
+}

+ 22 - 0
services/imm/struct_media_meta.go

@@ -0,0 +1,22 @@
+package imm
+
+//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.
+
+// MediaMeta is a nested struct in imm response
+type MediaMeta struct {
+	MediaFormat  MediaFormat  `json:"MediaFormat" xml:"MediaFormat"`
+	MediaStreams MediaStreams `json:"MediaStreams" xml:"MediaStreams"`
+}

+ 23 - 0
services/imm/struct_media_streams.go

@@ -0,0 +1,23 @@
+package imm
+
+//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.
+
+// MediaStreams is a nested struct in imm response
+type MediaStreams struct {
+	VideoStreams    []VideoStream    `json:"VideoStreams" xml:"VideoStreams"`
+	AudioStreams    []AudioStream    `json:"AudioStreams" xml:"AudioStreams"`
+	SubtitleStreams []SubtitleStream `json:"SubtitleStreams" xml:"SubtitleStreams"`
+}

+ 22 - 0
services/imm/struct_subtitle_stream.go

@@ -0,0 +1,22 @@
+package imm
+
+//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.
+
+// SubtitleStream is a nested struct in imm response
+type SubtitleStream struct {
+	Index    int    `json:"Index" xml:"Index"`
+	Language string `json:"Language" xml:"Language"`
+}

+ 21 - 0
services/imm/struct_subtitle_streams.go

@@ -0,0 +1,21 @@
+package imm
+
+//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.
+
+// SubtitleStreams is a nested struct in imm response
+type SubtitleStreams struct {
+	SubtitleStream []SubtitleStream `json:"SubtitleStream" xml:"SubtitleStream"`
+}

+ 42 - 0
services/imm/struct_video_stream.go

@@ -0,0 +1,42 @@
+package imm
+
+//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.
+
+// VideoStream is a nested struct in imm response
+type VideoStream struct {
+	Index              int    `json:"Index" xml:"Index"`
+	Language           string `json:"Language" xml:"Language"`
+	CodecName          string `json:"CodecName" xml:"CodecName"`
+	CodecLongName      string `json:"CodecLongName" xml:"CodecLongName"`
+	Profile            string `json:"Profile" xml:"Profile"`
+	CodecTimeBase      string `json:"CodecTimeBase" xml:"CodecTimeBase"`
+	CodecTagString     string `json:"CodecTagString" xml:"CodecTagString"`
+	CodecTag           string `json:"CodecTag" xml:"CodecTag"`
+	Width              int    `json:"Width" xml:"Width"`
+	Height             int    `json:"Height" xml:"Height"`
+	HasBFrames         int    `json:"HasBFrames" xml:"HasBFrames"`
+	SampleAspectRatio  string `json:"SampleAspectRatio" xml:"SampleAspectRatio"`
+	DisplayAspectRatio string `json:"DisplayAspectRatio" xml:"DisplayAspectRatio"`
+	PixelFormat        string `json:"PixelFormat" xml:"PixelFormat"`
+	Level              int    `json:"Level" xml:"Level"`
+	FrameRrate         string `json:"FrameRrate" xml:"FrameRrate"`
+	AverageFrameRate   string `json:"AverageFrameRate" xml:"AverageFrameRate"`
+	TimeBase           string `json:"TimeBase" xml:"TimeBase"`
+	StartTime          string `json:"StartTime" xml:"StartTime"`
+	Duration           string `json:"Duration" xml:"Duration"`
+	Bitrate            string `json:"Bitrate" xml:"Bitrate"`
+	Frames             string `json:"Frames" xml:"Frames"`
+}

+ 21 - 0
services/imm/struct_video_streams.go

@@ -0,0 +1,21 @@
+package imm
+
+//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.
+
+// VideoStreams is a nested struct in imm response
+type VideoStreams struct {
+	VideoStream []VideoStream `json:"VideoStream" xml:"VideoStream"`
+}