Mercurial > libavformat.hg
diff rtpdec.h @ 5665:93b0d64bf0c9 libavformat
When using RTP-over-UDP, send dummy packets during stream setup, similar to
what e.g. RealPlayer does. This allows proper port forwarding setup in NAT-
based environments.
Patch by Martin Storsj <$firstname at $firstname dot st>.
author | rbultje |
---|---|
date | Tue, 16 Feb 2010 22:50:50 +0000 |
parents | b34d9614b887 |
children | 57ef8feb5745 |
line wrap: on
line diff
--- a/rtpdec.h Tue Feb 16 19:26:49 2010 +0000 +++ b/rtpdec.h Tue Feb 16 22:50:50 2010 +0000 @@ -74,6 +74,19 @@ #endif /** + * Send a dummy packet on both port pairs to set up the connection + * state in potential NAT routers, so that we're able to receive + * packets. + * + * Note, this only works if the NAT router doesn't remap ports. This + * isn't a standardized procedure, but it works in many cases in practice. + * + * The same routine is used with RDT too, even if RDT doesn't use normal + * RTP packets otherwise. + */ +void rtp_send_punch_packets(URLContext* rtp_handle); + +/** * some rtp servers assume client is dead if they don't hear from them... * so we send a Receiver Report to the provided ByteIO context * (we don't have access to the rtcp handle from here)