summaryrefslogtreecommitdiffstats
path: root/ext/audiofile/gstafparse.c
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@gmail.com>2002-05-26 21:59:21 +0000
committerWim Taymans <wim.taymans@gmail.com>2002-05-26 21:59:21 +0000
commitd18d4fd5a1986d59af029a482e094a3707828438 (patch)
treebeacf1328f92d1827aed3be348f607dca5d0839d /ext/audiofile/gstafparse.c
parentcff445b737c736d65b85d861dbe9baeb28c5ae50 (diff)
downloadgst-plugins-bad-d18d4fd5a1986d59af029a482e094a3707828438.tar.gz
gst-plugins-bad-d18d4fd5a1986d59af029a482e094a3707828438.tar.bz2
gst-plugins-bad-d18d4fd5a1986d59af029a482e094a3707828438.zip
- Changed plugins for new APIs
Original commit message from CVS: - Changed plugins for new APIs - modularized audiofile. - added seeking, query and convert functions for mad, mpeg2dec, avidemux, mpegdemux, mpegparse - sync updates to oss. removed the ossclock for now
Diffstat (limited to 'ext/audiofile/gstafparse.c')
-rw-r--r--ext/audiofile/gstafparse.c27
1 files changed, 9 insertions, 18 deletions
diff --git a/ext/audiofile/gstafparse.c b/ext/audiofile/gstafparse.c
index 32a12dce..5067ea1f 100644
--- a/ext/audiofile/gstafparse.c
+++ b/ext/audiofile/gstafparse.c
@@ -180,7 +180,7 @@ gst_afparse_loop(GstElement *element)
GstAFParse *afparse;
GstBuffer *buf;
GstBufferPool *bufpool;
- gint numframes, frames_to_bytes, frames_per_read, bytes_per_read;
+ gint numframes = 0, frames_to_bytes, frames_per_read, bytes_per_read;
guint8 *data;
gboolean bypass_afread = TRUE;
GstByteStream *bs;
@@ -315,8 +315,8 @@ gst_afparse_get_property (GObject *object, guint prop_id, GValue *value, GParamS
}
}
-static gboolean
-plugin_init (GModule *module, GstPlugin *plugin)
+gboolean
+gst_afparse_plugin_init (GModule *module, GstPlugin *plugin)
{
GstElementFactory *factory;
@@ -343,14 +343,6 @@ plugin_init (GModule *module, GstPlugin *plugin)
return TRUE;
}
-
-GstPluginDesc plugin_desc = {
- GST_VERSION_MAJOR,
- GST_VERSION_MINOR,
- "afparse",
- plugin_init
-};
-
/* this is where we open the audiofile */
static gboolean
gst_afparse_open_file (GstAFParse *afparse)
@@ -483,7 +475,7 @@ static long
gst_afparse_vf_seek (AFvirtualfile *vfile, long offset, int is_relative)
{
GstByteStream *bs = (GstByteStream*)vfile->closure;
- GstSeekType type;
+ GstSeekType method;
guint64 current_offset = gst_bytestream_tell(bs);
if (!is_relative){
@@ -492,16 +484,15 @@ gst_afparse_vf_seek (AFvirtualfile *vfile, long offset, int is_relative)
return offset;
}
- type = GST_SEEK_BYTEOFFSET_SET;
+ method = GST_SEEK_METHOD_SET;
}
else {
if (offset == 0) return current_offset;
- type = GST_SEEK_BYTEOFFSET_CUR;
+ method = GST_SEEK_METHOD_CUR;
}
-
- g_print("doing seek to %d, current offset %lld\n", (gint)offset, current_offset);
- if (gst_bytestream_seek(bs, type, (gint64)offset)){
-
+
+ if (gst_bytestream_seek(bs, (gint64)offset, method)){
+ g_print("doing seek to %d\n", (gint)offset);
return offset;
}
return 0;