From 90da904f1e435812ce245928b80cfd325785ff37 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Sun, 29 Jun 2003 19:46:12 +0000 Subject: 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. --- ext/aalib/gstaasink.c | 7 +++++-- ext/dv/gstdvdec.c | 3 +++ ext/esd/esdmon.c | 18 +++++++++++------- ext/esd/esdsink.c | 16 ++++++++++------ ext/flac/gstflacdec.c | 41 +++++++++++++++++++++------------------- ext/flac/gstflacenc.c | 3 +++ ext/gdk_pixbuf/gstgdkpixbuf.c | 3 +++ ext/jpeg/gstjpegdec.c | 31 ++++++++++++++++-------------- ext/jpeg/gstjpegenc.c | 33 +++++++++++++++++--------------- ext/ladspa/gstladspa.c | 44 +++++++++++++++++++++---------------------- ext/libpng/gstpngenc.c | 5 ++++- ext/mikmod/gstmikmod.c | 5 ++++- ext/raw1394/gst1394.c | 3 +++ ext/raw1394/gstdv1394src.c | 26 ++++++++++++------------- ext/shout2/gstshout2.c | 5 ++++- ext/speex/gstspeexdec.c | 5 ++++- ext/speex/gstspeexenc.c | 3 +++ 17 files changed, 149 insertions(+), 102 deletions(-) (limited to 'ext') diff --git a/ext/aalib/gstaasink.c b/ext/aalib/gstaasink.c index 49fad729..6a9fbd5f 100644 --- a/ext/aalib/gstaasink.c +++ b/ext/aalib/gstaasink.c @@ -17,6 +17,9 @@ * Boston, MA 02111-1307, USA. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include #include @@ -246,7 +249,7 @@ gst_aasink_sinkconnect (GstPad *pad, GstCaps *caps) /* FIXME aasink->format is never set */ - GST_DEBUG (0, "aasink: setting %08lx (" GST_FOURCC_FORMAT ")", + GST_DEBUG ("aasink: setting %08lx (" GST_FOURCC_FORMAT ")", aasink->format, GST_FOURCC_ARGS(aasink->format)); g_signal_emit( G_OBJECT (aasink), gst_aasink_signals[SIGNAL_HAVE_SIZE], 0, @@ -346,7 +349,7 @@ gst_aasink_chain (GstPad *pad, GstBuffer *buf) aa_imgwidth (aasink->context), /* dw */ aa_imgheight (aasink->context)); /* dh */ - GST_DEBUG (0,"videosink: clock wait: %" G_GUINT64_FORMAT, GST_BUFFER_TIMESTAMP(buf)); + GST_DEBUG ("videosink: clock wait: %" G_GUINT64_FORMAT, GST_BUFFER_TIMESTAMP(buf)); if (aasink->clock) { GstClockID id = gst_clock_new_single_shot_id (aasink->clock, GST_BUFFER_TIMESTAMP(buf)); diff --git a/ext/dv/gstdvdec.c b/ext/dv/gstdvdec.c index f7bae7bc..da53e4d2 100644 --- a/ext/dv/gstdvdec.c +++ b/ext/dv/gstdvdec.c @@ -17,6 +17,9 @@ * Boston, MA 02111-1307, USA. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include /* First, include the header file for the plugin, to bring in the diff --git a/ext/esd/esdmon.c b/ext/esd/esdmon.c index 5d8cd9fc..569942db 100644 --- a/ext/esd/esdmon.c +++ b/ext/esd/esdmon.c @@ -20,8 +20,12 @@ * Boston, MA 02111-1307, USA. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include #include +#include #define GST_TYPE_ESDMON \ (gst_esdmon_get_type()) @@ -278,7 +282,7 @@ gst_esdmon_get (GstPad *pad) g_return_val_if_fail (pad != NULL, NULL); esdmon = GST_ESDMON(gst_pad_get_parent (pad)); - GST_DEBUG (GST_CAT_PLUGIN_INFO, "attempting to read something from esdmon"); + GST_DEBUG ("attempting to read something from esdmon"); buf = gst_buffer_new (); g_return_val_if_fail (buf, NULL); @@ -324,7 +328,7 @@ gst_esdmon_get (GstPad *pad) if (esdmon->depth == 16) readsamples /= 2; esdmon->samples_since_basetime += readsamples; - GST_DEBUG (GST_CAT_PLUGIN_INFO, "pushed buffer from esdmon of %ld bytes, timestamp %" G_GINT64_FORMAT, readbytes, GST_BUFFER_TIMESTAMP (buf)); + GST_DEBUG ("pushed buffer from esdmon of %ld bytes, timestamp %" G_GINT64_FORMAT, readbytes, GST_BUFFER_TIMESTAMP (buf)); return buf; } @@ -442,21 +446,21 @@ gst_esdmon_open_audio (GstEsdmon *src) if (src->depth == 16) esdformat |= ESD_BITS16; else if (src->depth == 8) esdformat |= ESD_BITS8; else { - GST_DEBUG (0, "esdmon: invalid bit depth (%d)", src->depth); + GST_DEBUG ("esdmon: invalid bit depth (%d)", src->depth); return FALSE; } if (src->channels == 2) esdformat |= ESD_STEREO; else if (src->channels == 1) esdformat |= ESD_MONO; else { - GST_DEBUG (0, "esdmon: invalid number of channels (%d)", src->channels); + GST_DEBUG ("esdmon: invalid number of channels (%d)", src->channels); return FALSE; } - GST_DEBUG (0, "esdmon: attempting to open connection to esound server"); + GST_DEBUG ("esdmon: attempting to open connection to esound server"); src->fd = esd_monitor_stream(esdformat, src->frequency, src->host, connname); if ( src->fd < 0 ) { - GST_DEBUG (0, "esdmon: can't open connection to esound server"); + GST_DEBUG ("esdmon: can't open connection to esound server"); return FALSE; } @@ -475,7 +479,7 @@ gst_esdmon_close_audio (GstEsdmon *src) GST_FLAG_UNSET (src, GST_ESDMON_OPEN); - GST_DEBUG (0, "esdmon: closed sound device"); + GST_DEBUG ("esdmon: closed sound device"); } static GstElementStateReturn diff --git a/ext/esd/esdsink.c b/ext/esd/esdsink.c index 673aee6e..af28a1cf 100644 --- a/ext/esd/esdsink.c +++ b/ext/esd/esdsink.c @@ -20,8 +20,12 @@ * Boston, MA 02111-1307, USA. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include "esdsink.h" #include +#include /* elementfactory information */ static GstElementDetails esdsink_details = { @@ -197,7 +201,7 @@ gst_esdsink_chain (GstPad *pad, GstBuffer *buf) if (GST_BUFFER_DATA (buf) != NULL) { if (!esdsink->mute && esdsink->fd >= 0) { - GST_DEBUG (0, "esdsink: fd=%d data=%p size=%d", + GST_DEBUG ("esdsink: fd=%d data=%p size=%d", esdsink->fd, GST_BUFFER_DATA (buf), GST_BUFFER_SIZE (buf)); write (esdsink->fd, GST_BUFFER_DATA (buf), GST_BUFFER_SIZE (buf)); } @@ -288,21 +292,21 @@ gst_esdsink_open_audio (GstEsdsink *sink) if (sink->depth == 16) esdformat |= ESD_BITS16; else if (sink->depth == 8) esdformat |= ESD_BITS8; else { - GST_DEBUG (0, "esdsink: invalid bit depth (%d)", sink->depth); + GST_DEBUG ("esdsink: invalid bit depth (%d)", sink->depth); return FALSE; } if (sink->channels == 2) esdformat |= ESD_STEREO; else if (sink->channels == 1) esdformat |= ESD_MONO; else { - GST_DEBUG (0, "esdsink: invalid number of channels (%d)", sink->channels); + GST_DEBUG ("esdsink: invalid number of channels (%d)", sink->channels); return FALSE; } - GST_DEBUG (0, "esdsink: attempting to open connection to esound server"); + GST_DEBUG ("esdsink: attempting to open connection to esound server"); sink->fd = esd_play_stream_fallback(esdformat, sink->frequency, sink->host, connname); if ( sink->fd < 0 ) { - GST_DEBUG (0, "esdsink: can't open connection to esound server"); + GST_DEBUG ("esdsink: can't open connection to esound server"); return FALSE; } @@ -318,7 +322,7 @@ gst_esdsink_close_audio (GstEsdsink *sink) close(sink->fd); sink->fd = -1; - GST_DEBUG (0, "esdsink: closed sound device"); + GST_DEBUG ("esdsink: closed sound device"); } static GstElementStateReturn diff --git a/ext/flac/gstflacdec.c b/ext/flac/gstflacdec.c index 9fc05dc8..b439f044 100644 --- a/ext/flac/gstflacdec.c +++ b/ext/flac/gstflacdec.c @@ -17,6 +17,9 @@ * Boston, MA 02111-1307, USA. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include #include @@ -211,7 +214,7 @@ gst_flacdec_update_metadata (FlacDec *flacdec, const FLAC__StreamMetadata *metad number_of_comments = metadata->data.vorbis_comment.num_comments; value = NULL; - GST_DEBUG (GST_CAT_CAPS, "%d tag(s) found", number_of_comments); + GST_DEBUG ("%d tag(s) found", number_of_comments); for (cursor = 0; cursor < number_of_comments; cursor++) { str_ptr = metadata->data.vorbis_comment.comments[cursor].entry; @@ -225,7 +228,7 @@ gst_flacdec_update_metadata (FlacDec *flacdec, const FLAC__StreamMetadata *metad entry = gst_props_entry_new (name, GST_PROPS_STRING_TYPE, value); gst_props_add_entry (props, (GstPropsEntry *) entry); - GST_DEBUG (GST_CAT_CAPS, "%s : %s", name, value); + GST_DEBUG ("%s : %s", name, value); g_free (name); g_free (value); @@ -286,7 +289,7 @@ gst_flacdec_error_callback (const FLAC__SeekableStreamDecoder *decoder, break; } - GST_DEBUG (0, error); + GST_DEBUG (error); gst_element_error (GST_ELEMENT (flacdec), error); } @@ -299,7 +302,7 @@ gst_flacdec_seek (const FLAC__SeekableStreamDecoder *decoder, flacdec = GST_FLACDEC (client_data); - GST_DEBUG (0, "seek %" G_GINT64_FORMAT, position); + GST_DEBUG ("seek %" G_GINT64_FORMAT, position); if (!gst_bytestream_seek (flacdec->bs, position, GST_SEEK_METHOD_SET)) { return FLAC__SEEKABLE_STREAM_DECODER_SEEK_STATUS_ERROR; } @@ -318,7 +321,7 @@ gst_flacdec_tell (const FLAC__SeekableStreamDecoder *decoder, if (*position == -1) return FLAC__SEEKABLE_STREAM_DECODER_TELL_STATUS_ERROR; - GST_DEBUG (0, "tell %" G_GINT64_FORMAT, *position); + GST_DEBUG ("tell %" G_GINT64_FORMAT, *position); return FLAC__SEEKABLE_STREAM_DECODER_TELL_STATUS_OK; } @@ -335,7 +338,7 @@ gst_flacdec_length (const FLAC__SeekableStreamDecoder *decoder, if (*length == -1) return FLAC__SEEKABLE_STREAM_DECODER_TELL_STATUS_ERROR; - GST_DEBUG (0, "length %" G_GINT64_FORMAT, *length); + GST_DEBUG ("length %" G_GINT64_FORMAT, *length); return FLAC__SEEKABLE_STREAM_DECODER_LENGTH_STATUS_OK; } @@ -347,7 +350,7 @@ gst_flacdec_eof (const FLAC__SeekableStreamDecoder *decoder, FlacDec *flacdec; flacdec = GST_FLACDEC (client_data); - GST_DEBUG (0, "eof %d", flacdec->eos); + GST_DEBUG ("eof %d", flacdec->eos); return flacdec->eos; } @@ -375,7 +378,7 @@ gst_flacdec_read (const FLAC__SeekableStreamDecoder *decoder, switch (GST_EVENT_TYPE (event)) { case GST_EVENT_EOS: - GST_DEBUG (0, "eos"); + GST_DEBUG ("eos"); flacdec->eos = TRUE; gst_event_unref (event); if (avail == 0) { @@ -383,7 +386,7 @@ gst_flacdec_read (const FLAC__SeekableStreamDecoder *decoder, } break; case GST_EVENT_DISCONTINUOUS: - GST_DEBUG (0, "discont"); + GST_DEBUG ("discont"); /* we are not yet sending the discont, we'll do that in the next write operation */ flacdec->need_discont = TRUE; @@ -435,7 +438,7 @@ gst_flacdec_write (const FLAC__SeekableStreamDecoder *decoder, } if (GST_PAD_IS_USABLE (flacdec->srcpad)) { - GST_DEBUG (0, "send discont"); + GST_DEBUG ("send discont"); format = GST_FORMAT_TIME; gst_pad_convert (flacdec->srcpad, GST_FORMAT_DEFAULT, @@ -516,39 +519,39 @@ gst_flacdec_loop (GstElement *element) flacdec = GST_FLACDEC (element); - GST_DEBUG (GST_CAT_PLUGIN_INFO, "flacdec: entering loop"); + GST_DEBUG ("flacdec: entering loop"); if (flacdec->init) { - GST_DEBUG (GST_CAT_PLUGIN_INFO, "flacdec: initializing decoder"); + GST_DEBUG ("flacdec: initializing decoder"); FLAC__seekable_stream_decoder_init (flacdec->decoder); /* FLAC__seekable_stream_decoder_process_metadata (flacdec->decoder); */ flacdec->init = FALSE; } if (flacdec->seek_pending) { - GST_DEBUG (GST_CAT_EVENT, "perform seek to sample %" G_GINT64_FORMAT, + GST_DEBUG ("perform seek to sample %" G_GINT64_FORMAT, flacdec->seek_value); if (FLAC__seekable_stream_decoder_seek_absolute (flacdec->decoder, flacdec->seek_value)) { flacdec->total_samples = flacdec->seek_value; - GST_DEBUG (GST_CAT_EVENT, "seek done"); + GST_DEBUG ("seek done"); } else { - GST_DEBUG (GST_CAT_EVENT, "seek failed"); + GST_DEBUG ("seek failed"); } flacdec->seek_pending = FALSE; } - GST_DEBUG (GST_CAT_PLUGIN_INFO, "flacdec: processing single"); + GST_DEBUG ("flacdec: processing single"); res = FLAC__seekable_stream_decoder_process_single (flacdec->decoder); - GST_DEBUG (GST_CAT_PLUGIN_INFO, "flacdec: checking for EOS"); + GST_DEBUG ("flacdec: checking for EOS"); if (FLAC__seekable_stream_decoder_get_state (flacdec->decoder) == FLAC__SEEKABLE_STREAM_DECODER_END_OF_STREAM) { GstEvent *event; - GST_DEBUG (GST_CAT_PLUGIN_INFO, "flacdec: sending EOS event"); + GST_DEBUG ("flacdec: sending EOS event"); FLAC__seekable_stream_decoder_finish(flacdec->decoder); flacdec->init = TRUE; @@ -558,7 +561,7 @@ gst_flacdec_loop (GstElement *element) } gst_element_set_eos (element); } - GST_DEBUG (GST_CAT_PLUGIN_INFO, "flacdec: _loop end"); + GST_DEBUG ("flacdec: _loop end"); } GST_PAD_FORMATS_FUNCTION (gst_flacdec_get_src_formats, diff --git a/ext/flac/gstflacenc.c b/ext/flac/gstflacenc.c index f1cd29e5..aa1a0195 100644 --- a/ext/flac/gstflacenc.c +++ b/ext/flac/gstflacenc.c @@ -18,6 +18,9 @@ */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include #include diff --git a/ext/gdk_pixbuf/gstgdkpixbuf.c b/ext/gdk_pixbuf/gstgdkpixbuf.c index c137caf6..667d5704 100644 --- a/ext/gdk_pixbuf/gstgdkpixbuf.c +++ b/ext/gdk_pixbuf/gstgdkpixbuf.c @@ -20,6 +20,9 @@ * Boston, MA 02111-1307, USA. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include #include #include diff --git a/ext/jpeg/gstjpegdec.c b/ext/jpeg/gstjpegdec.c index fa68d7f7..0e499043 100644 --- a/ext/jpeg/gstjpegdec.c +++ b/ext/jpeg/gstjpegdec.c @@ -18,6 +18,9 @@ */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include /*#define DEBUG_ENABLED*/ @@ -88,38 +91,38 @@ gst_jpegdec_class_init (GstJpegDec *klass) static void gst_jpegdec_init_source (j_decompress_ptr cinfo) { - GST_DEBUG (0,"gst_jpegdec_chain: init_source"); + GST_DEBUG ("gst_jpegdec_chain: init_source"); } static gboolean gst_jpegdec_fill_input_buffer (j_decompress_ptr cinfo) { - GST_DEBUG (0,"gst_jpegdec_chain: fill_input_buffer"); + GST_DEBUG ("gst_jpegdec_chain: fill_input_buffer"); return TRUE; } static void gst_jpegdec_skip_input_data (j_decompress_ptr cinfo, glong num_bytes) { - GST_DEBUG (0,"gst_jpegdec_chain: skip_input_data"); + GST_DEBUG ("gst_jpegdec_chain: skip_input_data"); } static gboolean gst_jpegdec_resync_to_restart (j_decompress_ptr cinfo, gint desired) { - GST_DEBUG (0,"gst_jpegdec_chain: resync_to_start"); + GST_DEBUG ("gst_jpegdec_chain: resync_to_start"); return TRUE; } static void gst_jpegdec_term_source (j_decompress_ptr cinfo) { - GST_DEBUG (0,"gst_jpegdec_chain: term_source"); + GST_DEBUG ("gst_jpegdec_chain: term_source"); } static void gst_jpegdec_init (GstJpegDec *jpegdec) { - GST_DEBUG (0,"gst_jpegdec_init: initializing"); + GST_DEBUG ("gst_jpegdec_init: initializing"); /* create the sink and src pads */ jpegdec->sinkpad = gst_pad_new_from_template (jpegdec_sink_template, "sink"); gst_element_add_pad(GST_ELEMENT(jpegdec),jpegdec->sinkpad); @@ -265,7 +268,7 @@ static void guarantee_huff_tables(j_decompress_ptr dinfo) (dinfo->dc_huff_tbl_ptrs[1] == NULL) && (dinfo->ac_huff_tbl_ptrs[0] == NULL) && (dinfo->ac_huff_tbl_ptrs[1] == NULL) ) { - GST_DEBUG (GST_CAT_PLUGIN_INFO, + GST_DEBUG ( "Generating standard Huffman tables for this frame."); std_huff_tables(dinfo); } @@ -298,14 +301,14 @@ gst_jpegdec_chain (GstPad *pad, GstBuffer *buf) data = (guchar *)GST_BUFFER_DATA(buf); size = GST_BUFFER_SIZE(buf); - GST_DEBUG (0,"gst_jpegdec_chain: got buffer of %ld bytes in '%s'",size, + GST_DEBUG ("gst_jpegdec_chain: got buffer of %ld bytes in '%s'",size, GST_OBJECT_NAME (jpegdec)); jpegdec->jsrc.next_input_byte = data; jpegdec->jsrc.bytes_in_buffer = size; - GST_DEBUG (0,"gst_jpegdec_chain: reading header %08lx", *(gulong *)data); + GST_DEBUG ("gst_jpegdec_chain: reading header %08lx", *(gulong *)data); jpeg_read_header(&jpegdec->cinfo, TRUE); r_h = jpegdec->cinfo.cur_comp_info[0]->h_samp_factor; @@ -320,12 +323,12 @@ gst_jpegdec_chain (GstPad *pad, GstBuffer *buf) jpegdec->cinfo.out_color_space = JCS_YCbCr; jpegdec->cinfo.dct_method = JDCT_IFAST; jpegdec->cinfo.raw_data_out = TRUE; - GST_DEBUG (0,"gst_jpegdec_chain: starting decompress"); + GST_DEBUG ("gst_jpegdec_chain: starting decompress"); guarantee_huff_tables(&jpegdec->cinfo); jpeg_start_decompress(&jpegdec->cinfo); width = jpegdec->cinfo.output_width; height = jpegdec->cinfo.output_height; - GST_DEBUG (0,"gst_jpegdec_chain: width %d, height %d", width, height); + GST_DEBUG ("gst_jpegdec_chain: width %d, height %d", width, height); outbuf = gst_buffer_new(); outsize = GST_BUFFER_SIZE(outbuf) = width*height + @@ -356,7 +359,7 @@ gst_jpegdec_chain (GstPad *pad, GstBuffer *buf) width2 = width >> 1; - GST_DEBUG (0,"gst_jpegdec_chain: decompressing %u", jpegdec->cinfo.rec_outbuf_height); + GST_DEBUG ("gst_jpegdec_chain: decompressing %u", jpegdec->cinfo.rec_outbuf_height); for (i = 0; i < height; i += r_v*DCTSIZE) { for (j=0, k=0; j< (r_v*DCTSIZE); j += r_v, k++) { jpegdec->line[0][j] = base[0]; base[0] += width; @@ -373,10 +376,10 @@ gst_jpegdec_chain (GstPad *pad, GstBuffer *buf) jpeg_read_raw_data(&jpegdec->cinfo, jpegdec->line, r_v*DCTSIZE); } - GST_DEBUG (0,"gst_jpegdec_chain: decompressing finished"); + GST_DEBUG ("gst_jpegdec_chain: decompressing finished"); jpeg_finish_decompress(&jpegdec->cinfo); - GST_DEBUG (0,"gst_jpegdec_chain: sending buffer"); + GST_DEBUG ("gst_jpegdec_chain: sending buffer"); gst_pad_push(jpegdec->srcpad, outbuf); gst_buffer_unref(buf); diff --git a/ext/jpeg/gstjpegenc.c b/ext/jpeg/gstjpegenc.c index ba8dd38b..b2a8fc1d 100644 --- a/ext/jpeg/gstjpegenc.c +++ b/ext/jpeg/gstjpegenc.c @@ -18,6 +18,9 @@ */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include #include "gstjpegenc.h" @@ -98,19 +101,19 @@ gst_jpegenc_class_init (GstJpegEnc *klass) static void gst_jpegenc_init_destination (j_compress_ptr cinfo) { - GST_DEBUG (0,"gst_jpegenc_chain: init_destination"); + GST_DEBUG ("gst_jpegenc_chain: init_destination"); } static gboolean gst_jpegenc_flush_destination (j_compress_ptr cinfo) { - GST_DEBUG (0,"gst_jpegenc_chain: flush_destination: buffer too small !!!"); + GST_DEBUG ("gst_jpegenc_chain: flush_destination: buffer too small !!!"); return TRUE; } static void gst_jpegenc_term_destination (j_compress_ptr cinfo) { - GST_DEBUG (0,"gst_jpegenc_chain: term_source"); + GST_DEBUG ("gst_jpegenc_chain: term_source"); } static void @@ -134,7 +137,7 @@ gst_jpegenc_init (GstJpegEnc *jpegenc) jpegenc->cinfo.err = jpeg_std_error(&jpegenc->jerr); jpeg_create_compress(&jpegenc->cinfo); - GST_DEBUG (0,"gst_jpegenc_init: setting line buffers"); + GST_DEBUG ("gst_jpegenc_init: setting line buffers"); jpegenc->line[0] = NULL; jpegenc->line[1] = NULL; jpegenc->line[2] = NULL; @@ -154,13 +157,13 @@ gst_jpegenc_resync (GstJpegEnc *jpegenc) guint size = 0; gint width, height; - GST_DEBUG (0,"gst_jpegenc_resync: resync"); + GST_DEBUG ("gst_jpegenc_resync: resync"); jpegenc->cinfo.image_width = width = jpegenc->width; jpegenc->cinfo.image_height = height = jpegenc->height; jpegenc->cinfo.input_components = 3; - GST_DEBUG (0,"gst_jpegenc_resync: wdith %d, height %d", width, height); + GST_DEBUG ("gst_jpegenc_resync: wdith %d, height %d", width, height); jpeg_set_defaults(&jpegenc->cinfo); jpegenc->cinfo.dct_method = JDCT_FASTEST; @@ -172,7 +175,7 @@ gst_jpegenc_resync (GstJpegEnc *jpegenc) switch (jpegenc->format) { case GST_COLORSPACE_RGB24: size = 3; - GST_DEBUG (0,"gst_jpegenc_resync: setting format to RGB24"); + GST_DEBUG ("gst_jpegenc_resync: setting format to RGB24"); jpegenc->cinfo.in_color_space = JCS_RGB; jpegenc->cinfo.raw_data_in = FALSE; break; @@ -180,7 +183,7 @@ gst_jpegenc_resync (GstJpegEnc *jpegenc) size = 2; jpegenc->cinfo.raw_data_in = TRUE; jpegenc->cinfo.in_color_space = JCS_YCbCr; - GST_DEBUG (0,"gst_jpegenc_resync: setting format to YUV420P"); + GST_DEBUG ("gst_jpegenc_resync: setting format to YUV420P"); jpegenc->cinfo.comp_info[0].h_samp_factor = 2; jpegenc->cinfo.comp_info[0].v_samp_factor = 2; jpegenc->cinfo.comp_info[1].h_samp_factor = 1; @@ -194,7 +197,7 @@ gst_jpegenc_resync (GstJpegEnc *jpegenc) jpegenc->line[2] = g_realloc(jpegenc->line[2], height*sizeof(char*)/2); } - GST_DEBUG (0,"gst_jpegenc_resync: setting format done"); + GST_DEBUG ("gst_jpegenc_resync: setting format done"); break; default: printf("gst_jpegenc_resync: unsupported colorspace, using RGB\n"); @@ -209,7 +212,7 @@ gst_jpegenc_resync (GstJpegEnc *jpegenc) jpeg_suppress_tables(&jpegenc->cinfo, TRUE); jpegenc->buffer = NULL; - GST_DEBUG (0,"gst_jpegenc_resync: resync done"); + GST_DEBUG ("gst_jpegenc_resync: resync done"); } static GstBuffer* @@ -218,7 +221,7 @@ gst_jpegenc_get (GstPad *pad) GstJpegEnc *jpegenc; GstBuffer *newbuf; - GST_DEBUG (0,"gst_jpegenc_chain: pull buffer"); + GST_DEBUG ("gst_jpegenc_chain: pull buffer"); g_return_val_if_fail (pad != NULL, NULL); g_return_val_if_fail (GST_IS_PAD (pad), NULL); @@ -227,7 +230,7 @@ gst_jpegenc_get (GstPad *pad) if (jpegenc->buffer == NULL || GST_BUFFER_REFCOUNT_VALUE(jpegenc->buffer) != 1) { if (jpegenc->buffer) gst_buffer_unref(jpegenc->buffer); - GST_DEBUG (0,"gst_jpegenc_chain: new buffer"); + GST_DEBUG ("gst_jpegenc_chain: new buffer"); newbuf = jpegenc->buffer = gst_buffer_new(); GST_BUFFER_DATA(newbuf) = g_malloc(jpegenc->bufsize); GST_BUFFER_SIZE(newbuf) = jpegenc->bufsize; @@ -260,7 +263,7 @@ gst_jpegenc_chain (GstPad *pad, GstBuffer *buf) data = GST_BUFFER_DATA(buf); size = GST_BUFFER_SIZE(buf); - GST_DEBUG (0,"gst_jpegenc_chain: got buffer of %ld bytes in '%s'",size, + GST_DEBUG ("gst_jpegenc_chain: got buffer of %ld bytes in '%s'",size, GST_OBJECT_NAME (jpegenc)); outbuf = gst_buffer_new(); @@ -281,7 +284,7 @@ gst_jpegenc_chain (GstPad *pad, GstBuffer *buf) jpeg_start_compress(&jpegenc->cinfo, TRUE); width2 = width>>1; - GST_DEBUG (0,"gst_jpegdec_chain: compressing"); + GST_DEBUG ("gst_jpegdec_chain: compressing"); for (i = 0; i < height; i += 2*DCTSIZE) { for (j=0, k=0; j<2*DCTSIZE;j+=2, k++) { @@ -293,7 +296,7 @@ gst_jpegenc_chain (GstPad *pad, GstBuffer *buf) jpeg_write_raw_data(&jpegenc->cinfo, jpegenc->line, 2*DCTSIZE); } jpeg_finish_compress(&jpegenc->cinfo); - GST_DEBUG (0,"gst_jpegdec_chain: compressing done"); + GST_DEBUG ("gst_jpegdec_chain: compressing done"); GST_BUFFER_SIZE(outbuf) = (((outsize - jpegenc->jdest.free_in_buffer)+3)&~3); diff --git a/ext/ladspa/gstladspa.c b/ext/ladspa/gstladspa.c index ed96e835..55c0186d 100644 --- a/ext/ladspa/gstladspa.c +++ b/ext/ladspa/gstladspa.c @@ -170,19 +170,19 @@ gst_ladspa_class_init (GstLADSPAClass *klass) for (i=0;iPortCount;i++) { if (LADSPA_IS_PORT_AUDIO(desc->PortDescriptors[i]) && LADSPA_IS_PORT_INPUT(desc->PortDescriptors[i])){ - GST_DEBUG (0, "input port %d", i); + GST_DEBUG ("input port %d", i); klass->sinkpad_portnums[sinkcount++] = i; } if (LADSPA_IS_PORT_AUDIO(desc->PortDescriptors[i]) && LADSPA_IS_PORT_OUTPUT(desc->PortDescriptors[i])){ - GST_DEBUG (0, "output port %d", i); + GST_DEBUG ("output port %d", i); klass->srcpad_portnums[srccount++] = i; } if (LADSPA_IS_PORT_CONTROL(desc->PortDescriptors[i]) && LADSPA_IS_PORT_INPUT(desc->PortDescriptors[i])){ - GST_DEBUG (0, "control port %d", i); + GST_DEBUG ("control port %d", i); klass->control_portnums[controlcount++] = i; } } @@ -324,7 +324,7 @@ gst_ladspa_class_init (GstLADSPAClass *klass) klass->control_info[i].param_name = argname; - GST_DEBUG (0, "adding arg %s from %s",argname, klass->control_info[i].name); + GST_DEBUG ("adding arg %s from %s",argname, klass->control_info[i].name); if (argtype==G_TYPE_BOOLEAN){ paramspec = g_param_spec_boolean(argname,argname,argname, FALSE, argperms); @@ -443,7 +443,7 @@ gst_ladspa_init (GstLADSPA *ladspa) if (sinkcount==0 && srccount == 1) { /* get mode (no sink pads) */ - GST_DEBUG (0, "mono get mode with 1 src pad"); + GST_DEBUG ("mono get mode with 1 src pad"); ladspa->newcaps = TRUE; @@ -451,14 +451,14 @@ gst_ladspa_init (GstLADSPA *ladspa) gst_pad_set_get_function (ladspa->srcpads[0], gst_ladspa_get); } else if (sinkcount==1){ /* with one sink we can use the chain function */ - GST_DEBUG (0, "chain mode"); + GST_DEBUG ("chain mode"); gst_pad_set_link_function (ladspa->sinkpads[0], gst_ladspa_connect); gst_pad_set_chain_function (ladspa->sinkpads[0], gst_ladspa_chain); gst_pad_set_bufferpool_function (ladspa->sinkpads[0], gst_ladspa_get_bufferpool); } else if (sinkcount > 1){ /* more than one sink pad needs loop mode */ - GST_DEBUG (0, "loop mode with %d sink pads and %d src pads", sinkcount, srccount); + GST_DEBUG ("loop mode with %d sink pads and %d src pads", sinkcount, srccount); for (i=0;isinkpads[i], gst_ladspa_connect); @@ -469,7 +469,7 @@ gst_ladspa_init (GstLADSPA *ladspa) else if (sinkcount==0 && srccount == 0){ /* for some reason these plugins exist - we'll just ignore them */ } else { - GST_DEBUG (0, "%d sink pads, %d src pads not yet supported", sinkcount, srccount); + GST_DEBUG ("%d sink pads, %d src pads not yet supported", sinkcount, srccount); } gst_ladspa_instantiate (ladspa); @@ -539,7 +539,7 @@ gst_ladspa_connect_get (GstPad *pad, GstCaps *caps) static void gst_ladspa_force_src_caps(GstLADSPA *ladspa, GstPad *pad) { - GST_DEBUG (0, "forcing caps with rate %d", ladspa->samplerate); + GST_DEBUG ("forcing caps with rate %d", ladspa->samplerate); gst_pad_try_set_caps (pad, gst_caps_new ( "ladspa_src_caps", "audio/raw", @@ -605,7 +605,7 @@ gst_ladspa_set_property (GObject *object, guint prop_id, const GValue *value, GP ladspa->controls[cid] = val; } - GST_DEBUG (0, "set arg %s to %f", control_info->name, ladspa->controls[cid]); + GST_DEBUG ("set arg %s to %f", control_info->name, ladspa->controls[cid]); } static void @@ -633,7 +633,7 @@ gst_ladspa_get_property (GObject *object, guint prop_id, GValue *value, GParamSp control_info = &(oclass->control_info[cid]); if (control_info->name == NULL) return; - GST_DEBUG (0, "got arg %s as %f", control_info->name, ladspa->controls[cid]); + GST_DEBUG ("got arg %s as %f", control_info->name, ladspa->controls[cid]); /* now see what type it is */ if (control_info->toggled) { @@ -666,7 +666,7 @@ gst_ladspa_instantiate (GstLADSPA *ladspa) } /* instantiate the plugin */ - GST_DEBUG (0, "instantiating the plugin"); + GST_DEBUG ("instantiating the plugin"); ladspa->handle = desc->instantiate(desc,ladspa->samplerate); g_return_val_if_fail (ladspa->handle != NULL, FALSE); @@ -674,7 +674,7 @@ gst_ladspa_instantiate (GstLADSPA *ladspa) /* walk through the ports and add all the arguments */ for (i=0;inumcontrols;i++) { /* connect the argument to the plugin */ - GST_DEBUG (0, "added control port %d", oclass->control_portnums[i]); + GST_DEBUG ("added control port %d", oclass->control_portnums[i]); desc->connect_port(ladspa->handle, oclass->control_portnums[i], &(ladspa->controls[i])); @@ -694,7 +694,7 @@ gst_ladspa_change_state (GstElement *element) GstLADSPA *ladspa = (GstLADSPA*)element; desc = ladspa->descriptor; - GST_DEBUG (0, "changing state"); + GST_DEBUG ("changing state"); switch (GST_STATE_TRANSITION (element)) { case GST_STATE_NULL_TO_READY: gst_ladspa_activate(ladspa); @@ -722,7 +722,7 @@ gst_ladspa_activate(GstLADSPA *ladspa) gst_ladspa_deactivate(ladspa); } - GST_DEBUG (0, "activating"); + GST_DEBUG ("activating"); /* activate the plugin (function might be null) */ if (desc->activate != NULL) { @@ -738,7 +738,7 @@ gst_ladspa_deactivate(GstLADSPA *ladspa) LADSPA_Descriptor *desc; desc = ladspa->descriptor; - GST_DEBUG (0, "deactivating"); + GST_DEBUG ("deactivating"); /* deactivate the plugin (function might be null) */ if (ladspa->activated && (desc->deactivate != NULL)) { @@ -776,11 +776,11 @@ gst_ladspa_loop(GstElement *element) /* find a bufferpool */ if (numsrcpads > 0 && (bufpool = gst_pad_get_bufferpool (ladspa->srcpads[0]))) { - GST_DEBUG (0, "Got bufferpool from first source pad"); + GST_DEBUG ("Got bufferpool from first source pad"); } else { bufferbytesize = sizeof (LADSPA_Data) * ladspa->buffersize; bufpool = gst_buffer_pool_get_default (bufferbytesize, ladspa->numbuffers); - GST_DEBUG (0, "Created default bufferpool, %d x %d bytes", ladspa->numbuffers, bufferbytesize); + GST_DEBUG ("Created default bufferpool, %d x %d bytes", ladspa->numbuffers, bufferbytesize); } /* get the bytestreams for each pad */ @@ -803,7 +803,7 @@ gst_ladspa_loop(GstElement *element) num_empty_pads = 0; /* first get all the necessary data from the input ports */ for (i=0 ; isrcpads[i], buffers_out[i]); data_out[i] = NULL; diff --git a/ext/libpng/gstpngenc.c b/ext/libpng/gstpngenc.c index 93845050..9cd39cc3 100644 --- a/ext/libpng/gstpngenc.c +++ b/ext/libpng/gstpngenc.c @@ -16,6 +16,9 @@ * */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include #include #include "gstpngenc.h" @@ -198,7 +201,7 @@ gst_pngenc_chain (GstPad *pad, GstBuffer *buf) /* non-0 return is from a longjmp inside of libpng */ if (setjmp (pngenc->png_struct_ptr->jmpbuf) != 0) { - GST_DEBUG (GST_CAT_PLUGIN_INFO, "returning from longjmp"); + GST_DEBUG ("returning from longjmp"); png_destroy_write_struct (&pngenc->png_struct_ptr, &pngenc->png_info_ptr); return; } diff --git a/ext/mikmod/gstmikmod.c b/ext/mikmod/gstmikmod.c index 284b4beb..40bf3f81 100644 --- a/ext/mikmod/gstmikmod.c +++ b/ext/mikmod/gstmikmod.c @@ -17,6 +17,9 @@ * Boston, MA 02111-1307, USA. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include "gstmikmod.h" #include @@ -406,7 +409,7 @@ GstMikMod *mikmod; mikmod = GST_MIKMOD (element); - GST_DEBUG (0,"state pending %d", GST_STATE_PENDING (element)); + GST_DEBUG ("state pending %d", GST_STATE_PENDING (element)); if (GST_STATE_PENDING (element) == GST_STATE_READY) { diff --git a/ext/raw1394/gst1394.c b/ext/raw1394/gst1394.c index e3302057..8e4671d3 100644 --- a/ext/raw1394/gst1394.c +++ b/ext/raw1394/gst1394.c @@ -18,6 +18,9 @@ */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include diff --git a/ext/raw1394/gstdv1394src.c b/ext/raw1394/gstdv1394src.c index 8efefe2a..97b2989e 100644 --- a/ext/raw1394/gstdv1394src.c +++ b/ext/raw1394/gstdv1394src.c @@ -226,32 +226,32 @@ int gst_dv1394src_iso_receive(raw1394handle_t handle,int channel,size_t len,quad if( p[3] & 0x80 ) { // PAL dv1394src->frameSize = PAL_FRAMESIZE; - GST_DEBUG(0,"PAL data"); + GST_DEBUG ("PAL data"); if (gst_pad_try_set_caps (dv1394src->srcpad, GST_CAPS_NEW ( "dv1394src", "video/dv", "format", GST_PROPS_STRING("PAL"), NULL) ) <= 0) { - GST_ERROR(GST_ELEMENT(dv1394src), "Could not set source caps for PAL"); + gst_element_error (GST_ELEMENT(dv1394src), "Could not set source caps for PAL"); return 0; } } else { // NTSC (untested) dv1394src->frameSize = NTSC_FRAMESIZE; - GST_DEBUG(0,"NTSC data [untested] - please report success/failure to "); + GST_DEBUG ("NTSC data [untested] - please report success/failure to "); if (gst_pad_try_set_caps (dv1394src->srcpad, GST_CAPS_NEW ( "dv1394src", "video/dv", "format", GST_PROPS_STRING ("NTSC"), NULL) ) <= 0) { - GST_ERROR(GST_ELEMENT(dv1394src), "Could not set source caps for NTSC"); + gst_element_error (GST_ELEMENT(dv1394src), "Could not set source caps for NTSC"); return 0; } } dv1394src->pool = gst_buffer_pool_get_default( dv1394src->frameSize, N_BUFFERS_IN_POOL ); if (dv1394src->pool == NULL) { - GST_ERROR(GST_ELEMENT(dv1394src), "gst_buffer_pool_get_default returned NULL"); + gst_element_error (GST_ELEMENT(dv1394src), "gst_buffer_pool_get_default returned NULL"); } } @@ -259,7 +259,7 @@ int gst_dv1394src_iso_receive(raw1394handle_t handle,int channel,size_t len,quad if( !dv1394src->drop_incomplete || dv1394src->bytesInFrame == dv1394src->frameSize ) { dv1394src->buf = dv1394src->frame; } else { - GST_INFO_ELEMENT(GST_CAT_PLUGIN_INFO, GST_ELEMENT(dv1394src), "incomplete frame dropped"); + GST_INFO_OBJECT (GST_ELEMENT(dv1394src), "incomplete frame dropped"); } dv1394src->frame = NULL; @@ -310,7 +310,7 @@ int gst_dv1394src_iso_receive(raw1394handle_t handle,int channel,size_t len,quad static int gst_dv1394src_bus_reset(raw1394handle_t handle, unsigned int generation) { - GST_INFO_ELEMENT(0,GST_DV1394SRC(raw1394_get_userdata(handle)),"have bus reset"); + GST_INFO_OBJECT (GST_DV1394SRC(raw1394_get_userdata(handle)),"have bus reset"); return 0; } @@ -337,31 +337,31 @@ gst_dv1394src_change_state (GstElement *element) switch (GST_STATE_TRANSITION (element)) { case GST_STATE_NULL_TO_READY: if ((dv1394src->handle = raw1394_new_handle()) == NULL) { - GST_INFO_ELEMENT(0,dv1394src,"can't get raw1394 handle"); + GST_INFO_OBJECT (dv1394src,"can't get raw1394 handle"); return GST_STATE_FAILURE; } raw1394_set_userdata(dv1394src->handle,dv1394src); dv1394src->numcards = raw1394_get_port_info(dv1394src->handle,dv1394src->pinfo,16); if (dv1394src->numcards == 0) { - GST_INFO_ELEMENT(0,dv1394src,"no cards available for raw1394"); + GST_INFO_OBJECT (dv1394src,"no cards available for raw1394"); return GST_STATE_FAILURE; } if (dv1394src->pinfo[dv1394src->card].nodes <= 1) { - GST_INFO_ELEMENT(0,dv1394src,"there are no nodes on the 1394 bus"); + GST_INFO_OBJECT (dv1394src,"there are no nodes on the 1394 bus"); return GST_STATE_FAILURE; } if (raw1394_set_port(dv1394src->handle,dv1394src->port) < 0) { - GST_INFO_ELEMENT(0,dv1394src,"can't set 1394 port %d",dv1394src->port); + GST_INFO_OBJECT (dv1394src,"can't set 1394 port %d",dv1394src->port); return GST_STATE_FAILURE; } raw1394_set_iso_handler(dv1394src->handle,dv1394src->channel,gst_dv1394src_iso_receive); raw1394_set_bus_reset_handler(dv1394src->handle,gst_dv1394src_bus_reset); dv1394src->started = FALSE; - GST_DEBUG(0,"successfully opened up 1394 connection"); + GST_DEBUG ("successfully opened up 1394 connection"); break; case GST_STATE_PAUSED_TO_PLAYING: if (raw1394_start_iso_rcv(dv1394src->handle,dv1394src->channel) < 0) { - GST_INFO_ELEMENT(0,dv1394src,"can't start 1394 iso receive"); + GST_INFO_OBJECT (dv1394src,"can't start 1394 iso receive"); return GST_STATE_FAILURE; } break; diff --git a/ext/shout2/gstshout2.c b/ext/shout2/gstshout2.c index d44d9a2d..8e4bcce7 100644 --- a/ext/shout2/gstshout2.c +++ b/ext/shout2/gstshout2.c @@ -17,6 +17,9 @@ * Boston, MA 02111-1307, USA. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include "gstshout2.h" #include #include @@ -390,7 +393,7 @@ gst_shout2send_change_state (GstElement *element) shout2send = GST_SHOUT2SEND(element); - GST_DEBUG (0,"state pending %d", GST_STATE_PENDING (element)); + GST_DEBUG ("state pending %d", GST_STATE_PENDING (element)); /* if going down into NULL state, close the file if it's open */ switch (GST_STATE_TRANSITION (element)) { diff --git a/ext/speex/gstspeexdec.c b/ext/speex/gstspeexdec.c index 924f0b02..3d92a086 100644 --- a/ext/speex/gstspeexdec.c +++ b/ext/speex/gstspeexdec.c @@ -18,6 +18,9 @@ */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include #include "gstspeexdec.h" @@ -87,7 +90,7 @@ gst_speexdec_class_init (GstSpeexDec *klass) static void gst_speexdec_init (GstSpeexDec *speexdec) { - GST_DEBUG (0,"gst_speexdec_init: initializing"); + GST_DEBUG ("gst_speexdec_init: initializing"); /* create the sink and src pads */ speexdec->sinkpad = gst_pad_new_from_template (speexdec_sink_template, "sink"); diff --git a/ext/speex/gstspeexenc.c b/ext/speex/gstspeexenc.c index 006700bd..b9e06596 100644 --- a/ext/speex/gstspeexenc.c +++ b/ext/speex/gstspeexenc.c @@ -18,6 +18,9 @@ */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include #include "gstspeexenc.h" -- cgit