[FFmpeg-soc] [PATCH] Add af_sox initial draft
S.N. Hemanth Meenakshisundaram
smeenaks at ucsd.edu
Sun Aug 15 09:05:07 CEST 2010
Sox wrapper for lavfi:
1. sox internally uses only integer 32-bit signed format for all its
effects. It can convert to S32 if other format inputs are supplied but I
guess we would want to do any such conversions internally (using
inserted resample filter) and only send s32 data to sox?
2. sox reads data from an 'input handler' effect in af_sox that forms
the first effect of the chain and writes data out to last effect
'output_handler' again defined in af_sox. Unfortunately, it does not
guarantee when an input will be processed and output. Also inserting x
samples need not mean all of them will be processed together. Hence the
current design is as follows:
i. i/p is assumed to be s32 (achieved with a resample filter inserted
ahead) and o/p is also changed to other formats if necessary by another
af_resample. The resample filter will also serve to keep channels constant.
ii. The effects chain (including input and output handlers) is built and
configured during init.
iii. Incoming s32 samples (coming in via filter samples) are added to an
input fifo.
iv. When sox requests data through its 'input handler' effect, we pull
data from the fifo and copy it into the buffer provided by sox for input.
v. When sox outputs any data, we queue it to an output fifo.
vi. When the next lavfi filter calls request_frame, we create a lavfi
audio buffer of predetermined size and copy data from the output fifo
into it and pass it on to the next filter.
Please review code and comment on the design as well. I will post
updates as I make more changes.
Regards,
---
libavfilter/Makefile | 1 +
libavfilter/af_sox.c | 323 ++++++++++++++++++++++++++++++++++++++++++++++
libavfilter/allfilters.c | 1 +
3 files changed, 325 insertions(+), 0 deletions(-)
create mode 100644 libavfilter/af_sox.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-af_sox-initial-draft.patch
Type: text/x-patch
Size: 12879 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-soc/attachments/20100815/a47eac93/attachment.bin>
More information about the FFmpeg-soc
mailing list