Commit 02b8d3cc authored by Vincent Carrubba's avatar Vincent Carrubba
Browse files

Correction of some bugs.Now, you can see a video with a green filter, :D

parent 596d1fb5
......@@ -83,7 +83,7 @@ MixerEffect::~MixerEffect()
void MixerEffect::render( void )
{
LightVideoFrame tmp;
quint32 i;
QHash< QString, InSlot<LightVideoFrame> >::iterator it = m_videoInputs.begin();
QHash< QString, InSlot<LightVideoFrame> >::iterator end = m_videoInputs.end();
......@@ -94,6 +94,14 @@ void MixerEffect::render( void )
const VideoFrame& lvf = static_cast<VideoFrame>( static_cast<LightVideoFrame>( ( it.value() ) ) );
if ( lvf.rvf.raw != NULL )
{
// qDebug() << "PONEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEY";
// for ( i = 0; i < lvf.nboctets; ++i )
// {
// qDebug() << "DUMP MIXER"
// << "lvf.rvf.raw[" << i << "] = "
// << lvf.rvf.raw[i];
// }
m_videoOutputs["out"] << it.value();
}
++it;
......
......@@ -25,10 +25,32 @@ void PouetEffect::render( void )
// m_videoOutputs["out"] << m_videoInputs["in"];
( m_videoInputs["in"] ) >> tmp;
// for ( i = 0; i < tmp.nboctets; ++i )
// {
// qDebug() << "DUMP"
// << "tmp.rvf.raw[" << i << "] = "
// << tmp.rvf.raw[i];
// }
for ( i = 0; i < tmp.nbpixels; ++i )
{
// qDebug() << "BEFORE MODIFIYING COLORS"
// << "tmp.rvf.pixel[i].Red = "
// << tmp.rvf.pixel[i].Red
// << '\n'
// << "tmp.rvf.pixel[i].Blue = "
// << tmp.rvf.pixel[i].Blue
// << "\n-----------------------";
tmp.rvf.pixel[i].Red = 0;
tmp.rvf.pixel[i].Blue = 0;
// qDebug() << "AFTER MODIFIYING COLORS"
// << "tmp.rvf.pixel[i].Red = "
// << tmp.rvf.pixel[i].Red
// << '\n'
// << "tmp.rvf.pixel[i].Blue = "
// << tmp.rvf.pixel[i].Blue
// << "\n-----------------------";
}
(m_videoOutputs["out"]) << tmp;
qDebug() << "End of PouetEffect";
......
......@@ -15,8 +15,6 @@ VideoFrame::VideoFrame()
VideoFrame::VideoFrame( quint32 nboctets )
{
quint32 i;
this->nboctets = nboctets;
this->nbpixels = nboctets / Pixel::NbComposantes;
this->rvf.raw = new quint8[nboctets];
......@@ -79,6 +77,8 @@ VideoFrame & VideoFrame::operator=( VideoFrame const & tocopy )
VideoFrame::VideoFrame( VideoFrame const & tocopy )
{
if (tocopy.rvf.raw != NULL)
{
quint32 i;
this->nboctets = tocopy.nboctets;
......@@ -87,4 +87,11 @@ VideoFrame::VideoFrame( VideoFrame const & tocopy )
for ( i = 0; i < this->nboctets; ++i )
this->rvf.raw[i] = tocopy.rvf.raw[i];
}
else
{
this->nboctets = 0;
this->nbpixels = 0;
this->rvf.raw = NULL;
}
}
......@@ -38,8 +38,7 @@ MainWorkflow::MainWorkflow( int trackCount ) :
"MainWorkflow constructor", "Can't have more than one MainWorkflow instance" );
m_instance = this;
MainWorkflow::blackOutput = new VideoFrame( VIDEOHEIGHT * VIDEOWIDTH * 3 );
memset( MainWorkflow::blackOutput->rvf.raw, 0, VIDEOHEIGHT * VIDEOWIDTH * 3 );
MainWorkflow::blackOutput = new VideoFrame();
m_tracks = new Toggleable<TrackWorkflow*>[trackCount];
for ( int i = 0; i < trackCount; ++i )
......
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