[FFmpeg-devel] [PATCH] Waveform audio grabber.

Ramiro Polla ramiro.polla
Wed Mar 17 04:50:07 CET 2010


On Sat, Mar 13, 2010 at 6:58 AM, Reimar D?ffinger
<Reimar.Doeffinger at gmx.de> wrote:
> On Fri, Mar 12, 2010 at 06:08:53PM -0300, Ramiro Polla wrote:
> I don't think adding the sample_format is particularly related to this new
> input format and shouldn't be in the same patch.

Split into ap_sample_fmt.diff

> Also it should select a suitable format (one supported by the hardware) on
> its own for values that are set to 0 instead of failing.

Set SAMPLE_FMT_S16 as default sample_fmt in ffmpeg.c. Tries all other
formats that are understood by MinGW.

One thing that bothers me about this implementation is the pts. There
is no way to get a proper pts from the MS API. What I have done here
is to detect whenever all buffers are full (this will drop audio data)
and use GetTickCount() to get a pts for the first frame in a sequence
as soon as it is received. All other frames without pts following that
one with pts are contiguous and so lavf can calculate the proper pts.
Any other ideas?

Ramiro Polla
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ap_sample_fmt.diff
Type: application/octet-stream
Size: 1345 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100317/446e9353/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: waveform-2.diff
Type: application/octet-stream
Size: 14926 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100317/446e9353/attachment-0001.obj>



More information about the ffmpeg-devel mailing list