Skip to content

Commit 7ab98e5

Browse files
authored
Merge pull request #242 from tencentyun/feature_jojoliang_b21eefa1
Feature jojoliang b21eefa1
2 parents 22cdbab + 151f6e5 commit 7ab98e5

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

ci_media.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,8 @@ type Subtitle struct {
460460

461461
// VideoTag TODO
462462
type VideoTag struct {
463-
Scenario string `xml:"Scenario,omitempty"`
463+
Scenario string `xml:"Scenario,omitempty"` // 1. Stream 2. ShortVideo
464+
Text string `xml:"Text,omitempty"`
464465
}
465466

466467
// VideoTagResult TODO
@@ -482,6 +483,7 @@ type VideoTagResultStreamDataData struct {
482483
PlaceTags []VideoTagResultStreamDataDataPlaceTags `xml:"PlaceTags,omitempty"`
483484
ActionTags []VideoTagResultStreamDataDataActionTags `xml:"ActionTags,omitempty"`
484485
ObjectTags []VideoTagResultStreamDataDataObjectTags `xml:"ObjectTags,omitempty"`
486+
Labels []VideoTagResultStreamDataDataLabels `xml:"Labels,omitempty"`
485487
}
486488

487489
// VideoTagResultStreamDataDataTags TODO
@@ -538,6 +540,12 @@ type VideoTagResultStreamDataDataObjectTags struct {
538540
TimeStamp string `xml:"TimeStamp,omitempty"`
539541
}
540542

543+
type VideoTagResultStreamDataDataLabels struct {
544+
First string `xml:"First,omitempty"`
545+
Second string `xml:"Second,omitempty"`
546+
Confidence float64 `xml:"Confidence,omitempty"`
547+
}
548+
541549
// QualityEstimate TODO
542550
type QualityEstimate struct {
543551
Score string `xml:"Score,omitempty"`

example/CI/workflow_and_job/jobs.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,11 +235,12 @@ func InvokeVideoTagJob() {
235235
createJobOpt := &cos.CreateJobsOptions{
236236
Tag: "VideoTag",
237237
Input: &cos.JobInput{
238-
Object: "input/test.mp4",
238+
Object: "50000453.mp4",
239239
},
240240
Operation: &cos.MediaProcessJobOperation{
241241
VideoTag: &cos.VideoTag{
242-
Scenario: "Stream",
242+
Scenario: "ShortVideo",
243+
Text: "今日周二!新冠病毒偏方治疗,希望对大家有帮助!",
243244
},
244245
},
245246
}

0 commit comments

Comments
 (0)