support publishing with WebRTC (#1659) (#1786)

This commit is contained in:
Alessandro Ros
2023-05-14 14:18:03 +02:00
committed by GitHub
parent 6ea299fc56
commit 1688e5d2e5
39 changed files with 1928 additions and 951 deletions
+8 -1
View File
@@ -78,7 +78,7 @@ func (t *formatProcessorMPEG4Audio) Process(unit Unit, hasNonRTSPReaders bool) e
}
// decode from RTP
if hasNonRTSPReaders {
if hasNonRTSPReaders || t.decoder != nil {
if t.decoder == nil {
t.decoder = t.format.CreateDecoder()
}
@@ -108,3 +108,10 @@ func (t *formatProcessorMPEG4Audio) Process(unit Unit, hasNonRTSPReaders bool) e
return nil
}
func (t *formatProcessorMPEG4Audio) UnitForRTPPacket(pkt *rtp.Packet, ntp time.Time) Unit {
return &UnitMPEG4Audio{
RTPPackets: []*rtp.Packet{pkt},
NTP: ntp,
}
}