diff --git a/av.go b/av.go index 495aecc..299f0fa 100644 --- a/av.go +++ b/av.go @@ -1,5 +1,9 @@ package av +import ( + "fmt" +) + type SampleFormat int const ( @@ -69,6 +73,10 @@ func (self SampleFormat) IsPlanar() bool { type ChannelLayout uint64 +func (self ChannelLayout) String() string { + return fmt.Sprintf("%dch", self.Count()) +} + const ( CH_FRONT_CENTER = ChannelLayout(1<