-
Notifications
You must be signed in to change notification settings - Fork 136
Pass Interceptors to Subscriber PeerConnection for Stats Collection #817
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Pass Interceptors to Subscriber PeerConnection for Stats Collection #817
Conversation
|
LGTM, but I just want to double-check if this was done intentionally |
Yes, it was intentional. It was the only way I could see to capture the metrics I needed. |
Sorry, I meant if leaving it out of subscriber peer connection in the first place was intentional or not |
|
Ah, got it thanks :) |
|
Interceptors are applied as either the default ones or user supplied - Lines 171 to 179 in 9ea8d56
There are important ones like NACK sender, RTCP reports which are registered as part of default. The publisher PC case was a specific use case and it is used with no interceptors but API is more generic to have user supplied interceptors. For stats, it might be better to add another option to specify if the stats interceptor should be registered and register it as part of default interceptor registration if enabled. |
|
I've updated the PR to include support for an additional param 'IncludeDefaultInterceptors' that does what I think boks1971 suggested. It appears to work in my project when I use the new param. |
| RetransmitBufferSize uint16 | ||
| Pacer pacer.Factory | ||
| Interceptors []interceptor.Factory | ||
| IncludeDefaultInterceptors bool |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good overall,
this formatting looks off, can you please check that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. Thanks
The createSubscriberPCLocked does not pass Interceptors from e.connParams to the subscriber PeerConnection. Note that createPublisherPCLocked does do this.
This prevents interceptors (in our case, Pion WebRTC stats interceptor) from being applied to the subscriber, causing inbound-rtp statistics to be missing when GetStats() is called on the subscriber PeerConnection.