gst/playback/gstplaybasebin.c: Of course, only pause if group is done...

Original commit message from CVS:
* gst/playback/gstplaybasebin.c: (probe_triggered):
Of course, only pause if group is done...
This commit is contained in:
Ronald S. Bultje 2005-01-16 15:06:28 +00:00
parent dfd05ab3ef
commit cbbe4f5964
2 changed files with 18 additions and 7 deletions

View file

@ -1,3 +1,8 @@
2005-01-16 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
* gst/playback/gstplaybasebin.c: (probe_triggered):
Of course, only pause if group is done...
2005-01-16 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
* gst/playback/gstplaybasebin.c: (probe_triggered):

View file

@ -648,6 +648,19 @@ probe_triggered (GstProbe * probe, GstData ** data, gpointer user_data)
}
if (have_left) {
g_mutex_lock (play_base_bin->group_lock);
while (g_list_length (play_base_bin->queued_groups) < 2 &&
GST_STATE (play_base_bin->thread) == GST_STATE_PLAYING) {
GST_DEBUG ("Waiting for new groups");
g_cond_wait (play_base_bin->group_cond, play_base_bin->group_lock);
GST_DEBUG ("done");
}
g_mutex_unlock (play_base_bin->group_lock);
/* error? */
if (GST_STATE (play_base_bin->thread) != GST_STATE_PLAYING)
return TRUE;
GST_DEBUG ("changing state for group change");
gst_element_set_state (play_base_bin->thread, GST_STATE_PAUSED);
/* ok, get rid of the current group then */
@ -656,15 +669,8 @@ probe_triggered (GstProbe * probe, GstData ** data, gpointer user_data)
gst_play_base_bin_signals[GROUP_SWITCH_SIGNAL], 0);
/* removing the current group brings the next group
* active */
g_mutex_lock (play_base_bin->group_lock);
play_base_bin->queued_groups =
g_list_remove (play_base_bin->queued_groups, group);
while (!play_base_bin->queued_groups) {
GST_DEBUG ("Waiting for new groups");
g_cond_wait (play_base_bin->group_cond, play_base_bin->group_lock);
GST_DEBUG ("done");
}
g_mutex_unlock (play_base_bin->group_lock);
setup_substreams (play_base_bin);
GST_DEBUG ("switching to next group %p",
play_base_bin->queued_groups->data);