X-Git-Url: http://rtime.felk.cvut.cz/gitweb/frescor/ffmpeg.git/blobdiff_plain/a9d1337e0ddde15598a5c383a41f39a4f57e6078..914345eda9d70ff0452d832d8ed37181c72ea431:/libavformat/rtpproto.c diff --git a/libavformat/rtpproto.c b/libavformat/rtpproto.c index 727c79961..a18bf5585 100644 --- a/libavformat/rtpproto.c +++ b/libavformat/rtpproto.c @@ -19,6 +19,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +int frsh_rtp_budget=0, frsh_rtp_period_ms=0, frsh_rtp_deadline_ms=0; + /** * @file libavformat/rtpproto.c * RTP protocol @@ -109,7 +111,7 @@ static void build_udp_url(char *buf, int buf_size, const char *hostname, int port, int local_port, int ttl, int max_packet_size, - const char *label) + const char *label, int budget, int period_ms, int deadline_ms) { snprintf(buf, buf_size, URL_PROTO"://%s:%d", hostname, port); if (local_port >= 0) @@ -120,6 +122,12 @@ static void build_udp_url(char *buf, int buf_size, url_add_option(buf, buf_size, "pkt_size=%d", max_packet_size); if (label) url_add_option(buf, buf_size, "contract_label=%s", label); + if (budget >=0) + url_add_option(buf, buf_size, "budget=%d", budget); + if (period_ms >=0) + url_add_option(buf, buf_size, "period=%d", period_ms); + if (deadline_ms >=0) + url_add_option(buf, buf_size, "deadline=%d", deadline_ms); } /** @@ -167,7 +175,8 @@ static int rtp_open(URLContext *h, const char *uri, int flags) } build_udp_url(buf, sizeof(buf), - hostname, port, local_port, ttl, max_packet_size, "RTP"); + hostname, port, local_port, ttl, max_packet_size, "RTP", + frsh_rtp_budget, frsh_rtp_period_ms, frsh_rtp_deadline_ms); if (url_open(&s->rtp_hd, buf, flags) < 0) goto fail; local_port = udp_get_local_port(s->rtp_hd); @@ -176,7 +185,8 @@ static int rtp_open(URLContext *h, const char *uri, int flags) /* well, should suppress localport in path */ build_udp_url(buf, sizeof(buf), - hostname, port + 1, local_port + 1, ttl, max_packet_size, "RTCP"); + hostname, port + 1, local_port + 1, ttl, max_packet_size, "RTCP", + 1000, 100*1000, 0); if (url_open(&s->rtcp_hd, buf, flags) < 0) goto fail;