summaryrefslogtreecommitdiffstats
path: root/gst/mpegaudioparse
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2002-03-24 22:07:03 +0000
committerAndy Wingo <wingo@pobox.com>2002-03-24 22:07:03 +0000
commit1d6862cb69701e14c6c01e3bdf6f7a165271f3d3 (patch)
tree2ae8d3322edae3bd3f4d7d7c159c6fbd2c32d55c /gst/mpegaudioparse
parent0cc78c5ef82a4d0ba9d9560e8afff292d99e1088 (diff)
downloadgst-plugins-bad-1d6862cb69701e14c6c01e3bdf6f7a165271f3d3.tar.gz
gst-plugins-bad-1d6862cb69701e14c6c01e3bdf6f7a165271f3d3.tar.bz2
gst-plugins-bad-1d6862cb69701e14c6c01e3bdf6f7a165271f3d3.zip
filter newlines out of GST_DEBUG statements to reflect new core behavior fixes to adder's caps, again
Original commit message from CVS: * filter newlines out of GST_DEBUG statements to reflect new core behavior * fixes to adder's caps, again
Diffstat (limited to 'gst/mpegaudioparse')
-rw-r--r--gst/mpegaudioparse/gstmp3types.c6
-rw-r--r--gst/mpegaudioparse/gstmpegaudioparse.c38
2 files changed, 22 insertions, 22 deletions
diff --git a/gst/mpegaudioparse/gstmp3types.c b/gst/mpegaudioparse/gstmp3types.c
index fd1fb91a..670cfba7 100644
--- a/gst/mpegaudioparse/gstmp3types.c
+++ b/gst/mpegaudioparse/gstmp3types.c
@@ -37,7 +37,7 @@ mp3_typefind(GstBuffer *buf, gpointer private)
data = GST_BUFFER_DATA(buf);
- GST_DEBUG (0,"mp3typefind: typefind\n");
+ GST_DEBUG (0,"mp3typefind: typefind");
/* check for ID3 Tag first and forward ID3 length */
if (!memcmp (data, "ID3", 3))
@@ -51,11 +51,11 @@ mp3_typefind(GstBuffer *buf, gpointer private)
((skip & 0x007f0000) >> 2) |
((skip & 0x00007f00) >> 1) |
((skip & 0x0000007f) >> 0)) + 4;
- GST_DEBUG (0, "mp3typefind: detected ID3 Tag with %u bytes\n", skip + 6);
+ GST_DEBUG (0, "mp3typefind: detected ID3 Tag with %u bytes", skip + 6);
/* return if buffer is not big enough */
if (GST_BUFFER_SIZE (buf) < skip + 10)
{
- GST_DEBUG (0, "mp3typefind: buffer too small (%d) to go on typefinding\n", skip + 6);
+ GST_DEBUG (0, "mp3typefind: buffer too small (%d) to go on typefinding", skip + 6);
return NULL;
}
data += skip;
diff --git a/gst/mpegaudioparse/gstmpegaudioparse.c b/gst/mpegaudioparse/gstmpegaudioparse.c
index 96640d68..65f1b279 100644
--- a/gst/mpegaudioparse/gstmpegaudioparse.c
+++ b/gst/mpegaudioparse/gstmpegaudioparse.c
@@ -242,7 +242,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\n",GST_BUFFER_SIZE(buf));
+ GST_DEBUG (0,"mp3parse: received buffer of %d bytes",GST_BUFFER_SIZE(buf));
last_ts = GST_BUFFER_TIMESTAMP(buf);
@@ -273,12 +273,12 @@ gst_mp3parse_chain (GstPad *pad, GstBuffer *buf)
while (offset < size-4) {
int skipped = 0;
- GST_DEBUG (0,"mp3parse: offset %ld, size %ld \n",offset, size);
+ GST_DEBUG (0,"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\n",offset,skipped);
+ GST_DEBUG (0,"mp3parse: **** now at %ld skipped %d bytes",offset,skipped);
}
/* construct the header word */
header = GULONG_FROM_BE(*((gulong *)(data+offset)));
@@ -305,12 +305,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 = GULONG_FROM_BE(*((gulong *)(data+offset+bpf)));
- GST_DEBUG(0,"mp3parse: header=%08lX, header2=%08lX, bpf=%d\n", header, header2, bpf );
+ GST_DEBUG(0,"mp3parse: header=%08lX, header2=%08lX, bpf=%d", header, 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=%08lX, header2=%08lX, bpf=%d)\n", header, header2, bpf );
+ GST_DEBUG(0,"mp3parse: next header doesn't match (header=%08lX, header2=%08lX, bpf=%d)", header, header2, bpf );
offset++; /* This frame is invalid. Start looking for a valid frame at the next position in the stream */
continue;
}
@@ -319,7 +319,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 \n",(size-offset), bpf);
+ GST_DEBUG (0,"mp3parse: partial buffer needed %ld < %d ",(size-offset), bpf);
break;
} else {
@@ -327,7 +327,7 @@ gst_mp3parse_chain (GstPad *pad, GstBuffer *buf)
offset += bpf;
if (mp3parse->skip == 0) {
- GST_DEBUG (0,"mp3parse: pushing buffer of %d bytes\n",GST_BUFFER_SIZE(outbuf));
+ GST_DEBUG (0,"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;
@@ -336,21 +336,21 @@ gst_mp3parse_chain (GstPad *pad, GstBuffer *buf)
gst_pad_push(mp3parse->srcpad,outbuf);
}
else {
- GST_DEBUG (0,"mp3parse: skipping buffer of %d bytes\n",GST_BUFFER_SIZE(outbuf));
+ GST_DEBUG (0,"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?)\n");
+ if (!mp3parse->in_flush) GST_DEBUG (0,"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\n",remainder);
+ GST_DEBUG (0,"mp3parse: partial buffer needed %ld for trailing bytes",remainder);
outbuf = gst_buffer_create_sub(mp3parse->partialbuf,offset,remainder);
gst_buffer_unref(mp3parse->partialbuf);
@@ -408,28 +408,28 @@ bpf_from_header (GstMPEGAudioParse *parse, unsigned long header)
static gboolean
head_check (unsigned long head)
{
- GST_DEBUG (0,"checking mp3 header 0x%08lx\n",head);
+ GST_DEBUG (0,"checking mp3 header 0x%08lx",head);
/* if it's not a valid sync */
if ((head & 0xffe00000) != 0xffe00000) {
- GST_DEBUG (0,"invalid sync\n");return FALSE; }
+ GST_DEBUG (0,"invalid sync");return FALSE; }
/* if it's an invalid MPEG version */
if (((head >> 19) & 3) == 0x1) {
- GST_DEBUG (0,"invalid MPEG version\n");return FALSE; }
+ GST_DEBUG (0,"invalid MPEG version");return FALSE; }
/* if it's an invalid layer */
if (!((head >> 17) & 3)) {
- GST_DEBUG (0,"invalid layer\n");return FALSE; }
+ GST_DEBUG (0,"invalid layer");return FALSE; }
/* if it's an invalid bitrate */
if (((head >> 12) & 0xf) == 0x0) {
- GST_DEBUG (0,"invalid bitrate\n");return FALSE; }
+ GST_DEBUG (0,"invalid bitrate");return FALSE; }
if (((head >> 12) & 0xf) == 0xf) {
- GST_DEBUG (0,"invalid bitrate\n");return FALSE; }
+ GST_DEBUG (0,"invalid bitrate");return FALSE; }
/* if it's an invalid samplerate */
if (((head >> 10) & 0x3) == 0x3) {
- GST_DEBUG (0,"invalid samplerate\n");return FALSE; }
+ GST_DEBUG (0,"invalid samplerate");return FALSE; }
if ((head & 0xffff0000) == 0xfffe0000) {
- GST_DEBUG (0,"invalid sync\n");return FALSE; }
+ GST_DEBUG (0,"invalid sync");return FALSE; }
if (head & 0x00000002) {
- GST_DEBUG (0,"invalid emphasis\n");return FALSE; }
+ GST_DEBUG (0,"invalid emphasis");return FALSE; }
return TRUE;
}