github.com/bluenviron/mediacommon@v1.9.3/pkg/formats/mpegts/codec_ac3.go (about) 1 package mpegts 2 3 import ( 4 "github.com/asticode/go-astits" 5 ) 6 7 // CodecAC3 is an AC-3 codec. 8 type CodecAC3 struct { 9 SampleRate int 10 ChannelCount int 11 } 12 13 // IsVideo implements Codec. 14 func (CodecAC3) IsVideo() bool { 15 return true 16 } 17 18 func (*CodecAC3) isCodec() {} 19 20 func (c CodecAC3) marshal(pid uint16) (*astits.PMTElementaryStream, error) { 21 return &astits.PMTElementaryStream{ 22 ElementaryPID: pid, 23 StreamType: astits.StreamTypeAC3Audio, 24 }, nil 25 }