From 903a8863ce8df4e710511127c89fe5a7c3384047 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 7 Mar 2017 14:59:36 +0200 Subject: [PATCH] playbin3/urisourcebin: Enable buffering by default This only has effect on network streams in these elements, and by enabling it by default we get the same behaviour as in playbin2. --- gst/playback/gstplaybin3.c | 2 +- gst/playback/gsturisourcebin.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/gst/playback/gstplaybin3.c b/gst/playback/gstplaybin3.c index 5baae3d..51eb1ed 100644 --- a/gst/playback/gstplaybin3.c +++ b/gst/playback/gstplaybin3.c @@ -534,7 +534,7 @@ struct _GstPlayBin3Class #define DEFAULT_SOURCE NULL #define DEFAULT_FLAGS GST_PLAY_FLAG_AUDIO | GST_PLAY_FLAG_VIDEO | GST_PLAY_FLAG_TEXT | \ GST_PLAY_FLAG_SOFT_VOLUME | GST_PLAY_FLAG_DEINTERLACE | \ - GST_PLAY_FLAG_SOFT_COLORBALANCE + GST_PLAY_FLAG_SOFT_COLORBALANCE | GST_PLAY_FLAG_BUFFERING #define DEFAULT_CURRENT_VIDEO -1 #define DEFAULT_CURRENT_AUDIO -1 #define DEFAULT_CURRENT_TEXT -1 diff --git a/gst/playback/gsturisourcebin.c b/gst/playback/gsturisourcebin.c index e0fc757..6d80daa 100644 --- a/gst/playback/gsturisourcebin.c +++ b/gst/playback/gsturisourcebin.c @@ -204,7 +204,7 @@ enum #define DEFAULT_BUFFER_DURATION -1 #define DEFAULT_BUFFER_SIZE -1 #define DEFAULT_DOWNLOAD FALSE -#define DEFAULT_USE_BUFFERING FALSE +#define DEFAULT_USE_BUFFERING TRUE #define DEFAULT_RING_BUFFER_MAX_SIZE 0 #define DEFAULT_CAPS (gst_static_caps_get (&default_raw_caps)) @@ -738,6 +738,7 @@ gst_uri_source_bin_init (GstURISourceBin * urisrc) urisrc->buffer_duration = DEFAULT_BUFFER_DURATION; urisrc->buffer_size = DEFAULT_BUFFER_SIZE; urisrc->download = DEFAULT_DOWNLOAD; + urisrc->use_buffering = DEFAULT_USE_BUFFERING; urisrc->ring_buffer_max_size = DEFAULT_RING_BUFFER_MAX_SIZE; urisrc->last_buffering_pct = -1; -- 2.7.4