@@ -15,10 +15,14 @@ import (
1515
1616// JobInput TODO
1717type JobInput struct {
18- Object string `xml:"Object,omitempty"`
19- Lang string `xml:"Lang,omitempty"`
20- Type string `xml:"Type,omitempty"`
21- BasicType string `xml:"BasicType,omitempty"`
18+ Object string `xml:"Object,omitempty"`
19+ Lang string `xml:"Lang,omitempty"`
20+ Type string `xml:"Type,omitempty"`
21+ BasicType string `xml:"BasicType,omitempty"`
22+ CosHeaders []struct {
23+ Key string `xml:"Key"`
24+ Value string `xml:"Value"`
25+ } `xml:"CosHeaders"`
2226}
2327
2428// StreamExtract TODO
@@ -128,12 +132,13 @@ type TransConfig struct {
128132
129133// Transcode TODO
130134type Transcode struct {
131- Container * Container `xml:"Container,omitempty"`
132- Video * Video `xml:"Video,omitempty"`
133- TimeInterval * TimeInterval `xml:"TimeInterval,omitempty"`
134- Audio * Audio `xml:"Audio,omitempty"`
135- TransConfig * TransConfig `xml:"TransConfig,omitempty"`
136- AudioMix * AudioMix `xml:"AudioMix,omitempty"`
135+ Container * Container `xml:"Container,omitempty"`
136+ Video * Video `xml:"Video,omitempty"`
137+ TimeInterval * TimeInterval `xml:"TimeInterval,omitempty"`
138+ Audio * Audio `xml:"Audio,omitempty"`
139+ TransConfig * TransConfig `xml:"TransConfig,omitempty"`
140+ AudioMix * AudioMix `xml:"AudioMix,omitempty"`
141+ AudioMixArray []AudioMix `xml:"AudioMixArray,omitempty"`
137142}
138143
139144// TranscodePro TODO
@@ -711,6 +716,12 @@ type MediaProcessJobOperation struct {
711716 VideoTargetRecResult * VideoTargetRecResult `xml:"VideoTargetRecResult,omitempty"`
712717 SegmentVideoBody * SegmentVideoBody `xml:"SegmentVideoBody,omitempty"`
713718 FreeTranscode string `xml:"FreeTranscode,omitempty"`
719+ PicProcess * PicProcess `xml:"PicProcess,omitempty"`
720+ PicProcessResult * PicProcessResult `xml:"PicProcessResult,omitempty"`
721+ PosterProduction * PosterProduction `xml:"PosterProduction,omitempty"`
722+ SpeechRecognition * SpeechRecognition `xml:"SpeechRecognition,omitempty"`
723+ SpeechRecognitionResult * SpeechRecognitionResult `xml:"SpeechRecognitionResult,omitempty"`
724+ SoundHoundResult * SoundHoundResult `xml:"SoundHoundResult,omitempty"`
714725}
715726
716727// CreatePicJobsOptions TODO
@@ -765,6 +776,13 @@ type MediaProcessJobDetail struct {
765776 QueueId string `xml:"QueueId,omitempty"`
766777 Input * JobInput `xml:"Input,omitempty"`
767778 Operation * MediaProcessJobOperation `xml:"Operation,omitempty"`
779+ SubTag string `xml:"SubTag,omitempty"`
780+ Workflow []struct {
781+ Name string `xml:"Name,omitempty"`
782+ RunId string `xml:"RunId,omitempty"`
783+ WorkflowId string `xml:"WorkflowId,omitempty"`
784+ WorkflowName string `xml:"WorkflowName,omitempty"`
785+ } `xml:"Workflow"`
768786}
769787
770788// CreatePicJobsResult TODO
@@ -1173,6 +1191,9 @@ type DescribeAIProcessBucketsOptions DescribeMediaProcessBucketsOptions
11731191// DescribeASRProcessBucketsOptions TODO
11741192type DescribeASRProcessBucketsOptions DescribeMediaProcessBucketsOptions
11751193
1194+ // DescribeFileProcessBucketsOptions TODO
1195+ type DescribeFileProcessBucketsOptions DescribeMediaProcessBucketsOptions
1196+
11761197// DescribeMediaProcessBucketsOptions TODO
11771198type DescribeMediaProcessBucketsOptions struct {
11781199 Regions string `url:"regions,omitempty"`
@@ -1222,6 +1243,16 @@ type DescribeASRProcessBucketsResult struct {
12221243 MediaBucketList []MediaProcessBucket `xml:"AsrBucketList,omitempty"`
12231244}
12241245
1246+ // DescribeFileProcessBucketsResult TODO
1247+ type DescribeFileProcessBucketsResult struct {
1248+ XMLName xml.Name `xml:"Response"`
1249+ RequestId string `xml:"RequestId,omitempty"`
1250+ TotalCount int `xml:"TotalCount,omitempty"`
1251+ PageNumber int `xml:"PageNumber,omitempty"`
1252+ PageSize int `xml:"PageSize,omitempty"`
1253+ FileBucketList []MediaProcessBucket `xml:"FileBucketList,omitempty"`
1254+ }
1255+
12251256// MediaProcessBucket TODO
12261257type MediaProcessBucket struct {
12271258 Name string `xml:"Name,omitempty"`
@@ -1287,6 +1318,20 @@ func (s *CIService) DescribeASRProcessBuckets(ctx context.Context, opt *Describe
12871318 return & res , resp , err
12881319}
12891320
1321+ // DescribeFileProcessBuckets TODO
1322+ func (s * CIService ) DescribeFileProcessBuckets (ctx context.Context , opt * DescribeFileProcessBucketsOptions ) (* DescribeFileProcessBucketsResult , * Response , error ) {
1323+ var res DescribeFileProcessBucketsResult
1324+ sendOpt := sendOptions {
1325+ baseURL : s .client .BaseURL .CIURL ,
1326+ uri : "/file_bucket" ,
1327+ optQuery : opt ,
1328+ method : http .MethodGet ,
1329+ result : & res ,
1330+ }
1331+ resp , err := s .client .send (ctx , & sendOpt )
1332+ return & res , resp , err
1333+ }
1334+
12901335// GetMediaInfoResult TODO
12911336type GetMediaInfoResult struct {
12921337 XMLName xml.Name `xml:"Response"`
@@ -1327,7 +1372,6 @@ type GenerateMediaInfoOptions struct {
13271372// GenerateMediaInfo TODO
13281373// 生成媒体信息接口,支持大文件,耗时较大请求
13291374func (s * CIService ) GenerateMediaInfo (ctx context.Context , opt * GenerateMediaInfoOptions ) (* GetMediaInfoResult , * Response , error ) {
1330-
13311375 var res GetMediaInfoResult
13321376 sendOpt := sendOptions {
13331377 baseURL : s .client .BaseURL .CIURL ,
@@ -1580,7 +1624,12 @@ type WorkflowNodeCondition struct {
15801624
15811625// SegmentVideoBody TODO
15821626type SegmentVideoBody struct {
1583- Mode string `xml:"Mode,omitempty"`
1627+ Mode string `xml:"Mode,omitempty"`
1628+ SegmentType string `xml:"SegmentType,omitempty"`
1629+ BackgroundBlue string `xml:"BackgroundBlue,omitempty"`
1630+ BackgroundRed string `xml:"BackgroundRed,omitempty"`
1631+ BackgroundGreen string `xml:"BackgroundGreen,omitempty"`
1632+ BackgroundLogoUrl string `xml:"BackgroundLogoUrl,omitempty"`
15841633}
15851634
15861635// NodeSmartCover TODO
@@ -3210,3 +3259,137 @@ func (s *CIService) DelImage(ctx context.Context, name string, opt *DelImageOpti
32103259 resp , err := s .client .send (ctx , & sendOpt )
32113260 return resp , err
32123261}
3262+
3263+ // CreateJobsOptions 提交任务的公用结构体
3264+ type CreateJobsOptions CreateMediaJobsOptions
3265+
3266+ // CreateJobsOptions 任务结果的公用结构体
3267+ type CreateJobsResult CreateMediaJobsResult
3268+
3269+ // CreateJobsOptions 提交任务的公用方法
3270+ func (s * CIService ) CreateJob (ctx context.Context , opt * CreateJobsOptions ) (* CreateJobsResult , * Response , error ) {
3271+ var res CreateJobsResult
3272+ sendOpt := sendOptions {
3273+ baseURL : s .client .BaseURL .CIURL ,
3274+ uri : "/jobs" ,
3275+ method : http .MethodPost ,
3276+ body : opt ,
3277+ result : & res ,
3278+ }
3279+ resp , err := s .client .send (ctx , & sendOpt )
3280+ return & res , resp , err
3281+ }
3282+
3283+ // CreateJobsOptions 提交任务的公用方法
3284+ func (s * CIService ) CancelJob (ctx context.Context , jobId string ) (* Response , error ) {
3285+ sendOpt := sendOptions {
3286+ baseURL : s .client .BaseURL .CIURL ,
3287+ uri : "/jobs/" + jobId + "?cancel" ,
3288+ method : http .MethodPut ,
3289+ }
3290+ resp , err := s .client .send (ctx , & sendOpt )
3291+ return resp , err
3292+ }
3293+
3294+ // DescribeJobsOptions 查询任务的公用选项
3295+ type DescribeJobsOptions DescribeMediaJobsOptions
3296+
3297+ // DescribeJobsResult 查询任务结果的公用结构体
3298+ type DescribeJobsResult DescribeMediaJobsResult
3299+
3300+ // DescribeJobs 查询任务列表的公用方法
3301+ func (s * CIService ) DescribeJobs (ctx context.Context , opt * DescribeJobsOptions ) (* DescribeJobsResult , * Response , error ) {
3302+ var res DescribeJobsResult
3303+ sendOpt := sendOptions {
3304+ baseURL : s .client .BaseURL .CIURL ,
3305+ uri : "/jobs" ,
3306+ optQuery : opt ,
3307+ method : http .MethodGet ,
3308+ result : & res ,
3309+ }
3310+ resp , err := s .client .send (ctx , & sendOpt )
3311+ return & res , resp , err
3312+ }
3313+
3314+ // DescribeJobs 查询指定任务的公用方法
3315+ func (s * CIService ) DescribeJob (ctx context.Context , jobid string ) (* DescribeJobsResult , * Response , error ) {
3316+ var res DescribeJobsResult
3317+ sendOpt := sendOptions {
3318+ baseURL : s .client .BaseURL .CIURL ,
3319+ uri : "/jobs/" + jobid ,
3320+ method : http .MethodGet ,
3321+ result : & res ,
3322+ }
3323+ resp , err := s .client .send (ctx , & sendOpt )
3324+ return & res , resp , err
3325+ }
3326+
3327+ // JobsNotifyBody TODO
3328+ type JobsNotifyBody struct {
3329+ XMLName xml.Name `xml:"Response"`
3330+ EventName string `xml:"EventName"`
3331+ JobsDetail []MediaProcessJobDetail `xml:"JobsDetail,omitempty"`
3332+ }
3333+
3334+ // ModifyM3U8TokenOptions TODO
3335+ type ModifyM3U8TokenOptions struct {
3336+ Token string `url:"token"`
3337+ }
3338+
3339+ // ModifyM3U8Token TODO
3340+ func (s * CIService ) ModifyM3U8Token (ctx context.Context , name string , opt * ModifyM3U8TokenOptions , id ... string ) (* Response , error ) {
3341+ var u string
3342+ if len (id ) == 1 {
3343+ u = fmt .Sprintf ("/%s?versionId=%s&ci-process=modifym3u8token" , encodeURIComponent (name ), id [0 ])
3344+ } else if len (id ) == 0 {
3345+ u = fmt .Sprintf ("/%s?ci-process=modifym3u8token" , encodeURIComponent (name ))
3346+ } else {
3347+ return nil , fmt .Errorf ("wrong params" )
3348+ }
3349+
3350+ sendOpt := sendOptions {
3351+ baseURL : s .client .BaseURL .BucketURL ,
3352+ uri : u ,
3353+ method : http .MethodGet ,
3354+ optQuery : opt ,
3355+ disableCloseBody : true ,
3356+ }
3357+ resp , err := s .client .send (ctx , & sendOpt )
3358+ return resp , err
3359+ }
3360+
3361+ // DescribeJobsOptions 查询模板的公用选项
3362+ type DescribeTemplateOptions DescribeMediaTemplateOptions
3363+
3364+ // DescribeJobsResult 查询模板结果的公用结构体
3365+ type DescribeTemplateResult DescribeMediaTemplateResult
3366+
3367+ // DescribeTemplate 搜索模板的公用方法
3368+ func (s * CIService ) DescribeTemplate (ctx context.Context , opt * DescribeTemplateOptions ) (* DescribeTemplateResult , * Response , error ) {
3369+ var res DescribeTemplateResult
3370+ sendOpt := sendOptions {
3371+ baseURL : s .client .BaseURL .CIURL ,
3372+ uri : "/template" ,
3373+ optQuery : opt ,
3374+ method : http .MethodGet ,
3375+ result : & res ,
3376+ }
3377+ resp , err := s .client .send (ctx , & sendOpt )
3378+ return & res , resp , err
3379+ }
3380+
3381+ // DescribeJobsResult 删除模板结果的公用结构体
3382+ type DeleteTemplateResult DeleteMediaTemplateResult
3383+
3384+ // DeleteTemplate 删除模板的公用方法
3385+ func (s * CIService ) DeleteTemplate (ctx context.Context , tempalteId string ) (* DeleteTemplateResult , * Response , error ) {
3386+ var res DeleteTemplateResult
3387+ sendOpt := sendOptions {
3388+ baseURL : s .client .BaseURL .CIURL ,
3389+ uri : "/template/" + tempalteId ,
3390+ method : http .MethodDelete ,
3391+ result : & res ,
3392+ }
3393+ resp , err := s .client .send (ctx , & sendOpt )
3394+ return & res , resp , err
3395+ }
0 commit comments