[180/906] minor cleanup in fxtest

This commit is contained in:
Filippo Argiolas 2008-08-16 17:36:10 +02:00 committed by Matthew Waters
parent 8941057006
commit 944afa296c

View file

@ -6,8 +6,6 @@
#include <gst/interfaces/xoverlay.h>
GstElement *pipeline;
/* TODO: use x overlay in the proper way (like suggested in docs, see gtkxoverlay example) */
static gboolean
expose_cb (GtkWidget * widget, GdkEventExpose * event, gpointer data)
@ -20,7 +18,7 @@ expose_cb (GtkWidget * widget, GdkEventExpose * event, gpointer data)
}
static void
destroy_cb (gpointer data)
destroy_cb (GtkWidget *widget, GdkEvent *event, GstElement *pipeline)
{
g_message ("destroy callback");
@ -86,6 +84,7 @@ gint
main (gint argc, gchar * argv[])
{
GstStateChangeReturn ret;
GstElement *pipeline;
GstElement *uload, *filter, *sink;
GstElement *sourcebin;
GError *error = NULL;
@ -139,11 +138,6 @@ main (gint argc, gchar * argv[])
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_container_set_border_width (GTK_CONTAINER (window), 3);
g_signal_connect (G_OBJECT (window), "delete-event",
G_CALLBACK (destroy_cb), NULL);
g_signal_connect (G_OBJECT (window), "destroy-event",
G_CALLBACK (destroy_cb), NULL);
pipeline = gst_pipeline_new ("pipeline");
uload = gst_element_factory_make ("glupload", "glu");
@ -157,6 +151,11 @@ main (gint argc, gchar * argv[])
return -1;
}
g_signal_connect (G_OBJECT (window), "delete-event",
G_CALLBACK (destroy_cb), pipeline);
g_signal_connect (G_OBJECT (window), "destroy-event",
G_CALLBACK (destroy_cb), pipeline);
screen = gtk_drawing_area_new ();
gtk_widget_set_size_request (screen, 640, 480); // 500 x 376