You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The author has run in the same issue as I have in #2994: there is no simple way to have per-PC state in an interceptor. As a result, they are hanging the same interceptor on all peer connections, and using a channel stored in a global variable in order to get their hands on the bandwidth estimator.
Perhaps I'm too simple, but this API feels awkward to me. In the case of Galene, I'm going to have to run a goroutine to listen for bandwidth estimators, and associate them with the tracks that I'm generating. I was expecting to be able to simply create the bandwidth estimator at NewPeerConnection time, and hang it on the data structure that encapsulate's Galene's peer connections.
It seems to me that both this issue and #2994 would be simply solved by allowing to add an interceptor that is not in the registry at NewPeerConnection time, and to allow the interceptor constructor to return arbitrary data. This way, the BWE interceptor could simply return the estimator at construction time, no need for complex callback code, and my NACK interceptor could be constructed with direct access to my data structures.
The text was updated successfully, but these errors were encountered:
I'm looking at switching Galene to TWCC, and I've found this code:
https://github.com/pion/webrtc/blob/master/examples/bandwidth-estimation-from-disk/main.go#L84
The author has run in the same issue as I have in #2994: there is no simple way to have per-PC state in an interceptor. As a result, they are hanging the same interceptor on all peer connections, and using a channel stored in a global variable in order to get their hands on the bandwidth estimator.
Perhaps I'm too simple, but this API feels awkward to me. In the case of Galene, I'm going to have to run a goroutine to listen for bandwidth estimators, and associate them with the tracks that I'm generating. I was expecting to be able to simply create the bandwidth estimator at NewPeerConnection time, and hang it on the data structure that encapsulate's Galene's peer connections.
It seems to me that both this issue and #2994 would be simply solved by allowing to add an interceptor that is not in the registry at NewPeerConnection time, and to allow the interceptor constructor to return arbitrary data. This way, the BWE interceptor could simply return the estimator at construction time, no need for complex callback code, and my NACK interceptor could be constructed with direct access to my data structures.
The text was updated successfully, but these errors were encountered: