Index: evolution/configure.in
===================================================================
RCS file: /cvs/gnome/evolution/configure.in,v
retrieving revision 1.903
diff -p -u -r1.903 configure.in
--- evolution/configure.in	14 Jun 2006 09:59:42 -0000	1.903
+++ evolution/configure.in	19 Jun 2006 00:54:04 -0000
@@ -80,7 +80,7 @@ AM_CONDITIONAL(HAVE_JW, test "x$HAVE_JW"
 AC_SUBST(HAVE_JW)
 
 dnl I18N stuff
-AC_PROG_INTLTOOL([0.35.0])
+AC_PROG_INTLTOOL([0.34.90])
 
 AM_GLIB_GNU_GETTEXT
 
@@ -1520,12 +1520,12 @@ AC_SUBST(all_plugins_experimental)
 
 if echo ${plugins_enabled} | grep "audio-inline" > /dev/null
 then
-	if ${PKG_CONFIG} --exists gstreamer-0.8
+	if ${PKG_CONFIG} --exists gstreamer-0.10
 	then
 		dnl *********************
 		dnl gstreamer
 		dnl *********************
-		PKG_CHECK_MODULES(GSTREAMER, gstreamer-0.8)
+		PKG_CHECK_MODULES(GSTREAMER, gstreamer-0.10)
 		AC_SUBST(GSTREAMER_CFLAGS)
 		AC_SUBST(GSTREAMER_LIBS)
 	else
Index: evolution/plugins/audio-inline/audio-inline.c
===================================================================
RCS file: /cvs/gnome/evolution/plugins/audio-inline/audio-inline.c,v
retrieving revision 1.7
diff -p -u -r1.7 audio-inline.c
--- evolution/plugins/audio-inline/audio-inline.c	27 Jan 2006 16:33:05 -0000	1.7
+++ evolution/plugins/audio-inline/audio-inline.c	19 Jun 2006 00:54:05 -0000
@@ -38,7 +38,7 @@ struct _org_gnome_audio_inline_pobject {
 
 	CamelMimePart *part;
 	char *filename;
-	GstElement *thread;
+	GstElement *pipeline;
 };
 
 static void
@@ -57,10 +57,10 @@ org_gnome_audio_inline_pobject_free (EMF
 		g_free (po->filename);
 		po->filename = NULL;
 	}
-	if (po->thread) {
-		gst_element_set_state (po->thread, GST_STATE_NULL);
-		gst_object_unref (GST_OBJECT (po->thread));
-		po->thread = NULL;
+	if (po->pipeline) {
+		gst_element_set_state (po->pipeline, GST_STATE_NULL);
+		gst_object_unref (GST_OBJECT (po->pipeline));
+		po->pipeline = NULL;
 	}
 }
 
@@ -69,9 +69,9 @@ org_gnome_audio_inline_pause_clicked (Gt
 {
 	struct _org_gnome_audio_inline_pobject *po = (struct _org_gnome_audio_inline_pobject *) pobject;
 
-	if (po->thread) {
+	if (po->pipeline) {
 		/* start playing */
-		gst_element_set_state (po->thread, GST_STATE_PAUSED);
+		gst_element_set_state (po->pipeline, GST_STATE_PAUSED);
 	}
 }
 
@@ -80,42 +80,47 @@ org_gnome_audio_inline_stop_clicked (Gtk
 {
 	struct _org_gnome_audio_inline_pobject *po = (struct _org_gnome_audio_inline_pobject *) pobject;
 
-	if (po->thread) {
+	if (po->pipeline) {
 		/* start playing */
-		gst_element_set_state (po->thread, GST_STATE_READY);
+		gst_element_set_state (po->pipeline, GST_STATE_READY);
 	}
 }
 
 static GstElement *
 org_gnome_audio_inline_gst_mpeg_thread (GstElement *filesrc)
 {
-	GstElement *thread, *decoder, *audiosink;
+	GstElement *pipeline, *decoder, *audiosink;
 
-	/* create a new thread to hold the elements */
-	thread = gst_thread_new ("org-gnome-audio-inline-mpeg-thread");
+	/* create a new pipeline to hold the elements */
+	pipeline = gst_pipeline_new ("org-gnome-audio-inline-mpeg-thread");
+	g_assert (pipeline != NULL);
 
 	/* now it's time to get the decoder */
 	decoder = gst_element_factory_make ("mad", "decoder");
-                                
+	if (!decoder)
+		d(printf ("You don't have the gstreamer 'mad' element installed!\n"));
+                       
 	/* and an audio sink */
 	audiosink = gst_element_factory_make ("osssink", "play_audio");
+	g_assert (audiosink != NULL);
                                     
 	/* add objects to the main pipeline */
-	gst_bin_add_many (GST_BIN (thread), filesrc, decoder, audiosink, NULL);
+	gst_bin_add_many (GST_BIN (pipeline), filesrc, decoder, audiosink, NULL);
                                         
 	/* link src to sink */
 	gst_element_link_many (filesrc, decoder, audiosink, NULL);
 
-	return thread;
+	return pipeline;
 }
 
 static GstElement *
 org_gnome_audio_inline_gst_ogg_thread (GstElement *filesrc)
 {
-	GstElement *thread, *demuxer, *decoder, *converter, *audiosink;
+	GstElement *pipeline, *demuxer, *decoder, *converter, *audiosink;
 
-	/* create a new thread to hold the elements */
-	thread = gst_thread_new ("org-gnome-audio-inline-mpeg-thread");
+	/* create a new pipeline to hold the elements */
+	pipeline = gst_pipeline_new ("org-gnome-audio-inline-mpeg-thread");
+	g_assert (pipeline != NULL);
 
 	/* create an ogg demuxer */
 	demuxer = gst_element_factory_make ("oggdemux", "demuxer");
@@ -123,7 +128,8 @@ org_gnome_audio_inline_gst_ogg_thread (G
                                                                             
 	/* create a vorbis decoder */
 	decoder = gst_element_factory_make ("vorbisdec", "decoder");
-	g_assert (decoder != NULL);
+	if (!decoder)
+		d(printf ("You don't have the gstreamer 'ogg vorbis' element installed!\n"));
                                                                                   
 	/* create an audio converter */
 	converter = gst_element_factory_make ("audioconvert", "converter");
@@ -133,59 +139,63 @@ org_gnome_audio_inline_gst_ogg_thread (G
 	audiosink = gst_element_factory_make ("osssink", "play_audio");
 	g_assert (audiosink != NULL);
                                                                                               
-	/* add objects to the thread */
-	gst_bin_add_many (GST_BIN (thread), filesrc, demuxer, decoder, converter, audiosink, NULL);
+	/* add objects to the pipeline */
+	gst_bin_add_many (GST_BIN (pipeline), filesrc, demuxer, decoder, converter, audiosink, NULL);
 
 	/* link them in the logical order */
 	gst_element_link_many (filesrc, demuxer, decoder, converter, audiosink, NULL);
 
-	return thread;
+	return pipeline;
 }
 
 static GstElement *
 org_gnome_audio_inline_gst_flac_thread (GstElement *filesrc)
 {
-	GstElement *thread, *decoder, *audiosink;
+	GstElement *pipeline, *decoder, *audiosink;
 
-	/* create a new thread to hold the elements */
-	thread = gst_thread_new ("org-gnome-audio-inline-flac-thread");
+	/* create a new pipeline to hold the elements */
+	pipeline = gst_pipeline_new ("org-gnome-audio-inline-flac-thread");
 
 	/* now it's time to get the decoder */
 	decoder = gst_element_factory_make ("flacdec", "decoder");
+	if (!decoder)
+		d(printf ("You don't have the gstreamer 'flacdec' element installed!\n"));
                                 
 	/* and an audio sink */
 	audiosink = gst_element_factory_make ("osssink", "play_audio");
                                     
 	/* add objects to the main pipeline */
-	gst_bin_add_many (GST_BIN (thread), filesrc, decoder, audiosink, NULL);
+	gst_bin_add_many (GST_BIN (pipeline), filesrc, decoder, audiosink, NULL);
                                         
 	/* link src to sink */
 	gst_element_link_many (filesrc, decoder, audiosink, NULL);
 
-	return thread;
+	return pipeline;
 }
 
 static GstElement *
 org_gnome_audio_inline_gst_mod_thread (GstElement *filesrc)
 {
-	GstElement *thread, *decoder, *audiosink;
+	GstElement *pipeline, *decoder, *audiosink;
 
-	/* create a new thread to hold the elements */
-	thread = gst_thread_new ("org-gnome-audio-inline-flac-thread");
+	/* create a new pipeline to hold the elements */
+	pipeline = gst_pipeline_new ("org-gnome-audio-inline-flac-thread");
 
 	/* now it's time to get the decoder */
 	decoder = gst_element_factory_make ("mikmod", "decoder");
+	if (!decoder)
+		d(printf ("You don't have the gstreamer 'mikmod' element installed!\n"));
                                 
 	/* and an audio sink */
 	audiosink = gst_element_factory_make ("osssink", "play_audio");
                                     
 	/* add objects to the main pipeline */
-	gst_bin_add_many (GST_BIN (thread), filesrc, decoder, audiosink, NULL);
+	gst_bin_add_many (GST_BIN (pipeline), filesrc, decoder, audiosink, NULL);
                                         
 	/* link src to sink */
 	gst_element_link_many (filesrc, decoder, audiosink, NULL);
 
-	return thread;
+	return pipeline;
 }
 
 static void
@@ -200,6 +210,7 @@ org_gnome_audio_inline_play_clicked (Gtk
 		CamelDataWrapper *data;
 		int argc = 1;
 		char *argv [] = { "org_gnome_audio_inline", NULL };
+		GError *error = NULL;
 
 		po->filename = e_mktemp ("org-gnome-audio-inline-file-XXXXXX");
 
@@ -211,9 +222,19 @@ org_gnome_audio_inline_play_clicked (Gtk
 		camel_stream_flush (stream);
 		camel_object_unref (stream);
 
-		d(printf ("audio inline formatter: init gst thread\n"));
+		if (!gst_init_check (&argc, (char ***) &argv, &error)) {
+			gchar *errstr;
+			g_free (argv[0]);
+			g_free (argv);
+			errstr = g_strdup_printf ("can't init gstreamer: %s",
+				GST_STR_NULL (error->message));
+			g_free (errstr);
+			g_error_free (error);
+			return;
+		}
+		else {
+			d(printf ("audio inline formatter: init gstreamer pipeline\n"));
 
-		if (gst_init_check (&argc, (char ***) &argv)) {
 			CamelContentType *type;
 			GstElement *filesrc;
 
@@ -227,24 +248,24 @@ org_gnome_audio_inline_play_clicked (Gtk
 					if (!g_ascii_strcasecmp (type->subtype, "mpeg") || !g_ascii_strcasecmp (type->subtype, "x-mpeg")
 					    || !g_ascii_strcasecmp (type->subtype, "mpeg3") || !g_ascii_strcasecmp (type->subtype, "x-mpeg3")
 					    || !g_ascii_strcasecmp (type->subtype, "mp3") || !g_ascii_strcasecmp (type->subtype, "x-mp3")) {
-						po->thread = org_gnome_audio_inline_gst_mpeg_thread (filesrc);
+						po->pipeline = org_gnome_audio_inline_gst_mpeg_thread (filesrc);
 					} else if (!g_ascii_strcasecmp (type->subtype, "flac") || !g_ascii_strcasecmp (type->subtype, "x-flac")) {
-						po->thread = org_gnome_audio_inline_gst_flac_thread (filesrc);
+						po->pipeline = org_gnome_audio_inline_gst_flac_thread (filesrc);
 					} else if (!g_ascii_strcasecmp (type->subtype, "mod") || !g_ascii_strcasecmp (type->subtype, "x-mod")) {
-						po->thread = org_gnome_audio_inline_gst_mod_thread (filesrc);
+						po->pipeline = org_gnome_audio_inline_gst_mod_thread (filesrc);
 					}
 				} else if (!g_ascii_strcasecmp (type->type, "application")) {
 					if (!g_ascii_strcasecmp (type->subtype, "ogg") || !g_ascii_strcasecmp (type->subtype, "x-ogg")) {
-						po->thread = org_gnome_audio_inline_gst_ogg_thread (filesrc);
+						po->pipeline = org_gnome_audio_inline_gst_ogg_thread (filesrc);
 					}
 				}
 			}
 		}
 	}
 
-	if (po->thread) {
+	if (po->pipeline) {
 		/* start playing */
-		gst_element_set_state (po->thread, GST_STATE_PLAYING);
+		gst_element_set_state (po->pipeline, GST_STATE_PLAYING);
 	}
 }
 
@@ -298,7 +319,7 @@ org_gnome_audio_inline_format (void *ep,
 	camel_object_ref (t->part);
 	pobj->part = t->part;
 	pobj->filename = NULL;
-	pobj->thread = NULL;
+	pobj->pipeline = NULL;
 	pobj->object.free = org_gnome_audio_inline_pobject_free;
 
 	camel_stream_printf (t->stream, "<object classid=%s></object>\n", classid);
