gst-plugins-base: seek: Make navigation/ colorbalance settings work with non-playbin2 pipelines too
Sebastian Dröge
slomo at kemper.freedesktop.org
Wed Feb 22 06:52:28 PST 2012
Module: gst-plugins-base
Branch: master
Commit: 55aaec31022846e795961c0d7f3eb19a13a1e9c3
URL: http://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=55aaec31022846e795961c0d7f3eb19a13a1e9c3
Author: Sebastian Dröge <sebastian.droege at collabora.co.uk>
Date: Wed Feb 22 15:52:04 2012 +0100
seek: Make navigation/colorbalance settings work with non-playbin2 pipelines too
---
tests/examples/seek/seek.c | 32 +++++++-------------------------
1 files changed, 7 insertions(+), 25 deletions(-)
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);
More information about the gstreamer-commits
mailing list