Commit c4847c3f authored by Hugo Beauzee-Luyssen's avatar Hugo Beauzee-Luyssen

Switching back to VLC 1.0.1

parent 53bc37a1
...@@ -33,7 +33,7 @@ static bool catchVLCException( libvlc_exception_t *ex ) ...@@ -33,7 +33,7 @@ static bool catchVLCException( libvlc_exception_t *ex )
{ {
if ( libvlc_exception_raised( ex ) ) if ( libvlc_exception_raised( ex ) )
{ {
qDebug() << libvlc_errmsg(); qDebug() << libvlc_exception_get_message( ex );
libvlc_exception_clear( ex ); libvlc_exception_clear( ex );
return (true); return (true);
} }
......
...@@ -48,7 +48,8 @@ void Exception::setErrorCallback( Exception::errorCallback handler, void* ...@@ -48,7 +48,8 @@ void Exception::setErrorCallback( Exception::errorCallback handler, void*
const char* Exception::getErrorText() const const char* Exception::getErrorText() const
{ {
return libvlc_errmsg(); // return libvlc_errmsg();
return libvlc_exception_get_message( m_internalPtr );
} }
void Exception::clear() void Exception::clear()
......
...@@ -32,7 +32,7 @@ Instance::Instance() ...@@ -32,7 +32,7 @@ Instance::Instance()
{ {
char const *argv[] = char const *argv[] =
{ {
// "-vvvvv", "-vvvvv",
"--no-skip-frames", "--no-skip-frames",
// "--intf", "dummy", // "--intf", "dummy",
//"--no-audio", //"--no-audio",
......
...@@ -43,7 +43,7 @@ MediaPlayer::MediaPlayer() ...@@ -43,7 +43,7 @@ MediaPlayer::MediaPlayer()
libvlc_event_attach( p_em, libvlc_MediaPlayerStopped, callbacks, this, m_ex ); libvlc_event_attach( p_em, libvlc_MediaPlayerStopped, callbacks, this, m_ex );
libvlc_event_attach( p_em, libvlc_MediaPlayerEndReached, callbacks, this, m_ex ); libvlc_event_attach( p_em, libvlc_MediaPlayerEndReached, callbacks, this, m_ex );
libvlc_event_attach( p_em, libvlc_MediaPlayerPositionChanged, callbacks, this, m_ex ); libvlc_event_attach( p_em, libvlc_MediaPlayerPositionChanged, callbacks, this, m_ex );
libvlc_event_attach( p_em, libvlc_MediaPlayerLengthChanged, callbacks,this,m_ex ); // libvlc_event_attach( p_em, libvlc_MediaPlayerLengthChanged, callbacks,this,m_ex );
} }
MediaPlayer::MediaPlayer( Media* media ) MediaPlayer::MediaPlayer( Media* media )
...@@ -104,9 +104,9 @@ void MediaPlayer::callbacks( const libvlc_event_t* ev ...@@ -104,9 +104,9 @@ void MediaPlayer::callbacks( const libvlc_event_t* ev
case libvlc_MediaPlayerPositionChanged: case libvlc_MediaPlayerPositionChanged:
self->emit positionChanged(); self->emit positionChanged();
break; break;
case libvlc_MediaPlayerLengthChanged: // case libvlc_MediaPlayerLengthChanged:
self->emit lengthChanged(); // self->emit lengthChanged();
break; // break;
case libvlc_MediaPlayerSnapshotTaken: case libvlc_MediaPlayerSnapshotTaken:
self->emit snapshotTaken(); self->emit snapshotTaken();
break; break;
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
MetaDataWorker::MetaDataWorker( Media* media ) : MetaDataWorker::MetaDataWorker( Media* media ) :
m_currentMedia( media ), m_currentMedia( media ),
m_mediaIsPlaying( false), m_mediaIsPlaying( false),
m_lengthHasChanged( false ) m_lengthHasChanged( true )
{ {
m_mediaPlayer = new LibVLCpp::MediaPlayer(); m_mediaPlayer = new LibVLCpp::MediaPlayer();
} }
...@@ -74,7 +74,7 @@ void MetaDataWorker::computeImageMetaData() ...@@ -74,7 +74,7 @@ void MetaDataWorker::computeImageMetaData()
void MetaDataWorker::getMetaData() void MetaDataWorker::getMetaData()
{ {
m_mediaIsPlaying = false; m_mediaIsPlaying = false;
m_lengthHasChanged = false; m_lengthHasChanged = true;
//In order to wait for the VOUT to be ready: //In order to wait for the VOUT to be ready:
while ( m_mediaPlayer->getWidth() == 0 ) while ( m_mediaPlayer->getWidth() == 0 )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment