mirror of https://bitbucket.org/ausocean/av.git
revid: mts encoder uses exported pids
This commit is contained in:
parent
7b4daed4a6
commit
3e2ff49420
|
@ -74,11 +74,6 @@ var (
|
|||
)
|
||||
|
||||
const (
|
||||
sdtPid = 17
|
||||
patPid = 0
|
||||
pmtPid = 4096
|
||||
videoPid = 256
|
||||
audioPid = 210
|
||||
H264ID = 27
|
||||
H265ID = 36
|
||||
audioStreamID = 0xc0 // First audio stream ID.
|
||||
|
@ -133,13 +128,13 @@ func NewEncoder(dst io.WriteCloser, rate float64, mediaType int) *Encoder {
|
|||
var sid byte
|
||||
switch mediaType {
|
||||
case EncodeAudio:
|
||||
mPid = audioPid
|
||||
mPid = AudioPid
|
||||
sid = audioStreamID
|
||||
case EncodeH265:
|
||||
mPid = videoPid
|
||||
mPid = VideoPid
|
||||
sid = H265ID
|
||||
case EncodeH264:
|
||||
mPid = videoPid
|
||||
mPid = VideoPid
|
||||
sid = H264ID
|
||||
}
|
||||
|
||||
|
@ -181,8 +176,8 @@ func NewEncoder(dst io.WriteCloser, rate float64, mediaType int) *Encoder {
|
|||
streamID: sid,
|
||||
|
||||
continuity: map[int]byte{
|
||||
patPid: 0,
|
||||
pmtPid: 0,
|
||||
PatPid: 0,
|
||||
PmtPid: 0,
|
||||
mPid: 0,
|
||||
},
|
||||
}
|
||||
|
|
|
@ -45,6 +45,7 @@ const (
|
|||
PatPid = 0
|
||||
PmtPid = 4096
|
||||
VideoPid = 256
|
||||
AudioPid = 210
|
||||
)
|
||||
|
||||
// StreamID is the id of the first stream.
|
||||
|
|
Loading…
Reference in New Issue