Commit 3b630cf3 authored by Hugo Beauzee-Luyssen's avatar Hugo Beauzee-Luyssen

Merged Workflow with VideoFrame types.

parent 2ad30d49
......@@ -27,7 +27,7 @@ struct VideoFrame
{
~VideoFrame();
VideoFrame();
VideoFrame(quint32 nboctets)
VideoFrame(quint32 nboctets);
VideoFrame(quint8* tocopy, quint32 nboctets);
VideoFrame(VideoFrame const &);
VideoFrame & operator=(VideoFrame const & tocopy);
......
......@@ -25,6 +25,7 @@
#include "vlmc.h"
#include "ClipWorkflow.h"
#include "Pool.hpp"
#include "VideoFrame.h"
ClipWorkflow::ClipWorkflow( Clip::Clip* clip ) :
m_clip( clip ),
......@@ -35,6 +36,8 @@ ClipWorkflow::ClipWorkflow( Clip::Clip* clip ) :
m_state( ClipWorkflow::Stopped ),
m_fullSpeedRender( false )
{
m_frame = new VideoFrame( VIDEOHEIGHT * VIDEOWIDTH * 4 );
// m_backBuffer = new unsigned char[VIDEOHEIGHT * VIDEOWIDTH * 4];
m_stateLock = new QReadWriteLock;
m_requiredStateLock = new QMutex;
m_waitCond = new QWaitCondition;
......
......@@ -31,12 +31,13 @@
#include <QReadWriteLock>
#include <QMutex>
#include "WaitCondition.hpp"
#include <QObject>
#include <QQueue>
#include "Clip.h"
#include "WaitCondition.hpp"
#include "VLCMediaPlayer.h"
#include "LightVideoFrame.h"
class ClipWorkflow : public QObject
{
......
......@@ -479,7 +479,7 @@ void TrackWorkflow::clipWorkflowRenderCompleted( ClipWorkflow* cw )
//s qDebug() << "Track render not completed yet";
}
unsigned char* TrackWorkflow::getSynchroneOutput()
VideoFrame* TrackWorkflow::getSynchroneOutput()
{
return m_synchroneRenderBuffer;
}
......
......@@ -32,6 +32,7 @@
#include <QDomElement>
#include "ClipWorkflow.h"
#include "VideoFrame.h"
//TODO: REMOVE THIS
#ifndef FPS
......@@ -72,7 +73,7 @@ class TrackWorkflow : public QObject
/**
* Returns the output that has been computed in synchrone mode.
*/
unsigned char* getSynchroneOutput();
VideoFrame* getSynchroneOutput();
//FIXME: this won't be reliable as soon as we change the fps from the configuration
static const unsigned int nbFrameBeforePreload = 60;
......@@ -119,7 +120,7 @@ class TrackWorkflow : public QObject
QAtomicInt m_nbClipToUnpause;
QAtomicInt m_nbClipToRender;
unsigned char* m_synchroneRenderBuffer;
VideoFrame* m_synchroneRenderBuffer;
TrackType m_trackType;
......
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