Skip to content

Commit 31ac8d6

Browse files
committed
Merge branch 'dev-AnimationTask' into 'master' (merge request !6)
dev-AnimationTask
2 parents ff3b327 + 0263d6a commit 31ac8d6

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed

ci_media.go

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,25 @@ type Snapshot struct {
118118
Width string `xml:"Width,omitempty"`
119119
Height string `xml:"Height,omitempty"`
120120
}
121+
122+
// 有意和转码区分,两种任务关注的参数不一样避免干扰
123+
type AnimationVideo struct {
124+
Codec string `xml:"Codec"`
125+
Width string `xml:"Width"`
126+
Height string `xml:"Height"`
127+
Fps string `xml:"Fps"`
128+
AnimateOnlyKeepKeyFrame string `xml:"AnimateOnlyKeepKeyFrame"`
129+
AnimateTimeIntervalOfFrame string `xml:"AnimateTimeIntervalOfFrame"`
130+
AnimateFramesPerSecond string `xml:"AnimateFramesPerSecond"`
131+
Quality string `xml:"Quality"`
132+
}
133+
134+
type Animation struct {
135+
Container *Container `xml:"Container,omitempty"`
136+
Video *AnimationVideo `xml:"Video,omitempty"`
137+
TimeInterval *TimeInterval `xml:"TimeInterval,omitempty"`
138+
}
139+
121140
type MediaProcessJobOperation struct {
122141
Tag string `xml:"Tag,omitempty"`
123142
Output *JobOutput `xml:"Output,omitempty"`
@@ -127,6 +146,7 @@ type MediaProcessJobOperation struct {
127146
WatermarkTemplateId []string `xml:"WatermarkTemplateId,omitempty"`
128147
ConcatTemplate *ConcatTemplate `xml:"ConcatTemplate,omitempty"`
129148
Snapshot *Snapshot `xml:"Snapshot,omitempty"`
149+
Animation *Animation `xml:"Animation,omitempty"`
130150
}
131151

132152
type CreateMediaJobsOptions struct {

example/CI/media_process/media_process.go

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,27 @@ func InvokeMultiTasks() {
291291
},
292292
},
293293
},
294+
cos.MediaProcessJobOperation{
295+
Tag: "Animation",
296+
Output: &cos.JobOutput{
297+
Region: "ap-chongqing",
298+
Object: "output/go_117374C.gif",
299+
Bucket: "wwj-cq-1253960454",
300+
},
301+
Animation: &cos.Animation{
302+
Container: &cos.Container{
303+
Format: "gif",
304+
},
305+
Video: &cos.AnimationVideo{
306+
Codec: "gif",
307+
AnimateOnlyKeepKeyFrame: "true",
308+
},
309+
TimeInterval: &cos.TimeInterval{
310+
Start: "0",
311+
Duration: "",
312+
},
313+
},
314+
},
294315
},
295316
QueueId: "paaf4fce5521a40888a3034a5de80f6ca",
296317
}

0 commit comments

Comments
 (0)