Added guards for compiling without GStreamer
authorPhilip Chimento <philip.chimento@gmail.com>
Tue, 28 Dec 2010 16:53:13 +0000 (17:53 +0100)
committerPhilip Chimento <philip.chimento@gmail.com>
Tue, 28 Dec 2010 16:53:13 +0000 (17:53 +0100)
The GStreamer code should be protected everywhere with #ifdef's so that
the library will still build without GStreamer support.

libchimara/gestalt.c
libchimara/schannel.c

index bcd2113c6608381e1fedd5a3d9513f75f323de65..15a754afe3a431260cce25aa17d96dbe00f3d177 100644 (file)
@@ -126,7 +126,11 @@ glk_gestalt_ext(glui32 sel, glui32 val, glui32 *arr, glui32 arrlen)
                        return 1;
 
                case gestalt_Sound:
+#ifdef GSTREAMER_SOUND
                        return 1;
+#else
+                       return 0;
+#endif
                        
                /* Unsupported capabilities */
                case gestalt_SoundVolume:
index 004efefd87288841194b894958dd0f099ff777b5..2e741d3fea1f330e1ba7b3abaa290a16e9fe351b 100644 (file)
@@ -80,6 +80,7 @@ glk_schannel_destroy(schanid_t chan)
 {
        VALID_SCHANNEL(chan, return);
 
+#ifdef GSTREAMER_SOUND
        ChimaraGlkPrivate *glk_data = g_private_get(glk_data_key);
        
        glk_data->schannel_list = g_list_delete_link(glk_data->schannel_list, chan->schannel_list);
@@ -95,6 +96,7 @@ glk_schannel_destroy(schanid_t chan)
        
        chan->magic = MAGIC_FREE;
        g_free(chan);
+#endif
 }
 
 /**
@@ -116,6 +118,7 @@ glk_schannel_iterate(schanid_t chan, glui32 *rockptr)
 {
        VALID_SCHANNEL_OR_NULL(chan, return NULL);
 
+#ifdef GSTREAMER_SOUND
        ChimaraGlkPrivate *glk_data = g_private_get(glk_data_key);
        GList *retnode;
        
@@ -130,6 +133,9 @@ glk_schannel_iterate(schanid_t chan, glui32 *rockptr)
                *rockptr = glk_schannel_get_rock(retval);
                
        return retval;
+#else
+       return NULL;
+#endif /* GSTREAMER_SOUND */
 }
 
 /**