[vlc-devel] Access to decompressed audio

Rémi Denis-Courmont remi at remlab.net
Mon Jan 10 17:03:12 CET 2011


On Mon, 10 Jan 2011 17:49:06 +0200, Sergey Vlasov <sergey.vlsv at gmail.com>
wrote:
> First of all I would like to implement a progress bar widget similar to
> http://soundcloud.com/. For that I need an access to
>
**<http://www.google.com/url?sa=t&source=web&cd=1&ved=0CBYQFjAA&url=http%3A%2F%2Fwiki.videolan.org%2FLibVLC_SampleCode_Qt&ei=YiUrTbj1OpKR4Abhu4DQCQ&usg=AFQjCNHtDP819pJwRWLcjbrrZLWeTskCSg&sig2=MP7feyw7MhLGu1KJcNxgLQ>raw
> decompressed audio data. I started with "LibVLC SampleCode Qt".
> Investigating VLC sources and various examples I ended up with this:

You want to get raw linear PCM audio frames? This would require a new
virtual "memory" audio output, much like we already have for video, and a
few APIs to LibVLC. But it's not very hard. However, I don't understand how
that relates to progress bar!


If you want to plot the audio signal ahead of time, you probably need
something else though. A virtual audio output would only give you the PCM
frames in real-time as they are virtually played back. If you want to fully
decode the file, you need to stream it through a custom output pipeline
using the smem plugin. However, it might burn the CPU quite much while
decoding is ongoing.

You can already do it with LibVLC albeit with horrible kludges. Someone
really should write a nicer API around streaming output :/

-- 
Rémi Denis-Courmont
http://www.remlab.net
http://fi.linkedin.com/in/remidenis




More information about the vlc-devel mailing list