hls muxer: support reading Opus tracks (#1338)

This commit is contained in:
aler9
2023-01-03 18:36:13 +01:00
parent cce3fb440f
commit 034e42f463
23 changed files with 447 additions and 193 deletions

View File

@@ -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{