My code is:
Code: Select all
[...]
libvlc_media_player_play (mp);
raise();
Code: Select all
if(libvlc_errmsg()!=NULL){
stop();
sendError(libvlc_errmsg(),&QWidget());
}
Other problem is that I want to know when is buffering to show a progress bar. I use:
Code: Select all
libvlc_state_t st = libvlc_media_player_get_state(mp);
if(st==libvlc_Buffering || st==libvlc_Opening){
if(ui.bufferingBar->value()<100){
ui.bufferingBar->setValue(ui.bufferingBar->value()+5);
}
else{
ui.bufferingBar->setValue(0);
}
}