Resolve RTX pair via OnTrack also. (#4190)
* Resolve RTX pair via OnTrack also. In simulcast probing path, the interceptor chain is not invoked for primary stream. Not sure if this is a recent change. Due to this, the RTX pair does not get resolved. Use the onTrack callback to resolve the pair. * remove debug
This commit is contained in:
@@ -61,10 +61,15 @@ func (f *RTXInfoExtractorFactory) NewInterceptor(id string) (interceptor.Interce
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (f *RTXInfoExtractorFactory) setStreamInfo(ssrc uint32, mid, rid, rsid string) {
|
||||
func (f *RTXInfoExtractorFactory) SetStreamInfo(ssrc uint32, mid, rid, rsid string) {
|
||||
var repairSsrc, baseSsrc uint32
|
||||
f.lock.Lock()
|
||||
|
||||
if mid == "" || (rid == "" && rsid == "") {
|
||||
f.lock.Unlock()
|
||||
return
|
||||
}
|
||||
|
||||
if rsid != "" {
|
||||
// repair stream found, find base stream
|
||||
for base, info := range f.streams {
|
||||
@@ -171,7 +176,7 @@ func (r *rtxInfoReader) Read(b []byte, a interceptor.Attributes) (int, intercept
|
||||
if mid != "" && (rid != "" || rsid != "") {
|
||||
r.logger.Debugw("stream found", "mid", mid, "rid", rid, "rsid", rsid, "ssrc", header.SSRC)
|
||||
r.tryTimes = -1
|
||||
go r.factory.setStreamInfo(header.SSRC, mid, rid, rsid)
|
||||
go r.factory.SetStreamInfo(header.SSRC, mid, rid, rsid)
|
||||
} else {
|
||||
// ignore padding only packet for probe count
|
||||
if !(header.Padding && n-header.MarshalSize()-int(b[n-1]) == 0) {
|
||||
|
||||
Reference in New Issue
Block a user