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 (
|
const (
|
||||||
sdtPid = 17
|
|
||||||
patPid = 0
|
|
||||||
pmtPid = 4096
|
|
||||||
videoPid = 256
|
|
||||||
audioPid = 210
|
|
||||||
H264ID = 27
|
H264ID = 27
|
||||||
H265ID = 36
|
H265ID = 36
|
||||||
audioStreamID = 0xc0 // First audio stream ID.
|
audioStreamID = 0xc0 // First audio stream ID.
|
||||||
|
@ -133,13 +128,13 @@ func NewEncoder(dst io.WriteCloser, rate float64, mediaType int) *Encoder {
|
||||||
var sid byte
|
var sid byte
|
||||||
switch mediaType {
|
switch mediaType {
|
||||||
case EncodeAudio:
|
case EncodeAudio:
|
||||||
mPid = audioPid
|
mPid = AudioPid
|
||||||
sid = audioStreamID
|
sid = audioStreamID
|
||||||
case EncodeH265:
|
case EncodeH265:
|
||||||
mPid = videoPid
|
mPid = VideoPid
|
||||||
sid = H265ID
|
sid = H265ID
|
||||||
case EncodeH264:
|
case EncodeH264:
|
||||||
mPid = videoPid
|
mPid = VideoPid
|
||||||
sid = H264ID
|
sid = H264ID
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -181,8 +176,8 @@ func NewEncoder(dst io.WriteCloser, rate float64, mediaType int) *Encoder {
|
||||||
streamID: sid,
|
streamID: sid,
|
||||||
|
|
||||||
continuity: map[int]byte{
|
continuity: map[int]byte{
|
||||||
patPid: 0,
|
PatPid: 0,
|
||||||
pmtPid: 0,
|
PmtPid: 0,
|
||||||
mPid: 0,
|
mPid: 0,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,6 +45,7 @@ const (
|
||||||
PatPid = 0
|
PatPid = 0
|
||||||
PmtPid = 4096
|
PmtPid = 4096
|
||||||
VideoPid = 256
|
VideoPid = 256
|
||||||
|
AudioPid = 210
|
||||||
)
|
)
|
||||||
|
|
||||||
// StreamID is the id of the first stream.
|
// StreamID is the id of the first stream.
|
||||||
|
|
Loading…
Reference in New Issue