I'm developing with libvlc and Qt4 and experience a problem with sound. It disappears just randomly during playback or if it was paused and then un-paused. I tried different versions of vlc as 1.1.5, 1.1.6 and 1.2.0-git. Surprisingly I got exactly the same behavior for vlc standalone (just to point that it's not my app but vlc player) which I built from 1.2.0-git, maybe it's good meaning that the problem is probably not in my code, however vlc build from 1.1.5 sources works ok. Anyways, for my app this happens all the time disregards of what libvlc version is used. I tested on two Ubuntu 10.04 systems with different hardware. vlc is not installed in the system, I build it using --prefix option for configure script and install into a dir under my home dir, I do that because 'make uninstall' doesn't clean up very well leaving may files behind and causes conflicts between different versions of vlc, with custom prefix I can easily clean it up manually.
I used http://wiki.videolan.org/LibVLC_SampleCode_Qt as starting point and just added buttons to play and pause:
Code: Select all
void Player::on_playButton_clicked()
{
libvlc_media_player_play(_mp);
}
void Player::on_pauseButton_clicked()
{
libvlc_media_player_set_pause(_mp, true);
}