Commit d8e7058a authored by luyikei's avatar luyikei Committed by Hugo Beauzée-Luyssen

ClipWorkflow: Add type() fucntion to return its TrackType to be used

We have to know which tracks should be used to give buffers to a getOutput function with a certain TrackType.
parent afcf7f28
......@@ -95,6 +95,12 @@ AudioClipWorkflow::getOutput( ClipWorkflow::GetMode mode, qint64 )
return buff;
}
Workflow::TrackType
AudioClipWorkflow::type() const
{
return Workflow::AudioTrack;
}
void AudioClipWorkflow::initializeInternals()
{
m_renderer->setName( qPrintable( QString("AudioClipWorkflow " % m_clipHelper->uuid().toString() ) ) );
......
......@@ -40,6 +40,7 @@ class AudioClipWorkflow : public ClipWorkflow
public:
AudioClipWorkflow( ClipHelper* ch );
virtual Workflow::OutputBuffer *getOutput( ClipWorkflow::GetMode mode, qint64 currentFrame );
virtual Workflow::TrackType type() const;
protected:
virtual quint32 getNbComputedBuffers() const;
virtual quint32 getMaxComputedBuffers() const;
......
......@@ -98,6 +98,7 @@ class ClipWorkflow : public EffectUser
* of the rendering process advancement.
*/
virtual Workflow::OutputBuffer *getOutput( ClipWorkflow::GetMode mode, qint64 currentFrame ) = 0;
virtual Workflow::TrackType type() const = 0;
void postGetOutput();
/**
* @brief Initialize base variables for the SourceRenderer.
......
......@@ -86,6 +86,12 @@ ImageClipWorkflow::getOutput( ClipWorkflow::GetMode, qint64 currentFrame )
return m_buffer;
}
Workflow::TrackType
ImageClipWorkflow::type() const
{
return Workflow::VideoTrack;
}
void
ImageClipWorkflow::lock(void *data, uint8_t **pp_ret, size_t )
{
......
......@@ -34,6 +34,7 @@ class ImageClipWorkflow : public ClipWorkflow
~ImageClipWorkflow();
virtual Workflow::OutputBuffer *getOutput( ClipWorkflow::GetMode mode, qint64 currentFrame );
virtual Workflow::TrackType type() const;
/**
* \brief Deactivate time seeking in an ImageClipWorkflow
*/
......
......@@ -121,6 +121,12 @@ VideoClipWorkflow::getOutput( ClipWorkflow::GetMode mode, qint64 currentFrame )
return buff;
}
Workflow::TrackType
VideoClipWorkflow::type() const
{
return Workflow::VideoTrack;
}
void
VideoClipWorkflow::lock( void *data, uint8_t** p_buffer, size_t size )
{
......
......@@ -37,6 +37,7 @@ class VideoClipWorkflow : public ClipWorkflow
public:
VideoClipWorkflow( ClipHelper* ch );
virtual Workflow::OutputBuffer *getOutput( ClipWorkflow::GetMode mode, qint64 currentFrame );
virtual Workflow::TrackType type() const;
static const quint32 nbBuffers = 3 * 30; //3 seconds with an average fps of 30
......
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