Commit 6e34b686 authored by Vincent Carrubba's avatar Vincent Carrubba
Browse files

Solving the crash when there's not plugins, and adding better debugs print

parent a69ef63e
......@@ -25,6 +25,8 @@
// CTOR & DTOR
#include <iostream>
EffectsEngine::EffectsEngine( void ) : m_patch( NULL ), m_bypassPatch( NULL )
{
//
......@@ -37,45 +39,47 @@ EffectsEngine::EffectsEngine( void ) : m_patch( NULL ), m_bypassPatch( NULL )
qDebug() << "RootNode creation failed!!!!!!!!!!";
else
{
qDebug() << "RootNode successfully created.";
m_patch = EffectNode::getRootNode( "RootNode" );
quint32 i;
EffectNode* tmp;
qDebug() << "RootNode successfully created!";
m_patch = EffectNode::getRootNode( "RootNode" );
// CREATION DU ROOTNODE ET DE SES SLOTS
for ( i = 0 ; i < 64; ++i)
m_patch->createStaticVideoInput();
m_patch->createStaticVideoOutput();
if ( m_patch->createChild( "libVLMC_MixerEffectPlugin" ) == true )
{
m_patch->createChild( "libVLMC_BlitInRectangleEffectPlugin" );
m_patch->createChild( "libVLMC_InvertRNBEffectPlugin" );
tmp = m_patch->getChild( 1 );
for ( i = 0 ; i < 64; ++i)
{
m_patch->createStaticVideoInput();
tmp = m_patch->getChild( 1 );
if ( tmp->connectChildStaticVideoInputToParentStaticVideoOutput( ( i + 1 ), ( i + 1 ) ) == false )
qDebug() << "La connection n'a pas reussie";
}
m_patch->createStaticVideoOutput();
qDebug() << "The connection of the intput " << i << " of the mixer with the internal " << i << " output of the RootNode failed!";
else
qDebug() << "The connection of the intput " << i << " of the mixer with the internal " << i << " output of the RootNode successed!";
// RECUP LE MIXER ET CONNECTE SA SORTIE 1 A L'INTERNAL INPUT DU ROOT NODE
tmp = m_patch->getChild( 1 );
if ( tmp->connectChildStaticVideoOutputToParentStaticVideoInput( 1, 1 ) == false )
qDebug() << "La connection de la sortie n'as pas reussie";
qDebug() << "The connection of the mixer output with the BypassRootNode internal input failed!";
else
qDebug() << "The connection of the mixer output with the BypassRootNode internal input successed!";
// m_patch->createChild( "libVLMC_BlitInRectangleEffectPlugin" );
// m_patch->createChild( "libVLMC_InvertRNBEffectPlugin" );
// // RECUP LE MIXER ET CONNECTE SA SORTIE 1 A L'ENTREE 2 DU BLIT
// tmp = m_patch->getChild( 1 );
// if ( tmp->connectStaticVideoOutputToStaticVideoInput( 1, 2, "dst" ) == false )
// qDebug() << "La connection de la sortie n'as pas reussie HAHA";
// // RECUP LE BLIT ET CONNECT SA SORTIE 2 A L'INTERNAL INPUT DU ROOT NODE
// tmp = m_patch->getChild( 2 );
// qDebug() << "NAME : " << tmp->getInstanceName();
// if ( tmp->connectChildStaticVideoOutputToParentStaticVideoInput( "res", 1 ) == false )
// qDebug() << "La connection de la sortie n'as pas reussie";
// // CONNECT SA SORTIE 1 A SA L'ENTREE 1 DE L'INVERSEUR DE BLEU ET DE ROUGE
// if ( tmp->connectStaticVideoOutputToStaticVideoInput( "aux", 3, 1 ) == false )
// qDebug() << "La connection de la sortie n'as pas reussie, MERDE";
// // CONNECT LA SORTIE DE L'INVERSEUR A L'ENTREE SRC DU BLIT
// tmp = m_patch->getChild( 3 );
// if ( tmp->connectStaticVideoOutputToStaticVideoInput( 1, 2, 1 ) == false )
......@@ -95,26 +99,31 @@ EffectsEngine::EffectsEngine( void ) : m_patch( NULL ), m_bypassPatch( NULL )
qDebug() << "BypassRootNode creation failed!!!!!!!!!!";
else
{
qDebug() << "BypassRootNode successfully created.";
m_bypassPatch = EffectNode::getRootNode( "BypassRootNode" );
quint32 i;
EffectNode* tmp;
qDebug() << "BypassRootNode successfully created!";
// CREATION DU BYPASSROOTNODE ET DE SES SLOTS
m_bypassPatch = EffectNode::getRootNode( "BypassRootNode" );
for ( i = 0 ; i < 64; ++i)
m_bypassPatch->createStaticVideoInput();
m_bypassPatch->createStaticVideoOutput();
if ( m_bypassPatch->createChild( "libVLMC_MixerEffectPlugin" ) == true )
{
tmp = m_bypassPatch->getChild( 1 );
for ( i = 0 ; i < 64; ++i)
{
m_bypassPatch->createStaticVideoInput();
tmp = m_bypassPatch->getChild( 1 );
if ( tmp->connectChildStaticVideoInputToParentStaticVideoOutput( ( i + 1 ), ( i + 1 ) ) == false )
qDebug() << "La connection n'a pas reussie";
}
m_bypassPatch->createStaticVideoOutput();
qDebug() << "The connection of the intput " << i << " of the mixer with the internal " << i << " output of the BypassRootNode failed!";
else
qDebug() << "The connection of the intput " << i << " of the mixer with the internal " << i << " output of the BypassRootNode successed!";
// RECUP LE MIXER ET CONNECTE SA SORTIE 1 A L'INTERNAL INPUT DU ROOT NODE
tmp = m_bypassPatch->getChild( 1 );
if ( tmp->connectChildStaticVideoOutputToParentStaticVideoInput( 1, 1 ) == false )
qDebug() << "La connection de la sortie n'as pas reussie";
qDebug() << "The connection of the mixer output with the BypassRootNode internal input failed!";
else
qDebug() << "The connection of the mixer output with the BypassRootNode internal input successed!";
}
else
qDebug() << "There's not the video mixer plugin, so the connection with it cannot exist in the BypassRootNode";
......
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