From: Wim Taymans Date: Thu, 22 Sep 2005 17:41:03 +0000 (+0000) Subject: gst/playback/gstplaybin.c: Only seek on one sink, the first one that succeeds. X-Git-Tag: RELEASE-0_9_3~26 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7d29a33df87d1882ff659351528c424c523c1c27;p=platform%2Fupstream%2Fgst-plugins-base.git gst/playback/gstplaybin.c: Only seek on one sink, the first one that succeeds. Original commit message from CVS: * gst/playback/gstplaybin.c: (gst_play_bin_class_init), (gst_play_bin_send_event): Only seek on one sink, the first one that succeeds. --- diff --git a/ChangeLog b/ChangeLog index 29a4f37..f222960 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-09-22 Wim Taymans + + * gst/playback/gstplaybin.c: (gst_play_bin_class_init), + (gst_play_bin_send_event): + Only seek on one sink, the first one that succeeds. + 2005-09-22 Michael Smith * ext/vorbis/vorbisenc.c: (gst_vorbisenc_clear), diff --git a/gst/playback/gstplaybin.c b/gst/playback/gstplaybin.c index 4d438af..727c905 100644 --- a/gst/playback/gstplaybin.c +++ b/gst/playback/gstplaybin.c @@ -101,6 +101,9 @@ static void gst_play_bin_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * spec); static void gst_play_bin_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * spec); + +static gboolean gst_play_bin_send_event (GstElement * element, + GstEvent * event); static GstStateChangeReturn gst_play_bin_change_state (GstElement * element, GstStateChange transition); @@ -190,6 +193,7 @@ gst_play_bin_class_init (GstPlayBinClass * klass) gstelement_klass->change_state = GST_DEBUG_FUNCPTR (gst_play_bin_change_state); + gstelement_klass->send_event = GST_DEBUG_FUNCPTR (gst_play_bin_send_event); playbasebin_klass->setup_output_pads = setup_sinks; } @@ -849,6 +853,28 @@ setup_sinks (GstPlayBaseBin * play_base_bin, GstPlayBaseGroup * group) } } +static gboolean +gst_play_bin_send_event (GstElement * element, GstEvent * event) +{ + GstPlayBin *play_bin; + GList *sinks; + gboolean res = FALSE; + + play_bin = GST_PLAY_BIN (element); + + sinks = play_bin->sinks; + while (sinks) { + GstElement *sink = GST_ELEMENT_CAST (sinks->data); + + if ((res = gst_element_send_event (sink, event))) + break; + + sinks = g_list_next (sinks); + } + + return res; +} + static GstStateChangeReturn gst_play_bin_change_state (GstElement * element, GstStateChange transition) {