mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-09 10:59:39 +00:00
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
This commit is contained in:
parent
d32d671504
commit
fabfd43f53
2 changed files with 5 additions and 3 deletions
2
common
2
common
|
@ -1 +1 @@
|
|||
Subproject commit d6e219fd076d8f182bd1ee84228b1b85cdb807a6
|
||||
Subproject commit 8b323f41bfaccb8f30bddfc6ff8bd6a4be04a3e1
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue