40 lines
432 B
Go
40 lines
432 B
Go
|
|
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
|
|
)
|
|
|