add ChannelLayout.String()

This commit is contained in:
nareix 2016-06-07 18:13:25 +08:00
parent 60470c83ac
commit 5f4a22fb98

8
av.go
View File

@ -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<<iota)
CH_FRONT_LEFT