From 3b4fbe89bdaeda196cd6c3b1e346f044ee61fcd5 Mon Sep 17 00:00:00 2001 From: Mark Nauwelaerts Date: Mon, 28 Feb 2011 18:32:33 +0100 Subject: [PATCH 1/5] Automatic update of common submodule From 1de7f6a to 6aec6b9 --- common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common b/common index 1de7f6ab2d..6aec6b9716 160000 --- a/common +++ b/common @@ -1 +1 @@ -Subproject commit 1de7f6ab2d4bc1af69f06079cf0f4e2cbbfdc178 +Subproject commit 6aec6b9716c184c60c4bc6a5916a2471cfa8c8cd From 53c02dff3ffb8d728078a9b82c5bda20f6e9fb87 Mon Sep 17 00:00:00 2001 From: Mark Nauwelaerts Date: Mon, 28 Feb 2011 18:52:47 +0100 Subject: [PATCH 2/5] configure.ac: export plugin description more platform independent Fixes #642504. --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 5b08865c7e..bacd07a46e 100644 --- a/configure.ac +++ b/configure.ac @@ -906,7 +906,7 @@ AC_SUBST(GST_LIB_LDFLAGS) dnl this really should only contain flags, not libs - they get added before dnl whatevertarget_LIBS and -L flags here affect the rest of the linking -GST_PLUGIN_LDFLAGS="-module -avoid-version -export-symbols-regex '^[_]*gst_plugin_desc\$\$' $GST_ALL_LDFLAGS" +GST_PLUGIN_LDFLAGS="-module -avoid-version -export-symbols-regex '^[_]*gst_plugin_desc.*' $GST_ALL_LDFLAGS" AC_SUBST(GST_PLUGIN_LDFLAGS) dnl *** output files *** From 09f15da2f831a7166cdcf9250e8d5e257937a422 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Wed, 2 Mar 2011 15:38:01 +0000 Subject: [PATCH 3/5] typefindfunctions: fix compiler warning on 32-bit systems MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Mark 64-bit interger constant as such to avoid warnings such as: gsttypefindfunctions.c:2152: error: integer constant is too large for ‘long’ type --- gst/typefind/gsttypefindfunctions.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gst/typefind/gsttypefindfunctions.c b/gst/typefind/gsttypefindfunctions.c index 2b35330f52..47c6bb5fc4 100644 --- a/gst/typefind/gsttypefindfunctions.c +++ b/gst/typefind/gsttypefindfunctions.c @@ -2149,7 +2149,7 @@ h263_video_type_find (GstTypeFind * tf, gpointer unused) /* Find the picture start code */ data = (data << 8) + c.data[0]; - psc = data & 0xfffffc0000; + psc = data & G_GUINT64_CONSTANT (0xfffffc0000); if (psc == 0x800000) { /* Found PSC */ /* TR */ From cf9aaffcb96f41bf21acace53e5d5055f3364870 Mon Sep 17 00:00:00 2001 From: Stefan Kost Date: Fri, 4 Mar 2011 14:39:45 +0200 Subject: [PATCH 4/5] playbin2: set several properties in one go g_object_set is a varargs function. Save 7 g_obvject_calls (and the overhead of them) by using it accordingly. --- gst/playback/gstplaybin2.c | 46 +++++++++++++++----------------------- 1 file changed, 18 insertions(+), 28 deletions(-) diff --git a/gst/playback/gstplaybin2.c b/gst/playback/gstplaybin2.c index 30aa71618b..03af931a44 100644 --- a/gst/playback/gstplaybin2.c +++ b/gst/playback/gstplaybin2.c @@ -3194,31 +3194,21 @@ activate_group (GstPlayBin * playbin, GstSourceGroup * group, GstState target) group->uridecodebin = gst_object_ref (uridecodebin); } - /* configure connection speed */ - g_object_set (uridecodebin, "connection-speed", - playbin->connection_speed / 1000, NULL); - flags = gst_play_sink_get_flags (playbin->playsink); - /* configure download buffering */ - if (flags & GST_PLAY_FLAG_DOWNLOAD) - g_object_set (uridecodebin, "download", TRUE, NULL); - else - g_object_set (uridecodebin, "download", FALSE, NULL); - - /* configure uri */ - g_object_set (uridecodebin, "uri", group->uri, NULL); - /* configure buffering of demuxed/parsed data */ - if (flags & GST_PLAY_FLAG_BUFFERING) - g_object_set (uridecodebin, "use-buffering", TRUE, NULL); - else - g_object_set (uridecodebin, "use-buffering", FALSE, NULL); - /* configure buffering parameters */ - g_object_set (uridecodebin, "buffer-duration", playbin->buffer_duration, - NULL); - g_object_set (uridecodebin, "buffer-size", playbin->buffer_size, NULL); - g_object_set (uridecodebin, "ring-buffer-max-size", - playbin->ring_buffer_max_size, NULL); + g_object_set (uridecodebin, + /* configure connection speed */ + "connection-speed", playbin->connection_speed / 1000, + /* configure uri */ + "uri", group->uri, + /* configure download buffering */ + "download", ((flags & GST_PLAY_FLAG_DOWNLOAD) != 0), + /* configure buffering of demuxed/parsed data */ + "use-buffering", ((flags & GST_PLAY_FLAG_BUFFERING) != 0), + /* configure buffering parameters */ + "buffer-duration", playbin->buffer_duration, + "buffer-size", playbin->buffer_size, + "ring-buffer-max-size", playbin->ring_buffer_max_size, NULL); /* connect pads and other things */ group->pad_added_id = g_signal_connect (uridecodebin, "pad-added", @@ -3268,11 +3258,11 @@ activate_group (GstPlayBin * playbin, GstSourceGroup * group, GstState target) group->suburidecodebin = gst_object_ref (suburidecodebin); } - /* configure connection speed */ - g_object_set (suburidecodebin, "connection-speed", - playbin->connection_speed, NULL); - /* configure uri */ - g_object_set (suburidecodebin, "uri", group->suburi, NULL); + g_object_set (suburidecodebin, + /* configure connection speed */ + "connection-speed", playbin->connection_speed, + /* configure uri */ + "uri", group->suburi, NULL); /* connect pads and other things */ group->sub_pad_added_id = g_signal_connect (suburidecodebin, "pad-added", From ba2e500bd992d8ad7db0da923801964964835967 Mon Sep 17 00:00:00 2001 From: Mark Nauwelaerts Date: Thu, 3 Mar 2011 19:14:38 +0100 Subject: [PATCH 5/5] baseaudiosink: start ringbuffer upon going to PLAYING and already EOS ... otherwise we may end up without running clock in PLAYING. Fixes #636886. --- gst-libs/gst/audio/gstbaseaudiosink.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/gst-libs/gst/audio/gstbaseaudiosink.c b/gst-libs/gst/audio/gstbaseaudiosink.c index b5c87b9fdf..f8b18b0b9e 100644 --- a/gst-libs/gst/audio/gstbaseaudiosink.c +++ b/gst-libs/gst/audio/gstbaseaudiosink.c @@ -56,7 +56,6 @@ struct _GstBaseAudioSinkPrivate gboolean sync_latency; GstClockTime eos_time; - gint eos_rendering; gboolean do_time_offset; /* number of microseconds we alow timestamps or clock slaving to drift @@ -837,10 +836,6 @@ gst_base_audio_sink_drain (GstBaseAudioSink * sink) if (!sink->ringbuffer->spec.rate) return TRUE; - /* if PLAYING is interrupted, - * arrange to have clock running when going to PLAYING again */ - g_atomic_int_set (&sink->priv->eos_rendering, 1); - /* need to start playback before we can drain, but only when * we have successfully negotiated a format and thus acquired the * ringbuffer. */ @@ -858,7 +853,6 @@ gst_base_audio_sink_drain (GstBaseAudioSink * sink) GST_DEBUG_OBJECT (sink, "drained audio"); } - g_atomic_int_set (&sink->priv->eos_rendering, 0); return TRUE; } @@ -1888,7 +1882,6 @@ gst_base_audio_sink_change_state (GstElement * element, sink->next_sample = -1; sink->priv->last_align = -1; sink->priv->eos_time = -1; - sink->priv->eos_rendering = 0; gst_ring_buffer_set_flushing (sink->ringbuffer, FALSE); gst_ring_buffer_may_start (sink->ringbuffer, FALSE); @@ -1903,19 +1896,24 @@ gst_base_audio_sink_change_state (GstElement * element, sink->provided_clock, TRUE)); break; case GST_STATE_CHANGE_PAUSED_TO_PLAYING: + { + gboolean eos; + GST_OBJECT_LOCK (sink); GST_DEBUG_OBJECT (sink, "ringbuffer may start now"); sink->priv->sync_latency = TRUE; + eos = GST_BASE_SINK (sink)->eos; GST_OBJECT_UNLOCK (sink); gst_ring_buffer_may_start (sink->ringbuffer, TRUE); - if (GST_BASE_SINK_CAST (sink)->pad_mode == GST_ACTIVATE_PULL || - g_atomic_int_get (&sink->priv->eos_rendering)) { + if (GST_BASE_SINK_CAST (sink)->pad_mode == GST_ACTIVATE_PULL || eos) { /* we always start the ringbuffer in pull mode immediatly */ - /* sync rendering on eos needs running clock */ + /* sync rendering on eos needs running clock, + * and others need running clock when finished rendering eos */ gst_ring_buffer_start (sink->ringbuffer); } break; + } case GST_STATE_CHANGE_PLAYING_TO_PAUSED: /* ringbuffer cannot start anymore */ gst_ring_buffer_may_start (sink->ringbuffer, FALSE);