Skip to content
This repository was archived by the owner on Sep 29, 2023. It is now read-only.

Commit 5cc0e09

Browse files
committed
Added GitNbChannel function that return number of channels
1 parent aa6374b commit 5cc0e09

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

ffmpeg/metadata.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ type Streams struct {
2929
CodecName string `json:"codec_name"`
3030
CodecLongName string `json:"codec_long_name"`
3131
Profile string `json:"profile"`
32+
Channels int `json:"channels"`
3233
CodecType string `json:"codec_type"`
3334
CodecTimeBase string `json:"codec_time_base"`
3435
CodecTagString string `json:"codec_tag_string"`
@@ -167,6 +168,11 @@ func (s Streams) GetProfile() string {
167168
return s.Profile
168169
}
169170

171+
//GetNbChannels returns number of channels for the stream
172+
func (s Streams) GetNbChannels() int {
173+
return s.Channels
174+
}
175+
170176
//GetCodecType ...
171177
func (s Streams) GetCodecType() string {
172178
return s.CodecType

metadata.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ type Streams interface {
2727
GetCodecName() string
2828
GetCodecLongName() string
2929
GetProfile() string
30+
GetNbChannels() int
3031
GetCodecType() string
3132
GetCodecTimeBase() string
3233
GetCodecTagString() string

0 commit comments

Comments
 (0)