Commit 504910c1 authored by Hugo Beauzee-Luyssen's avatar Hugo Beauzee-Luyssen

Almost working version, but stuck at VLC level...

parent 942d6174
......@@ -30,7 +30,7 @@ Instance::Instance()
{
char const *argv[] =
{
// "-vvvvv",
"-vvvvv",
"--no-skip-frames",
// "--intf", "dummy",
"--text-renderer", "dummy",
......
......@@ -39,7 +39,7 @@ WorkflowRenderer::WorkflowRenderer() :
m_media = new LibVLCpp::Media( "fake://" );
sprintf( buffer, ":invmem-width=%i", VIDEOWIDTH );
m_media->addOption( ":codec=invmem" );
m_media->addOption( ":codec=invmem,inamem" );
m_media->addOption( buffer );
sprintf( buffer, ":invmem-height=%i", VIDEOHEIGHT );
m_media->addOption( buffer );
......@@ -53,7 +53,11 @@ WorkflowRenderer::WorkflowRenderer() :
m_media->addOption( buffer );
sprintf( buffer, ":height=%i", VIDEOHEIGHT );
m_media->addOption( buffer );
m_media->addOption( ":no-audio" );
sprintf( buffer, ":inamem-data=%lld", (qint64)this );
m_media->addOption( buffer );
sprintf( buffer, ":inamem-callback=%lld", (qint64)WorkflowRenderer::lock );
m_media->addOption( buffer );
m_condMutex = new QMutex;
m_waitCond = new QWaitCondition;
......@@ -86,6 +90,14 @@ WorkflowRenderer::~WorkflowRenderer()
delete m_waitCond;
}
void* WorkflowRenderer::lockAudio( void* datas )
{
WorkflowRenderer* self = reinterpret_cast<WorkflowRenderer*>( datas );
qDebug() << "Injecting audio data";
return self->m_lastFrame->audio;
}
void* WorkflowRenderer::lock( void* datas )
{
WorkflowRenderer* self = reinterpret_cast<WorkflowRenderer*>( datas );
......
......@@ -57,6 +57,7 @@ class WorkflowRenderer : public GenericRenderer
virtual void previousFrame();
static void* lock( void* datas );
static void* lockAudio( void* datas );
static void unlock( void* datas );
private:
......
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