[vlc-devel] Access to decompressed audio

Sergey Vlasov sergey.vlsv at gmail.com
Mon Jan 10 16:49:06 CET 2011


I'm trying to write a media player with a custom UI, some functionality of
it may end up in upstream later.

First of all I would like to implement a progress bar widget similar to
http://soundcloud.com/. For that I need an access to
decompressed audio data. I started with "LibVLC SampleCode Qt".
Investigating VLC sources and various examples I ended up with this:

    libvlc_media_player_play (_mp);

    vlc_object_t *vlc_obj = (vlc_object_t *) _vlcinstance->p_libvlc_int;

    aout_instance_t *p_aout = (aout_instance_t *)vlc_obj;
    aout_buffer_t *p_buffer;

    p_buffer = aout_FifoPop( p_aout, &p_aout->output.fifo);

    if (p_buffer != NULL)
        printf("Buffer size: %d\n", (unsigned int)p_buffer->i_buffer);
        printf("Failed to access audio\n");

I can never get p_buffer valid. What do I do wrong?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20110110/27322339/attachment.html>

More information about the vlc-devel mailing list