forked from External/mediamtx
hls muxer: support reading Opus tracks (#1338)
This commit is contained in:
parent
cce3fb440f
commit
034e42f463
23 changed files with 447 additions and 193 deletions
|
|
@ -203,6 +203,17 @@ func (s *rtspSource) run(ctx context.Context) error {
|
|||
}
|
||||
})
|
||||
|
||||
case *format.Opus:
|
||||
c.OnPacketRTP(medi, forma, func(pkt *rtp.Packet) {
|
||||
err := res.stream.writeData(cmedia, cformat, &dataOpus{
|
||||
rtpPackets: []*rtp.Packet{pkt},
|
||||
ntp: time.Now(),
|
||||
})
|
||||
if err != nil {
|
||||
s.Log(logger.Warn, "%v", err)
|
||||
}
|
||||
})
|
||||
|
||||
default:
|
||||
c.OnPacketRTP(medi, forma, func(pkt *rtp.Packet) {
|
||||
err := res.stream.writeData(cmedia, cformat, &dataGeneric{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue