Mercurial > libavformat.hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
5664:6c380241df7c | 5665:93b0d64bf0c9 |
---|---|
70 int rtp_get_local_port(URLContext *h); | 70 int rtp_get_local_port(URLContext *h); |
71 int rtp_set_remote_url(URLContext *h, const char *uri); | 71 int rtp_set_remote_url(URLContext *h, const char *uri); |
72 #if (LIBAVFORMAT_VERSION_MAJOR <= 52) | 72 #if (LIBAVFORMAT_VERSION_MAJOR <= 52) |
73 void rtp_get_file_handles(URLContext *h, int *prtp_fd, int *prtcp_fd); | 73 void rtp_get_file_handles(URLContext *h, int *prtp_fd, int *prtcp_fd); |
74 #endif | 74 #endif |
75 | |
76 /** | |
77 * Send a dummy packet on both port pairs to set up the connection | |
78 * state in potential NAT routers, so that we're able to receive | |
79 * packets. | |
80 * | |
81 * Note, this only works if the NAT router doesn't remap ports. This | |
82 * isn't a standardized procedure, but it works in many cases in practice. | |
83 * | |
84 * The same routine is used with RDT too, even if RDT doesn't use normal | |
85 * RTP packets otherwise. | |
86 */ | |
87 void rtp_send_punch_packets(URLContext* rtp_handle); | |
75 | 88 |
76 /** | 89 /** |
77 * some rtp servers assume client is dead if they don't hear from them... | 90 * some rtp servers assume client is dead if they don't hear from them... |
78 * so we send a Receiver Report to the provided ByteIO context | 91 * so we send a Receiver Report to the provided ByteIO context |
79 * (we don't have access to the rtcp handle from here) | 92 * (we don't have access to the rtcp handle from here) |