From 426cf5e9b303a29f477940d8d7a3203f372644e7 Mon Sep 17 00:00:00 2001 From: David Schleef Date: Wed, 13 Aug 2003 06:43:01 +0000 Subject: [PATCH] clean up code, fix typos in lst checkin Original commit message from CVS: clean up code, fix typos in lst checkin --- gst-libs/gst/riff/riff.h | 5 ++--- gst-libs/gst/riff/riffparse.c | 15 +++++++-------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/gst-libs/gst/riff/riff.h b/gst-libs/gst/riff/riff.h index 95af7508d7..d8f57735b7 100644 --- a/gst-libs/gst/riff/riff.h +++ b/gst-libs/gst/riff/riff.h @@ -40,9 +40,8 @@ typedef enum { GST_RIFF_STATE_MOVI = 4 } GstRiffParserState; -#define MAKE_FOUR_CC(a,b,c,d) ( ((guint32)a) | (((guint32)b)<< 8) | \ - ((guint32)c)<<16 | (((guint32)d)<<24) ) - +#define MAKE_FOUR_CC(a,b,c,d) GST_MAKE_FOURCC(a,b,c,d) + /* RIFF types */ #define GST_RIFF_RIFF_WAVE MAKE_FOUR_CC('W','A','V','E') #define GST_RIFF_RIFF_AVI MAKE_FOUR_CC('A','V','I',' ') diff --git a/gst-libs/gst/riff/riffparse.c b/gst-libs/gst/riff/riffparse.c index 3b66db8723..72a7820b8e 100644 --- a/gst-libs/gst/riff/riffparse.c +++ b/gst-libs/gst/riff/riffparse.c @@ -170,9 +170,9 @@ gst_riff_parser_next_buffer (GstRiff *riff, GstBuffer *buf, gulong off) } else { - GST_DEBUG ("gst_riff_parser: chunk id offset %08x is 0x%08x '%s' and is 0x%08x long", - riff->nextlikely, GUINT32_FROM_LE (words[0]), - gst_riff_id_to_fourcc(GUINT32_FROM_LE (words[0])), GUINT32_FROM_LE (words[1])); + GST_DEBUG ("gst_riff_parser: chunk id offset %08x is 0x%08x '" GST_FOURCC_FORMAT "' and is 0x%08x long", + riff->nextlikely, chunk->id, GST_FOURCC_ARGS(chunk->id), + chunk->size); riff->nextlikely += 8 + chunk->size; /* doesn't include hdr */ /* if this buffer is incomplete */ @@ -194,7 +194,7 @@ gst_riff_parser_next_buffer (GstRiff *riff, GstBuffer *buf, gulong off) } if (riff->nextlikely & 0x01) riff->nextlikely++; - /*riff->chunks = g_list_prepend(riff->chunks,chunk); */ + /*riff->chunks = g_list_prepend(riff->chunks,chunk);*/ } } if ((riff->nextlikely+12) > last && !riff->incomplete_chunk) { @@ -221,16 +221,15 @@ gst_riff_parser_resync (GstRiff *riff, gulong offset) } -GstRiffChunk *gst_riff_get_chunk(GstRiff *riff,gchar *fourcc) +GstRiffChunk *gst_riff_parser_get_chunk(GstRiff *riff, guint32 fourcc) { GList *chunk; g_return_val_if_fail(riff != NULL, NULL); - g_return_val_if_fail(fourcc != NULL, NULL); chunk = riff->chunks; while (chunk) { - if (((GstRiffChunk *)(chunk->data))->id == gst_riff_fourcc_to_id(fourcc)) + if (((GstRiffChunk *)(chunk->data))->id == fourcc) return (GstRiffChunk *)(chunk->data); chunk = g_list_next(chunk); } @@ -238,7 +237,7 @@ GstRiffChunk *gst_riff_get_chunk(GstRiff *riff,gchar *fourcc) return NULL; } -guint32 gst_riff_get_nextlikely(GstRiff *riff) +guint32 gst_riff_parser_get_nextlikely(GstRiff *riff) { g_return_val_if_fail(riff != NULL, 0);