[vlmc-devel] WorkflowRenderer: Use Workflow::Frame instead of Workflow::AudioSample

Yikai Lu git at videolan.org
Wed Jun 1 18:15:04 CEST 2016


vlmc | branch: master | Yikai Lu <luyikei.qmltu at gmail.com> | Wed May  4 20:20:29 2016 +0900| [5bf38ac5fcf568757e475c39c6ca9ef086368204] | committer: Hugo Beauzée-Luyssen

WorkflowRenderer: Use Workflow::Frame instead of Workflow::AudioSample

Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>

> https://code.videolan.org/videolan/vlmc/commit/5bf38ac5fcf568757e475c39c6ca9ef086368204
---

 src/Renderer/WorkflowRenderer.cpp | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/Renderer/WorkflowRenderer.cpp b/src/Renderer/WorkflowRenderer.cpp
index 27e3516..2131a5e 100644
--- a/src/Renderer/WorkflowRenderer.cpp
+++ b/src/Renderer/WorkflowRenderer.cpp
@@ -165,11 +165,11 @@ WorkflowRenderer::lockAudio( EsHandler *handler, int64_t *pts, size_t *bufferSiz
 {
     qint64                              ptsDiff;
     quint32                             nbSample;
-    const Workflow::AudioSample         *renderAudioSample;
+    const Workflow::Frame         *renderAudioSample;
 
     if ( m_stopping == false && m_paused == false )
     {
-        renderAudioSample = static_cast<const Workflow::AudioSample*>( m_mainWorkflow->getOutput( Workflow::AudioTrack,
+        renderAudioSample = static_cast<const Workflow::Frame*>( m_mainWorkflow->getOutput( Workflow::AudioTrack,
                                                                                            m_paused ) );
     }
     else
@@ -177,9 +177,8 @@ WorkflowRenderer::lockAudio( EsHandler *handler, int64_t *pts, size_t *bufferSiz
     if ( renderAudioSample != nullptr )
     {
 //        vlmcDebug() << "pts diff:" << renderAudioSample->ptsDiff;
-        nbSample = renderAudioSample->nbSample;
-        *buffer = renderAudioSample->buff;
-        *bufferSize = renderAudioSample->size;
+        *buffer = (uchar*)renderAudioSample->buffer();
+        *bufferSize = renderAudioSample->size();
         ptsDiff = renderAudioSample->ptsDiff;
     }
     else



More information about the Vlmc-devel mailing list