seek: Use colorbalance of playbin2 directly

This commit is contained in:
Sebastian Dröge 2012-02-23 13:31:37 +01:00
parent 0ef49c5275
commit 03eab90fe8

View file

@ -1002,6 +1002,10 @@ make_playerbin2_pipeline (const gchar * location)
/* FIXME: this is not triggered, playbin2 is not forwarding it from the sink */
g_signal_connect (pipeline, "notify::volume", G_CALLBACK (volume_notify_cb),
NULL);
navigation_element = GST_ELEMENT (gst_object_ref (pipeline));
colorbalance_element = GST_ELEMENT (gst_object_ref (pipeline));
return pipeline;
}
@ -2623,6 +2627,9 @@ find_interface_elements (void)
gpointer item;
gboolean done = FALSE, hardware = FALSE;
if (pipeline_type == 16)
return;
if (navigation_element)
gst_object_unref (navigation_element);
navigation_element = NULL;
@ -2631,9 +2638,8 @@ find_interface_elements (void)
gst_object_unref (colorbalance_element);
colorbalance_element = NULL;
if (pipeline_type != 16)
navigation_element =
gst_bin_get_by_interface (GST_BIN (pipeline), GST_TYPE_NAVIGATION);
navigation_element =
gst_bin_get_by_interface (GST_BIN (pipeline), GST_TYPE_NAVIGATION);
it = gst_bin_iterate_all_by_interface (GST_BIN (pipeline),
GST_TYPE_COLOR_BALANCE);
@ -2693,17 +2699,13 @@ navigation_cmd_cb (GtkButton * button, gpointer data)
{
GstNavigationCommand cmd = GPOINTER_TO_INT (data);
if (pipeline_type == 16) {
gst_navigation_send_command (GST_NAVIGATION (pipeline), cmd);
} else {
if (!navigation_element) {
find_interface_elements ();
if (!navigation_element)
return;
}
gst_navigation_send_command (GST_NAVIGATION (navigation_element), cmd);
if (!navigation_element) {
find_interface_elements ();
if (!navigation_element)
return;
}
gst_navigation_send_command (GST_NAVIGATION (navigation_element), cmd);
}
#if defined (GDK_WINDOWING_X11) || defined (GDK_WINDOWING_WIN32) || defined (GDK_WINDOWING_QUARTZ)
@ -2804,9 +2806,6 @@ button_press_cb (GtkWidget * widget, GdkEventButton * event, gpointer user_data)
if (navigation_element)
gst_navigation_send_mouse_event (GST_NAVIGATION (navigation_element),
"mouse-button-press", event->button, event->x, event->y);
else if (pipeline_type == 16)
gst_navigation_send_mouse_event (GST_NAVIGATION (pipeline),
"mouse-button-press", event->button, event->x, event->y);
return FALSE;
}
@ -2818,9 +2817,6 @@ button_release_cb (GtkWidget * widget, GdkEventButton * event,
if (navigation_element)
gst_navigation_send_mouse_event (GST_NAVIGATION (navigation_element),
"mouse-button-release", event->button, event->x, event->y);
else if (pipeline_type == 16)
gst_navigation_send_mouse_event (GST_NAVIGATION (pipeline),
"mouse-button-release", event->button, event->x, event->y);
return FALSE;
}
@ -2831,9 +2827,6 @@ key_press_cb (GtkWidget * widget, GdkEventKey * event, gpointer user_data)
if (navigation_element)
gst_navigation_send_key_event (GST_NAVIGATION (navigation_element),
"key-press", gdk_keyval_name (event->keyval));
else if (pipeline_type == 16)
gst_navigation_send_key_event (GST_NAVIGATION (pipeline),
"key-press", gdk_keyval_name (event->keyval));
return FALSE;
}
@ -2844,9 +2837,6 @@ key_release_cb (GtkWidget * widget, GdkEventKey * event, gpointer user_data)
if (navigation_element)
gst_navigation_send_key_event (GST_NAVIGATION (navigation_element),
"key-release", gdk_keyval_name (event->keyval));
else if (pipeline_type == 16)
gst_navigation_send_key_event (GST_NAVIGATION (pipeline),
"key-release", gdk_keyval_name (event->keyval));
return FALSE;
}
@ -2858,9 +2848,6 @@ motion_notify_cb (GtkWidget * widget, GdkEventMotion * event,
if (navigation_element)
gst_navigation_send_mouse_event (GST_NAVIGATION (navigation_element),
"mouse-move", 0, event->x, event->y);
else if (pipeline_type == 16)
gst_navigation_send_mouse_event (GST_NAVIGATION (pipeline),
"mouse-move", 0, event->x, event->y);
return FALSE;
}