-
Notifications
You must be signed in to change notification settings - Fork 92
/
ci_media.go
4330 lines (3915 loc) · 161 KB
/
ci_media.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
package cos
import (
"bytes"
"context"
"encoding/json"
"encoding/xml"
"errors"
"fmt"
"net/http"
"sort"
"strings"
"time"
"github.com/clbanning/mxj"
"github.com/mitchellh/mapstructure"
)
type VodInfo struct {
FileId string `xml:"FileId,omitempty"`
SubAppId string `xml:"SubAppId,omitempty"`
}
// JobInput TODO
type JobInput struct {
Object string `xml:"Object,omitempty"`
Lang string `xml:"Lang,omitempty"`
Type string `xml:"Type,omitempty"`
BasicType string `xml:"BasicType,omitempty"`
CosHeaders []struct {
Key string `xml:"Key"`
Value string `xml:"Value"`
} `xml:"CosHeaders"`
Url string `xml:"Url,omitempty"`
Vod *VodInfo `xml:"Vod,omitempty"`
}
// StreamExtract TODO
type StreamExtract struct {
Index string `xml:"Index,omitempty"`
Object string `xml:"Object,omitempty"`
}
// JobOutput TODO
type JobOutput struct {
Region string `xml:"Region,omitempty"`
Bucket string `xml:"Bucket,omitempty"`
Object string `xml:"Object,omitempty"`
SpriteObject string `xml:"SpriteObject,omitempty"`
AuObject string `xml:"AuObject,omitempty"`
BassObject string `xml:"BassObject,omitempty"`
DrumObject string `xml:"DrumObject,omitempty"`
StreamExtract []StreamExtract `xml:"StreamExtract,omitempty"`
}
// ClipConfig TODO
type ClipConfig struct {
Duration string `xml:"Duration"`
}
// Container TODO
type Container struct {
Format string `xml:"Format,omitempty"`
ClipConfig *ClipConfig `xml:"ClipConfig,omitempty"`
}
// Video TODO
type Video struct {
Codec string `xml:"Codec"`
Width string `xml:"Width,omitempty"`
Height string `xml:"Height,omitempty"`
Fps string `xml:"Fps,omitempty"`
Remove string `xml:"Remove,omitempty"`
Profile string `xml:"Profile,omitempty"`
Bitrate string `xml:"Bitrate,omitempty"`
Crf string `xml:"Crf,omitempty"`
Gop string `xml:"Gop,omitempty"`
Preset string `xml:"Preset,omitempty"`
Bufsize string `xml:"Bufsize,omitempty"`
Maxrate string `xml:"Maxrate,omitempty"`
HlsTsTime string `xml:"HlsTsTime,omitempty"`
DashSegment string `xml:"DashSegment,omitempty"`
Pixfmt string `xml:"Pixfmt,omitempty"`
LongShortMode string `xml:"LongShortMode,omitempty"`
Rotate string `xml:"Rotate,omitempty"`
AnimateOnlyKeepKeyFrame string `xml:"AnimateOnlyKeepKeyFrame,omitempty"`
AnimateTimeIntervalOfFrame string `xml:"AnimateTimeIntervalOfFrame,omitempty"`
AnimateFramesPerSecond string `xml:"AnimateFramesPerSecond,omitempty"`
Quality string `xml:"Quality,omitempty"`
Roi string `xml:"Roi,omitempty"`
Crop string `xml:"Crop,omitempty"`
Interlaced string `xml:"Interlaced,omitempty"`
ColorParam *VideoColorParam `xml:"ColorParam,omitempty"`
}
type VideoColorParam struct {
ColorRange string `xml:"ColorRange,omitempty"`
ColorSpace string `xml:"ColorSpace,omitempty"`
ColorTrc string `xml:"ColorTrc,omitempty"`
ColorPrimaries string `xml:"ColorPrimaries,omitempty"`
}
// TranscodeProVideo TODO
type TranscodeProVideo struct {
Codec string `xml:"Codec,omitempty"`
Profile string `xml:"Profile,omitempty"`
Width string `xml:"Width,omitempty"`
Height string `xml:"Height,omitempty"`
Interlaced string `xml:"Interlaced,omitempty"`
Fps string `xml:"Fps,omitempty"`
Bitrate string `xml:"Bitrate,omitempty"`
Rotate string `xml:"Rotate,omitempty"`
}
// TimeInterval TODO
type TimeInterval struct {
Start string `xml:"Start,omitempty"`
Duration string `xml:"Duration,omitempty"`
}
// Audio TODO
type Audio struct {
Codec string `xml:"Codec,omitempty"`
Samplerate string `xml:"Samplerate,omitempty"`
Bitrate string `xml:"Bitrate,omitempty"`
Channels string `xml:"Channels,omitempty"`
Remove string `xml:"Remove,omitempty"`
KeepTwoTracks string `xml:"KeepTwoTracks,omitempty"`
SwitchTrack string `xml:"SwitchTrack,omitempty"`
SampleFormat string `xml:"SampleFormat,omitempty"`
}
// TranscodeProAudio TODO
type TranscodeProAudio struct {
Codec string `xml:"Codec,omitempty"`
Remove string `xml:"Remove,omitempty"`
}
// TransConfig TODO
type TransConfig struct {
AdjDarMethod string `xml:"AdjDarMethod,omitempty"`
IsCheckReso string `xml:"IsCheckReso,omitempty"`
ResoAdjMethod string `xml:"ResoAdjMethod,omitempty"`
IsCheckVideoBitrate string `xml:"IsCheckVideoBitrate,omitempty"`
VideoBitrateAdjMethod string `xml:"VideoBitrateAdjMethod,omitempty"`
IsCheckAudioBitrate string `xml:"IsCheckAudioBitrate,omitempty"`
AudioBitrateAdjMethod string `xml:"AudioBitrateAdjMethod,omitempty"`
DeleteMetadata string `xml:"DeleteMetadata,omitempty"`
IsHdr2Sdr string `xml:"IsHdr2Sdr,omitempty"`
HlsEncrypt *HlsEncrypt `xml:"HlsEncrypt,omitempty"`
}
// Transcode TODO
type Transcode struct {
Container *Container `xml:"Container,omitempty"`
Video *Video `xml:"Video,omitempty"`
TimeInterval *TimeInterval `xml:"TimeInterval,omitempty"`
Audio *Audio `xml:"Audio,omitempty"`
TransConfig *TransConfig `xml:"TransConfig,omitempty"`
AudioMix *AudioMix `xml:"AudioMix,omitempty"`
AudioMixArray []AudioMix `xml:"AudioMixArray,omitempty"`
}
// TranscodePro TODO
type TranscodePro struct {
Container *Container `xml:"Container,omitempty"`
Video *TranscodeProVideo `xml:"Video,omitempty"`
Audio *TranscodeProAudio `xml:"Audio,omitempty"`
TimeInterval *TimeInterval `xml:"TimeInterval,omitempty"`
TransConfig *TransConfig `xml:"TransConfig,omitempty"`
}
// WatermarkSlideConfig TODO
type WatermarkSlideConfig struct {
SlideMode string `xml:"SlideMode,omitempty"`
XSlideSpeed string `xml:"XSlideSpeed,omitempty"`
YSlideSpeed string `xml:"YSlideSpeed,omitempty"`
}
// Image TODO
type Image struct {
Url string `xml:"Url,omitempty"`
Mode string `xml:"Mode,omitempty"`
Width string `xml:"Width,omitempty"`
Height string `xml:"Height,omitempty"`
Transparency string `xml:"Transparency,omitempty"`
Background string `xml:"Background,omitempty"`
}
// Text TODO
type Text struct {
FontSize string `xml:"FontSize,omitempty"`
FontType string `xml:"FontType,omitempty"`
FontColor string `xml:"FontColor,omitempty"`
Transparency string `xml:"Transparency,omitempty"`
Text string `xml:"Text,omitempty"`
}
// TtsTpl TODO
type TtsTpl struct {
Mode string `xml:"Mode,omitempty"`
Codec string `xml:"Codec,omitempty"`
VoiceType string `xml:"VoiceType,omitempty"`
Volume string `xml:"Volume,omitempty"`
Speed string `xml:"Speed,omitempty"`
}
// TtsConfig TODO
type TtsConfig struct {
Input string `xml:"Input,omitempty"`
InputType string `xml:"InputType,omitempty"`
}
// Translation TODO
type Translation struct {
Lang string `xml:"Lang,omitempty"`
Type string `xml:"Type,omitempty"`
}
// WordsGeneralize TODO
type WordsGeneralize struct {
NerMethod string `xml:"NerMethod,omitempty"`
SegMethod string `xml:"SegMethod,omitempty"`
}
// WordsGeneralizeResult TODO
type WordsGeneralizeResult struct {
WordsGeneralizeLable []WordsGeneralizeResulteLable `xml:"WordsGeneralizeLable,omitempty"`
WordsGeneralizeToken []WordsGeneralizeResulteToken `xml:"WordsGeneralizeToken,omitempty"`
}
// WordsGeneralizeResulteLable TODO
type WordsGeneralizeResulteLable struct {
Category string `xml:"Category,omitempty"`
Word string `xml:"Word,omitempty"`
}
// WordsGeneralizeResulteToken TODO
type WordsGeneralizeResulteToken struct {
Length string `xml:"Length,omitempty"`
Offset string `xml:"Offset,omitempty"`
Pos string `xml:"Pos,omitempty"`
Word string `xml:"Word,omitempty"`
}
// Watermark TODO
type Watermark struct {
Type string `xml:"Type,omitempty"`
Pos string `xml:"Pos,omitempty"` // TopLeft:左上; Top:上居中; TopRight:右上; Left:左居中; Center:正中心; Right:右居中; BottomLeft:左下; Bottom:下居中; BottomRight:右下
LocMode string `xml:"LocMode,omitempty"`
Dx string `xml:"Dx,omitempty"`
Dy string `xml:"Dy,omitempty"`
StartTime string `xml:"StartTime,omitempty"`
EndTime string `xml:"EndTime,omitempty"`
SlideConfig *WatermarkSlideConfig `xml:"SlideConfig,omitempty"`
Image *Image `xml:"Image,omitempty"`
Text *Text `xml:"Text,omitempty"`
}
// EffectConfig TODO
type EffectConfig struct {
EnableStartFadein string `xml:"EnableStartFadein,omitempty"`
StartFadeinTime string `xml:"StartFadeinTime,omitempty"`
EnableEndFadeout string `xml:"EnableEndFadeout,omitempty"`
EndFadeoutTime string `xml:"EndFadeoutTime,omitempty"`
EnableBgmFade string `xml:"EnableBgmFade,omitempty"`
BgmFadeTime string `xml:"BgmFadeTime,omitempty"`
}
// AudioMix TODO
type AudioMix struct {
AudioSource string `xml:"AudioSource,omitempty"`
MixMode string `xml:"MixMode,omitempty"`
Replace string `xml:"Replace,omitempty"`
EffectConfig *EffectConfig `xml:"EffectConfig,omitempty"`
}
// ConcatFragment TODO
type ConcatFragment struct {
Url string `xml:"Url,omitempty"`
Mode string `xml:"Mode,omitempty"`
StartTime string `xml:"StartTime,omitempty"`
EndTime string `xml:"EndTime,omitempty"`
FragmentIndex string `xml:"FragmentIndex,omitempty"`
Duration string `xml:"Duration,omitempty"`
}
// ConcatTemplate TODO
type ConcatTemplate struct {
ConcatFragment []ConcatFragment `xml:"ConcatFragment,omitempty"`
Audio *Audio `xml:"Audio,omitempty"`
Video *Video `xml:"Video,omitempty"`
Container *Container `xml:"Container,omitempty"`
Index string `xml:"Index,omitempty"`
AudioMix *AudioMix `xml:"AudioMix,omitempty"`
AudioMixArray []AudioMix `xml:"AudioMixArray,omitempty"`
SceneChangeInfo *SceneChangeInfo `xml:"SceneChangeInfo,omitempty"`
DirectConcat string `xml:"DirectConcat,omitempty"`
}
// SceneChangeInfo 转场参数
type SceneChangeInfo struct {
Mode string `xml:"Mode,omitempty"`
Time string `xml:"Time,omitempty"`
}
// SpriteSnapshotConfig TODO
type SpriteSnapshotConfig struct {
CellHeight string `xml:"CellHeight,omitempty"`
CellWidth string `xml:"CellWidth,omitempty"`
Color string `xml:"Color,omitempty"`
Columns string `xml:"Columns,omitempty"`
Lines string `xml:"Lines,omitempty"`
Margin string `xml:"Margin,omitempty"`
Padding string `xml:"Padding,omitempty"`
ScaleMethod string `xml:"ScaleMethod,omitempty"`
}
// Snapshot TODO
type Snapshot struct {
Mode string `xml:"Mode,omitempty"`
Start string `xml:"Start,omitempty"`
TimeInterval string `xml:"TimeInterval,omitempty"`
Count string `xml:"Count,omitempty"`
Width string `xml:"Width,omitempty"`
Height string `xml:"Height,omitempty"`
CIParam string `xml:"CIParam,omitempty"`
IsCheckCount bool `xml:"IsCheckCount,omitempty"`
IsCheckBlack bool `xml:"IsCheckBlack,omitempty"`
BlackLevel string `xml:"BlackLevel,omitempty"`
PixelBlackThreshold string `xml:"PixelBlackThreshold,omitempty"`
SnapshotOutMode string `xml:"SnapshotOutMode,omitempty"`
SpriteSnapshotConfig *SpriteSnapshotConfig `xml:"SpriteSnapshotConfig,omitempty"`
}
// AnimationVideo TODO
// 有意和转码区分,两种任务关注的参数不一样避免干扰
type AnimationVideo struct {
Codec string `xml:"Codec,omitempty"`
Width string `xml:"Width,omitempty"`
Height string `xml:"Height,omitempty"`
Fps string `xml:"Fps,omitempty"`
AnimateOnlyKeepKeyFrame string `xml:"AnimateOnlyKeepKeyFrame,omitempty"`
AnimateTimeIntervalOfFrame string `xml:"AnimateTimeIntervalOfFrame,omitempty"`
AnimateFramesPerSecond string `xml:"AnimateFramesPerSecond,omitempty"`
Quality string `xml:"Quality,omitempty"`
}
// Animation TODO
type Animation struct {
Container *Container `xml:"Container,omitempty"`
Video *AnimationVideo `xml:"Video,omitempty"`
TimeInterval *TimeInterval `xml:"TimeInterval,omitempty"`
}
// HlsEncrypt TODO
type HlsEncrypt struct {
IsHlsEncrypt bool `xml:"IsHlsEncrypt,omitempty"`
UriKey string `xml:"UriKey,omitempty"`
}
// Segment TODO
type Segment struct {
Format string `xml:"Format,omitempty"`
Duration string `xml:"Duration,omitempty"`
TranscodeIndex string `xml:"TranscodeIndex,omitempty"`
HlsEncrypt *HlsEncrypt `xml:"HlsEncrypt,omitempty"`
StartTime string `xml:"StartTime,omitempty"`
EndTime string `xml:"EndTime,omitempty"`
}
// VideoMontageVideo TODO
type VideoMontageVideo struct {
Codec string `xml:"Codec"`
Width string `xml:"Width"`
Height string `xml:"Height"`
Fps string `xml:"Fps"`
Remove string `xml:"Remove,omitempty"`
Bitrate string `xml:"Bitrate"`
Crf string `xml:"Crf"`
}
// VideoMontage TODO
type VideoMontage struct {
Container *Container `xml:"Container,omitempty"`
Video *VideoMontageVideo `xml:"Video,omitempty"`
Audio *Audio `xml:"Audio,omitempty"`
Duration string `xml:"Duration,omitempty"`
Scene string `xml:"Scene,omitempty"`
AudioMix *AudioMix `xml:"AudioMix,omitempty"`
AudioMixArray []AudioMix `xml:"AudioMixArray,omitempty"`
}
// AudioConfig TODO
type AudioConfig struct {
Codec string `xml:"Codec"`
Samplerate string `xml:"Samplerate"`
Bitrate string `xml:"Bitrate"`
Channels string `xml:"Channels"`
}
// VoiceSeparate TODO
type VoiceSeparate struct {
AudioMode string `xml:"AudioMode,omitempty"` // IsAudio 人声, IsBackground 背景声, AudioAndBackground 人声和背景声
AudioConfig *AudioConfig `xml:"AudioConfig,omitempty"`
}
// ColorEnhance TODO
type ColorEnhance struct {
Enable string `xml:"Enable,omitempty"`
Contrast string `xml:"Contrast,omitempty"`
Correction string `xml:"Correction,omitempty"`
Saturation string `xml:"Saturation,omitempty"`
}
// MsSharpen TODO
type MsSharpen struct {
Enable string `xml:"Enable,omitempty"`
SharpenLevel string `xml:"SharpenLevel,omitempty"`
}
// VideoProcess TODO
type VideoProcess struct {
ColorEnhance *ColorEnhance `xml:"ColorEnhance,omitempty"`
MsSharpen *MsSharpen `xml:"MsSharpen,omitempty"`
}
// SDRtoHDR TODO
type SDRtoHDR struct {
HdrMode string `xml:"HdrMode,omitempty"` // HLG、HDR10
}
// SuperResolution TODO
type SuperResolution struct {
Resolution string `xml:"Resolution,omitempty"` // sdtohd、hdto4k
EnableScaleUp string `xml:"EnableScaleUp,omitempty"`
Version string `xml:"Version,omitempty"`
}
// DigitalWatermark TODO
type DigitalWatermark struct {
Message string `xml:"Message"`
Type string `xml:"Type"`
Version string `xml:"Version"`
}
// ExtractDigitalWatermark TODO
type ExtractDigitalWatermark struct {
Type string `xml:"Type"`
Version string `xml:"Version"`
}
// Subtitles TODO
type Subtitles struct {
Subtitle []Subtitle `xml:"Subtitle,omitempty"`
}
// Subtitle TODO
type Subtitle struct {
Url string `xml:"Url,omitempty"`
Embed string `xml:"Embed,omitempty"`
FontType string `xml:"FontType,omitempty"`
FontSize string `xml:"FontSize,omitempty"`
FontColor string `xml:"FontColor,omitempty"`
OutlineColor string `xml:"OutlineColor,omitempty"`
VMargin string `xml:"VMargin,omitempty"`
}
// VideoTag TODO
type VideoTag struct {
Scenario string `xml:"Scenario,omitempty"` // 1. Stream 2. ShortVideo
Text string `xml:"Text,omitempty"`
}
// VideoTagResult TODO
type VideoTagResult struct {
StreamData *VideoTagResultStreamData `xml:"StreamData,omitempty"`
}
// VideoTagResultStreamData TODO
type VideoTagResultStreamData struct {
SubErrCode string `xml:"SubErrCode,omitempty"`
SubErrMsg string `xml:"SubErrMsg,omitempty"`
Data *VideoTagResultStreamDataData `xml:"Data,omitempty"`
}
// VideoTagResultStreamDataData TODO
type VideoTagResultStreamDataData struct {
Tags []VideoTagResultStreamDataDataTags `xml:"Tags,omitempty"`
PersonTags []VideoTagResultStreamDataDataPersonTags `xml:"PersonTags,omitempty"`
PlaceTags []VideoTagResultStreamDataDataPlaceTags `xml:"PlaceTags,omitempty"`
ActionTags []VideoTagResultStreamDataDataActionTags `xml:"ActionTags,omitempty"`
ObjectTags []VideoTagResultStreamDataDataObjectTags `xml:"ObjectTags,omitempty"`
Labels []VideoTagResultStreamDataDataLabels `xml:"Labels,omitempty"`
}
// VideoTagResultStreamDataDataTags TODO
type VideoTagResultStreamDataDataTags struct {
Tag string `xml:"Tag,omitempty"`
TagCls string `xml:"TagCls,omitempty"`
Confidence float64 `xml:"Confidence,omitempty"`
}
// VideoTagResultStreamDataDataPersonTags TODO
type VideoTagResultStreamDataDataPersonTags struct {
Name string `xml:"Name,omitempty"`
Confidence float64 `xml:"Confidence,omitempty"`
Count string `xml:"Count,omitempty"`
DetailPerSecond []VideoTagResultStreamDataDataPersonTagsDetailPerSecond `xml:"DetailPerSecond,omitempty"`
}
// VideoTagResultStreamDataDataPersonTagsDetailPerSecond TODO
type VideoTagResultStreamDataDataPersonTagsDetailPerSecond struct {
TimeStamp string `xml:"TimeStamp,omitempty"`
Name string `xml:"Name,omitempty"`
Confidence float64 `xml:"Confidence,omitempty"`
BBox []VideoTagResultStreamDataDataPersonTagsDetailPerSecondBBox `xml:"BBox,omitempty"`
}
// VideoTagResultStreamDataDataPersonTags TODO
type VideoTagResultStreamDataDataPersonTagsDetailPerSecondBBox struct {
X1 string `xml:"X1,omitempty"`
X2 string `xml:"X2,omitempty"`
Y1 string `xml:"Y1,omitempty"`
Y2 string `xml:"Y2,omitempty"`
}
// VideoTagResultStreamDataDataPlaceTags TODO
type VideoTagResultStreamDataDataPlaceTags struct {
Tags []VideoTagResultStreamDataDataTags `xml:"Tags,omitempty"`
ClipFrameResult []string `xml:"ClipFrameResult,omitempty"`
StartTime string `xml:"StartTime,omitempty"`
EndTime string `xml:"EndTime,omitempty"`
StartIndex string `xml:"StartIndex,omitempty"`
EndIndex string `xml:"EndIndex,omitempty"`
}
// VideoTagResultStreamDataDataActionTags TODO
type VideoTagResultStreamDataDataActionTags struct {
Tags []VideoTagResultStreamDataDataTags `xml:"Tags,omitempty"`
StartTime string `xml:"StartTime,omitempty"`
EndTime string `xml:"EndTime,omitempty"`
}
// VideoTagResultStreamDataDataObjectTags TODO
type VideoTagResultStreamDataDataObjectTags struct {
Objects []VideoTagResultStreamDataDataPersonTagsDetailPerSecond `xml:"Objects,omitempty"`
TimeStamp string `xml:"TimeStamp,omitempty"`
}
type VideoTagResultStreamDataDataLabels struct {
First string `xml:"First,omitempty"`
Second string `xml:"Second,omitempty"`
Confidence float64 `xml:"Confidence,omitempty"`
}
// QualityEstimate TODO
type QualityEstimate struct {
Score string `xml:"Score,omitempty"`
VqaPlusResult struct {
NoAudio bool `xml:"NoAudio,omitempty"`
NoVideo bool `xml:"NoVideo,omitempty"`
DetailedResult []struct {
Type string `xml:"Type,omitempty"`
Items []struct {
Confidence int `xml:"Confidence,omitempty"`
StartTimeOffset float32 `xml:"StartTimeOffset,omitempty"`
EndTimeOffset float32 `xml:"EndTimeOffset,omitempty"`
AreaCoordSet []int `xml:"AreaCoordSet,omitempty"`
} `xml:"Items,omitempty"`
} `xml:"DetailedResult,omitempty"`
} `xml:"VqaPlusResult,omitempty"`
}
// QualityEstimate TODO
type QualityEstimateConfig struct {
Rotate string `xml:"Rotate,omitempty"`
Mode string `xml:"Mode,omitempty"`
}
// MediaResult TODO
type MediaResult struct {
OutputFile struct {
Bucket string `xml:"Bucket,omitempty"`
Md5Info []struct {
Md5 string `xml:"Md5,omitempty"`
ObjectName string `xml:"ObjectName,omitempty"`
} `xml:"Md5Info,omitempty"`
ObjectName []string `xml:"ObjectName,omitempty"`
ObjectPrefix string `xml:"ObjectPrefix,omitempty"`
Region string `xml:"Region,omitempty"`
SpriteOutputFile struct {
Bucket string `xml:"Bucket,omitempty"`
Md5Info []struct {
Md5 string `xml:"Md5,omitempty"`
ObjectName string `xml:"ObjectName,omitempty"`
} `xml:"Md5Info,omitempty"`
ObjectName []string `xml:"ObjectName,omitempty"`
ObjectPrefix string `xml:"ObjectPrefix,omitempty"`
Region string `xml:"Region,omitempty"`
} `xml:"SpriteOutputFile,omitempty"`
} `xml:"OutputFile,omitempty"`
}
// MediaInfo TODO
type MediaInfo struct {
Format struct {
Bitrate string `xml:"Bitrate"`
Duration string `xml:"Duration"`
FormatLongName string `xml:"FormatLongName"`
FormatName string `xml:"FormatName"`
NumProgram string `xml:"NumProgram"`
NumStream string `xml:"NumStream"`
Size string `xml:"Size"`
StartTime string `xml:"StartTime"`
} `xml:"Format"`
Stream struct {
Audio []struct {
Bitrate string `xml:"Bitrate"`
Channel string `xml:"Channel"`
ChannelLayout string `xml:"ChannelLayout"`
CodecLongName string `xml:"CodecLongName"`
CodecName string `xml:"CodecName"`
CodecTag string `xml:"CodecTag"`
CodecTagString string `xml:"CodecTagString"`
CodecTimeBase string `xml:"CodecTimeBase"`
Duration string `xml:"Duration"`
Index string `xml:"Index"`
Language string `xml:"Language"`
SampleFmt string `xml:"SampleFmt"`
SampleRate string `xml:"SampleRate"`
StartTime string `xml:"StartTime"`
Timebase string `xml:"Timebase"`
} `xml:"Audio"`
Subtitle string `xml:"Subtitle"`
Video []struct {
AvgFps string `xml:"AvgFps"`
Bitrate string `xml:"Bitrate"`
CodecLongName string `xml:"CodecLongName"`
CodecName string `xml:"CodecName"`
CodecTag string `xml:"CodecTag"`
CodecTagString string `xml:"CodecTagString"`
CodecTimeBase string `xml:"CodecTimeBase"`
Dar string `xml:"Dar"`
Duration string `xml:"Duration"`
Fps string `xml:"Fps"`
HasBFrame string `xml:"HasBFrame"`
Height string `xml:"Height"`
Index string `xml:"Index"`
Language string `xml:"Language"`
Level string `xml:"Level"`
NumFrames string `xml:"NumFrames"`
PixFormat string `xml:"PixFormat"`
Profile string `xml:"Profile"`
RefFrames string `xml:"RefFrames"`
Rotation string `xml:"Rotation"`
Sar string `xml:"Sar"`
StartTime string `xml:"StartTime"`
Timebase string `xml:"Timebase"`
Width string `xml:"Width"`
ColorRange string `xml:"ColorRange"`
ColorTransfer string `xml:"ColorTransfer"`
ColorPrimaries string `xml:"ColorPrimaries"`
} `xml:"Video"`
} `xml:"Stream"`
}
// PicProcess TODO
type PicProcess struct {
IsPicInfo string `xml:"IsPicInfo,omitempty"`
ProcessRule string `xml:"ProcessRule,omitempty"`
}
// PicProcessResult TODO
type PicProcessResult struct {
UploadResult struct {
OriginalInfo struct {
Key string `xml:"Key"`
Location string `xml:"Location"`
ETag string `xml:"ETag"`
ImageInfo struct {
Format string `xml:"Format"`
Width int32 `xml:"Width"`
Height int32 `xml:"Height"`
Quality int32 `xml:"Quality"`
Ave string `xml:"Ave"`
Orientation int32 `xml:"Orientation"`
} `xml:"ImageInfo"`
} `xml:"OriginalInfo"`
ProcessResults struct {
Object struct {
Key string `xml:"Key"`
Location string `xml:"Location"`
Format string `xml:"Format"`
Width int32 `xml:"Width"`
Height int32 `xml:"Height"`
Size int32 `xml:"Size"`
Quality int32 `xml:"Quality"`
Etag string `xml:"Etag"`
} `xml:"Object"`
} `xml:"ProcessResults"`
} `xml:"UploadResult"`
}
// PosterProduction TODO
type PosterProduction struct {
TemplateId string `xml:"TemplateId,omitempty"`
Info interface{} `xml:"Info,omitempty"`
}
// PicProcessJobOperation TODO
type PicProcessJobOperation struct {
TemplateId string `xml:"TemplateId,omitempty"`
PicProcess *PicProcess `xml:"PicProcess,omitempty"`
Output *JobOutput `xml:"Output,omitempty"`
UserData string `xml:"UserData,omitempty"`
JobLevel int `xml:"JobLevel,omitempty"`
PicProcessResult *PicProcessResult `xml:"PicProcessResult,omitempty"`
PosterProduction *PosterProduction `xml:"PosterProduction,omitempty"`
}
// MediaProcessJobOperation TODO
type MediaProcessJobOperation struct {
Tag string `xml:"Tag,omitempty"`
Output *JobOutput `xml:"Output,omitempty"`
MediaResult *MediaResult `xml:"MediaResult,omitempty"`
MediaInfo *MediaInfo `xml:"MediaInfo,omitempty"`
Transcode *Transcode `xml:"Transcode,omitempty"`
Watermark []Watermark `xml:"Watermark,omitempty"`
TemplateId string `xml:"TemplateId,omitempty"`
WatermarkTemplateId []string `xml:"WatermarkTemplateId,omitempty"`
ConcatTemplate *ConcatTemplate `xml:"ConcatTemplate,omitempty"`
Snapshot *Snapshot `xml:"Snapshot,omitempty"`
Animation *Animation `xml:"Animation,omitempty"`
Segment *Segment `xml:"Segment,omitempty"`
VideoMontage *VideoMontage `xml:"VideoMontage,omitempty"`
VoiceSeparate *VoiceSeparate `xml:"VoiceSeparate,omitempty"`
VideoProcess *VideoProcess `xml:"VideoProcess,omitempty"`
TranscodeTemplateId string `xml:"TranscodeTemplateId,omitempty"` // 视频增强、超分、SDRtoHDR任务类型,可以选择转码模板相关参数
SDRtoHDR *SDRtoHDR `xml:"SDRtoHDR,omitempty"`
SuperResolution *SuperResolution `xml:"SuperResolution,omitempty"`
DigitalWatermark *DigitalWatermark `xml:"DigitalWatermark,omitempty"`
ExtractDigitalWatermark *ExtractDigitalWatermark `xml:"ExtractDigitalWatermark,omitempty"`
VideoTag *VideoTag `xml:"VideoTag,omitempty"`
VideoTagResult *VideoTagResult `xml:"VideoTagResult,omitempty"`
SmartCover *NodeSmartCover `xml:"SmartCover,omitempty"`
UserData string `xml:"UserData,omitempty"`
JobLevel int `xml:"JobLevel,omitempty"`
QualityEstimate *QualityEstimate `xml:"QualityEstimate,omitempty"`
TtsTpl *TtsTpl `xml:"TtsTpl,omitempty"`
TtsConfig *TtsConfig `xml:"TtsConfig,omitempty"`
Translation *Translation `xml:"Translation,omitempty"`
WordsGeneralize *WordsGeneralize `xml:"WordsGeneralize,omitempty"`
WordsGeneralizeResult *WordsGeneralizeResult `xml:"WordsGeneralizeResult,omitempty"`
QualityEstimateConfig *QualityEstimateConfig `xml:"QualityEstimateConfig,omitempty"`
NoiseReduction *NoiseReduction `xml:"NoiseReduction,omitempty"`
SplitVideoParts *SplitVideoParts `xml:"SplitVideoParts,omitempty"`
SplitVideoInfoResult *SplitVideoInfoResult `xml:"SplitVideoInfoResult,omitempty"`
Subtitles *Subtitles `xml:"Subtitles,omitempty"`
VideoEnhance *VideoEnhance `xml:"VideoEnhance,omitempty"`
VideoTargetRec *VideoTargetRec `xml:"VideoTargetRec,omitempty"`
VideoTargetRecResult *VideoTargetRecResult `xml:"VideoTargetRecResult,omitempty"`
SegmentVideoBody *SegmentVideoBody `xml:"SegmentVideoBody,omitempty"`
FreeTranscode string `xml:"FreeTranscode,omitempty"`
PicProcess *PicProcess `xml:"PicProcess,omitempty"`
PicProcessResult *PicProcessResult `xml:"PicProcessResult,omitempty"`
PosterProduction *PosterProduction `xml:"PosterProduction,omitempty"`
SpeechRecognition *SpeechRecognition `xml:"SpeechRecognition,omitempty"`
SpeechRecognitionResult *SpeechRecognitionResult `xml:"SpeechRecognitionResult,omitempty"`
SoundHoundResult *SoundHoundResult `xml:"SoundHoundResult,omitempty"`
FillConcat *FillConcat `xml:"FillConcat,omitempty"`
VideoSynthesis *VideoSynthesis `xml:"VideoSynthesis,omitempty"`
DnaConfig *DnaConfig `xml:"DnaConfig,omitempty"`
DnaResult *DnaResult `xml:"DnaResult,omitempty"`
VocalScore *VocalScore `xml:"VocalScore,omitempty"`
VocalScoreResult *VocalScoreResult `xml:"VocalScoreResult,omitempty"`
ImageInspect *ImageInspect `xml:"ImageInspect,omitempty"`
ImageInspectResult *ImageInspectResult `xml:"ImageInspectResult,omitempty"`
SnapshotPrefix string `xml:"SnapshotPrefix,omitempty"`
ImageOCR *ImageOCRTemplate `xml:"ImageOCR,omitempty"`
Detection *ImageOCRDetection `xml:"Detection,omitempty"`
}
// CreatePicJobsOptions TODO
type CreatePicJobsOptions struct {
XMLName xml.Name `xml:"Request"`
Tag string `xml:"Tag,omitempty"`
Input *JobInput `xml:"Input,omitempty"`
Operation *PicProcessJobOperation `xml:"Operation,omitempty"`
QueueId string `xml:"QueueId,omitempty"`
CallBack string `xml:"CallBack,omitempty"`
QueueType string `xml:"QueueType,omitempty"`
CallBackFormat string `xml:"CallBackFormat,omitempty"`
CallBackType string `xml:"CallBackType,omitempty"`
CallBackMqConfig *NotifyConfigCallBackMqConfig `xml:"CallBackMqConfig,omitempty"`
CallBackKafkaConfig *KafkaConfig `xml:"CallBackKafkaConfig,omitempty"`
}
// CreateAIJobsOptions TODO
type CreateAIJobsOptions CreateMediaJobsOptions
// CreateMediaJobsOptions TODO
type CreateMediaJobsOptions struct {
XMLName xml.Name `xml:"Request"`
Tag string `xml:"Tag,omitempty"`
Input *JobInput `xml:"Input,omitempty"`
Operation *MediaProcessJobOperation `xml:"Operation,omitempty"`
QueueId string `xml:"QueueId,omitempty"`
QueueType string `xml:"QueueType,omitempty"`
CallBackFormat string `xml:"CallBackFormat,omitempty"`
CallBackType string `xml:"CallBackType,omitempty"`
CallBack string `xml:"CallBack,omitempty"`
CallBackMqConfig *NotifyConfigCallBackMqConfig `xml:"CallBackMqConfig,omitempty"`
CallBackKafkaConfig *KafkaConfig `xml:"CallBackKafkaConfig,omitempty"`
}
// NotifyConfigCallBackMqConfig TODO
type NotifyConfigCallBackMqConfig struct {
MqMode string `xml:"MqMode,omitempty"`
MqRegion string `xml:"MqRegion,omitempty"`
MqName string `xml:"MqName,omitempty"`
}
// MediaProcessJobDetail TODO
type MediaProcessJobDetail struct {
Code string `xml:"Code,omitempty"`
Message string `xml:"Message,omitempty"`
JobId string `xml:"JobId,omitempty"`
Tag string `xml:"Tag,omitempty"`
Progress string `xml:"Progress,omitempty"`
State string `xml:"State,omitempty"`
CreationTime string `xml:"CreationTime,omitempty"`
StartTime string `xml:"StartTime,omitempty"`
EndTime string `xml:"EndTime,omitempty"`
QueueId string `xml:"QueueId,omitempty"`
Input *JobInput `xml:"Input,omitempty"`
Operation *MediaProcessJobOperation `xml:"Operation,omitempty"`
SubTag string `xml:"SubTag,omitempty"`
Workflow []struct {
Name string `xml:"Name,omitempty"`
RunId string `xml:"RunId,omitempty"`
WorkflowId string `xml:"WorkflowId,omitempty"`
WorkflowName string `xml:"WorkflowName,omitempty"`
} `xml:"Workflow"`
}
// CreatePicJobsResult TODO
type CreatePicJobsResult CreateMediaJobsResult
// CreateAIJobsResult TODO
type CreateAIJobsResult CreateMediaJobsResult
// CreateMediaJobsResult TODO
type CreateMediaJobsResult struct {
XMLName xml.Name `xml:"Response"`
JobsDetail *MediaProcessJobDetail `xml:"JobsDetail,omitempty"`
}
// CreateMultiMediaJobsOptions TODO
type CreateMultiMediaJobsOptions struct {
XMLName xml.Name `xml:"Request"`
Tag string `xml:"Tag,omitempty"`
Input *JobInput `xml:"Input,omitempty"`
Operation []MediaProcessJobOperation `xml:"Operation,omitempty"`
QueueId string `xml:"QueueId,omitempty"`
QueueType string `xml:"QueueType,omitempty"`
CallBackFormat string `xml:"CallBackFormat,omitempty"`
CallBackType string `xml:"CallBackType,omitempty"`
CallBack string `xml:"CallBack,omitempty"`
CallBackMqConfig *NotifyConfigCallBackMqConfig `xml:"CallBackMqConfig,omitempty"`
CallBackKafkaConfig *KafkaConfig `xml:"CallBackKafkaConfig,omitempty"`
}
// CreateMultiMediaJobsResult TODO
type CreateMultiMediaJobsResult struct {
XMLName xml.Name `xml:"Response"`
JobsDetail []MediaProcessJobDetail `xml:"JobsDetail,omitempty"`
}
// MediaProcessJobsNotifyBody TODO
type MediaProcessJobsNotifyBody struct {
XMLName xml.Name `xml:"Response"`
EventName string `xml:"EventName"`
JobsDetail *MediaProcessJobDetail `xml:"JobsDetail,omitempty"`
}
// WorkflowExecutionNotifyBody TODO
type WorkflowExecutionNotifyBody struct {
XMLName xml.Name `xml:"Response"`
EventName string `xml:"EventName"`
WorkflowExecution struct {
RunId string `xml:"RunId"`
BucketId string `xml:"BucketId"`
Object string `xml:"Object"`
CosHeaders []struct {
Key string `xml:"Key"`
Value string `xml:"Value"`
} `xml:"CosHeaders"`
WorkflowId string `xml:"WorkflowId"`
WorkflowName string `xml:"WorkflowName"`
CreateTime string `xml:"CreateTime"`
State string `xml:"State"`
Tasks []struct {
Type string `xml:"Type"`
CreateTime string `xml:"CreateTime"`
EndTime string `xml:"EndTime"`
State string `xml:"State"`
JobId string `xml:"JobId"`
Name string `xml:"Name"`
TemplateId string `xml:"TemplateId"`
TemplateName string `xml:"TemplateName"`
TranscodeTemplateId string `xml:"TranscodeTemplateId,omitempty"`
TranscodeTemplateName string `xml:"TranscodeTemplateName,omitempty"`
HdrMode string `xml:"HdrMode,omitempty"`
ResultInfo struct {
ObjectCount int `xml:"ObjectCount"`
SpriteObjectCount int `xml:"SpriteObjectCount"`
ObjectInfo []struct {
ObjectName string `xml:"ObjectName"`
ObjectUrl string `xml:"ObjectUrl"`
InputObjectName string `xml:"InputObjectName"`
Code string `xml:"Code"`
Message string `xml:"Message"`
ImageOcrResult *ImageOCRDetection `xml:"ImageOcrResult,omitempty"`
} `xml:"ObjectInfo,omitempty"`
SpriteObjectInfo []struct {
ObjectName string `xml:"ObjectName"`
ObjectUrl string `xml:"ObjectUrl"`
InputObjectName string `xml:"InputObjectName"`
Code string `xml:"Code"`
Message string `xml:"Message"`
} `xml:"SpriteObjectInfo,omitempty"`
} `xml:"ResultInfo,omitempty"`
} `xml:"Tasks"`
} `xml:"WorkflowExecution"`
}
// CreateMultiMediaJobs TODO
func (s *CIService) CreateMultiMediaJobs(ctx context.Context, opt *CreateMultiMediaJobsOptions) (*CreateMultiMediaJobsResult, *Response, error) {
var res CreateMultiMediaJobsResult
sendOpt := sendOptions{
baseURL: s.client.BaseURL.CIURL,
uri: "/jobs",
method: http.MethodPost,
body: opt,
result: &res,
}
resp, err := s.client.send(ctx, &sendOpt)
return &res, resp, err
}
// CreateMediaJobs TODO
func (s *CIService) CreateMediaJobs(ctx context.Context, opt *CreateMediaJobsOptions) (*CreateMediaJobsResult, *Response, error) {
var res CreateMediaJobsResult
sendOpt := sendOptions{
baseURL: s.client.BaseURL.CIURL,
uri: "/jobs",
method: http.MethodPost,
body: opt,
result: &res,
}
resp, err := s.client.send(ctx, &sendOpt)
return &res, resp, err
}
// CreatePicProcessJobs TODO
func (s *CIService) CreatePicProcessJobs(ctx context.Context, opt *CreatePicJobsOptions) (*CreatePicJobsResult, *Response, error) {
var res CreatePicJobsResult
sendOpt := sendOptions{
baseURL: s.client.BaseURL.CIURL,
uri: "/pic_jobs",
method: http.MethodPost,
body: opt,
result: &res,
}
resp, err := s.client.send(ctx, &sendOpt)
return &res, resp, err
}
// CreateAIJobs TODO
func (s *CIService) CreateAIJobs(ctx context.Context, opt *CreateAIJobsOptions) (*CreateAIJobsResult, *Response, error) {
var res CreateAIJobsResult
sendOpt := sendOptions{
baseURL: s.client.BaseURL.CIURL,
uri: "/ai_jobs",
method: http.MethodPost,
body: opt,
result: &res,
}
resp, err := s.client.send(ctx, &sendOpt)
return &res, resp, err
}
// DescribePicProcessJobResult TODO
type DescribePicProcessJobResult DescribeMediaProcessJobResult
// DescribeAIJobResult TODO
type DescribeAIJobResult DescribeMediaProcessJobResult
// DescribeMediaProcessJobResult TODO