Support for GStreamer 1.0
[projects/chimara/chimara.git] / libchimara / init.c
index ab7522cbc545d6240ea578f2a1963796fcb4200d..bcf1ad3db9821231cb1b3a11dc1533b85cf6f85c 100644 (file)
@@ -1,14 +1,14 @@
 #include <config.h>
 #include <glib.h>
 #include <glib/gi18n-lib.h>
-#ifdef GSTREAMER_SOUND
+#if defined(GSTREAMER_0_10_SOUND) || defined(GSTREAMER_1_0_SOUND)
 #include <gst/gst.h>
 #endif
 
 static gboolean chimara_initialized = FALSE;
 
 /* This function is called at every entry point of the library, to set up
-threads and gettext. It is NOT called from Glk functions. */
+gettext and GStreamer. It is NOT called from Glk functions. */
 void
 chimara_init(void)
 {
@@ -17,21 +17,13 @@ chimara_init(void)
                /* Setup gettext */
                bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR);
                bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
-               
-               /* Make sure threads have been initialized */
-               if(!g_thread_supported())
-                       g_error(_("In order to use the Chimara library, you must initialize"
-                               " the thread system by calling g_threads_init() and "
-                               "gdk_threads_init() BEFORE the initial call to gtk_init() in "
-                               "your main program."));
 
-#ifdef GSTREAMER_SOUND
+#if defined(GSTREAMER_0_10_SOUND) || defined(GSTREAMER_1_0_SOUND)
                /* Make sure GStreamer has been initialized if it hasn't been already;
                in particular, if you want your program to parse GStreamer command line
                options then you should do it yourself, before gtk_init(). */
-               
-               /* SUCKY DEBIAN: gst_is_initialized() supported from 0.10.30 onward */
-               /*if( !gst_is_initialized() )*/
+
+               if( !gst_is_initialized() )
                        gst_init(NULL, NULL);
 #endif
        }