diff options
author | David Schleef <ds@schleef.org> | 2004-01-16 00:55:29 +0000 |
---|---|---|
committer | David Schleef <ds@schleef.org> | 2004-01-16 00:55:29 +0000 |
commit | 7d64f26d2546be8ff1bcc4bb851108cb50384c58 (patch) | |
tree | 8ec2bfc3fdd7244c33946a34e685a124fffbc985 /gst-libs/gst/audio/gstaudiofilter.c | |
parent | 5404ac52f9ea35330439cce0cce266fab8649e14 (diff) | |
download | gst-plugins-bad-7d64f26d2546be8ff1bcc4bb851108cb50384c58.tar.gz gst-plugins-bad-7d64f26d2546be8ff1bcc4bb851108cb50384c58.tar.bz2 gst-plugins-bad-7d64f26d2546be8ff1bcc4bb851108cb50384c58.zip |
gst-libs/gst/audio/Makefile.am: Add gstaudiofiltertemplate.c and building of gstaudiofilterexample.c from the template.
Original commit message from CVS:
* gst-libs/gst/audio/Makefile.am:
Add gstaudiofiltertemplate.c and building of gstaudiofilterexample.c
from the template.
* gst-libs/gst/audio/gstaudiofilter.c:
* gst-libs/gst/audio/gstaudiofilter.h:
Add bytes_per_sample and size and n_samples calculation.
* gst-libs/gst/audio/gstaudiofilterexample.c:
Remove, now autogenerated.
* gst-libs/gst/audio/gstaudiofiltertemplate.c:
Moved from gstaudiofilterexample, object name changed, code added
so that it actually works.
* gst-libs/gst/audio/make_filter:
Script to build an audiofilter subclass from the template.
* gst/colorspace/Makefile.am:
* gst/colorspace/yuv2yuv.c:
Remove file, since it's GPL, and we don't use it.
Diffstat (limited to 'gst-libs/gst/audio/gstaudiofilter.c')
-rw-r--r-- | gst-libs/gst/audio/gstaudiofilter.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gst-libs/gst/audio/gstaudiofilter.c b/gst-libs/gst/audio/gstaudiofilter.c index cda21da0..35ed4875 100644 --- a/gst-libs/gst/audio/gstaudiofilter.c +++ b/gst-libs/gst/audio/gstaudiofilter.c @@ -144,6 +144,9 @@ gst_audiofilter_link (GstPad *pad, const GstCaps *caps) } ret &= gst_structure_get_int (structure, "rate", &audiofilter->rate); + audiofilter->bytes_per_sample = (audiofilter->width/8) * + audiofilter->channels; + if (audiofilter_class->setup) (audiofilter_class->setup) (audiofilter); return GST_PAD_LINK_OK; @@ -204,6 +207,9 @@ gst_audiofilter_chain (GstPad *pad, GstData *data) return; } + audiofilter->size = GST_BUFFER_SIZE (inbuf); + audiofilter->n_samples = audiofilter->size / audiofilter->bytes_per_sample; + if (gst_data_is_writable(data)) { if (audiofilter_class->filter_inplace) { (audiofilter_class->filter_inplace) (audiofilter, inbuf); |