rem: audio_sink = gst_gconf_get_default_audio_sink (); if (!GST_IS_ELEMENT (audio_sink)) { g_message ("failed to render default audio sink from gconf"); return NULL; } video_sink = gst_gconf_get_default_video_sink (); if (!GST_IS_ELEMENT (video_sink)) { g_message ("failed to render default video sink from gconf"); return NULL; } vis_video_sink = gst_gconf_get_default_video_sink (); if (!GST_IS_ELEMENT (vis_video_sink)) { g_message ("failed to render default video sink from gconf for vis"); return NULL; }
add: bvw->priv->init_width = bvw->priv->init_height = 0;
context: bacon_video_widget_new (int width, int height,		gboolean null_out, GError **err){	BaconVideoWidget *bvw;	GstElement *audio_sink, *video_sink, *vis_video_sink, *vis_element;	bvw = BACON_VIDEO_WIDGET (g_object_new			(bacon_video_widget_get_type (), NULL));	bvw->priv->metadata_hash = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);		bvw->priv->play = gst_play_new (GST_PLAY_PIPE_VIDEO_VISUALISATION, err);		bvw->priv->init_width = bvw->priv->init_height = 0;	//FIXME	if (*err != NULL)	{		g_message ("error: %s", (*err)->message);		return NULL;	}	audio_sink = gst_gconf_get_default_audio_sink ();	if (!GST_IS_ELEMENT (audio_sink))	{		g_message ("failed to render default audio sink from gconf");		return NULL;	}	video_sink = gst_gconf_get_default_video_sink ();	if (!GST_IS_ELEMENT (video_sink))	{		g_message ("failed to render default video sink from gconf");		return NULL;	}	vis_video_sink = gst_gconf_get_default_video_sink ();	if (!GST_IS_ELEMENT (vis_video_sink)) {		g_message ("failed to render default video sink from gconf for vis");		return NULL;	}	gst_play_set_video_sink (bvw->priv->play, video_sink);	gst_play_set_audio_sink (bvw->priv->play, audio_sink);	gst_play_set_visualisation_video_sink (bvw->priv->play, vis_video_sink);	bvw->priv->vis_plugins_list = NULL;		bvw->priv->vis_sig_handler = g_signal_connect (G_OBJECT (bvw->priv->play),												"have_vis_xid",												(GtkSignalFunc) update_vis_xid,												(gpointer) bvw);	bvw->priv->vis_signal_blocked = FALSE;			g_signal_connect (G_OBJECT (bvw->priv->play),			"have_xid", (GtkSignalFunc) update_xid, (gpointer) bvw);	g_signal_connect (G_OBJECT (bvw->priv->play),			"have_video_size", (GtkSignalFunc) got_video_size, (gpointer) bvw);	g_signal_connect (G_OBJECT (bvw->priv->play),			"stream_end", (GtkSignalFunc) got_eos, (gpointer) bvw);	g_signal_connect (G_OBJECT (bvw->priv->play),			"stream_length", (GtkSignalFunc) got_stream_length, (gpointer) bvw);	g_signal_connect (G_OBJECT (bvw->priv->play), "information",			(GtkSignalFunc) bacon_video_widget_information, (gpointer) bvw);	g_signal_connect (G_OBJECT (bvw->priv->play),			"time_tick", (GtkSignalFunc) got_time_tick, (gpointer) bvw);	g_signal_connect (G_OBJECT (bvw->priv->play),			"pipeline_error", (GtkSignalFunc) got_error, (gpointer) bvw);				bvw->priv->vw = GST_VIDEO_WIDGET(gst_video_widget_new ());	if (!GST_IS_VIDEO_WIDGET(bvw->priv->vw)) {		g_message ("failed to create video widget");		return NULL;	}		gtk_box_pack_end (GTK_BOX(bvw), GTK_WIDGET(bvw->priv->vw), TRUE, TRUE, 0);		gtk_widget_show (GTK_WIDGET(bvw->priv->vw));			return GTK_WIDGET (bvw);}