diff options
author | Ronald S. Bultje <rbultje@ronald.bitfreak.net> | 2003-07-29 19:57:11 +0000 |
---|---|---|
committer | Ronald S. Bultje <rbultje@ronald.bitfreak.net> | 2003-07-29 19:57:11 +0000 |
commit | ea675ccaadb5641e0bf2bf9d1a829b021625531a (patch) | |
tree | f6ef2c239e7d7df8ccd8b453139656c1135971b3 /gst/mpegaudioparse/gstmpegaudioparse.c | |
parent | 833a8b579b03c478de72f1d5e8aafb9b369380bd (diff) | |
download | gst-plugins-bad-ea675ccaadb5641e0bf2bf9d1a829b021625531a.tar.gz gst-plugins-bad-ea675ccaadb5641e0bf2bf9d1a829b021625531a.tar.bz2 gst-plugins-bad-ea675ccaadb5641e0bf2bf9d1a829b021625531a.zip |
Fix weird leftovers from the old mimetype era and also implement duration support
Original commit message from CVS:
Fix weird leftovers from the old mimetype era and also implement duration support
Diffstat (limited to 'gst/mpegaudioparse/gstmpegaudioparse.c')
-rw-r--r-- | gst/mpegaudioparse/gstmpegaudioparse.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gst/mpegaudioparse/gstmpegaudioparse.c b/gst/mpegaudioparse/gstmpegaudioparse.c index 1a9534f3..a4645064 100644 --- a/gst/mpegaudioparse/gstmpegaudioparse.c +++ b/gst/mpegaudioparse/gstmpegaudioparse.c @@ -45,8 +45,9 @@ mp3_src_factory (void) GST_PAD_ALWAYS, gst_caps_new ( "mp3parse_src", - "audio/x-mp3", + "audio/mpeg", gst_props_new ( + "mpegversion", GST_PROPS_INT (1), "layer", GST_PROPS_INT_RANGE (1, 3), "rate", GST_PROPS_INT_RANGE (8000, 48000), "channels", GST_PROPS_INT_RANGE (1, 2), @@ -64,7 +65,7 @@ mp3_sink_factory (void) GST_PAD_ALWAYS, gst_caps_new ( "mp3parse_sink", - "audio/x-mp3", + "audio/mpeg", NULL), NULL); }; @@ -272,6 +273,7 @@ gst_mp3parse_chain (GstPad *pad, GstBuffer *buf) mp3parse->in_flush = FALSE; } GST_BUFFER_TIMESTAMP(outbuf) = last_ts; + GST_BUFFER_DURATION(outbuf) = 8 * (GST_SECOND/1000) * GST_BUFFER_SIZE(outbuf) / mp3parse->bit_rate; if (GST_PAD_CAPS (mp3parse->srcpad) != NULL) { gst_pad_push(mp3parse->srcpad,outbuf); |