@@ -4,9 +4,8 @@ import "github.com/admpub/transcoder"
4
4
5
5
// Metadata ...
6
6
type Metadata struct {
7
- Format Format `json:"format"`
8
- Streams []Streams `json:"streams"`
9
- Infos map [string ]string `json:"infos"`
7
+ Format Format `json:"format"`
8
+ Streams []Streams `json:"streams"`
10
9
}
11
10
12
11
// Format ...
@@ -26,34 +25,36 @@ type Format struct {
26
25
// Streams ...
27
26
type Streams struct {
28
27
Index int
29
- ID string `json:"id"`
30
- CodecName string `json:"codec_name"`
31
- CodecLongName string `json:"codec_long_name"`
32
- Profile string `json:"profile"`
33
- CodecType string `json:"codec_type"`
34
- CodecTimeBase string `json:"codec_time_base"`
35
- CodecTagString string `json:"codec_tag_string"`
36
- CodecTag string `json:"codec_tag"`
37
- Width int `json:"width"`
38
- Height int `json:"height"`
39
- CodedWidth int `json:"coded_width"`
40
- CodedHeight int `json:"coded_height"`
41
- HasBFrames int `json:"has_b_frames"`
42
- SampleAspectRatio string `json:"sample_aspect_ratio"`
43
- DisplayAspectRatio string `json:"display_aspect_ratio"`
44
- PixFmt string `json:"pix_fmt"`
45
- Level int `json:"level"`
46
- ChromaLocation string `json:"chroma_location"`
47
- Refs int `json:"refs"`
48
- QuarterSample string `json:"quarter_sample"`
49
- DivxPacked string `json:"divx_packed"`
50
- RFrameRrate string `json:"r_frame_rate"`
51
- AvgFrameRate string `json:"avg_frame_rate"`
52
- TimeBase string `json:"time_base"`
53
- DurationTs int `json:"duration_ts"`
54
- Duration string `json:"duration"`
55
- Disposition Disposition `json:"disposition"`
56
- BitRate string `json:"bit_rate"`
28
+ ID string `json:"id"`
29
+ CodecName string `json:"codec_name"`
30
+ CodecLongName string `json:"codec_long_name"`
31
+ Profile string `json:"profile"`
32
+ CodecType string `json:"codec_type"`
33
+ CodecTimeBase string `json:"codec_time_base"`
34
+ CodecTagString string `json:"codec_tag_string"`
35
+ CodecTag string `json:"codec_tag"`
36
+ Width int `json:"width"`
37
+ Height int `json:"height"`
38
+ CodedWidth int `json:"coded_width"`
39
+ CodedHeight int `json:"coded_height"`
40
+ HasBFrames int `json:"has_b_frames"`
41
+ SampleAspectRatio string `json:"sample_aspect_ratio"`
42
+ DisplayAspectRatio string `json:"display_aspect_ratio"`
43
+ PixFmt string `json:"pix_fmt"`
44
+ Level int `json:"level"`
45
+ ChromaLocation string `json:"chroma_location"`
46
+ Refs int `json:"refs"`
47
+ QuarterSample string `json:"quarter_sample"`
48
+ DivxPacked string `json:"divx_packed"`
49
+ RFrameRrate string `json:"r_frame_rate"`
50
+ AvgFrameRate string `json:"avg_frame_rate"`
51
+ TimeBase string `json:"time_base"`
52
+ DurationTs int `json:"duration_ts"`
53
+ Duration string `json:"duration"`
54
+ Disposition Disposition `json:"disposition"`
55
+ BitRate string `json:"bit_rate"`
56
+ Tags map [string ]string `json:"tags"`
57
+ SideDataList []map [string ]string `json:"side_data_list"`
57
58
}
58
59
59
60
// Tags ...
@@ -288,6 +289,14 @@ func (s Streams) GetBitRate() string {
288
289
return s .BitRate
289
290
}
290
291
292
+ func (s Streams ) GetTags () map [string ]string {
293
+ return s .Tags
294
+ }
295
+
296
+ func (s Streams ) GetSideDataList () []map [string ]string {
297
+ return s .SideDataList
298
+ }
299
+
291
300
//GetDefault ...
292
301
func (d Disposition ) GetDefault () int {
293
302
return d .Default
0 commit comments