summaryrefslogtreecommitdiffstats
path: root/gst/wavparse/gstwavparse.c
diff options
context:
space:
mode:
authorDavid Schleef <ds@schleef.org>2003-08-13 04:48:51 +0000
committerDavid Schleef <ds@schleef.org>2003-08-13 04:48:51 +0000
commitb3a95010c176ad4227119a424436067445e6f5ed (patch)
tree4e713539409335fa4685e8f66062d4f54928ba15 /gst/wavparse/gstwavparse.c
parent2bbef11b2b60c3096cb3ffbb9dcaae1220be3cf5 (diff)
Remove riff code, since it's duplicated in the riff library
Original commit message from CVS: Remove riff code, since it's duplicated in the riff library
Diffstat (limited to 'gst/wavparse/gstwavparse.c')
-rw-r--r--gst/wavparse/gstwavparse.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/gst/wavparse/gstwavparse.c b/gst/wavparse/gstwavparse.c
index 52ee103a..2849b6e9 100644
--- a/gst/wavparse/gstwavparse.c
+++ b/gst/wavparse/gstwavparse.c
@@ -318,10 +318,10 @@ gst_wavparse_chain (GstPad *pad, GstBuffer *buf)
GST_DEBUG ("GstWavParse: checking for RIFF format");
/* create a new RIFF parser */
- wavparse->riff = gst_riff_new ();
+ wavparse->riff = gst_riff_parser_new (NULL, NULL);
/* give it the current buffer to start parsing */
- retval = gst_riff_next_buffer (wavparse->riff, buf, 0);
+ retval = gst_riff_parser_next_buffer (wavparse->riff, buf, 0);
buffer_riffed = TRUE;
if (retval < 0) {
GST_DEBUG ("sorry, isn't RIFF");
@@ -347,12 +347,12 @@ gst_wavparse_chain (GstPad *pad, GstBuffer *buf)
/* there's a good possibility we may not have parsed this buffer */
if (buffer_riffed == FALSE) {
- gst_riff_next_buffer (wavparse->riff, buf, GST_BUFFER_OFFSET (buf));
+ gst_riff_parser_next_buffer (wavparse->riff, buf, GST_BUFFER_OFFSET (buf));
buffer_riffed = TRUE;
}
/* see if the fmt chunk is available yet */
- fmt = gst_riff_get_chunk (wavparse->riff, "fmt ");
+ fmt = gst_riff_parser_get_chunk (wavparse->riff, GST_RIFF_TAG_fmt);
/* if we've got something, deal with it */
if (fmt != NULL) {
@@ -444,11 +444,11 @@ gst_wavparse_chain (GstPad *pad, GstBuffer *buf)
/* again, we might need to parse the buffer */
if (buffer_riffed == FALSE) {
- gst_riff_next_buffer (wavparse->riff, buf, GST_BUFFER_OFFSET (buf));
+ gst_riff_parser_next_buffer (wavparse->riff, buf, GST_BUFFER_OFFSET (buf));
buffer_riffed = TRUE;
}
- datachunk = gst_riff_get_chunk (wavparse->riff, "data");
+ datachunk = gst_riff_parser_get_chunk (wavparse->riff, GST_RIFF_TAG_data);
if (datachunk != NULL) {
gulong subsize;
@@ -480,7 +480,7 @@ gst_wavparse_chain (GstPad *pad, GstBuffer *buf)
wavparse->state = GST_WAVPARSE_DATA;
/* however, we may be expecting another chunk at some point */
- wavparse->riff_nextlikely = gst_riff_get_nextlikely (wavparse->riff);
+ wavparse->riff_nextlikely = gst_riff_parser_get_nextlikely (wavparse->riff);
} else {
/* otherwise we just sort of give up for this buffer */
gst_buffer_unref (buf);
@@ -705,6 +705,10 @@ plugin_init (GModule *module, GstPlugin *plugin)
GstElementFactory *factory;
GstTypeFactory *type;
+ if(gst_library_load("gstriff") == FALSE){
+ return FALSE;
+ }
+
/* create an elementfactory for the wavparse element */
factory = gst_element_factory_new ("wavparse", GST_TYPE_WAVPARSE,
&gst_wavparse_details);