diff options
author | David Schleef <ds@schleef.org> | 2003-08-13 04:47:30 +0000 |
---|---|---|
committer | David Schleef <ds@schleef.org> | 2003-08-13 04:47:30 +0000 |
commit | ba4eba53fe211296ed2a333cd2e896c322c21bbb (patch) | |
tree | 801a7cf087e641935797845c366ffecc60c305b7 /gst-libs/gst/riff/riffparse.c | |
parent | dc4d0baf7d14c83756e04e7fb6d9e3e994639bb1 (diff) | |
download | gst-plugins-bad-ba4eba53fe211296ed2a333cd2e896c322c21bbb.tar.gz gst-plugins-bad-ba4eba53fe211296ed2a333cd2e896c322c21bbb.tar.bz2 gst-plugins-bad-ba4eba53fe211296ed2a333cd2e896c322c21bbb.zip |
Move some code from wavparse
Original commit message from CVS:
Move some code from wavparse
Diffstat (limited to 'gst-libs/gst/riff/riffparse.c')
-rw-r--r-- | gst-libs/gst/riff/riffparse.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/gst-libs/gst/riff/riffparse.c b/gst-libs/gst/riff/riffparse.c index 8a993a6b..3b66db87 100644 --- a/gst-libs/gst/riff/riffparse.c +++ b/gst-libs/gst/riff/riffparse.c @@ -219,3 +219,29 @@ gst_riff_parser_resync (GstRiff *riff, gulong offset) riff->dataleft = NULL; riff->nextlikely = offset; } + + +GstRiffChunk *gst_riff_get_chunk(GstRiff *riff,gchar *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)) + return (GstRiffChunk *)(chunk->data); + chunk = g_list_next(chunk); + } + + return NULL; +} + +guint32 gst_riff_get_nextlikely(GstRiff *riff) +{ + g_return_val_if_fail(riff != NULL, 0); + + return riff->nextlikely; +} + |