diff options
author | Benjamin Otte <otte@gnome.org> | 2003-06-29 19:46:12 +0000 |
---|---|---|
committer | Benjamin Otte <otte@gnome.org> | 2003-06-29 19:46:12 +0000 |
commit | 90da904f1e435812ce245928b80cfd325785ff37 (patch) | |
tree | 308c8167f16721bbfe4a047e6d798ade33aa968e /sys/oss | |
parent | 7519af569b22f502f88b9c80e7ce26522e1e9aad (diff) |
compatibility fix for new GST_DEBUG stuff.
Original commit message from CVS:
compatibility fix for new GST_DEBUG stuff.
Includes fixes for missing includes for config.h and unistd.h
I only ensured for plugins I can build that they work, so if some of them are still broken, you gotta fix them yourselves unfortunately.
Diffstat (limited to 'sys/oss')
-rw-r--r-- | sys/oss/gstosscommon.c | 70 | ||||
-rw-r--r-- | sys/oss/gstossgst.c | 11 | ||||
-rw-r--r-- | sys/oss/gstosssink.c | 8 | ||||
-rw-r--r-- | sys/oss/gstosssrc.c | 9 |
4 files changed, 54 insertions, 44 deletions
diff --git a/sys/oss/gstosscommon.c b/sys/oss/gstosscommon.c index 6d96f9c4..c3346b8f 100644 --- a/sys/oss/gstosscommon.c +++ b/sys/oss/gstosscommon.c @@ -47,24 +47,24 @@ gst_ossformat_get (gint law, gint endianness, gboolean sign, gint width, gint de if (sign == TRUE) { if (endianness == G_LITTLE_ENDIAN) { *format = AFMT_S16_LE; - GST_DEBUG (GST_CAT_PLUGIN_INFO, + GST_DEBUG ( "16 bit signed LE, no law (%d)", *format); } else if (endianness == G_BIG_ENDIAN) { *format = AFMT_S16_BE; - GST_DEBUG (GST_CAT_PLUGIN_INFO, + GST_DEBUG ( "16 bit signed BE, no law (%d)", *format); } } else { if (endianness == G_LITTLE_ENDIAN) { *format = AFMT_U16_LE; - GST_DEBUG (GST_CAT_PLUGIN_INFO, + GST_DEBUG ( "16 bit unsigned LE, no law (%d)", *format); } else if (endianness == G_BIG_ENDIAN) { *format = AFMT_U16_BE; - GST_DEBUG (GST_CAT_PLUGIN_INFO, + GST_DEBUG ( "16 bit unsigned BE, no law (%d)", *format); } } @@ -73,23 +73,23 @@ gst_ossformat_get (gint law, gint endianness, gboolean sign, gint width, gint de else if (width == 8) { if (sign == TRUE) { *format = AFMT_S8; - GST_DEBUG (GST_CAT_PLUGIN_INFO, + GST_DEBUG ( "8 bit signed, no law (%d)", *format); } else { *format = AFMT_U8; - GST_DEBUG (GST_CAT_PLUGIN_INFO, + GST_DEBUG ( "8 bit unsigned, no law (%d)", *format); } *bps = 1; } } else if (law == 1) { *format = AFMT_MU_LAW; - GST_DEBUG (GST_CAT_PLUGIN_INFO, + GST_DEBUG ( "mu law (%d)", *format); } else if (law == 2) { *format = AFMT_A_LAW; - GST_DEBUG (GST_CAT_PLUGIN_INFO, + GST_DEBUG ( "a law (%d)", *format); } else { g_critical ("unknown law"); @@ -147,7 +147,7 @@ gst_osscommon_parse_caps (GstOssCommon *common, GstCaps *caps) if (!gst_ossformat_get (common->law, common->endianness, common->sign, common->width, common->depth, &format, &bps)) { - GST_DEBUG (GST_CAT_PLUGIN_INFO, "could not get format"); + GST_DEBUG ("could not get format"); return FALSE; } @@ -216,7 +216,7 @@ gst_osscommon_sync_parms (GstOssCommon *common) else frag = 0x7FFF0000 | common->fragment; - GST_INFO (GST_CAT_PLUGIN_INFO, + GST_INFO ( "common: setting sound card to %dHz %d format %s (%08x fragment)", common->rate, common->format, (common->channels == 2) ? "stereo" : "mono", frag); @@ -250,7 +250,7 @@ gst_osscommon_sync_parms (GstOssCommon *common) } common->fragment = space.fragstotal << 16 | frag_ln; - GST_INFO (GST_CAT_PLUGIN_INFO, + GST_INFO ( "common: set sound card to %dHz, %d format, %s " "(%d bytes buffer, %08x fragment)", common->rate, common->format, @@ -258,7 +258,7 @@ gst_osscommon_sync_parms (GstOssCommon *common) space.bytes, common->fragment); common->fragment_time = (GST_SECOND * common->fragment_size) / common->bps; - GST_INFO (GST_CAT_PLUGIN_INFO, "fragment time %u %" G_GUINT64_FORMAT "\n", + GST_INFO ( "fragment time %u %" G_GUINT64_FORMAT "\n", common->bps, common->fragment_time); if (target_format != common->format || @@ -278,7 +278,7 @@ gst_osscommon_open_audio (GstOssCommon *common, GstOssOpenMode mode, gchar **err gint caps; g_return_val_if_fail (common->fd == -1, FALSE); - GST_INFO (GST_CAT_PLUGIN_INFO, "common: attempting to open sound device"); + GST_INFO ( "common: attempting to open sound device"); /* first try to open the sound card */ if (mode == GST_OSSCOMMON_WRITE) { @@ -336,41 +336,41 @@ gst_osscommon_open_audio (GstOssCommon *common, GstOssOpenMode mode, gchar **err /* set card state */ ioctl (common->fd, SNDCTL_DSP_GETCAPS, &caps); - GST_INFO (GST_CAT_PLUGIN_INFO, "osscommon: Capabilities %08x", caps); + GST_INFO ( "osscommon: Capabilities %08x", caps); - if (caps & DSP_CAP_DUPLEX) GST_INFO (GST_CAT_PLUGIN_INFO, "osscommon: Full duplex"); - if (caps & DSP_CAP_REALTIME) GST_INFO (GST_CAT_PLUGIN_INFO, "osscommon: Realtime"); - if (caps & DSP_CAP_BATCH) GST_INFO (GST_CAT_PLUGIN_INFO, "osscommon: Batch"); - if (caps & DSP_CAP_COPROC) GST_INFO (GST_CAT_PLUGIN_INFO, "osscommon: Has coprocessor"); - if (caps & DSP_CAP_TRIGGER) GST_INFO (GST_CAT_PLUGIN_INFO, "osscommon: Trigger"); - if (caps & DSP_CAP_MMAP) GST_INFO (GST_CAT_PLUGIN_INFO, "osscommon: Direct access"); + if (caps & DSP_CAP_DUPLEX) GST_INFO ( "osscommon: Full duplex"); + if (caps & DSP_CAP_REALTIME) GST_INFO ( "osscommon: Realtime"); + if (caps & DSP_CAP_BATCH) GST_INFO ( "osscommon: Batch"); + if (caps & DSP_CAP_COPROC) GST_INFO ( "osscommon: Has coprocessor"); + if (caps & DSP_CAP_TRIGGER) GST_INFO ( "osscommon: Trigger"); + if (caps & DSP_CAP_MMAP) GST_INFO ( "osscommon: Direct access"); #ifdef DSP_CAP_MULTI - if (caps & DSP_CAP_MULTI) GST_INFO (GST_CAT_PLUGIN_INFO, "osscommon: Multiple open"); + if (caps & DSP_CAP_MULTI) GST_INFO ( "osscommon: Multiple open"); #endif /* DSP_CAP_MULTI */ #ifdef DSP_CAP_BIND - if (caps & DSP_CAP_BIND) GST_INFO (GST_CAT_PLUGIN_INFO, "osscommon: Channel binding"); + if (caps & DSP_CAP_BIND) GST_INFO ( "osscommon: Channel binding"); #endif /* DSP_CAP_BIND */ ioctl(common->fd, SNDCTL_DSP_GETFMTS, &caps); - GST_INFO (GST_CAT_PLUGIN_INFO, "osscommon: Formats %08x", caps); - if (caps & AFMT_MU_LAW) GST_INFO (GST_CAT_PLUGIN_INFO, "osscommon: MU_LAW"); - if (caps & AFMT_A_LAW) GST_INFO (GST_CAT_PLUGIN_INFO, "osscommon: A_LAW"); - if (caps & AFMT_IMA_ADPCM) GST_INFO (GST_CAT_PLUGIN_INFO, "osscommon: IMA_ADPCM"); - if (caps & AFMT_U8) GST_INFO (GST_CAT_PLUGIN_INFO, "osscommon: U8"); - if (caps & AFMT_S16_LE) GST_INFO (GST_CAT_PLUGIN_INFO, "osscommon: S16_LE"); - if (caps & AFMT_S16_BE) GST_INFO (GST_CAT_PLUGIN_INFO, "osscommon: S16_BE"); - if (caps & AFMT_S8) GST_INFO (GST_CAT_PLUGIN_INFO, "osscommon: S8"); - if (caps & AFMT_U16_LE) GST_INFO (GST_CAT_PLUGIN_INFO, "osscommon: U16_LE"); - if (caps & AFMT_U16_BE) GST_INFO (GST_CAT_PLUGIN_INFO, "osscommon: U16_BE"); - if (caps & AFMT_MPEG) GST_INFO (GST_CAT_PLUGIN_INFO, "osscommon: MPEG"); + GST_INFO ( "osscommon: Formats %08x", caps); + if (caps & AFMT_MU_LAW) GST_INFO ( "osscommon: MU_LAW"); + if (caps & AFMT_A_LAW) GST_INFO ( "osscommon: A_LAW"); + if (caps & AFMT_IMA_ADPCM) GST_INFO ( "osscommon: IMA_ADPCM"); + if (caps & AFMT_U8) GST_INFO ( "osscommon: U8"); + if (caps & AFMT_S16_LE) GST_INFO ( "osscommon: S16_LE"); + if (caps & AFMT_S16_BE) GST_INFO ( "osscommon: S16_BE"); + if (caps & AFMT_S8) GST_INFO ( "osscommon: S8"); + if (caps & AFMT_U16_LE) GST_INFO ( "osscommon: U16_LE"); + if (caps & AFMT_U16_BE) GST_INFO ( "osscommon: U16_BE"); + if (caps & AFMT_MPEG) GST_INFO ( "osscommon: MPEG"); #ifdef AFMT_AC3 - if (caps & AFMT_AC3) GST_INFO (GST_CAT_PLUGIN_INFO, "osscommon: AC3"); + if (caps & AFMT_AC3) GST_INFO ( "osscommon: AC3"); #endif - GST_INFO (GST_CAT_PLUGIN_INFO, + GST_INFO ( "osscommon: opened audio (%s) with fd=%d", common->device, common->fd); common->caps = caps; diff --git a/sys/oss/gstossgst.c b/sys/oss/gstossgst.c index 337dff48..71feae36 100644 --- a/sys/oss/gstossgst.c +++ b/sys/oss/gstossgst.c @@ -21,6 +21,9 @@ */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include <sys/types.h> #include <sys/stat.h> #include <sys/ioctl.h> @@ -173,7 +176,7 @@ gst_ossgst_format_to_caps (gint format, gint stereo, gint rate) gint width = 16; gboolean supported = TRUE; - GST_DEBUG (0, "have format 0x%08x %d %d", format, stereo, rate); + GST_DEBUG ("have format 0x%08x %d %d", format, stereo, rate); switch (format) { case AFMT_MU_LAW: @@ -342,7 +345,7 @@ gst_ossgst_spawn_process (GstOssGst *ossgst) pipe(ossgst->fdin); pipe(ossgst->fdout); - GST_DEBUG (0, "about to fork"); + GST_DEBUG ("about to fork"); if((ossgst->childpid = fork()) == -1) { @@ -350,13 +353,13 @@ gst_ossgst_spawn_process (GstOssGst *ossgst) gst_element_error(GST_ELEMENT(ossgst),"forking"); return FALSE; } - GST_DEBUG (0,"forked %d", ossgst->childpid); + GST_DEBUG ("forked %d", ossgst->childpid); if(ossgst->childpid == 0) { gchar **args; - GST_DEBUG (0, "fork command %d", ossgst->childpid); + GST_DEBUG ("fork command %d", ossgst->childpid); ld_preload = getenv ("LD_PRELOAD"); diff --git a/sys/oss/gstosssink.c b/sys/oss/gstosssink.c index 7bd4c988..1c424058 100644 --- a/sys/oss/gstosssink.c +++ b/sys/oss/gstosssink.c @@ -20,11 +20,15 @@ * Boston, MA 02111-1307, USA. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include <sys/ioctl.h> #include <sys/soundcard.h> #include <errno.h> +#include <unistd.h> -#include <gstosssink.h> +#include "gstosssink.h" /* elementfactory information */ static GstElementDetails gst_osssink_details = { @@ -634,7 +638,7 @@ gst_osssink_change_state (GstElement *element) gst_osscommon_close_audio (&osssink->common); GST_FLAG_UNSET (osssink, GST_OSSSINK_OPEN); - GST_INFO (GST_CAT_PLUGIN_INFO, "osssink: closed sound device"); + GST_INFO ( "osssink: closed sound device"); } break; } diff --git a/sys/oss/gstosssrc.c b/sys/oss/gstosssrc.c index 68593d80..046e8cc2 100644 --- a/sys/oss/gstosssrc.c +++ b/sys/oss/gstosssrc.c @@ -20,6 +20,9 @@ * Boston, MA 02111-1307, USA. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> @@ -322,7 +325,7 @@ gst_osssrc_get (GstPad *pad) src = GST_OSSSRC(gst_pad_get_parent (pad)); - GST_DEBUG (GST_CAT_PLUGIN_INFO, "attempting to read something from the soundcard"); + GST_DEBUG ("attempting to read something from the soundcard"); if (src->need_eos) { src->need_eos = FALSE; @@ -368,7 +371,7 @@ gst_osssrc_get (GstPad *pad) src->curoffset += readbytes; - GST_DEBUG (GST_CAT_PLUGIN_INFO, "pushed buffer from soundcard of %ld bytes, timestamp %" G_GINT64_FORMAT, + GST_DEBUG ("pushed buffer from soundcard of %ld bytes, timestamp %" G_GINT64_FORMAT, readbytes, GST_BUFFER_TIMESTAMP (buf)); return buf; @@ -426,7 +429,7 @@ gst_osssrc_change_state (GstElement *element) { GstOssSrc *osssrc = GST_OSSSRC (element); - GST_DEBUG (GST_CAT_PLUGIN_INFO, "osssrc: state change"); + GST_DEBUG ("osssrc: state change"); switch (GST_STATE_TRANSITION (element)) { case GST_STATE_NULL_TO_READY: |