diff options
author | Benjamin Otte <otte@gnome.org> | 2003-06-29 19:46:13 +0000 |
---|---|---|
committer | Benjamin Otte <otte@gnome.org> | 2003-06-29 19:46:13 +0000 |
commit | f4a7caa418d3a283392b1142fe9863ae870ce3b8 (patch) | |
tree | 8d29cf94dd85acfa8cc58f5761d28a24eae14223 /gst | |
parent | 813b3a530e66bebe1153c8b10abc4cafc99ac772 (diff) | |
download | gst-plugins-bad-f4a7caa418d3a283392b1142fe9863ae870ce3b8.tar.gz gst-plugins-bad-f4a7caa418d3a283392b1142fe9863ae870ce3b8.tar.bz2 gst-plugins-bad-f4a7caa418d3a283392b1142fe9863ae870ce3b8.zip |
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 'gst')
30 files changed, 221 insertions, 137 deletions
diff --git a/gst/cdxaparse/gstcdxaparse.c b/gst/cdxaparse/gstcdxaparse.c index 2154aa54..08e6f14c 100644 --- a/gst/cdxaparse/gstcdxaparse.c +++ b/gst/cdxaparse/gstcdxaparse.c @@ -19,6 +19,9 @@ */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include <string.h> #include "gstcdxaparse.h" @@ -163,7 +166,7 @@ cdxa_type_find (GstBuffer *buf, gchar *data = GST_BUFFER_DATA (buf); GstCaps *new; - GST_DEBUG (0,"cdxa_parse: typefind"); + GST_DEBUG ("cdxa_parse: typefind"); if (GUINT32_FROM_LE (((guint32 *)data)[0]) != GST_RIFF_TAG_RIFF) return NULL; diff --git a/gst/chart/gstchart.c b/gst/chart/gstchart.c index 0e6d9ed1..97cb6fc0 100644 --- a/gst/chart/gstchart.c +++ b/gst/chart/gstchart.c @@ -17,6 +17,9 @@ * Boston, MA 02111-1307, USA. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include <config.h> #include <gst/gst.h> @@ -240,7 +243,7 @@ gst_chart_sinkconnect (GstPad *pad, GstCaps *caps) gst_caps_get_int (caps, "rate", &chart->samplerate); chart->samples_between_frames = chart->samplerate / chart->framerate; - GST_DEBUG (0, "CHART: new sink caps: rate %d", + GST_DEBUG ("CHART: new sink caps: rate %d", chart->samplerate); /*gst_chart_sync_parms (chart); */ /* */ @@ -255,7 +258,7 @@ draw_chart_16bpp(guchar * output, gint width, gint height, guint16 *colstart; gint16 * in; - GST_DEBUG (0, "CHART: drawing frame to %p, width = %d, height = %d, src_data = %p, src_size = %d", + GST_DEBUG ("CHART: drawing frame to %p, width = %d, height = %d, src_data = %p, src_size = %d", output, width, height, src_data, src_size); for (colstart = (guint16 *)output, in = (gint16 *)src_data, i = 0; @@ -314,14 +317,14 @@ gst_chart_chain (GstPad *pad, GstBuffer *bufin) chart = GST_CHART(GST_OBJECT_PARENT (pad)); g_return_if_fail (chart != NULL); - GST_DEBUG (0, "CHART: chainfunc called"); + GST_DEBUG ("CHART: chainfunc called"); samples_in = GST_BUFFER_SIZE (bufin) / sizeof(gint16); datain = (gint16 *) (GST_BUFFER_DATA (bufin)); - GST_DEBUG (0, "input buffer has %d samples", samples_in); + GST_DEBUG ("input buffer has %d samples", samples_in); if (chart->next_time <= GST_BUFFER_TIMESTAMP (bufin)) { chart->next_time = GST_BUFFER_TIMESTAMP (bufin); - GST_DEBUG (0, "in: %" G_GINT64_FORMAT, GST_BUFFER_TIMESTAMP (bufin)); + GST_DEBUG ("in: %" G_GINT64_FORMAT, GST_BUFFER_TIMESTAMP (bufin)); } chart->samples_since_last_frame += samples_in; @@ -336,7 +339,7 @@ gst_chart_chain (GstPad *pad, GstBuffer *bufin) dataout = g_malloc (sizeout); GST_BUFFER_SIZE(bufout) = sizeout; GST_BUFFER_DATA(bufout) = dataout; - GST_DEBUG (0, "CHART: made new buffer: size %d, width %d, height %d", + GST_DEBUG ("CHART: made new buffer: size %d, width %d, height %d", sizeout, chart->width, chart->height); /* take data and draw to new buffer */ @@ -350,7 +353,7 @@ gst_chart_chain (GstPad *pad, GstBuffer *bufin) /* Check if we need to renegotiate size. */ if (chart->first_buffer) { - GST_DEBUG (0, "making new pad"); + GST_DEBUG ("making new pad"); if (gst_pad_try_set_caps (chart->srcpad, GST_CAPS_NEW ( "chartsrc", @@ -372,17 +375,17 @@ gst_chart_chain (GstPad *pad, GstBuffer *bufin) chart->first_buffer = FALSE; } - GST_DEBUG (0, "CHART: outputting buffer"); + GST_DEBUG ("CHART: outputting buffer"); /* output buffer */ GST_BUFFER_FLAG_SET (bufout, GST_BUFFER_READONLY); gst_pad_push (chart->srcpad, bufout); } } else { - GST_DEBUG (0, "CHART: skipping buffer"); + GST_DEBUG ("CHART: skipping buffer"); gst_buffer_unref(bufin); } - GST_DEBUG (0, "CHART: exiting chainfunc"); + GST_DEBUG ("CHART: exiting chainfunc"); } static void diff --git a/gst/deinterlace/gstdeinterlace.c b/gst/deinterlace/gstdeinterlace.c index 1ff62880..76cc34b1 100644 --- a/gst/deinterlace/gstdeinterlace.c +++ b/gst/deinterlace/gstdeinterlace.c @@ -19,6 +19,9 @@ /* based on the Area Based Deinterlacer (for RGB frames) */ /* (a VirtualDub filter) from Gunnar Thalin <guth@home.se> */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include <string.h> #include <gst/gst.h> #include "gstdeinterlace.h" diff --git a/gst/festival/gstfestival.c b/gst/festival/gstfestival.c index d0470379..728b4556 100644 --- a/gst/festival/gstfestival.c +++ b/gst/festival/gstfestival.c @@ -60,6 +60,9 @@ /* */ /*=======================================================================*/ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include <stdio.h> #include <stdlib.h> #include <unistd.h> @@ -240,7 +243,7 @@ gst_festival_chain (GstPad *pad, GstBuffer *buf) g_return_if_fail (GST_BUFFER_DATA (buf) != NULL); festival = GST_FESTIVAL (gst_pad_get_parent (pad)); - GST_DEBUG (0, "gst_festival_chain: got buffer in '%s'", + GST_DEBUG ("gst_festival_chain: got buffer in '%s'", gst_object_get_name (GST_OBJECT (festival))); fd = fdopen(dup(festival->info->server_fd),"wb"); diff --git a/gst/filter/gstbpwsinc.c b/gst/filter/gstbpwsinc.c index 7ee8680b..0e57a747 100644 --- a/gst/filter/gstbpwsinc.c +++ b/gst/filter/gstbpwsinc.c @@ -30,6 +30,9 @@ * - this might be improved upon with bytestream */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include <gst/gst.h> #include "gstfilter.h" #include <math.h> /* M_PI */ @@ -197,7 +200,7 @@ gst_bpwsinc_sink_connect (GstPad * pad, GstCaps * caps) { len = filter->wing_size; /* fill the lp kernel */ - GST_DEBUG (GST_CAT_PLUGIN_INFO, + GST_DEBUG ( "bpwsinc: initializing LP kernel of length %d with cut-off %f", len * 2 + 1, filter->lower_frequency); kernel_lp = (double *) g_malloc (sizeof (double) * (2 * len + 1)); @@ -220,7 +223,7 @@ gst_bpwsinc_sink_connect (GstPad * pad, GstCaps * caps) for (i = 0; i <= len * 2; ++i) kernel_lp[i] /= sum; /* fill the hp kernel */ - GST_DEBUG (GST_CAT_PLUGIN_INFO, + GST_DEBUG ( "bpwsinc: initializing HP kernel of length %d with cut-off %f", len * 2 + 1, filter->upper_frequency); kernel_hp = (double *) g_malloc (sizeof (double) * (2 * len + 1)); diff --git a/gst/filter/gstiir.c b/gst/filter/gstiir.c index 9b4deb88..06aa8f53 100644 --- a/gst/filter/gstiir.c +++ b/gst/filter/gstiir.c @@ -18,6 +18,9 @@ * Boston, MA 02111-1307, USA. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include <gst/gst.h> #include "gstfilter.h" #include "iir.h" diff --git a/gst/filter/gstlpwsinc.c b/gst/filter/gstlpwsinc.c index 74cea70e..64e104d6 100644 --- a/gst/filter/gstlpwsinc.c +++ b/gst/filter/gstlpwsinc.c @@ -30,6 +30,9 @@ * - this might be improved upon with bytestream */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include <gst/gst.h> #include "gstfilter.h" #include <math.h> /* M_PI */ @@ -189,7 +192,7 @@ gst_lpwsinc_sink_connect (GstPad * pad, GstCaps * caps) /* fill the kernel */ g_print ("DEBUG: initing filter kernel\n"); len = filter->wing_size; - GST_DEBUG (GST_CAT_PLUGIN_INFO, + GST_DEBUG ( "lpwsinc: initializing filter kernel of length %d", len * 2 + 1); filter->kernel = (double *) g_malloc (sizeof (double) * (2 * len + 1)); diff --git a/gst/flx/gstflxdec.c b/gst/flx/gstflxdec.c index 337d920f..0f4fac18 100644 --- a/gst/flx/gstflxdec.c +++ b/gst/flx/gstflxdec.c @@ -17,6 +17,9 @@ * Boston, MA 02111-1307, USA. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include <string.h> #include "flx_fmt.h" @@ -471,7 +474,7 @@ gst_flxdec_loop (GstElement *element) g_return_if_fail (element != NULL); g_return_if_fail (GST_IS_FLXDEC(element)); - GST_DEBUG (0, "entering loop function"); + GST_DEBUG ("entering loop function"); flxdec = GST_FLXDEC(element); diff --git a/gst/mixmatrix/mixmatrix.c b/gst/mixmatrix/mixmatrix.c index 9d76cc76..bf9e9c90 100644 --- a/gst/mixmatrix/mixmatrix.c +++ b/gst/mixmatrix/mixmatrix.c @@ -1,3 +1,6 @@ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include <config.h> #include <gst/gst.h> #include <gst/bytestream/bytestream.h> @@ -176,14 +179,14 @@ mixmatrix_alloc_matrix (int x,int y) { gfloat **matrix; int i; - GST_DEBUG(0,"mixmatrix: allocating a %dx%d matrix of floats\n",x,y); + GST_DEBUG ("mixmatrix: allocating a %dx%d matrix of floats\n",x,y); matrix = g_new(gfloat *,x); - GST_DEBUG(0,"mixmatrix: %p: ",matrix); + GST_DEBUG ("mixmatrix: %p: ",matrix); for (i=0;i<x;i++) { matrix[i] = g_new(gfloat,y); - GST_DEBUG(0,"%p, ",matrix[i]); + GST_DEBUG ("%p, ",matrix[i]); } - GST_DEBUG(0,"\n"); + GST_DEBUG ("\n"); return matrix; } @@ -237,7 +240,7 @@ mixmatrix_resize(GstMixMatrix *mix, int sinkpads, int srcpads) gfloat **newmatrix; int i; - GST_DEBUG(0,"mixmatrix: resizing matrix!!!!\n"); + GST_DEBUG ("mixmatrix: resizing matrix!!!!\n"); // check the sinkpads list if (sinkresize) { diff --git a/gst/mpeg1sys/buffer.c b/gst/mpeg1sys/buffer.c index 677c398b..53104a31 100644 --- a/gst/mpeg1sys/buffer.c +++ b/gst/mpeg1sys/buffer.c @@ -71,7 +71,7 @@ static double ratio [16] = { 0., 1., 0.6735, 0.7031, 0.7615, 0.8055, 1.2015, 0.}; */ -#ifdef GST_DEBUG_ENABLED +#ifndef GST_DISABLE_GST_DEBUG static char picture_types [4][3] = { "I", "P", "B", "D" }; #endif @@ -136,7 +136,7 @@ void mpeg1mux_buffer_queue(Mpeg1MuxBuffer *mb, GstBuffer *buf) { mb->length += GST_BUFFER_SIZE(buf); } - GST_DEBUG (0,"queuing buffer %lu", mb->length); + GST_DEBUG ("queuing buffer %lu", mb->length); if (mb->buffer_type == BUFFER_TYPE_VIDEO) { mpeg1mux_buffer_update_video_info(mb); } @@ -150,7 +150,7 @@ gulong mpeg1mux_buffer_update_queued(Mpeg1MuxBuffer *mb, guint64 scr) { Mpeg1MuxTimecode *tc; gulong total_queued = 0; - GST_DEBUG (0,"queued in buffer on SCR=%" G_GUINT64_FORMAT, scr); + GST_DEBUG ("queued in buffer on SCR=%" G_GUINT64_FORMAT, scr); queued_list = g_list_first(mb->queued_list); while (queued_list) { @@ -161,12 +161,12 @@ gulong mpeg1mux_buffer_update_queued(Mpeg1MuxBuffer *mb, guint64 scr) { queued_list = g_list_first(mb->queued_list); } else { - GST_DEBUG (0,"queued in buffer %ld, %" G_GUINT64_FORMAT, tc->original_length, tc->DTS); + GST_DEBUG ("queued in buffer %ld, %" G_GUINT64_FORMAT, tc->original_length, tc->DTS); total_queued += tc->original_length; queued_list = g_list_next(queued_list); } } - GST_DEBUG (0,"queued in buffer %lu", total_queued); + GST_DEBUG ("queued in buffer %lu", total_queued); return total_queued; } @@ -177,7 +177,7 @@ void mpeg1mux_buffer_shrink(Mpeg1MuxBuffer *mb, gulong size) { gulong consumed = 0; gulong count; - GST_DEBUG (0,"shrinking buffer %lu", size); + GST_DEBUG ("shrinking buffer %lu", size); g_assert(mb->length >= size); @@ -198,16 +198,16 @@ void mpeg1mux_buffer_shrink(Mpeg1MuxBuffer *mb, gulong size) { else { consumed += tc->length; while (size >= consumed) { - GST_DEBUG (0,"removing timecode: %" G_GUINT64_FORMAT " %" G_GUINT64_FORMAT " %lu %lu", tc->DTS, tc->PTS, tc->length, consumed); + GST_DEBUG ("removing timecode: %" G_GUINT64_FORMAT " %" G_GUINT64_FORMAT " %lu %lu", tc->DTS, tc->PTS, tc->length, consumed); mb->timecode_list = g_list_remove_link(mb->timecode_list, timecode_list); mb->queued_list = g_list_append(mb->queued_list, tc); timecode_list = g_list_first(mb->timecode_list); tc = (Mpeg1MuxTimecode *) timecode_list->data; consumed += tc->length; - GST_DEBUG (0,"next timecode: %" G_GUINT64_FORMAT " %" G_GUINT64_FORMAT " %lu %lu", tc->DTS, tc->PTS, tc->length, consumed); + GST_DEBUG ("next timecode: %" G_GUINT64_FORMAT " %" G_GUINT64_FORMAT " %lu %lu", tc->DTS, tc->PTS, tc->length, consumed); } mb->new_frame = TRUE; - GST_DEBUG (0,"leftover frame size from %lu to %lu ", tc->length, consumed-size); + GST_DEBUG ("leftover frame size from %lu to %lu ", tc->length, consumed-size); tc->length = consumed - size; } @@ -220,7 +220,7 @@ void mpeg1mux_buffer_shrink(Mpeg1MuxBuffer *mb, gulong size) { mb->info.audio.PTS = tc->PTS; mb->next_frame_time = tc->PTS; } - GST_DEBUG (0,"next frame time timecode: %" G_GUINT64_FORMAT " %lu", mb->next_frame_time, tc->length); + GST_DEBUG ("next frame time timecode: %" G_GUINT64_FORMAT " %lu", mb->next_frame_time, tc->length); /* check buffer consistency */ timecode_list = g_list_first(mb->timecode_list); @@ -248,7 +248,7 @@ static void mpeg1mux_buffer_update_video_info(Mpeg1MuxBuffer *mb) { gst_getbits_t gb; - GST_DEBUG (0,"mpeg1mux::update_video_info %lu %lu", mb->base, mb->scan_pos); + GST_DEBUG ("mpeg1mux::update_video_info %lu %lu", mb->base, mb->scan_pos); if (mb->base == 0 && mb->scan_pos == 0) { if ((SYNCWORD_START<<8)+*(mb->buffer+3) == SEQUENCE_HEADER) { @@ -268,7 +268,7 @@ static void mpeg1mux_buffer_update_video_info(Mpeg1MuxBuffer *mb) { mb->info.video.secs_per_frame = 1. / picture_rates[mb->info.video.picture_rate]; mb->info.video.decoding_order=0; mb->info.video.group_order=0; - GST_DEBUG (0,"mpeg1mux::update_video_info: secs per frame %g", mb->info.video.secs_per_frame); + GST_DEBUG ("mpeg1mux::update_video_info: secs per frame %g", mb->info.video.secs_per_frame); } else { g_print("mpeg1mux::update_video_info: Invalid MPEG Video header\n"); @@ -277,16 +277,16 @@ static void mpeg1mux_buffer_update_video_info(Mpeg1MuxBuffer *mb) { while (offset < mb->length-6) { if (!have_sync) { guchar byte = *(data+offset); - /*GST_DEBUG (0,"mpeg1mux::update_video_info: found #%d at %lu",byte,offset); */ + /*GST_DEBUG ("mpeg1mux::update_video_info: found #%d at %lu",byte,offset); */ offset++; /* if it's zero, increment the zero count */ if (byte == 0) { sync_zeros++; - /*GST_DEBUG (0,"mpeg1mux::update_video_info: found zero #%d at %lu",sync_zeros,offset-1); */ + /*GST_DEBUG ("mpeg1mux::update_video_info: found zero #%d at %lu",sync_zeros,offset-1); */ } /* if it's a one and we have two previous zeros, we have sync */ else if ((byte == 1) && (sync_zeros >= 2)) { - GST_DEBUG (0,"mpeg1mux::update_video_info: synced at %lu",offset-1); + GST_DEBUG ("mpeg1mux::update_video_info: synced at %lu",offset-1); have_sync = TRUE; sync_zeros = 0; } @@ -295,21 +295,21 @@ static void mpeg1mux_buffer_update_video_info(Mpeg1MuxBuffer *mb) { /* then snag the chunk ID */ } else if (id == 0) { id = *(data+offset); - GST_DEBUG (0,"mpeg1mux::update_video_info: got id 0x%02lX",id); + GST_DEBUG ("mpeg1mux::update_video_info: got id 0x%02lX",id); id = (SYNCWORD_START<<8)+id; switch (id) { case SEQUENCE_HEADER: - GST_DEBUG (0,"mpeg1mux::update_video_info: sequence header"); + GST_DEBUG ("mpeg1mux::update_video_info: sequence header"); break; case GROUP_START: - GST_DEBUG (0,"mpeg1mux::update_video_info: group start"); + GST_DEBUG ("mpeg1mux::update_video_info: group start"); mb->info.video.group_order=0; break; case PICTURE_START: /* skip the first access unit */ if (mb->info.video.decoding_order != 0) { Mpeg1MuxTimecode *tc; - GST_DEBUG (0,"mpeg1mux::update_video_info: PTS %" G_GUINT64_FORMAT ", DTS %" G_GUINT64_FORMAT ", length %lu", mb->info.video.current_PTS, + GST_DEBUG ("mpeg1mux::update_video_info: PTS %" G_GUINT64_FORMAT ", DTS %" G_GUINT64_FORMAT ", length %lu", mb->info.video.current_PTS, mb->info.video.current_DTS, offset - mb->current_start-3); tc = (Mpeg1MuxTimecode *) g_malloc(sizeof(Mpeg1MuxTimecode)); @@ -331,7 +331,7 @@ static void mpeg1mux_buffer_update_video_info(Mpeg1MuxBuffer *mb) { temp= (*(data+offset+1)<<8)+*(data+offset+2); temporal_reference = (temp & 0xffc0) >> 6; mb->info.video.current_type = (temp & 0x0038) >> 3; - GST_DEBUG (0,"mpeg1mux::update_video_info: picture start temporal_ref:%d type:%s Frame", temporal_reference, + GST_DEBUG ("mpeg1mux::update_video_info: picture start temporal_ref:%d type:%s Frame", temporal_reference, picture_types[mb->info.video.current_type-1]); mb->info.video.current_DTS = mb->info.video.decoding_order * mb->info.video.secs_per_frame * CLOCKS; @@ -345,7 +345,7 @@ static void mpeg1mux_buffer_update_video_info(Mpeg1MuxBuffer *mb) { offset++; break; case SEQUENCE_END: - GST_DEBUG (0,"mpeg1mux::update_video_info: sequence end"); + GST_DEBUG ("mpeg1mux::update_video_info: sequence end"); break; } /* prepare for next sync */ @@ -370,7 +370,7 @@ static void mpeg1mux_buffer_update_audio_info(Mpeg1MuxBuffer *mb) { Mpeg1MuxTimecode *tc; - GST_DEBUG (0,"mpeg1mux::update_audio_info %lu %lu", mb->base, mb->scan_pos); + GST_DEBUG ("mpeg1mux::update_audio_info %lu %lu", mb->base, mb->scan_pos); if (mb->base == 0 && mb->scan_pos == 0) { id = GUINT32_FROM_BE(*((guint32 *)(data))); @@ -396,7 +396,7 @@ static void mpeg1mux_buffer_update_audio_info(Mpeg1MuxBuffer *mb) { } mb->info.audio.framesize = bpf; - GST_DEBUG (0,"mpeg1mux::update_audio_info: samples per second %d", samplerate_index); + GST_DEBUG ("mpeg1mux::update_audio_info: samples per second %d", samplerate_index); gst_getbits_init(&gb, NULL, NULL); gst_getbits_newbuf(&gb, data, mb->length); @@ -417,13 +417,13 @@ static void mpeg1mux_buffer_update_audio_info(Mpeg1MuxBuffer *mb) { mb->info.audio.original_copy = gst_getbits1(&gb); mb->info.audio.emphasis = gst_getbits2(&gb); - GST_DEBUG (0,"mpeg1mux::update_audio_info: layer %d", mb->info.audio.layer); - GST_DEBUG (0,"mpeg1mux::update_audio_info: bit_rate %d", mb->info.audio.bit_rate); - GST_DEBUG (0,"mpeg1mux::update_audio_info: frequency %d", mb->info.audio.frequency); + GST_DEBUG ("mpeg1mux::update_audio_info: layer %d", mb->info.audio.layer); + GST_DEBUG ("mpeg1mux::update_audio_info: bit_rate %d", mb->info.audio.bit_rate); + GST_DEBUG ("mpeg1mux::update_audio_info: frequency %d", mb->info.audio.frequency); mb->info.audio.samples_per_second = (double)dfrequency [mb->info.audio.frequency]; - GST_DEBUG (0,"mpeg1mux::update_audio_info: samples per second %g", mb->info.audio.samples_per_second); + GST_DEBUG ("mpeg1mux::update_audio_info: samples per second %g", mb->info.audio.samples_per_second); mb->info.audio.decoding_order=0; @@ -435,7 +435,7 @@ static void mpeg1mux_buffer_update_audio_info(Mpeg1MuxBuffer *mb) { mb->info.audio.current_PTS = mb->info.audio.decoding_order * samples [mb->info.audio.layer] / mb->info.audio.samples_per_second * 90. + startup_delay; - GST_DEBUG (0,"mpeg1mux::update_audio_info: PTS %" G_GUINT64_FORMAT ", length %u", mb->info.audio.current_PTS, mb->info.audio.framesize); + GST_DEBUG ("mpeg1mux::update_audio_info: PTS %" G_GUINT64_FORMAT ", length %u", mb->info.audio.current_PTS, mb->info.audio.framesize); tc->PTS = mb->info.audio.current_PTS; tc->DTS = mb->info.audio.current_PTS; mb->timecode_list = g_list_append(mb->timecode_list, tc); @@ -482,7 +482,7 @@ static void mpeg1mux_buffer_update_audio_info(Mpeg1MuxBuffer *mb) { mb->info.audio.samples_per_second * 90. ; tc->DTS = tc->PTS = mb->info.audio.current_PTS; - GST_DEBUG (0,"mpeg1mux::update_audio_info: PTS %" G_GUINT64_FORMAT ", %" G_GUINT64_FORMAT " length %lu", mb->info.audio.current_PTS, tc->PTS, tc->length); + GST_DEBUG ("mpeg1mux::update_audio_info: PTS %" G_GUINT64_FORMAT ", %" G_GUINT64_FORMAT " length %lu", mb->info.audio.current_PTS, tc->PTS, tc->length); mb->timecode_list = g_list_append(mb->timecode_list, tc); mb->info.audio.decoding_order++; diff --git a/gst/mpeg1sys/gstmpeg1systemencode.c b/gst/mpeg1sys/gstmpeg1systemencode.c index 01f32198..7e18121a 100644 --- a/gst/mpeg1sys/gstmpeg1systemencode.c +++ b/gst/mpeg1sys/gstmpeg1systemencode.c @@ -17,6 +17,9 @@ * Boston, MA 02111-1307, USA. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include <stdlib.h> #include <string.h> #include <math.h> @@ -25,7 +28,7 @@ #include "gstmpeg1systemencode.h" #include "main.h" -/*#define GST_DEBUG(a, b...) g_print (##b) */ +/*#define GST_DEBUG (b...) g_print (##b) */ /* elementfactory information */ static GstElementDetails system_encode_details = { @@ -217,7 +220,7 @@ gst_system_encode_pick_streams (GList *mta, GstMPEG1SystemEncode *system_encode) { guint64 lowest = ~1; - GST_DEBUG (0, "pick_streams: %" G_GINT64_FORMAT ", %" G_GINT64_FORMAT, system_encode->video_buffer->next_frame_time, + GST_DEBUG ("pick_streams: %" G_GINT64_FORMAT ", %" G_GINT64_FORMAT, system_encode->video_buffer->next_frame_time, system_encode->audio_buffer->next_frame_time); if (system_encode->which_streams & STREAMS_VIDEO) { @@ -278,7 +281,7 @@ gst_system_encode_update_mta (GstMPEG1SystemEncode *system_encode, GList *mta, g GList *streams = g_list_first(mta); Mpeg1MuxBuffer *mb = (Mpeg1MuxBuffer *)streams->data; - GST_DEBUG (0,"system_encode::multiplex: update mta"); + GST_DEBUG ("system_encode::multiplex: update mta"); mpeg1mux_buffer_shrink(mb, size); @@ -315,7 +318,7 @@ gst_system_setup_multiplex (GstMPEG1SystemEncode *system_encode) (double)(system_encode->packets_per_pack-1.))) / (double)(system_encode->packets_per_pack) ); system_encode->data_rate = ceil(system_encode->dmux_rate/50.)*50; - GST_DEBUG (0,"system_encode::multiplex: data_rate %u, video_rate: %u, audio_rate: %u", system_encode->data_rate, + GST_DEBUG ("system_encode::multiplex: data_rate %u, video_rate: %u, audio_rate: %u", system_encode->data_rate, system_encode->video_rate, system_encode->audio_rate); system_encode->video_delay = (double)system_encode->video_delay_ms*(double)(CLOCKS/1000); @@ -327,7 +330,7 @@ gst_system_setup_multiplex (GstMPEG1SystemEncode *system_encode) video_tc = MPEG1MUX_BUFFER_FIRST_TIMECODE(system_encode->video_buffer); audio_tc = MPEG1MUX_BUFFER_FIRST_TIMECODE(system_encode->audio_buffer); - GST_DEBUG (0,"system_encode::video tc %" G_GINT64_FORMAT ", audio tc %" G_GINT64_FORMAT ":", video_tc->DTS, audio_tc->DTS); + GST_DEBUG ("system_encode::video tc %" G_GINT64_FORMAT ", audio tc %" G_GINT64_FORMAT ":", video_tc->DTS, audio_tc->DTS); system_encode->delay = ((double)system_encode->sectors_delay + ceil((double)video_tc->length/(double)system_encode->min_packet_data) + @@ -341,7 +344,7 @@ gst_system_setup_multiplex (GstMPEG1SystemEncode *system_encode) system_encode->video_delay = 0; system_encode->delay = 0; - GST_DEBUG (0,"system_encode::multiplex: delay %g, mux_rate: %lu", system_encode->delay, system_encode->mux_rate); + GST_DEBUG ("system_encode::multiplex: delay %g, mux_rate: %lu", system_encode->delay, system_encode->mux_rate); } static void @@ -361,7 +364,7 @@ gst_system_encode_multiplex(GstMPEG1SystemEncode *system_encode) g_mutex_lock(system_encode->lock); while (gst_system_encode_have_data(system_encode)) { - GST_DEBUG (0,"system_encode::multiplex: multiplexing"); + GST_DEBUG ("system_encode::multiplex: multiplexing"); if (!system_encode->have_setup) { gst_system_setup_multiplex(system_encode); @@ -397,7 +400,7 @@ gst_system_encode_multiplex(GstMPEG1SystemEncode *system_encode) tc = MPEG1MUX_BUFFER_FIRST_TIMECODE(mb); if (mb->new_frame) { - GST_DEBUG (0,"system_encode::multiplex: new frame"); + GST_DEBUG ("system_encode::multiplex: new frame"); if (tc->frame_type == FRAME_TYPE_AUDIO || tc->frame_type == FRAME_TYPE_IFRAME || tc->frame_type == FRAME_TYPE_PFRAME) { timestamps = TIMESTAMPS_PTS; } @@ -458,7 +461,7 @@ gst_system_encode_multiplex(GstMPEG1SystemEncode *system_encode) system_encode->bytes_output += GST_BUFFER_SIZE(outbuf); gst_pad_push(system_encode->srcpad,outbuf); - GST_DEBUG (0,"system_encode::multiplex: writing %02x", mb->stream_id); + GST_DEBUG ("system_encode::multiplex: writing %02x", mb->stream_id); } gst_info("system_encode::multiplex: data left in video buffer %lu\n", MPEG1MUX_BUFFER_SPACE(system_encode->video_buffer)); @@ -484,18 +487,18 @@ gst_system_encode_chain (GstPad *pad, GstBuffer *buf) data = GST_BUFFER_DATA(buf); size = GST_BUFFER_SIZE(buf); - GST_DEBUG (0,"system_encode::chain: system_encode: have buffer of size %lu",size); + GST_DEBUG ("system_encode::chain: system_encode: have buffer of size %lu",size); padname = GST_OBJECT_NAME (pad); if (strncmp(padname, "audio_", 6) == 0) { channel = atoi(&padname[6]); - GST_DEBUG (0,"gst_system_encode_chain: got audio buffer in from audio channel %02d", channel); + GST_DEBUG ("gst_system_encode_chain: got audio buffer in from audio channel %02d", channel); mpeg1mux_buffer_queue(system_encode->audio_buffer, buf); } else if (strncmp(padname, "video_", 6) == 0) { channel = atoi(&padname[6]); - GST_DEBUG (0,"gst_system_encode_chain: got video buffer in from video channel %02d", channel); + GST_DEBUG ("gst_system_encode_chain: got video buffer in from video channel %02d", channel); mpeg1mux_buffer_queue(system_encode->video_buffer, buf); diff --git a/gst/mpeg1videoparse/gstmp1videoparse.c b/gst/mpeg1videoparse/gstmp1videoparse.c index da3e7059..332a259a 100644 --- a/gst/mpeg1videoparse/gstmp1videoparse.c +++ b/gst/mpeg1videoparse/gstmp1videoparse.c @@ -18,6 +18,9 @@ */ /*#define GST_DEBUG_ENABLED */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include "gstmp1videoparse.h" /* Start codes. */ @@ -208,7 +211,7 @@ mp1videoparse_find_next_gop (Mp1VideoParse *mp1videoparse, GstBuffer *buf) static void gst_mp1videoparse_flush (Mp1VideoParse *mp1videoparse) { - GST_DEBUG (0,"mp1videoparse: flushing"); + GST_DEBUG ("mp1videoparse: flushing"); if (mp1videoparse->partialbuf) { gst_buffer_unref(mp1videoparse->partialbuf); mp1videoparse->partialbuf= NULL; @@ -276,17 +279,17 @@ gst_mp1videoparse_real_chain (Mp1VideoParse *mp1videoparse, GstBuffer *buf, GstP data = GST_BUFFER_DATA(mp1videoparse->partialbuf); size = GST_BUFFER_SIZE(mp1videoparse->partialbuf); - GST_DEBUG (0,"mp1videoparse: received buffer of %ld bytes %" G_GINT64_FORMAT,size, GST_BUFFER_TIMESTAMP(buf)); + GST_DEBUG ("mp1videoparse: received buffer of %ld bytes %" G_GINT64_FORMAT,size, GST_BUFFER_TIMESTAMP(buf)); head = GUINT32_FROM_BE(*((guint32 *)data)); - GST_DEBUG (0,"mp1videoparse: head is %08x", (unsigned int)head); + GST_DEBUG ("mp1videoparse: head is %08x", (unsigned int)head); if (!mp1videoparse_valid_sync(head) || mp1videoparse->need_resync) { sync_pos = mp1videoparse_find_next_gop(mp1videoparse, mp1videoparse->partialbuf); if (sync_pos != -1) { mp1videoparse->need_resync = FALSE; - GST_DEBUG (0,"mp1videoparse: found new gop at %d", sync_pos); + GST_DEBUG ("mp1videoparse: found new gop at %d", sync_pos); if (sync_pos != 0) { temp = gst_buffer_create_sub(mp1videoparse->partialbuf, sync_pos, size-sync_pos); @@ -299,7 +302,7 @@ gst_mp1videoparse_real_chain (Mp1VideoParse *mp1videoparse, GstBuffer *buf, GstP } } else { - GST_DEBUG (0,"mp1videoparse: could not sync"); + GST_DEBUG ("mp1videoparse: could not sync"); gst_buffer_unref(mp1videoparse->partialbuf); mp1videoparse->partialbuf = NULL; return; @@ -313,7 +316,7 @@ gst_mp1videoparse_real_chain (Mp1VideoParse *mp1videoparse, GstBuffer *buf, GstP sync_state = 0; have_sync = FALSE; - GST_DEBUG (0,"mp1videoparse: searching sync"); + GST_DEBUG ("mp1videoparse: searching sync"); while (offset < size-1) { sync_byte = *(data + offset); @@ -322,7 +325,7 @@ gst_mp1videoparse_real_chain (Mp1VideoParse *mp1videoparse, GstBuffer *buf, GstP sync_state++; } else if ((sync_byte == 1) && (sync_state >=2)) { - GST_DEBUG (0,"mp1videoparse: code 0x000001%02x",data[offset+1]); + GST_DEBUG ("mp1videoparse: code 0x000001%02x",data[offset+1]); if (data[offset+1] == (PICTURE_START_CODE & 0xff)) { mp1videoparse->picture_in_buffer++; if (mp1videoparse->picture_in_buffer == 1) { @@ -334,7 +337,7 @@ gst_mp1videoparse_real_chain (Mp1VideoParse *mp1videoparse, GstBuffer *buf, GstP break; } else { - GST_DEBUG (0,"mp1videoparse: %d in buffer", mp1videoparse->picture_in_buffer); + GST_DEBUG ("mp1videoparse: %d in buffer", mp1videoparse->picture_in_buffer); g_assert_not_reached(); } } @@ -348,7 +351,7 @@ gst_mp1videoparse_real_chain (Mp1VideoParse *mp1videoparse, GstBuffer *buf, GstP if (have_sync) { offset -= 2; - GST_DEBUG (0,"mp1videoparse: synced at %ld code 0x000001%02x",offset,data[offset+3]); + GST_DEBUG ("mp1videoparse: synced at %ld code 0x000001%02x",offset,data[offset+3]); outbuf = gst_buffer_create_sub(mp1videoparse->partialbuf, 0, offset+4); g_assert(outbuf != NULL); @@ -359,9 +362,9 @@ gst_mp1videoparse_real_chain (Mp1VideoParse *mp1videoparse, GstBuffer *buf, GstP mp1videoparse->in_flush = FALSE; } - GST_DEBUG (0,"mp1videoparse: pushing %d bytes %" G_GUINT64_FORMAT, GST_BUFFER_SIZE(outbuf), GST_BUFFER_TIMESTAMP(outbuf)); + GST_DEBUG ("mp1videoparse: pushing %d bytes %" G_GUINT64_FORMAT, GST_BUFFER_SIZE(outbuf), GST_BUFFER_TIMESTAMP(outbuf)); gst_pad_push(outpad, outbuf); - GST_DEBUG (0,"mp1videoparse: pushing done"); + GST_DEBUG ("mp1videoparse: pushing done"); mp1videoparse->picture_in_buffer = 0; temp = gst_buffer_create_sub(mp1videoparse->partialbuf, offset, size-offset); @@ -381,7 +384,7 @@ gst_mp1videoparse_change_state (GstElement *element) g_return_val_if_fail(GST_IS_MP1VIDEOPARSE(element),GST_STATE_FAILURE); mp1videoparse = GST_MP1VIDEOPARSE(element); - GST_DEBUG (0,"mp1videoparse: state pending %d", GST_STATE_PENDING(element)); + GST_DEBUG ("mp1videoparse: state pending %d", GST_STATE_PENDING(element)); * if going down into NULL state, clear out buffers * if (GST_STATE_PENDING(element) == GST_STATE_READY) { diff --git a/gst/mpeg2sub/gstmpeg2subt.c b/gst/mpeg2sub/gstmpeg2subt.c index a857a104..1a290b76 100644 --- a/gst/mpeg2sub/gstmpeg2subt.c +++ b/gst/mpeg2sub/gstmpeg2subt.c @@ -19,6 +19,9 @@ /*#define DEBUG_ENABLED */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include <gstmpeg2subt.h> static void gst_mpeg2subt_class_init (GstMpeg2SubtClass *klass); @@ -198,7 +201,7 @@ gst_mpeg2subt_parse_header (GstMpeg2Subt *mpeg2subt) mpeg2subt->color[2] = yuv_color[buffer [i+2] >> 4]; mpeg2subt->color[3] = yuv_color[buffer [i+2] & 0xf]; mpeg2subt->color[4] = yuv_color[0xf]; - GST_DEBUG (0,"mpeg2subt: colors %d %d %d %d", mpeg2subt->color[0],mpeg2subt->color[1],mpeg2subt->color[2],mpeg2subt->color[3]); + GST_DEBUG ("mpeg2subt: colors %d %d %d %d", mpeg2subt->color[0],mpeg2subt->color[1],mpeg2subt->color[2],mpeg2subt->color[3]); i += 3; break; case 0x04: /* transparency palette */ @@ -206,7 +209,7 @@ gst_mpeg2subt_parse_header (GstMpeg2Subt *mpeg2subt) mpeg2subt->trans[2] = buffer [i+1] & 0xf; mpeg2subt->trans[1] = buffer [i+2] >> 4; mpeg2subt->trans[0] = buffer [i+2] & 0xf; - GST_DEBUG (0,"mpeg2subt: transparency %d %d %d %d", mpeg2subt->trans[0],mpeg2subt->trans[1],mpeg2subt->trans[2],mpeg2subt->trans[3]); + GST_DEBUG ("mpeg2subt: transparency %d %d %d %d", mpeg2subt->trans[0],mpeg2subt->trans[1],mpeg2subt->trans[2],mpeg2subt->trans[3]); i += 3; break; case 0x05: /* image coordinates */ @@ -226,7 +229,7 @@ gst_mpeg2subt_parse_header (GstMpeg2Subt *mpeg2subt) */ mpeg2subt->duration = (((buffer[i+1] << 8) + buffer[i+2]) * 25)/90; - GST_DEBUG (0,"duration %d", mpeg2subt->duration); + GST_DEBUG ("duration %d", mpeg2subt->duration); if ( (buffer[i+3] != buffer[mpeg2subt->data_size+2]) || (buffer[i+4] != buffer[mpeg2subt->data_size+3]) ) @@ -280,7 +283,7 @@ gst_mpeg2subt_merge_title (GstMpeg2Subt *mpeg2subt, GstBuffer *buf) offset[1] = mpeg2subt->offset[1]; #define get_nibble() get_nibble (buffer, offset, id, &aligned) - GST_DEBUG (0,"mpeg2subt: merging subtitle"); + GST_DEBUG ("mpeg2subt: merging subtitle"); while ((offset[1] < mpeg2subt->data_size + 2) && (y < height)) { @@ -362,7 +365,7 @@ gst_mpeg2subt_chain_subtitle (GstPad *pad, GstBuffer *buf) mpeg2subt->have_title = FALSE; } - GST_DEBUG (0,"presentation time %" G_GUINT64_FORMAT, GST_BUFFER_TIMESTAMP(buf)); + GST_DEBUG ("presentation time %" G_GUINT64_FORMAT, GST_BUFFER_TIMESTAMP(buf)); /* deal with partial frame from previous buffer */ if (mpeg2subt->partialbuf) { @@ -382,7 +385,7 @@ gst_mpeg2subt_chain_subtitle (GstPad *pad, GstBuffer *buf) if (mpeg2subt->packet_size == size) { - GST_DEBUG (0,"mpeg2subt: subtitle packet size %d, current size %ld", mpeg2subt->packet_size, size); + GST_DEBUG ("mpeg2subt: subtitle packet size %d, current size %ld", mpeg2subt->packet_size, size); mpeg2subt->data_size = GUINT16_FROM_BE(*(guint16 *)(data+2)); diff --git a/gst/mpegaudioparse/gstmp3types.c b/gst/mpegaudioparse/gstmp3types.c index 30a4a7ff..1d74d472 100644 --- a/gst/mpegaudioparse/gstmp3types.c +++ b/gst/mpegaudioparse/gstmp3types.c @@ -41,7 +41,7 @@ mp3_type_find(GstBuffer *buf, gpointer private) data = GST_BUFFER_DATA (buf); size = GST_BUFFER_SIZE (buf); - GST_DEBUG (0,"mp3typefind: typefind"); + GST_DEBUG ("mp3typefind: typefind"); /* gracefully ripped from libid3 */ if (size >= 3 && @@ -50,7 +50,7 @@ mp3_type_find(GstBuffer *buf, gpointer private) data += 128; size -= 128; - GST_DEBUG (0, "mp3typefind: detected ID3 Tag V1"); + GST_DEBUG ("mp3typefind: detected ID3 Tag V1"); } else if (size >= 10 && (data[0] == 'I' && data[1] == 'D' && data[2] == '3') && data[3] < 0xff && data[4] < 0xff && @@ -69,7 +69,7 @@ mp3_type_find(GstBuffer *buf, gpointer private) if (data[3] > 3 && (data[5] & 0x10)) skip += 10; - GST_DEBUG (0, "mp3typefind: detected ID3 Tag V2 with %u bytes", skip); + GST_DEBUG ("mp3typefind: detected ID3 Tag V2 with %u bytes", skip); size -= skip; data += skip; } @@ -147,8 +147,8 @@ mp3_type_frame_length_from_header (guint32 header) length += ((layer == 3 && version == 0) ? 144000 : 72000) * bitrate / samplerate; } - GST_DEBUG (0, "Calculated mad frame length of %u bytes", length); - GST_DEBUG (0, "samplerate = %lu - bitrate = %lu - layer = %lu - version = %lu", samplerate, bitrate, layer, version); + GST_DEBUG ("Calculated mad frame length of %u bytes", length); + GST_DEBUG ("samplerate = %lu - bitrate = %lu - layer = %lu - version = %lu", samplerate, bitrate, layer, version); return length; } diff --git a/gst/mpegaudioparse/gstmpegaudioparse.c b/gst/mpegaudioparse/gstmpegaudioparse.c index 4d0cf3a4..a5d8797c 100644 --- a/gst/mpegaudioparse/gstmpegaudioparse.c +++ b/gst/mpegaudioparse/gstmpegaudioparse.c @@ -18,6 +18,9 @@ */ /*#define GST_DEBUG_ENABLED */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include <gstmpegaudioparse.h> @@ -243,7 +246,7 @@ gst_mp3parse_chain (GstPad *pad, GstBuffer *buf) mp3parse = GST_MP3PARSE (gst_pad_get_parent (pad)); - GST_DEBUG (0,"mp3parse: received buffer of %d bytes",GST_BUFFER_SIZE(buf)); + GST_DEBUG ("mp3parse: received buffer of %d bytes",GST_BUFFER_SIZE(buf)); last_ts = GST_BUFFER_TIMESTAMP(buf); @@ -274,12 +277,12 @@ gst_mp3parse_chain (GstPad *pad, GstBuffer *buf) while (offset < size-4) { int skipped = 0; - GST_DEBUG (0,"mp3parse: offset %ld, size %ld ",offset, size); + GST_DEBUG ("mp3parse: offset %ld, size %ld ",offset, size); /* search for a possible start byte */ for (;((data[offset] != 0xff) && (offset < size));offset++) skipped++; if (skipped && !mp3parse->in_flush) { - GST_DEBUG (0,"mp3parse: **** now at %ld skipped %d bytes",offset,skipped); + GST_DEBUG ("mp3parse: **** now at %ld skipped %d bytes",offset,skipped); } /* construct the header word */ header = GUINT32_FROM_BE(*((guint32 *)(data+offset))); @@ -306,12 +309,12 @@ gst_mp3parse_chain (GstPad *pad, GstBuffer *buf) if ((size-offset)<(bpf+4)) { if (mp3parse->in_flush) break; } /* wait until we have the the entire current frame as well as the next frame header */ header2 = GUINT32_FROM_BE(*((guint32 *)(data+offset+bpf))); - GST_DEBUG(0,"mp3parse: header=%08X, header2=%08X, bpf=%d", (unsigned int)header, (unsigned int)header2, bpf ); + GST_DEBUG ("mp3parse: header=%08X, header2=%08X, bpf=%d", (unsigned int)header, (unsigned int)header2, bpf ); #define HDRMASK ~( (0xF<<12)/*bitrate*/ | (1<<9)/*padding*/ | (3<<4)/*mode extension*/ ) /* mask the bits which are allowed to differ between frames */ if ( (header2&HDRMASK) != (header&HDRMASK) ) { /* require 2 matching headers in a row */ - GST_DEBUG(0,"mp3parse: next header doesn't match (header=%08X, header2=%08X, bpf=%d)", (unsigned int)header, (unsigned int)header2, bpf ); + GST_DEBUG ("mp3parse: next header doesn't match (header=%08X, header2=%08X, bpf=%d)", (unsigned int)header, (unsigned int)header2, bpf ); offset++; /* This frame is invalid. Start looking for a valid frame at the next position in the stream */ continue; } @@ -320,7 +323,7 @@ gst_mp3parse_chain (GstPad *pad, GstBuffer *buf) /* if we don't have the whole frame... */ if ((size - offset) < bpf) { - GST_DEBUG (0,"mp3parse: partial buffer needed %ld < %d ",(size-offset), bpf); + GST_DEBUG ("mp3parse: partial buffer needed %ld < %d ",(size-offset), bpf); break; } else { @@ -328,7 +331,7 @@ gst_mp3parse_chain (GstPad *pad, GstBuffer *buf) offset += bpf; if (mp3parse->skip == 0) { - GST_DEBUG (0,"mp3parse: pushing buffer of %d bytes",GST_BUFFER_SIZE(outbuf)); + GST_DEBUG ("mp3parse: pushing buffer of %d bytes",GST_BUFFER_SIZE(outbuf)); if (mp3parse->in_flush) { /* FIXME do some sort of flush event */ mp3parse->in_flush = FALSE; @@ -337,21 +340,21 @@ gst_mp3parse_chain (GstPad *pad, GstBuffer *buf) gst_pad_push(mp3parse->srcpad,outbuf); } else { - GST_DEBUG (0,"mp3parse: skipping buffer of %d bytes",GST_BUFFER_SIZE(outbuf)); + GST_DEBUG ("mp3parse: skipping buffer of %d bytes",GST_BUFFER_SIZE(outbuf)); gst_buffer_unref(outbuf); mp3parse->skip--; } } } else { offset++; - if (!mp3parse->in_flush) GST_DEBUG (0,"mp3parse: *** wrong header, skipping byte (FIXME?)"); + if (!mp3parse->in_flush) GST_DEBUG ("mp3parse: *** wrong header, skipping byte (FIXME?)"); } } /* if we have processed this block and there are still */ /* bytes left not in a partial block, copy them over. */ if (size-offset > 0) { glong remainder = (size - offset); - GST_DEBUG (0,"mp3parse: partial buffer needed %ld for trailing bytes",remainder); + GST_DEBUG ("mp3parse: partial buffer needed %ld for trailing bytes",remainder); outbuf = gst_buffer_create_sub(mp3parse->partialbuf,offset,remainder); gst_buffer_unref(mp3parse->partialbuf); @@ -409,28 +412,28 @@ bpf_from_header (GstMPEGAudioParse *parse, unsigned long header) static gboolean head_check (unsigned long head) { - GST_DEBUG (0,"checking mp3 header 0x%08lx",head); + GST_DEBUG ("checking mp3 header 0x%08lx",head); /* if it's not a valid sync */ if ((head & 0xffe00000) != 0xffe00000) { - GST_DEBUG (0,"invalid sync");return FALSE; } + GST_DEBUG ("invalid sync");return FALSE; } /* if it's an invalid MPEG version */ if (((head >> 19) & 3) == 0x1) { - GST_DEBUG (0,"invalid MPEG version");return FALSE; } + GST_DEBUG ("invalid MPEG version");return FALSE; } /* if it's an invalid layer */ if (!((head >> 17) & 3)) { - GST_DEBUG (0,"invalid layer");return FALSE; } + GST_DEBUG ("invalid layer");return FALSE; } /* if it's an invalid bitrate */ if (((head >> 12) & 0xf) == 0x0) { - GST_DEBUG (0,"invalid bitrate");return FALSE; } + GST_DEBUG ("invalid bitrate");return FALSE; } if (((head >> 12) & 0xf) == 0xf) { - GST_DEBUG (0,"invalid bitrate");return FALSE; } + GST_DEBUG ("invalid bitrate");return FALSE; } /* if it's an invalid samplerate */ if (((head >> 10) & 0x3) == 0x3) { - GST_DEBUG (0,"invalid samplerate");return FALSE; } + GST_DEBUG ("invalid samplerate");return FALSE; } if ((head & 0xffff0000) == 0xfffe0000) { - GST_DEBUG (0,"invalid sync");return FALSE; } + GST_DEBUG ("invalid sync");return FALSE; } if (head & 0x00000002) { - GST_DEBUG (0,"invalid emphasis");return FALSE; } + GST_DEBUG ("invalid emphasis");return FALSE; } return TRUE; } diff --git a/gst/passthrough/gstpassthrough.c b/gst/passthrough/gstpassthrough.c index 1b45f156..75856aac 100644 --- a/gst/passthrough/gstpassthrough.c +++ b/gst/passthrough/gstpassthrough.c @@ -18,6 +18,9 @@ * Boston, MA 02111-1307, USA. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include <string.h> #include <gst/gst.h> #include <gst/audio/audio.h> diff --git a/gst/playondemand/gstplayondemand.c b/gst/playondemand/gstplayondemand.c index 2d883234..dcffbf36 100644 --- a/gst/playondemand/gstplayondemand.c +++ b/gst/playondemand/gstplayondemand.c @@ -18,6 +18,9 @@ */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include <string.h> #include <gst/gst.h> #include <gst/audio/audio.h> diff --git a/gst/qtdemux/qtdemux.c b/gst/qtdemux/qtdemux.c index 16b415b9..be187752 100644 --- a/gst/qtdemux/qtdemux.c +++ b/gst/qtdemux/qtdemux.c @@ -18,6 +18,9 @@ * Boston, MA 02111-1307, USA. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include "qtdemux.h" #include <string.h> @@ -257,7 +260,7 @@ static gboolean gst_qtdemux_handle_sink_event (GstQTDemux *qtdemux) gst_bytestream_get_status(qtdemux->bs, &remaining, &event); type = event ? GST_EVENT_TYPE(event) : GST_EVENT_UNKNOWN; - GST_DEBUG(0,"qtdemux: event %p %d", event, type); + GST_DEBUG ("qtdemux: event %p %d", event, type); switch(type){ case GST_EVENT_EOS: @@ -268,7 +271,7 @@ static gboolean gst_qtdemux_handle_sink_event (GstQTDemux *qtdemux) g_warning("flush event"); break; case GST_EVENT_DISCONTINUOUS: - GST_DEBUG(0,"discontinuous event\n"); + GST_DEBUG ("discontinuous event\n"); //gst_bytestream_flush_fast(qtdemux->bs, remaining); break; default: @@ -324,7 +327,7 @@ static void gst_qtdemux_loop_header (GstElement *element) //cur_offset = gst_bytestream_tell(qtdemux->bs); cur_offset = qtdemux->offset; - GST_DEBUG(0,"loop at position %d",cur_offset); + GST_DEBUG ("loop at position %d",cur_offset); switch(qtdemux->state){ case QTDEMUX_STATE_HEADER: @@ -341,9 +344,9 @@ static void gst_qtdemux_loop_header (GstElement *element) }while(1); length = GUINT32_FROM_BE(*(guint32 *)data); - GST_DEBUG(0,"length %08x",length); + GST_DEBUG ("length %08x",length); fourcc = GUINT32_FROM_LE(*(guint32 *)(data+4)); - GST_DEBUG(0,"fourcc " GST_FOURCC_FORMAT, GST_FOURCC_ARGS(fourcc)); + GST_DEBUG ("fourcc " GST_FOURCC_FORMAT, GST_FOURCC_ARGS(fourcc)); if(length==0){ length = gst_bytestream_length(qtdemux->bs) - cur_offset; } @@ -351,9 +354,9 @@ static void gst_qtdemux_loop_header (GstElement *element) guint32 length1, length2; length1 = GUINT32_FROM_BE(*(guint32 *)(data+8)); - GST_DEBUG(0,"length1 %08x",length1); + GST_DEBUG ("length1 %08x",length1); length2 = GUINT32_FROM_BE(*(guint32 *)(data+12)); - GST_DEBUG(0,"length2 %08x",length2); + GST_DEBUG ("length2 %08x",length2); length=length2; } @@ -370,7 +373,7 @@ static void gst_qtdemux_loop_header (GstElement *element) do{ ret = gst_bytestream_read(qtdemux->bs, &moov, length); if(ret < length){ - GST_DEBUG(0,"read failed (%d < %d)",ret,length); + GST_DEBUG ("read failed (%d < %d)",ret,length); if(!gst_qtdemux_handle_sink_event(qtdemux)){ return; } @@ -395,7 +398,7 @@ static void gst_qtdemux_loop_header (GstElement *element) ret = gst_bytestream_seek(qtdemux->bs, cur_offset + length, GST_SEEK_METHOD_SET); qtdemux->offset = cur_offset + length; - GST_DEBUG(0,"seek returned %d\n",ret); + GST_DEBUG ("seek returned %d\n",ret); break; } case QTDEMUX_STATE_SEEKING_EOS: @@ -444,7 +447,7 @@ static void gst_qtdemux_loop_header (GstElement *element) GST_BUFFER(gst_event_new (GST_EVENT_EOS))); } ret = gst_bytestream_seek(qtdemux->bs, 0, GST_SEEK_METHOD_END); - GST_DEBUG(0,"seek returned %d",ret); + GST_DEBUG ("seek returned %d",ret); qtdemux->state = QTDEMUX_STATE_SEEKING_EOS; return; @@ -455,23 +458,23 @@ static void gst_qtdemux_loop_header (GstElement *element) offset = stream->samples[stream->sample_index].offset; size = stream->samples[stream->sample_index].size; - GST_DEBUG(0,"pushing from stream %d, sample_index=%d offset=%d size=%d", + GST_DEBUG ("pushing from stream %d, sample_index=%d offset=%d size=%d", index, stream->sample_index, offset, size); cur_offset = gst_bytestream_tell(qtdemux->bs); if(offset != cur_offset){ - GST_DEBUG(0,"seeking to offset %d",offset); + GST_DEBUG ("seeking to offset %d",offset); ret = gst_bytestream_seek(qtdemux->bs, offset, GST_SEEK_METHOD_SET); - GST_DEBUG(0,"seek returned %d",ret); + GST_DEBUG ("seek returned %d",ret); return; } - GST_DEBUG(0,"reading %d bytes\n",size); + GST_DEBUG ("reading %d bytes\n",size); buf = NULL; do{ ret = gst_bytestream_read(qtdemux->bs, &buf, size); if(ret < size){ - GST_DEBUG(0,"read failed (%d < %d)",ret,size); + GST_DEBUG ("read failed (%d < %d)",ret,size); if(!gst_qtdemux_handle_sink_event(qtdemux)){ return; } @@ -500,14 +503,14 @@ static GstCaps *gst_qtdemux_src_getcaps(GstPad *pad, GstCaps *caps) QtDemuxStream *stream; int i; - GST_DEBUG(0,"gst_qtdemux_src_getcaps"); + GST_DEBUG ("gst_qtdemux_src_getcaps"); qtdemux = GST_QTDEMUX(gst_pad_get_parent(pad)); g_return_val_if_fail(GST_IS_QTDEMUX(qtdemux), NULL); - GST_DEBUG(0, "looking for pad %p in qtdemux %p", pad, qtdemux); - GST_DEBUG(0, "n_streams is %d", qtdemux->n_streams); + GST_DEBUG ("looking for pad %p in qtdemux %p", pad, qtdemux); + GST_DEBUG ("n_streams is %d", qtdemux->n_streams); for(i=0;i<qtdemux->n_streams;i++){ stream = qtdemux->streams[i]; if(stream->pad == pad){ @@ -515,7 +518,7 @@ static GstCaps *gst_qtdemux_src_getcaps(GstPad *pad, GstCaps *caps) } } - GST_DEBUG(0,"Couldn't find stream cooresponding to pad\n"); + GST_DEBUG ("Couldn't find stream cooresponding to pad\n"); return NULL; } @@ -527,23 +530,23 @@ gst_qtdemux_src_link(GstPad *pad, GstCaps *caps) QtDemuxStream *stream; int i; - GST_DEBUG(0,"gst_qtdemux_src_link"); + GST_DEBUG ("gst_qtdemux_src_link"); qtdemux = GST_QTDEMUX(gst_pad_get_parent(pad)); - GST_DEBUG(0, "looking for pad %p in qtdemux %p", pad, qtdemux); + GST_DEBUG ("looking for pad %p in qtdemux %p", pad, qtdemux); g_return_val_if_fail(GST_IS_QTDEMUX(qtdemux), GST_PAD_LINK_REFUSED); - GST_DEBUG(0, "n_streams is %d", qtdemux->n_streams); + GST_DEBUG ("n_streams is %d", qtdemux->n_streams); for(i=0;i<qtdemux->n_streams;i++){ stream = qtdemux->streams[i]; - GST_DEBUG(0, "pad[%d] is %p", i, stream->pad); + GST_DEBUG ("pad[%d] is %p", i, stream->pad); if(stream->pad == pad){ return GST_PAD_LINK_OK; } } - GST_DEBUG(0,"Couldn't find stream cooresponding to pad\n"); + GST_DEBUG ("Couldn't find stream cooresponding to pad\n"); return GST_PAD_LINK_REFUSED; } @@ -581,9 +584,9 @@ void gst_qtdemux_add_stream(GstQTDemux *qtdemux, QtDemuxStream *stream) qtdemux->streams[qtdemux->n_streams] = stream; qtdemux->n_streams++; - GST_DEBUG(0, "n_streams is now %d", qtdemux->n_streams); + GST_DEBUG ("n_streams is now %d", qtdemux->n_streams); - GST_DEBUG(0, "adding pad %p to qtdemux %p", stream->pad, qtdemux); + GST_DEBUG ("adding pad %p to qtdemux %p", stream->pad, qtdemux); gst_element_add_pad(GST_ELEMENT (qtdemux), stream->pad); /* Note: we need to have everything set up before calling try_set_caps */ diff --git a/gst/rtjpeg/gstrtjpegdec.c b/gst/rtjpeg/gstrtjpegdec.c index 3676df84..3166bf70 100644 --- a/gst/rtjpeg/gstrtjpegdec.c +++ b/gst/rtjpeg/gstrtjpegdec.c @@ -18,6 +18,9 @@ */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include <gstrtjpegdec.h> diff --git a/gst/rtjpeg/gstrtjpegenc.c b/gst/rtjpeg/gstrtjpegenc.c index fb0723bc..d44586ec 100644 --- a/gst/rtjpeg/gstrtjpegenc.c +++ b/gst/rtjpeg/gstrtjpegenc.c @@ -18,6 +18,9 @@ */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include <gstrtjpegenc.h> /* elementfactory information */ diff --git a/gst/smooth/gstsmooth.c b/gst/smooth/gstsmooth.c index 434078c7..d174977e 100644 --- a/gst/smooth/gstsmooth.c +++ b/gst/smooth/gstsmooth.c @@ -17,6 +17,9 @@ * Boston, MA 02111-1307, USA. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include <string.h> #include <gstsmooth.h> @@ -234,7 +237,7 @@ gst_smooth_chain (GstPad *pad, GstBuffer *buf) data = GST_BUFFER_DATA (buf); size = GST_BUFFER_SIZE (buf); - GST_DEBUG (0,"smooth: have buffer of %d", GST_BUFFER_SIZE (buf)); + GST_DEBUG ("smooth: have buffer of %d", GST_BUFFER_SIZE (buf)); outbuf = gst_buffer_new(); GST_BUFFER_DATA (outbuf) = g_malloc (GST_BUFFER_SIZE (buf)); diff --git a/gst/smoothwave/gstsmoothwave.c b/gst/smoothwave/gstsmoothwave.c index 7e2917b4..e6a55fcd 100644 --- a/gst/smoothwave/gstsmoothwave.c +++ b/gst/smoothwave/gstsmoothwave.c @@ -18,6 +18,9 @@ */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include <string.h> #include "gstsmoothwave.h" @@ -125,12 +128,12 @@ gst_smoothwave_init (GstSmoothWave *smoothwave) /* gtk_widget_set_default_colormap (gdk_rgb_get_cmap()); */ /* gtk_widget_set_default_visual (gdk_rgb_get_visual()); */ -/* GST_DEBUG (0,"creating palette"); */ +/* GST_DEBUG ("creating palette"); */ for (i=0;i<256;i++) palette[i] = (i << 16) || (i << 8); -/* GST_DEBUG (0,"creating cmap"); */ +/* GST_DEBUG ("creating cmap"); */ smoothwave->cmap = gdk_rgb_cmap_new(palette,256); -/* GST_DEBUG (0,"created cmap"); */ +/* GST_DEBUG ("created cmap"); */ /* gtk_widget_set_default_colormap (smoothwave->cmap); */ smoothwave->image = gtk_drawing_area_new(); @@ -176,7 +179,7 @@ gst_smoothwave_chain (GstPad *pad, GstBuffer *buf) qheight = smoothwave->height/4; -/* GST_DEBUG (0,"traversing %d",smoothwave->width); */ +/* GST_DEBUG ("traversing %d",smoothwave->width); */ for (i=0;i<MAX(smoothwave->width,samplecount);i++) { gint16 y1 = (gint32)(samples[i*2] * qheight) / 32768 + qheight; @@ -195,8 +198,8 @@ gst_smoothwave_chain (GstPad *pad, GstBuffer *buf) ptr++; } -/* GST_DEBUG (0,"drawing"); */ -/* GST_DEBUG (0,"gdk_draw_indexed_image(%p,%p,%d,%d,%d,%d,%s,%p,%d,%p);", +/* GST_DEBUG ("drawing"); */ +/* GST_DEBUG ("gdk_draw_indexed_image(%p,%p,%d,%d,%d,%d,%s,%p,%d,%p);", smoothwave->image->window, smoothwave->image->style->fg_gc[GTK_STATE_NORMAL], 0,0,smoothwave->width,smoothwave->height, diff --git a/gst/smpte/gstsmpte.c b/gst/smpte/gstsmpte.c index 3a7d2f4e..b6761427 100644 --- a/gst/smpte/gstsmpte.c +++ b/gst/smpte/gstsmpte.c @@ -17,6 +17,9 @@ * Boston, MA 02111-1307, USA. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include <string.h> #include <gstsmpte.h> #include "paint.h" diff --git a/gst/spectrum/gstspectrum.c b/gst/spectrum/gstspectrum.c index cb78bdd0..16786e33 100644 --- a/gst/spectrum/gstspectrum.c +++ b/gst/spectrum/gstspectrum.c @@ -17,6 +17,9 @@ * Boston, MA 02111-1307, USA. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include <string.h> #include "gstspectrum.h" diff --git a/gst/speed/gstspeed.c b/gst/speed/gstspeed.c index 01d2a96d..42f9bb33 100644 --- a/gst/speed/gstspeed.c +++ b/gst/speed/gstspeed.c @@ -18,6 +18,9 @@ * Boston, MA 02111-1307, USA. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include <string.h> #include <gst/gst.h> #include <math.h> diff --git a/gst/stereo/gststereo.c b/gst/stereo/gststereo.c index 2bb2bab8..55f58996 100644 --- a/gst/stereo/gststereo.c +++ b/gst/stereo/gststereo.c @@ -17,6 +17,9 @@ * Boston, MA 02111-1307, USA. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include <gststereo.h> /* elementfactory information */ diff --git a/gst/vbidec/gstvbidec.c b/gst/vbidec/gstvbidec.c index 1bd7c8bd..731e64d4 100644 --- a/gst/vbidec/gstvbidec.c +++ b/gst/vbidec/gstvbidec.c @@ -17,6 +17,9 @@ * Boston, MA 02111-1307, USA. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include <config.h> #include <string.h> #include <inttypes.h> diff --git a/gst/videocrop/gstvideocrop.c b/gst/videocrop/gstvideocrop.c index ea807420..53628471 100644 --- a/gst/videocrop/gstvideocrop.c +++ b/gst/videocrop/gstvideocrop.c @@ -17,6 +17,9 @@ * Boston, MA 02111-1307, USA. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include <gst/gst.h> #include <string.h> diff --git a/gst/virtualdub/gstxsharpen.c b/gst/virtualdub/gstxsharpen.c index d289338b..c7d5af7a 100644 --- a/gst/virtualdub/gstxsharpen.c +++ b/gst/virtualdub/gstxsharpen.c @@ -16,6 +16,9 @@ * */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include <string.h> #include <gst/gst.h> #include "gstvirtualdub.h" diff --git a/gst/y4m/gsty4mencode.c b/gst/y4m/gsty4mencode.c index 442ce0aa..d84873bd 100644 --- a/gst/y4m/gsty4mencode.c +++ b/gst/y4m/gsty4mencode.c @@ -17,6 +17,9 @@ * Boston, MA 02111-1307, USA. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include <string.h> #include <gst/gst.h> #include "gsty4mencode.h" |