Commit 5deb6e09 authored by Wim Taymans's avatar Wim Taymans
Browse files

gst/playback/gstplaybasebin.c: Stop buffering when the group is commited...

gst/playback/gstplaybasebin.c: Stop buffering when the group is commited because the queues filled up.

Original commit message from CVS:
* gst/playback/gstplaybasebin.c: (queue_overrun),
(no_more_pads_full):
Stop buffering when the group is commited because the queues filled up.
Fixes #442024.
parent 588bc09c
2007-05-29 Wim Taymans <wim@fluendo.com>
* gst/playback/gstplaybasebin.c: (queue_overrun),
(no_more_pads_full):
Stop buffering when the group is commited because the queues filled up.
Fixes #442024.
2007-05-25 Jan Schmidt <thaytan@mad.scientist.com>
 
* ext/alsa/gstalsamixer.c: (gst_alsa_mixer_ensure_track_list),
......@@ -597,25 +597,6 @@ queue_deadlock_check (GstElement * queue, GstPlayBaseBin * play_base_bin)
}
}
/* this signal will be fired when one of the queues with raw
* data is filled. This means that the group building stage is over
* and playback of the new queued group should start. This is a rather unusual
* situation because normally the group is commited when the "no_more_pads"
* signal is fired.
*/
static void
queue_overrun (GstElement * queue, GstPlayBaseBin * play_base_bin)
{
GST_DEBUG_OBJECT (play_base_bin, "queue %s overrun",
GST_ELEMENT_NAME (queue));
preroll_remove_overrun (queue, play_base_bin);
group_commit (play_base_bin, FALSE,
GST_OBJECT_PARENT (GST_OBJECT_CAST (queue)) ==
GST_OBJECT_CAST (play_base_bin->subtitle));
}
/* Used for time-based buffering in streaming mode and is called when a queue
* emits the running signal. This means that the high watermark threshold is
* reached and the buffering is completed. */
......@@ -667,6 +648,28 @@ queue_threshold_reached (GstElement * queue, GstPlayBaseBin * play_base_bin)
fill_buffer (play_base_bin, 100);
}
/* this signal will be fired when one of the queues with raw
* data is filled. This means that the group building stage is over
* and playback of the new queued group should start. This is a rather unusual
* situation because normally the group is commited when the "no_more_pads"
* signal is fired.
*/
static void
queue_overrun (GstElement * queue, GstPlayBaseBin * play_base_bin)
{
GST_DEBUG_OBJECT (play_base_bin, "queue %s overrun",
GST_ELEMENT_NAME (queue));
preroll_remove_overrun (queue, play_base_bin);
group_commit (play_base_bin, FALSE,
GST_OBJECT_PARENT (GST_OBJECT_CAST (queue)) ==
GST_OBJECT_CAST (play_base_bin->subtitle));
/* notify end of buffering */
queue_threshold_reached (queue, play_base_bin);
}
/* this signal is only added when in streaming mode to catch underruns
*/
static void
......@@ -1048,6 +1051,8 @@ no_more_pads_full (GstElement * element, gboolean subs,
if (!g_object_get_data (G_OBJECT (element), "pending"))
return;
GST_DEBUG_OBJECT (element, "remove pending");
g_object_set_data (G_OBJECT (element), "pending", NULL);
play_base_bin->pending--;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment