From: Sebastian Dröge Date: Wed, 22 Feb 2012 14:52:04 +0000 (+0100) Subject: seek: Make navigation/colorbalance settings work with non-playbin2 pipelines too X-Git-Tag: RELEASE-0.11.3~1^2~81 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=55aaec31022846e795961c0d7f3eb19a13a1e9c3;p=platform%2Fupstream%2Fgst-plugins-base.git seek: Make navigation/colorbalance settings work with non-playbin2 pipelines too --- diff --git a/tests/examples/seek/seek.c b/tests/examples/seek/seek.c index d861fc5..4ec50d8 100644 --- a/tests/examples/seek/seek.c +++ b/tests/examples/seek/seek.c @@ -2619,37 +2619,22 @@ is_valid_color_balance_element (GstElement * element) static void find_interface_elements (void) { - GstElement *video_sink, *playsink; GstIterator *it; gpointer item; gboolean done = FALSE, hardware = FALSE; - g_object_get (pipeline, "video-sink", &video_sink, NULL); - if (!video_sink) - return; - if (navigation_element) gst_object_unref (navigation_element); + navigation_element = NULL; if (colorbalance_element) gst_object_unref (colorbalance_element); colorbalance_element = NULL; - if (GST_IS_NAVIGATION (video_sink)) { - navigation_element = gst_object_ref (video_sink); - } else if (GST_IS_BIN (video_sink)) { - navigation_element = - gst_bin_get_by_interface (GST_BIN (video_sink), GST_TYPE_NAVIGATION); - } else { - navigation_element = NULL; - } - - gst_object_unref (video_sink); + navigation_element = + gst_bin_get_by_interface (GST_BIN (pipeline), GST_TYPE_NAVIGATION); - playsink = gst_bin_get_by_name (GST_BIN (pipeline), "playsink"); - g_assert (playsink != NULL); - - it = gst_bin_iterate_all_by_interface (GST_BIN (playsink), + it = gst_bin_iterate_all_by_interface (GST_BIN (pipeline), GST_TYPE_COLOR_BALANCE); while (!done) { switch (gst_iterator_next (it, &item)) { @@ -2699,8 +2684,6 @@ find_interface_elements (void) } gst_iterator_free (it); - - gst_object_unref (playsink); } /* called when Navigation command button is pressed */ @@ -3391,8 +3374,8 @@ main (int argc, char **argv) gtk_container_add (GTK_CONTAINER (navigation), grid); } - /* colorbalance expander, only for playbin2 */ - if (pipeline_type == 16) { + /* colorbalance expander */ + { GtkWidget *vbox, *frame; colorbalance = gtk_expander_new ("color balance options"); @@ -3616,8 +3599,7 @@ main (int argc, char **argv) } gtk_box_pack_start (GTK_BOX (vbox), step, FALSE, FALSE, 2); gtk_box_pack_start (GTK_BOX (vbox), navigation, FALSE, FALSE, 2); - if (colorbalance) - gtk_box_pack_start (GTK_BOX (vbox), colorbalance, FALSE, FALSE, 2); + gtk_box_pack_start (GTK_BOX (vbox), colorbalance, FALSE, FALSE, 2); gtk_box_pack_start (GTK_BOX (vbox), gtk_hseparator_new (), FALSE, FALSE, 2); gtk_box_pack_start (GTK_BOX (vbox), hscale, FALSE, FALSE, 2); gtk_box_pack_start (GTK_BOX (vbox), statusbar, FALSE, FALSE, 2);