add ChannelLayout.String()
This commit is contained in:
parent
60470c83ac
commit
5f4a22fb98
8
av.go
8
av.go
@ -1,5 +1,9 @@
|
|||||||
package av
|
package av
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
)
|
||||||
|
|
||||||
type SampleFormat int
|
type SampleFormat int
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@ -69,6 +73,10 @@ func (self SampleFormat) IsPlanar() bool {
|
|||||||
|
|
||||||
type ChannelLayout uint64
|
type ChannelLayout uint64
|
||||||
|
|
||||||
|
func (self ChannelLayout) String() string {
|
||||||
|
return fmt.Sprintf("%dch", self.Count())
|
||||||
|
}
|
||||||
|
|
||||||
const (
|
const (
|
||||||
CH_FRONT_CENTER = ChannelLayout(1<<iota)
|
CH_FRONT_CENTER = ChannelLayout(1<<iota)
|
||||||
CH_FRONT_LEFT
|
CH_FRONT_LEFT
|
||||||
|
Loading…
x
Reference in New Issue
Block a user