mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-10 08:22:32 +00:00
gst/level/gstlevel.c: Add GAP-flag support.
Original commit message from CVS: * gst/level/gstlevel.c: Add GAP-flag support.
This commit is contained in:
parent
9f75afd5fd
commit
d37e93af90
2 changed files with 15 additions and 6 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2007-11-26 Stefan Kost <ensonic@users.sf.net>
|
||||||
|
|
||||||
|
* gst/level/gstlevel.c:
|
||||||
|
Add GAP-flag support.
|
||||||
|
|
||||||
2007-11-26 Edward Hervey <bilboed@bilboed.com>
|
2007-11-26 Edward Hervey <bilboed@bilboed.com>
|
||||||
|
|
||||||
* gst/rtp/gstrtph263depay.c: (gst_rtp_h263_depay_process):
|
* gst/rtp/gstrtph263depay.c: (gst_rtp_h263_depay_process):
|
||||||
|
|
|
@ -523,12 +523,16 @@ gst_level_transform_ip (GstBaseTransform * trans, GstBuffer * in)
|
||||||
num_frames = num_int_samples / filter->channels;
|
num_frames = num_int_samples / filter->channels;
|
||||||
|
|
||||||
for (i = 0; i < filter->channels; ++i) {
|
for (i = 0; i < filter->channels; ++i) {
|
||||||
|
if (!GST_BUFFER_FLAG_IS_SET (in, GST_BUFFER_FLAG_GAP)) {
|
||||||
filter->process (in_data, num_int_samples, filter->channels, &CS,
|
filter->process (in_data, num_int_samples, filter->channels, &CS,
|
||||||
&filter->peak[i]);
|
&filter->peak[i]);
|
||||||
GST_LOG_OBJECT (filter,
|
GST_LOG_OBJECT (filter,
|
||||||
"channel %d, cumulative sum %f, peak %f, over %d samples/%d channels",
|
"channel %d, cumulative sum %f, peak %f, over %d samples/%d channels",
|
||||||
i, CS, filter->peak[i], num_int_samples, filter->channels);
|
i, CS, filter->peak[i], num_int_samples, filter->channels);
|
||||||
filter->CS[i] += CS;
|
filter->CS[i] += CS;
|
||||||
|
} else {
|
||||||
|
filter->peak[i] = 0.0;
|
||||||
|
}
|
||||||
in_data += (filter->width / 8);
|
in_data += (filter->width / 8);
|
||||||
|
|
||||||
filter->decay_peak_age[i] +=
|
filter->decay_peak_age[i] +=
|
||||||
|
|
Loading…
Reference in a new issue