github.com/bluenviron/mediacommon@v1.9.3/pkg/formats/mpegts/codec_mpeg4_video.go (about)

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