From c4847c3f263da484bdbe932a014fa21dd2b38235 Mon Sep 17 00:00:00 2001 From: Hugo Beauzee-Luyssen Date: Mon, 24 Aug 2009 11:16:27 +0200 Subject: [PATCH] Switching back to VLC 1.0.1 --- src/GUI/Transcode.cpp | 2 +- src/LibVLCpp/VLCException.cpp | 3 ++- src/LibVLCpp/VLCInstance.cpp | 2 +- src/LibVLCpp/VLCMediaPlayer.cpp | 8 ++++---- src/Metadata/MetaDataWorker.cpp | 4 ++-- 5 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/GUI/Transcode.cpp b/src/GUI/Transcode.cpp index d86e549d..30923685 100644 --- a/src/GUI/Transcode.cpp +++ b/src/GUI/Transcode.cpp @@ -33,7 +33,7 @@ static bool catchVLCException( libvlc_exception_t *ex ) { if ( libvlc_exception_raised( ex ) ) { - qDebug() << libvlc_errmsg(); + qDebug() << libvlc_exception_get_message( ex ); libvlc_exception_clear( ex ); return (true); } diff --git a/src/LibVLCpp/VLCException.cpp b/src/LibVLCpp/VLCException.cpp index 07f6edf2..2563ae4e 100644 --- a/src/LibVLCpp/VLCException.cpp +++ b/src/LibVLCpp/VLCException.cpp @@ -48,7 +48,8 @@ void Exception::setErrorCallback( Exception::errorCallback handler, void* const char* Exception::getErrorText() const { - return libvlc_errmsg(); +// return libvlc_errmsg(); + return libvlc_exception_get_message( m_internalPtr ); } void Exception::clear() diff --git a/src/LibVLCpp/VLCInstance.cpp b/src/LibVLCpp/VLCInstance.cpp index c80e5c3e..e68e6ddf 100644 --- a/src/LibVLCpp/VLCInstance.cpp +++ b/src/LibVLCpp/VLCInstance.cpp @@ -32,7 +32,7 @@ Instance::Instance() { char const *argv[] = { -// "-vvvvv", + "-vvvvv", "--no-skip-frames", // "--intf", "dummy", //"--no-audio", diff --git a/src/LibVLCpp/VLCMediaPlayer.cpp b/src/LibVLCpp/VLCMediaPlayer.cpp index 89e9e97f..154cb652 100644 --- a/src/LibVLCpp/VLCMediaPlayer.cpp +++ b/src/LibVLCpp/VLCMediaPlayer.cpp @@ -43,7 +43,7 @@ MediaPlayer::MediaPlayer() 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_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 ) @@ -104,9 +104,9 @@ void MediaPlayer::callbacks( const libvlc_event_t* ev case libvlc_MediaPlayerPositionChanged: self->emit positionChanged(); break; - case libvlc_MediaPlayerLengthChanged: - self->emit lengthChanged(); - break; +// case libvlc_MediaPlayerLengthChanged: +// self->emit lengthChanged(); +// break; case libvlc_MediaPlayerSnapshotTaken: self->emit snapshotTaken(); break; diff --git a/src/Metadata/MetaDataWorker.cpp b/src/Metadata/MetaDataWorker.cpp index 9f687401..ce98d6d0 100644 --- a/src/Metadata/MetaDataWorker.cpp +++ b/src/Metadata/MetaDataWorker.cpp @@ -29,7 +29,7 @@ MetaDataWorker::MetaDataWorker( Media* media ) : m_currentMedia( media ), m_mediaIsPlaying( false), - m_lengthHasChanged( false ) + m_lengthHasChanged( true ) { m_mediaPlayer = new LibVLCpp::MediaPlayer(); } @@ -74,7 +74,7 @@ void MetaDataWorker::computeImageMetaData() void MetaDataWorker::getMetaData() { m_mediaIsPlaying = false; - m_lengthHasChanged = false; + m_lengthHasChanged = true; //In order to wait for the VOUT to be ready: while ( m_mediaPlayer->getWidth() == 0 ) -- GitLab