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