Error messages, and state problem [C++]
Posted: 27 Aug 2010 12:55
I want to add a little client for streaming to my program but I have a problem detecting error, I try to recover error messages with a function but isn't work.
My code is:
where raise is:
I try to open false http direction and I don't obtain a error message.
Other problem is that I want to know when is buffering to show a progress bar. I use:
This code work when my program's opening a stream but after it's opening, state always is "libvlc_Playing ".
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);
}
}