diff options
author | Wim Taymans <wim.taymans@collabora.co.uk> | 2011-01-03 15:40:11 +0100 |
---|---|---|
committer | Wim Taymans <wim.taymans@collabora.co.uk> | 2011-01-03 15:40:11 +0100 |
commit | dc221c02193bb4740be7cdd3fc2addbcc5e358ae (patch) | |
tree | 88da3b4df563fde85680a971d8ca71389270914a | |
parent | 6ab508dfa56f92c86c3b379b6cfe4ff28f2551e4 (diff) |
rtspsrc: increase udp buffer size
Set a bigger UDP buffer size by default to reduce packet loss with
high bitrate streams.
-rw-r--r-- | gst/rtsp/gstrtspsrc.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gst/rtsp/gstrtspsrc.c b/gst/rtsp/gstrtspsrc.c index 7e003d3c8..15bf5cfc7 100644 --- a/gst/rtsp/gstrtspsrc.c +++ b/gst/rtsp/gstrtspsrc.c @@ -161,7 +161,7 @@ gst_rtsp_src_buffer_mode_get_type (void) #define DEFAULT_DEBUG FALSE #define DEFAULT_RETRY 20 #define DEFAULT_TIMEOUT 5000000 -#define DEFAULT_UDP_BUFFER_SIZE 0 +#define DEFAULT_UDP_BUFFER_SIZE 0x80000 #define DEFAULT_TCP_TIMEOUT 20000000 #define DEFAULT_LATENCY_MS 2000 #define DEFAULT_CONNECTION_SPEED 0 @@ -1494,6 +1494,10 @@ again: goto no_udp_protocol; g_object_set (G_OBJECT (udpsrc0), "port", tmp_rtp, "reuse", FALSE, NULL); + if (src->udp_buffer_size != 0) + g_object_set (G_OBJECT (udpsrc0), "buffer-size", src->udp_buffer_size, + NULL); + ret = gst_element_set_state (udpsrc0, GST_STATE_PAUSED); if (ret == GST_STATE_CHANGE_FAILURE) { if (tmp_rtp != 0) { @@ -2720,8 +2724,6 @@ gst_rtspsrc_stream_configure_udp (GstRTSPSrc * src, GstRTSPStream * stream, * if we can. */ g_object_set (G_OBJECT (stream->udpsrc[0]), "timeout", src->udp_timeout, NULL); - g_object_set (G_OBJECT (stream->udpsrc[0]), "buffer-size", - src->udp_buffer_size, NULL); /* get output pad of the UDP source. */ *outpad = gst_element_get_static_pad (stream->udpsrc[0], "src"); |