mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-23 14:36:24 +00:00
Move some code from wavparse
Original commit message from CVS: Move some code from wavparse
This commit is contained in:
parent
141645bc32
commit
65143e581d
2 changed files with 28 additions and 0 deletions
|
@ -426,6 +426,8 @@ struct _GstRiffChunk {
|
||||||
GstRiff* gst_riff_parser_new (GstRiffCallback function, gpointer data);
|
GstRiff* gst_riff_parser_new (GstRiffCallback function, gpointer data);
|
||||||
GstRiffReturn gst_riff_parser_next_buffer (GstRiff *riff, GstBuffer *buf, gulong off);
|
GstRiffReturn gst_riff_parser_next_buffer (GstRiff *riff, GstBuffer *buf, gulong off);
|
||||||
void gst_riff_parser_resync (GstRiff *riff, gulong offset);
|
void gst_riff_parser_resync (GstRiff *riff, gulong offset);
|
||||||
|
GstRiffChunk* gst_riff_parser_get_chunk (GstRiff *riff, guint32 fourcc);
|
||||||
|
guint32 gst_riff_parser_get_nextlikely (GstRiff *riff);
|
||||||
|
|
||||||
/* from gstriffencode.c */
|
/* from gstriffencode.c */
|
||||||
GstRiff* gst_riff_encoder_new (guint32 type);
|
GstRiff* gst_riff_encoder_new (guint32 type);
|
||||||
|
|
|
@ -219,3 +219,29 @@ gst_riff_parser_resync (GstRiff *riff, gulong offset)
|
||||||
riff->dataleft = NULL;
|
riff->dataleft = NULL;
|
||||||
riff->nextlikely = offset;
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue