mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 04:36:20 +00:00
Added the xid stuff in again if compiling against gtk.
Original commit message from CVS: Added the xid stuff in again if compiling against gtk.
This commit is contained in:
parent
4594d70939
commit
d1b66a439a
1 changed files with 17 additions and 8 deletions
|
@ -7,8 +7,10 @@
|
||||||
static int launch_argc;
|
static int launch_argc;
|
||||||
static char **launch_argv;
|
static char **launch_argv;
|
||||||
|
|
||||||
//GtkWidget *window;
|
#ifndef USE_GLIB2
|
||||||
//GtkWidget *gtk_socket;
|
GtkWidget *window;
|
||||||
|
GtkWidget *gtk_socket;
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef void (*found_handler) (GstElement *element, gint xid, void *priv);
|
typedef void (*found_handler) (GstElement *element, gint xid, void *priv);
|
||||||
|
|
||||||
|
@ -22,7 +24,7 @@ arg_search (GstBin *bin, gchar *argname, found_handler handler, void *priv)
|
||||||
|
|
||||||
children = gst_bin_get_list(bin);
|
children = gst_bin_get_list(bin);
|
||||||
|
|
||||||
#if 0
|
#ifndef USE_GLIB2
|
||||||
while (children) {
|
while (children) {
|
||||||
GstElement *child;
|
GstElement *child;
|
||||||
|
|
||||||
|
@ -59,14 +61,16 @@ arg_search (GstBin *bin, gchar *argname, found_handler handler, void *priv)
|
||||||
void
|
void
|
||||||
handle_have_size (GstElement *element,int width,int height)
|
handle_have_size (GstElement *element,int width,int height)
|
||||||
{
|
{
|
||||||
//gtk_widget_set_usize(gtk_socket,width,height);
|
#ifndef USE_GLIB2
|
||||||
//gtk_widget_show_all(window);
|
gtk_widget_set_usize(gtk_socket,width,height);
|
||||||
|
gtk_widget_show_all(window);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
xid_handler (GstElement *element, gint xid, void *priv)
|
xid_handler (GstElement *element, gint xid, void *priv)
|
||||||
{
|
{
|
||||||
#if 0
|
#ifndef USE_GLIB2
|
||||||
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
|
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
|
||||||
|
|
||||||
gtk_socket = gtk_socket_new ();
|
gtk_socket = gtk_socket_new ();
|
||||||
|
@ -153,8 +157,13 @@ main(int argc, char *argv[])
|
||||||
fprintf(stderr,"RUNNING pipeline\n");
|
fprintf(stderr,"RUNNING pipeline\n");
|
||||||
gst_element_set_state (pipeline, GST_STATE_PLAYING);
|
gst_element_set_state (pipeline, GST_STATE_PLAYING);
|
||||||
|
|
||||||
// g_idle_add(idle_func,pipeline);
|
g_idle_add(idle_func,pipeline);
|
||||||
// g_main_loop_run (g_main_loop_new (NULL, FALSE));
|
#ifdef USE_GLIB2
|
||||||
|
g_main_loop_run (g_main_loop_new (NULL, FALSE));
|
||||||
|
#else
|
||||||
|
gtk_main();
|
||||||
|
#endif
|
||||||
|
|
||||||
while (1)
|
while (1)
|
||||||
gst_bin_iterate (GST_BIN (pipeline));
|
gst_bin_iterate (GST_BIN (pipeline));
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue