mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
gst/law/mulaw-decode.*: Calculate outgoing buffer duration if incoming buffer didn't have a valid duration.
Original commit message from CVS: * gst/law/mulaw-decode.c: (mulawdec_sink_setcaps), (gst_mulawdec_chain): * gst/law/mulaw-decode.h: Calculate outgoing buffer duration if incoming buffer didn't have a valid duration.
This commit is contained in:
parent
ceb068d0e9
commit
7eeeca8c27
3 changed files with 19 additions and 1 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
2007-11-02 Edward Hervey <bilboed@bilboed.com>
|
||||||
|
|
||||||
|
* gst/law/mulaw-decode.c: (mulawdec_sink_setcaps),
|
||||||
|
(gst_mulawdec_chain):
|
||||||
|
* gst/law/mulaw-decode.h:
|
||||||
|
Calculate outgoing buffer duration if incoming buffer didn't have a
|
||||||
|
valid duration.
|
||||||
|
|
||||||
2007-10-30 Wim Taymans <wim.taymans@gmail.com>
|
2007-10-30 Wim Taymans <wim.taymans@gmail.com>
|
||||||
|
|
||||||
* gst/qtdemux/qtdemux.c: (gst_qtdemux_activate_segment),
|
* gst/qtdemux/qtdemux.c: (gst_qtdemux_activate_segment),
|
||||||
|
|
|
@ -73,6 +73,9 @@ mulawdec_sink_setcaps (GstPad * pad, GstCaps * caps)
|
||||||
"signed", G_TYPE_BOOLEAN, TRUE,
|
"signed", G_TYPE_BOOLEAN, TRUE,
|
||||||
"rate", G_TYPE_INT, rate, "channels", G_TYPE_INT, channels, NULL);
|
"rate", G_TYPE_INT, rate, "channels", G_TYPE_INT, channels, NULL);
|
||||||
|
|
||||||
|
mulawdec->rate = rate;
|
||||||
|
mulawdec->channels = channels;
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -163,7 +166,11 @@ gst_mulawdec_chain (GstPad * pad, GstBuffer * buffer)
|
||||||
GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_DISCONT);
|
GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_DISCONT);
|
||||||
|
|
||||||
GST_BUFFER_TIMESTAMP (outbuf) = GST_BUFFER_TIMESTAMP (buffer);
|
GST_BUFFER_TIMESTAMP (outbuf) = GST_BUFFER_TIMESTAMP (buffer);
|
||||||
GST_BUFFER_DURATION (outbuf) = GST_BUFFER_DURATION (buffer);
|
if (GST_BUFFER_DURATION (outbuf) == GST_CLOCK_TIME_NONE)
|
||||||
|
GST_BUFFER_DURATION (outbuf) = gst_util_uint64_scale_int (GST_SECOND,
|
||||||
|
mulaw_size * 2, 2 * mulawdec->rate * mulawdec->channels);
|
||||||
|
else
|
||||||
|
GST_BUFFER_DURATION (outbuf) = GST_BUFFER_DURATION (buffer);
|
||||||
gst_buffer_set_caps (outbuf, mulawdec->srccaps);
|
gst_buffer_set_caps (outbuf, mulawdec->srccaps);
|
||||||
|
|
||||||
mulaw_decode (mulaw_data, linear_data, mulaw_size);
|
mulaw_decode (mulaw_data, linear_data, mulaw_size);
|
||||||
|
|
|
@ -43,6 +43,9 @@ struct _GstMuLawDec {
|
||||||
|
|
||||||
GstPad *sinkpad,*srcpad;
|
GstPad *sinkpad,*srcpad;
|
||||||
GstCaps *srccaps;
|
GstCaps *srccaps;
|
||||||
|
|
||||||
|
gint rate;
|
||||||
|
gint channels;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstMuLawDecClass {
|
struct _GstMuLawDecClass {
|
||||||
|
|
Loading…
Reference in a new issue