package ts import ( "bytes" "github.com/nareix/mp4/isom" ) type Track struct { SPS []byte PPS []byte Type int pid uint PTS int64 TimeScale int64 mpeg4AudioConfig isom.MPEG4AudioConfig buf bytes.Buffer payload []byte peshdr *PESHeader tshdr TSHeader spsHasWritten bool payloadReady bool demuxer *Demuxer mux *Muxer streamId uint tsw *TSWriter dataBuf *iovec cacheSize int } const ( H264 = 1 AAC = 2 )