diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-04-01 21:12:23 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-04-01 21:12:47 +0200 |
commit | b99a8e4e4a1e2043819e0507371c7617462bb8e5 (patch) | |
tree | c1ada4c857d219008ad14f1f08efe480d2407957 /libavformat | |
parent | fde2e35e56424e2fc9b05cd763638c1b52b41ca4 (diff) | |
parent | 8c9c5479c4ba729b4ba868ab541a90b2061a7c2f (diff) | |
download | ffmpeg-b99a8e4e4a1e2043819e0507371c7617462bb8e5.tar.gz |
Merge commit '8c9c5479c4ba729b4ba868ab541a90b2061a7c2f'
* commit '8c9c5479c4ba729b4ba868ab541a90b2061a7c2f':
rtp: Add an option to set the send/receive buffer size
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/rtpproto.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/rtpproto.c b/libavformat/rtpproto.c index 81d586af81..0f294fb6f4 100644 --- a/libavformat/rtpproto.c +++ b/libavformat/rtpproto.c @@ -51,6 +51,7 @@ typedef struct RTPContext { struct sockaddr_storage last_rtp_source, last_rtcp_source; socklen_t last_rtp_source_len, last_rtcp_source_len; int ttl; + int buffer_size; int rtcp_port, local_rtpport, local_rtcpport; int connect; int pkt_size; @@ -63,6 +64,7 @@ typedef struct RTPContext { #define E AV_OPT_FLAG_ENCODING_PARAM static const AVOption options[] = { { "ttl", "Time to live (in milliseconds, multicast only)", OFFSET(ttl), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, INT_MAX, .flags = D|E }, + { "buffer_size", "Send/Receive buffer size (in bytes)", OFFSET(buffer_size), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, INT_MAX, .flags = D|E }, { "rtcp_port", "Custom rtcp port", OFFSET(rtcp_port), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, INT_MAX, .flags = D|E }, { "local_rtpport", "Local rtp port", OFFSET(local_rtpport), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, INT_MAX, .flags = D|E }, { "local_rtcpport", "Local rtcp port", OFFSET(local_rtcpport), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, INT_MAX, .flags = D|E }, @@ -232,6 +234,8 @@ static void build_udp_url(RTPContext *s, url_add_option(buf, buf_size, "localport=%d", local_port); if (s->ttl >= 0) url_add_option(buf, buf_size, "ttl=%d", s->ttl); + if (s->buffer_size >= 0) + url_add_option(buf, buf_size, "buffer_size=%d", s->buffer_size); if (s->pkt_size >= 0) url_add_option(buf, buf_size, "pkt_size=%d", s->pkt_size); if (s->connect) |