Commit 7a3ba36e authored by Hugo Beauzee-Luyssen's avatar Hugo Beauzee-Luyssen

Added stuff in outputmedia

parent 0b1680c4
...@@ -28,8 +28,7 @@ Media::Media( const QString& mrl ) : m_mrl( mrl ), m_snapshot( NULL ) ...@@ -28,8 +28,7 @@ Media::Media( const QString& mrl ) : m_mrl( mrl ), m_snapshot( NULL )
{ {
char const *vlc_argv[] = char const *vlc_argv[] =
{ {
"-verbose", "-verbose", "3",
"3",
//"--snapshot-format", "jpg", //"--snapshot-format", "jpg",
//"--plugin-path", VLC_TREE "/modules", //"--plugin-path", VLC_TREE "/modules",
//"--ignore-config", /* Don't use VLC's config files */ //"--ignore-config", /* Don't use VLC's config files */
...@@ -104,7 +103,7 @@ void Media::lock( LibVLCpp::Media::DataCtx* ctx, void **renderPtr ) ...@@ -104,7 +103,7 @@ void Media::lock( LibVLCpp::Media::DataCtx* ctx, void **renderPtr )
void Media::unlock( LibVLCpp::Media::DataCtx* ctx ) void Media::unlock( LibVLCpp::Media::DataCtx* ctx )
{ {
// qDebug() << "frame just rendered"; //qDebug() << "frame just rendered";
ctx->mutex->unlock(); ctx->mutex->unlock();
} }
......
...@@ -34,8 +34,9 @@ OutputMedia::OutputMedia() : m_pixelBuffer( NULL ) ...@@ -34,8 +34,9 @@ OutputMedia::OutputMedia() : m_pixelBuffer( NULL )
m_vlcMedia->addOption( lock ); m_vlcMedia->addOption( lock );
m_vlcMedia->addOption( unlock ); m_vlcMedia->addOption( unlock );
m_vlcMedia->addOption( data ); m_vlcMedia->addOption( data );
m_vlcMedia->addOption( ":vout=sdl" );
m_vlcMediaPlayer = new LibVLCpp::MediaPlayer(m_vlcMedia); m_vlcMediaPlayer = new LibVLCpp::MediaPlayer( m_vlcMedia );
} }
uchar* OutputMedia::lock( OutputMedia::DataCtx* dataCtx ) uchar* OutputMedia::lock( OutputMedia::DataCtx* dataCtx )
...@@ -48,7 +49,7 @@ uchar* OutputMedia::lock( OutputMedia::DataCtx* dataCtx ) ...@@ -48,7 +49,7 @@ uchar* OutputMedia::lock( OutputMedia::DataCtx* dataCtx )
void OutputMedia::unlock( OutputMedia::DataCtx* dataCtx ) void OutputMedia::unlock( OutputMedia::DataCtx* dataCtx )
{ {
//FIXME: use class Image to avoid alloc/free... //FIXME: use class Image to avoid alloc/free...
delete dataCtx->outputMedia->m_pixelBuffer; //delete dataCtx->outputMedia->m_pixelBuffer;
dataCtx->mutex->unlock(); dataCtx->mutex->unlock();
qDebug() << "Unlocked invmem"; qDebug() << "Unlocked invmem";
} }
......
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