From: Philip Chimento Date: Tue, 28 Dec 2010 16:53:13 +0000 (+0100) Subject: Added guards for compiling without GStreamer X-Git-Tag: v0.9~152^2~19 X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;h=e46e161023a699c5b28ee6f81e912168ab97a643;p=projects%2Fchimara%2Fchimara.git Added guards for compiling without GStreamer The GStreamer code should be protected everywhere with #ifdef's so that the library will still build without GStreamer support. --- diff --git a/libchimara/gestalt.c b/libchimara/gestalt.c index bcd2113..15a754a 100644 --- a/libchimara/gestalt.c +++ b/libchimara/gestalt.c @@ -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: diff --git a/libchimara/schannel.c b/libchimara/schannel.c index 004efef..2e741d3 100644 --- a/libchimara/schannel.c +++ b/libchimara/schannel.c @@ -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 */ } /**