rem: autoplug_list = xine_get_autoplay_input_plugin_ids (gtx->priv->xine); while (autoplug_list && autoplug_list[i]) { if (g_ascii_strcasecmp (autoplug_list[i], "VCD") == 0) gtx->priv->can_vcd = TRUE; else if (g_ascii_strcasecmp (autoplug_list[i], "DVD") == 0) gtx->priv->can_dvd = TRUE; else if (g_ascii_strcasecmp (autoplug_list[i], "CDDA") == 0) gtx->priv->can_cdda = TRUE; i++; }
context: gtk_xine_realize (GtkWidget *widget){	GtkXine *gtx;	const char *const *autoplug_list;	int i = 0;	GdkWindowAttr attr;	g_return_if_fail (widget != NULL);	g_return_if_fail (GTK_IS_XINE (widget));	gtx = GTK_XINE (widget);	/* set realized flag */	GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);	attr.x = widget->allocation.x;	attr.y = widget->allocation.y;	attr.width = widget->allocation.width;	attr.height = widget->allocation.height;	attr.window_type = GDK_WINDOW_CHILD;	attr.wclass = GDK_INPUT_OUTPUT;	attr.event_mask = gtk_widget_get_events (widget) | GDK_EXPOSURE_MASK		| GDK_POINTER_MOTION_MASK		| GDK_BUTTON_PRESS_MASK | GDK_KEY_PRESS_MASK;	widget->window = gdk_window_new (gtk_widget_get_parent_window (widget),			&attr, GDK_WA_X | GDK_WA_Y);	gdk_window_show (widget->window);	/* Flush, so that the window is really shown */	gdk_flush ();	gdk_window_set_user_data (widget->window, gtx);	gtx->priv->video_window = widget->window;	/* track configure events of toplevel window */	g_signal_connect (GTK_OBJECT (gtk_widget_get_toplevel (widget)),			  "configure-event",			  GTK_SIGNAL_FUNC (configure_cb), gtx);	/* Init threads in X and setup the needed X stuff */	if (!XInitThreads ())	{		g_signal_emit (G_OBJECT (gtx),				gtx_table_signals[ERROR], 0,				0,				_("Could not initialise the threads support.\n"				"You should install a thread-safe Xlib."));		return;	}	gtx->priv->display = XOpenDisplay (gdk_display_get_name			(gdk_display_get_default ()));	XLockDisplay (gtx->priv->display);	gtx->priv->screen = DefaultScreen (gtx->priv->display);	if (XShmQueryExtension (gtx->priv->display) == True)	{		gtx->priv->completion_event =			XShmGetEventBase (gtx->priv->display) + ShmCompletion;	} else {		gtx->priv->completion_event = -1;	}	/* load audio, video drivers */	gtx->priv->ao_driver = load_audio_out_driver (gtx);	gtx->priv->vo_driver = load_video_out_driver (gtx);	if (gtx->priv->vo_driver == NULL)	{		XUnlockDisplay (gtx->priv->display);		g_signal_emit (G_OBJECT (gtx),				gtx_table_signals[ERROR], 0,				GTX_STARTUP,				_("Could not find a suitable video output."));		return;	}	if (gtx->priv->null_out == FALSE)		gtx->priv->vis = xine_post_init (gtx->priv->xine, "goom", 0,				&gtx->priv->ao_driver, &gtx->priv->vo_driver);	gtx->priv->stream = xine_stream_new (gtx->priv->xine,			gtx->priv->ao_driver, gtx->priv->vo_driver);	gtx->priv->ev_queue = xine_event_new_queue (gtx->priv->stream);	/* Setup xine events, the screensaver and the event filter */	xine_event_create_listener_thread (gtx->priv->ev_queue,			xine_event, (void *) gtx);	scrsaver_init (gtx->priv->display);	XUnlockDisplay (gtx->priv->display);	/* Can we play DVDs and VCDs ? */	autoplug_list = xine_get_autoplay_input_plugin_ids (gtx->priv->xine);	while (autoplug_list && autoplug_list[i])	{		if (g_ascii_strcasecmp (autoplug_list[i], "VCD") == 0)			gtx->priv->can_vcd = TRUE;		else if (g_ascii_strcasecmp (autoplug_list[i], "DVD") == 0)			gtx->priv->can_dvd = TRUE;		else if (g_ascii_strcasecmp (autoplug_list[i], "CDDA") == 0)			gtx->priv->can_cdda = TRUE;		i++;	}	/* now, create a xine thread */	pthread_create (&gtx->priv->thread, NULL, xine_thread, gtx);	return;}