@@ -16,6 +16,11 @@ import (
1616 "github.com/mitchellh/mapstructure"
1717)
1818
19+ type VodInfo struct {
20+ FileId string `xml:"FileId,omitempty"`
21+ SubAppId string `xml:"SubAppId,omitempty"`
22+ }
23+
1924// JobInput TODO
2025type JobInput struct {
2126 Object string `xml:"Object,omitempty"`
@@ -26,7 +31,8 @@ type JobInput struct {
2631 Key string `xml:"Key"`
2732 Value string `xml:"Value"`
2833 } `xml:"CosHeaders"`
29- Url string `xml:"Url,omitempty"`
34+ Url string `xml:"Url,omitempty"`
35+ Vod * VodInfo `xml:"Vod,omitempty"`
3036}
3137
3238// StreamExtract TODO
@@ -1475,6 +1481,10 @@ func (s *CIService) CreatePlayKey(ctx context.Context) (*PlayKeyResult, *Respons
14751481 return & res , resp , err
14761482}
14771483
1484+ func (s * CIService ) CreateMediaPlayKey (ctx context.Context ) (* PlayKeyResult , * Response , error ) {
1485+ return s .CreatePlayKey (ctx )
1486+ }
1487+
14781488func (s * CIService ) GetPlayKey (ctx context.Context ) (* PlayKeyResult , * Response , error ) {
14791489 var res PlayKeyResult
14801490 sendOpt := sendOptions {
@@ -1487,6 +1497,36 @@ func (s *CIService) GetPlayKey(ctx context.Context) (*PlayKeyResult, *Response,
14871497 return & res , resp , err
14881498}
14891499
1500+ func (s * CIService ) DescribeMediaPlayKey (ctx context.Context ) (* PlayKeyResult , * Response , error ) {
1501+ var res PlayKeyResult
1502+ sendOpt := sendOptions {
1503+ baseURL : s .client .BaseURL .CIURL ,
1504+ uri : "/playKey" ,
1505+ method : http .MethodGet ,
1506+ result : & res ,
1507+ }
1508+ resp , err := s .client .send (ctx , & sendOpt )
1509+ return & res , resp , err
1510+ }
1511+
1512+ type UpdateMediaPlayKeyOptions struct {
1513+ MasterPlayKey string `url:"masterPlayKey,omitempty"`
1514+ BackupPlayKey string `url:"backupPlayKey,omitempty"`
1515+ }
1516+
1517+ func (s * CIService ) UpdateMediaPlayKey (ctx context.Context , opt * UpdateMediaPlayKeyOptions ) (* PlayKeyResult , * Response , error ) {
1518+ var res PlayKeyResult
1519+ sendOpt := sendOptions {
1520+ baseURL : s .client .BaseURL .CIURL ,
1521+ uri : "/playKey" ,
1522+ method : http .MethodPut ,
1523+ optQuery : opt ,
1524+ result : & res ,
1525+ }
1526+ resp , err := s .client .send (ctx , & sendOpt )
1527+ return & res , resp , err
1528+ }
1529+
14901530// GenerateMediaInfoOptions TODO
14911531type GenerateMediaInfoOptions struct {
14921532 XMLName xml.Name `xml:"Request"`
@@ -3998,3 +4038,63 @@ type ImageOCRTextWordPolygon struct {
39984038 Y int `xml:"Y,omitempty"`
39994039 } `xml:"RightBottom,omitempty"`
40004040}
4041+
4042+ type LiveTanscodeVideo struct {
4043+ Codec string `xml:"Codec"`
4044+ Width string `xml:"Width,omitempty"`
4045+ Height string `xml:"Height,omitempty"`
4046+ Fps string `xml:"Fps,omitempty"`
4047+ Bitrate string `xml:"Bitrate,omitempty"`
4048+ Gop string `xml:"Gop,omitempty"`
4049+ Maxrate string `xml:"Maxrate,omitempty"`
4050+ }
4051+
4052+ type LiveTanscodeTransConfig struct {
4053+ InitialClipNum string `xml:"InitialClipNum,omitempty"`
4054+ CosTag string `xml:"CosTag,omitempty"`
4055+ HlsEncrypt * HlsEncrypt `xml:"HlsEncrypt,omitempty"`
4056+ }
4057+
4058+ type LiveTanscode struct {
4059+ Container * Container `xml:"Container,omitempty"`
4060+ Video * LiveTanscodeVideo `xml:"Video,omitempty"`
4061+ // TimeInterval *TimeInterval `xml:"TimeInterval,omitempty"`
4062+ // Audio *Audio `xml:"Audio,omitempty"`
4063+ TransConfig * LiveTanscodeTransConfig `xml:"TransConfig,omitempty"`
4064+ }
4065+
4066+ type GeneratePlayListJobOperation struct {
4067+ Tag string `xml:"Tag,omitempty"`
4068+ Output * JobOutput `xml:"Output,omitempty"`
4069+ MediaResult * MediaResult `xml:"MediaResult,omitempty"`
4070+ MediaInfo * MediaInfo `xml:"MediaInfo,omitempty"`
4071+ Transcode * LiveTanscode `xml:"Transcode,omitempty"`
4072+ UserData string `xml:"UserData,omitempty"`
4073+ JobLevel int `xml:"JobLevel,omitempty"`
4074+ }
4075+
4076+ type CreateGeneratePlayListJobOptions struct {
4077+ XMLName xml.Name `xml:"Request"`
4078+ Tag string `xml:"Tag,omitempty"`
4079+ Input * JobInput `xml:"Input,omitempty"`
4080+ Operation * GeneratePlayListJobOperation `xml:"Operation,omitempty"`
4081+ QueueId string `xml:"QueueId,omitempty"`
4082+ QueueType string `xml:"QueueType,omitempty"`
4083+ CallBackFormat string `xml:"CallBackFormat,omitempty"`
4084+ CallBackType string `xml:"CallBackType,omitempty"`
4085+ CallBack string `xml:"CallBack,omitempty"`
4086+ CallBackMqConfig * NotifyConfigCallBackMqConfig `xml:"CallBackMqConfig,omitempty"`
4087+ }
4088+
4089+ func (s * CIService ) CreateGeneratePlayListJob (ctx context.Context , opt * CreateGeneratePlayListJobOptions ) (* CreateJobsResult , * Response , error ) {
4090+ var res CreateJobsResult
4091+ sendOpt := sendOptions {
4092+ baseURL : s .client .BaseURL .CIURL ,
4093+ uri : "/jobs" ,
4094+ method : http .MethodPost ,
4095+ body : opt ,
4096+ result : & res ,
4097+ }
4098+ resp , err := s .client .send (ctx , & sendOpt )
4099+ return & res , resp , err
4100+ }
0 commit comments