Return write count from WriteRTP. (#4059)
* Log write count atomic. * Return write count from WriteRTP. Apologies for the frequent changes on this. With relays, the down track could write to several targets. So, use count to have an accurate indication of how may subscribers were written to.
This commit is contained in:
+1
-3
@@ -820,9 +820,7 @@ func (w *WebRTCReceiver) forwardRTP(layer int32, buff *buffer.Buffer) {
|
||||
|
||||
var writeCount atomic.Int32
|
||||
w.downTrackSpreader.Broadcast(func(dt TrackSender) {
|
||||
if dt.WriteRTP(pkt, spatialLayer) {
|
||||
writeCount.Inc()
|
||||
}
|
||||
writeCount.Add(dt.WriteRTP(pkt, spatialLayer))
|
||||
})
|
||||
|
||||
if rt := w.redTransformer.Load(); rt != nil {
|
||||
|
||||
Reference in New Issue
Block a user