Commit 52e59020 authored by Hugo Beauzee-Luyssen's avatar Hugo Beauzee-Luyssen

Fix audio behaviour in pause mode

Removed useless attribute from workflow renderer
parent 9f63d1c2
...@@ -133,8 +133,11 @@ WorkflowRenderer::lockVideo( qint64 *pts, size_t *bufferSize, void **buffer ) ...@@ -133,8 +133,11 @@ WorkflowRenderer::lockVideo( qint64 *pts, size_t *bufferSize, void **buffer )
if ( m_stopping == false && m_paused == false ) if ( m_stopping == false && m_paused == false )
{ {
MainWorkflow::OutputBuffers* ret = m_mainWorkflow->getOutput( MainWorkflow::VideoTrack ); MainWorkflow::OutputBuffers* ret =
memcpy( m_renderVideoFrame, (*(ret->video))->frame.octets, (*(ret->video))->nboctets ); m_mainWorkflow->getOutput( MainWorkflow::VideoTrack );
memcpy( m_renderVideoFrame,
(*(ret->video))->frame.octets,
(*(ret->video))->nboctets );
m_videoBuffSize = (*(ret->video))->nboctets; m_videoBuffSize = (*(ret->video))->nboctets;
ptsDiff = (*(ret->video))->ptsDiff; ptsDiff = (*(ret->video))->ptsDiff;
} }
...@@ -154,20 +157,23 @@ WorkflowRenderer::lockVideo( qint64 *pts, size_t *bufferSize, void **buffer ) ...@@ -154,20 +157,23 @@ WorkflowRenderer::lockVideo( qint64 *pts, size_t *bufferSize, void **buffer )
int int
WorkflowRenderer::lockAudio( qint64 *pts, size_t *bufferSize, void **buffer ) WorkflowRenderer::lockAudio( qint64 *pts, size_t *bufferSize, void **buffer )
{ {
qint64 ptsDiff; qint64 ptsDiff;
uint32_t nbSample;
AudioClipWorkflow::AudioSample *renderAudioSample;
if ( m_stopping == false ) if ( m_stopping == false && m_paused == false )
{ {
MainWorkflow::OutputBuffers* ret = m_mainWorkflow->getOutput( MainWorkflow::AudioTrack ); MainWorkflow::OutputBuffers* ret = m_mainWorkflow->getOutput( MainWorkflow::AudioTrack );
m_renderAudioSample = ret->audio; renderAudioSample = ret->audio;
} }
uint32_t nbSample; else
if ( m_renderAudioSample != NULL ) renderAudioSample = NULL;
if ( renderAudioSample != NULL )
{ {
nbSample = m_renderAudioSample->nbSample; nbSample = renderAudioSample->nbSample;
*buffer = m_renderAudioSample->buff; *buffer = renderAudioSample->buff;
*bufferSize = m_renderAudioSample->size; *bufferSize = renderAudioSample->size;
ptsDiff = m_renderAudioSample->ptsDiff; ptsDiff = renderAudioSample->ptsDiff;
} }
else else
{ {
......
...@@ -317,7 +317,6 @@ class WorkflowRenderer : public GenericRenderer ...@@ -317,7 +317,6 @@ class WorkflowRenderer : public GenericRenderer
*/ */
static uint8_t* silencedAudioBuffer; static uint8_t* silencedAudioBuffer;
size_t m_videoBuffSize; size_t m_videoBuffSize;
AudioClipWorkflow::AudioSample* m_renderAudioSample;
Action::Stack m_actions; Action::Stack m_actions;
QMutex* m_actionsMutex; QMutex* m_actionsMutex;
QWaitCondition* m_waitCond; QWaitCondition* m_waitCond;
......
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