Commit 628dc1ea authored by Hugo Beauzee-Luyssen's avatar Hugo Beauzee-Luyssen

Fix compilation for VLC 1.0-bugfix

parent 7f744a81
...@@ -43,7 +43,8 @@ MediaPlayer::MediaPlayer() ...@@ -43,7 +43,8 @@ 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 ); //TODO: activate this when switching to vlc 1.1
// libvlc_event_attach( p_em, libvlc_MediaPlayerLengthChanged, callbacks,this,m_ex );
} }
MediaPlayer::MediaPlayer( Media* media ) MediaPlayer::MediaPlayer( Media* media )
...@@ -91,9 +92,10 @@ void MediaPlayer::callbacks( const libvlc_event_t* ev ...@@ -91,9 +92,10 @@ 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: //TODO: activate this when switching to VLC 1.1
self->emit lengthChanged(); // case libvlc_MediaPlayerLengthChanged:
break; // self->emit lengthChanged();
// break;
case libvlc_MediaPlayerSnapshotTaken: case libvlc_MediaPlayerSnapshotTaken:
self->emit snapshotTaken(); self->emit snapshotTaken();
break; break;
......
...@@ -72,7 +72,8 @@ namespace LibVLCpp ...@@ -72,7 +72,8 @@ namespace LibVLCpp
void stopped(); void stopped();
void endReached(); void endReached();
void positionChanged(); void positionChanged();
void lengthChanged(); //TODO: activate this when switching to VLC 1.1
// void lengthChanged();
}; };
} }
......
...@@ -29,8 +29,9 @@ ...@@ -29,8 +29,9 @@
#include "MetaDataManager.h" #include "MetaDataManager.h"
#include "Library.h" #include "Library.h"
//TODO: change m_lengthHasChanged default value to false when switching to VLC 1.1
MetaDataManager::MetaDataManager() : m_renderWidget( NULL ), MetaDataManager::MetaDataManager() : m_renderWidget( NULL ),
m_mediaIsPlaying( false), m_lengthHasChanged( false ) m_mediaIsPlaying( false), m_lengthHasChanged( true )
{ {
m_mediaPlayer = new LibVLCpp::MediaPlayer(); m_mediaPlayer = new LibVLCpp::MediaPlayer();
connect( Library::getInstance(), SIGNAL( newMediaLoaded( Media* ) ),this, SLOT( newMediaLoaded( Media* ) ) ); connect( Library::getInstance(), SIGNAL( newMediaLoaded( Media* ) ),this, SLOT( newMediaLoaded( Media* ) ) );
...@@ -73,7 +74,8 @@ void MetaDataManager::run() ...@@ -73,7 +74,8 @@ void MetaDataManager::run()
m_currentClip->addParam( ":audio" ); m_currentClip->addParam( ":audio" );
m_mediaPlayer->setMedia( m_currentClip->getVLCMedia() ); m_mediaPlayer->setMedia( m_currentClip->getVLCMedia() );
connect( m_mediaPlayer, SIGNAL( lengthChanged() ), this, SLOT( entrypointLengthChanged() ) ); //TODO: activate this when switching to VLC 1.1
// connect( m_mediaPlayer, SIGNAL( lengthChanged() ), this, SLOT( entrypointLengthChanged() ) );
connect( m_mediaPlayer, SIGNAL( playing() ), this, SLOT( entrypointPlaying() ) ); connect( m_mediaPlayer, SIGNAL( playing() ), this, SLOT( entrypointPlaying() ) );
m_mediaPlayer->play(); m_mediaPlayer->play();
} }
......
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