Merge branch 'master' into 0.11

This commit is contained in:
Wim Taymans 2011-03-04 16:21:13 +01:00
commit 6aa22111a1
5 changed files with 29 additions and 41 deletions

2
common

@ -1 +1 @@
Subproject commit 1de7f6ab2d4bc1af69f06079cf0f4e2cbbfdc178 Subproject commit 6aec6b9716c184c60c4bc6a5916a2471cfa8c8cd

View file

@ -906,7 +906,7 @@ AC_SUBST(GST_LIB_LDFLAGS)
dnl this really should only contain flags, not libs - they get added before 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 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) AC_SUBST(GST_PLUGIN_LDFLAGS)
dnl *** output files *** dnl *** output files ***

View file

@ -56,7 +56,6 @@ struct _GstBaseAudioSinkPrivate
gboolean sync_latency; gboolean sync_latency;
GstClockTime eos_time; GstClockTime eos_time;
gint eos_rendering;
gboolean do_time_offset; gboolean do_time_offset;
/* number of microseconds we alow timestamps or clock slaving to drift /* number of microseconds we alow timestamps or clock slaving to drift
@ -841,10 +840,6 @@ gst_base_audio_sink_drain (GstBaseAudioSink * sink)
if (!sink->ringbuffer->spec.rate) if (!sink->ringbuffer->spec.rate)
return TRUE; 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 /* need to start playback before we can drain, but only when
* we have successfully negotiated a format and thus acquired the * we have successfully negotiated a format and thus acquired the
* ringbuffer. */ * ringbuffer. */
@ -862,7 +857,6 @@ gst_base_audio_sink_drain (GstBaseAudioSink * sink)
GST_DEBUG_OBJECT (sink, "drained audio"); GST_DEBUG_OBJECT (sink, "drained audio");
} }
g_atomic_int_set (&sink->priv->eos_rendering, 0);
return TRUE; return TRUE;
} }
@ -1894,7 +1888,6 @@ gst_base_audio_sink_change_state (GstElement * element,
sink->next_sample = -1; sink->next_sample = -1;
sink->priv->last_align = -1; sink->priv->last_align = -1;
sink->priv->eos_time = -1; sink->priv->eos_time = -1;
sink->priv->eos_rendering = 0;
gst_ring_buffer_set_flushing (sink->ringbuffer, FALSE); gst_ring_buffer_set_flushing (sink->ringbuffer, FALSE);
gst_ring_buffer_may_start (sink->ringbuffer, FALSE); gst_ring_buffer_may_start (sink->ringbuffer, FALSE);
@ -1909,19 +1902,24 @@ gst_base_audio_sink_change_state (GstElement * element,
sink->provided_clock, TRUE)); sink->provided_clock, TRUE));
break; break;
case GST_STATE_CHANGE_PAUSED_TO_PLAYING: case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
{
gboolean eos;
GST_OBJECT_LOCK (sink); GST_OBJECT_LOCK (sink);
GST_DEBUG_OBJECT (sink, "ringbuffer may start now"); GST_DEBUG_OBJECT (sink, "ringbuffer may start now");
sink->priv->sync_latency = TRUE; sink->priv->sync_latency = TRUE;
eos = GST_BASE_SINK (sink)->eos;
GST_OBJECT_UNLOCK (sink); GST_OBJECT_UNLOCK (sink);
gst_ring_buffer_may_start (sink->ringbuffer, TRUE); gst_ring_buffer_may_start (sink->ringbuffer, TRUE);
if (GST_BASE_SINK_CAST (sink)->pad_mode == GST_ACTIVATE_PULL || if (GST_BASE_SINK_CAST (sink)->pad_mode == GST_ACTIVATE_PULL || eos) {
g_atomic_int_get (&sink->priv->eos_rendering)) {
/* we always start the ringbuffer in pull mode immediatly */ /* 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); gst_ring_buffer_start (sink->ringbuffer);
} }
break; break;
}
case GST_STATE_CHANGE_PLAYING_TO_PAUSED: case GST_STATE_CHANGE_PLAYING_TO_PAUSED:
/* ringbuffer cannot start anymore */ /* ringbuffer cannot start anymore */
gst_ring_buffer_may_start (sink->ringbuffer, FALSE); gst_ring_buffer_may_start (sink->ringbuffer, FALSE);

View file

@ -3194,31 +3194,21 @@ activate_group (GstPlayBin * playbin, GstSourceGroup * group, GstState target)
group->uridecodebin = gst_object_ref (uridecodebin); 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); flags = gst_play_sink_get_flags (playbin->playsink);
/* configure download buffering */ g_object_set (uridecodebin,
if (flags & GST_PLAY_FLAG_DOWNLOAD) /* configure connection speed */
g_object_set (uridecodebin, "download", TRUE, NULL); "connection-speed", playbin->connection_speed / 1000,
else /* configure uri */
g_object_set (uridecodebin, "download", FALSE, NULL); "uri", group->uri,
/* configure download buffering */
/* configure uri */ "download", ((flags & GST_PLAY_FLAG_DOWNLOAD) != 0),
g_object_set (uridecodebin, "uri", group->uri, NULL); /* configure buffering of demuxed/parsed data */
/* configure buffering of demuxed/parsed data */ "use-buffering", ((flags & GST_PLAY_FLAG_BUFFERING) != 0),
if (flags & GST_PLAY_FLAG_BUFFERING) /* configure buffering parameters */
g_object_set (uridecodebin, "use-buffering", TRUE, NULL); "buffer-duration", playbin->buffer_duration,
else "buffer-size", playbin->buffer_size,
g_object_set (uridecodebin, "use-buffering", FALSE, NULL); "ring-buffer-max-size", playbin->ring_buffer_max_size, 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);
/* connect pads and other things */ /* connect pads and other things */
group->pad_added_id = g_signal_connect (uridecodebin, "pad-added", 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); group->suburidecodebin = gst_object_ref (suburidecodebin);
} }
/* configure connection speed */ g_object_set (suburidecodebin,
g_object_set (suburidecodebin, "connection-speed", /* configure connection speed */
playbin->connection_speed, NULL); "connection-speed", playbin->connection_speed,
/* configure uri */ /* configure uri */
g_object_set (suburidecodebin, "uri", group->suburi, NULL); "uri", group->suburi, NULL);
/* connect pads and other things */ /* connect pads and other things */
group->sub_pad_added_id = g_signal_connect (suburidecodebin, "pad-added", group->sub_pad_added_id = g_signal_connect (suburidecodebin, "pad-added",

View file

@ -2149,7 +2149,7 @@ h263_video_type_find (GstTypeFind * tf, gpointer unused)
/* Find the picture start code */ /* Find the picture start code */
data = (data << 8) + c.data[0]; data = (data << 8) + c.data[0];
psc = data & 0xfffffc0000; psc = data & G_GUINT64_CONSTANT (0xfffffc0000);
if (psc == 0x800000) { if (psc == 0x800000) {
/* Found PSC */ /* Found PSC */
/* TR */ /* TR */