Added unknown source frame handler #32
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I'm using gortsplib in a scenario where the server is running inside a docker container. After RTSP negotiation UDP frames are coming from random ports so they are dropped in serverUDPListener run(). I have no control over the docker service so I can't turn off the userland-proxy option or use host networking in docker. I've managed to create a simple UDP matching mechanism based on NAT hole punching on the client-side and expecting new connections on the server side. Parsing RTP/RTCP frames I'm able to predict from which client/publisher the frame is coming from and modify SettupedTrack udp ports.
The problem is that currently, I need to modify serverudpl.go to inject this mechanism. If the library would have a built-in handler for frames coming from an unknown source it would be possible to make it from the connection handling layer.