Commit 20b131a7 authored by Hugo Beauzee-Luyssen's avatar Hugo Beauzee-Luyssen

Removed nasty VLCpp stuff.

parent 9985532a
......@@ -26,8 +26,7 @@
Clip::Clip( const QString& mrl )
: m_vlcMedia( NULL ), m_mrl( mrl ), m_snapshot( NULL )
{
m_instance = LibVLCpp::Instance::getInstance();
m_vlcMedia = new LibVLCpp::Media( m_instance, mrl );
m_vlcMedia = new LibVLCpp::Media( mrl );
m_uuid = QUuid::createUuid();
}
......@@ -45,7 +44,7 @@ void Clip::loadMedia( const QString& mrl )
delete m_vlcMedia;
m_mrl = mrl;
m_vlcMedia = new LibVLCpp::Media( m_instance, mrl );
m_vlcMedia = new LibVLCpp::Media( mrl );
}
void Clip::flushParameters()
......
......@@ -53,8 +53,6 @@ public:
const QUuid& getUuid() const;
protected:
//TODO: is this really usefull now ?!
LibVLCpp::Instance* m_instance;
LibVLCpp::Media* m_vlcMedia;
QString m_mrl;
QList<QString> m_parameters;
......
......@@ -27,7 +27,6 @@
using namespace LibVLCpp;
Instance* Instance::m_singleton = NULL;
Instance* Instance::m_instance = NULL;
Instance::Instance()
{
......
......@@ -38,16 +38,9 @@ namespace LibVLCpp
private:
Exception m_ex;
static Instance* m_singleton;
static Instance* m_instance;
public:
static Instance* getNewInstance( int argc, const char** argv )
{
m_instance = new Instance( argc, argv );
return m_instance;
}
static Instance* getInstance()
{
if (NULL == m_singleton)
......@@ -63,12 +56,6 @@ namespace LibVLCpp
delete m_singleton;
m_singleton = NULL;
}
if ( m_instance != NULL )
{
delete m_instance;
m_instance = NULL;
}
}
};
}
......
......@@ -26,10 +26,10 @@
using namespace LibVLCpp;
Media::Media( Instance* instance, const QString& filename )
: m_instance( *instance ), m_dataCtx( NULL ), m_pixelBuffer( NULL )
Media::Media( const QString& filename )
: m_dataCtx( NULL ), m_pixelBuffer( NULL )
{
m_internalPtr = libvlc_media_new( m_instance, filename.toLocal8Bit(), m_ex );
m_internalPtr = libvlc_media_new( *(LibVLCpp::Instance::getInstance()), filename.toLocal8Bit(), m_ex );
m_ex.checkThrow();
}
......
......@@ -49,7 +49,7 @@ namespace LibVLCpp
typedef void (*lockCallback)( Media::DataCtx* dataCtx, void **pp_ret );
typedef void (*unlockCallback)( Media::DataCtx* dataCtx );
Media( Instance* instance, const QString& filename );
Media( const QString& filename );
~Media();
void addOption( const char* opt );
void setLockCallback( Media::lockCallback );
......@@ -64,7 +64,6 @@ namespace LibVLCpp
DataCtx* buildDataCtx();
Exception m_ex;
Instance& m_instance;
DataCtx* m_dataCtx;
uchar* m_pixelBuffer;
};
......
......@@ -51,8 +51,7 @@ void MetaDataManager::run()
void MetaDataManager::renderSnapshot()
{
//TODO: set the position to 1/3 of the video length
m_mediaPlayer->setTime( m_mediaPlayer->getTime() / 3 );
m_mediaPlayer->setTime( m_mediaPlayer->getLength() / 3 );
//FIXME: add a signal / slot for time changed.
sleep(1);
......
......@@ -40,8 +40,6 @@ PreviewWidget::PreviewWidget( QWidget *parent ) :
setAcceptDrops(true);
m_currentInstance = LibVLCpp::Instance::getInstance();
connect( m_ui->seekSlider, SIGNAL( sliderPosChanged(int) ),
this, SLOT( seekSliderMoved(int) ) );
......
......@@ -54,8 +54,6 @@ private slots:
private:
Ui::PreviewWidget* m_ui;
//TODO: Is this really useful now ?!
LibVLCpp::Instance* m_currentInstance;
LibVLCpp::MediaPlayer* m_mediaPlayer;
bool m_clipLoaded;
};
......
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