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