-
Notifications
You must be signed in to change notification settings - Fork 54
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
Support application-defined packet (rfc3550#section-6.7) #181
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #181 +/- ##
==========================================
+ Coverage 77.73% 78.50% +0.76%
==========================================
Files 21 22 +1
Lines 1936 2005 +69
==========================================
+ Hits 1505 1574 +69
Misses 336 336
Partials 95 95
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Amazing work @shlompy! Mind fixing the failures above ^ To solve the 'Not having a SSRC' issue I was thinking maybe we add |
Thanks.
But I still need to test this properly E2E... I did place a breakpoint in Packet.go and saw this packet is parsed correctly and being... |
@Sean-Der , I might have mis-understood the complaint about the related issues I've mentioned.. |
I've pushed fixes, hope the checks will pass now... took me awhile with the go lint, gofumpt and fixing commit messages.... |
Hope I'm done with fixing issues.
|
I'll appreciate if someone can help me.. Placing breakpoints in rtcp packet unmarshalling, I can see the packet got unmarshalled fine, and is being written to readStream
readStream.write(decrypted) didn't return any error. I'm trying to read the packet in my application, I have 2 go routines for AUDIO and VIDEO tracks where rtcp packets are being read:
This code is able to get rtcp.ReceiverReport, but no rtcp.ApplicationDefined packets are being read. in rtcp package, I've added logs when rtcp.ReceiverReport and rtcp.ApplicationDefined packets are being unmarshaled, and both are having the same SSRC so I really don't understand what the problem is and how to debug it further:
|
@Sean-Der, I believe the reason I'm not able to get the application-defined packet, is because of lack of Media SSRC in the RFC. Is there a way to pass such packets without media SSRC into the application? I've also tried to use rtcp interceptor but it doesn't get these pacekts.. From pion perspective, it creates a new stream for this unknown ssrc and is considered as "unhandled stream" |
Hey @shlompy sorry this didn't get merged sooner! I am gonna merge it now. Next lets add a I think that API makes sense? |
Thabks Sean! Your API suggestion makes sense to get any incommibg packets, the only drawback I see with it is that without having a media ssrc, pion interceptor also cannot work with such packets... It might be more complex for me to get into it again, but I think a better solution should have been to allow passing pion a custom packet marshaller/unmarsheler, from the application, and the app defined subtype field. Something similar to the way pion allows providing custom interceptors implementations. Something like: So if pion gets app defined packet with subType 4, it will use this struct implementation. Maybe even just telling pion to use custom GetSSRCDestination function for different subtypes |
Description
pion rtcp currently doesn't do anything with application-defined packets, they are being parssed as raw packets and cannot be read by the application, because of no DestinationSSRC() is implemented for raw packets.
This PR fully (Hopefully :) ) implement application-defined packets based on rfc3550
https://datatracker.ietf.org/doc/html/rfc3550#section-6.7