github.com/bluenviron/mediacommon@v1.9.3/pkg/formats/mpegts/codec_mpeg1_video.go (about) 1 package mpegts 2 3 import ( 4 "github.com/asticode/go-astits" 5 ) 6 7 // CodecMPEG1Video is a MPEG-1/2 Video codec. 8 type CodecMPEG1Video struct{} 9 10 // IsVideo implements Codec. 11 func (CodecMPEG1Video) IsVideo() bool { 12 return true 13 } 14 15 func (*CodecMPEG1Video) isCodec() {} 16 17 func (c CodecMPEG1Video) marshal(pid uint16) (*astits.PMTElementaryStream, error) { 18 return &astits.PMTElementaryStream{ 19 ElementaryPID: pid, 20 // we use MPEG-2 to notify readers that video can be either MPEG-1 or MPEG-2 21 StreamType: astits.StreamTypeMPEG2Video, 22 }, nil 23 }