[vlmc-devel] [PATCH 5/7] GenericRenderer Implement setRenderTarget

Yikai Lu luyikei.qmltu at gmail.com
Sun Apr 17 18:27:29 CEST 2016


---
 src/Renderer/GenericRenderer.cpp | 6 ++++++
 src/Renderer/GenericRenderer.h   | 7 ++++++-
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/src/Renderer/GenericRenderer.cpp b/src/Renderer/GenericRenderer.cpp
index 598b59e..6ca0e72 100644
--- a/src/Renderer/GenericRenderer.cpp
+++ b/src/Renderer/GenericRenderer.cpp
@@ -49,6 +49,12 @@ GenericRenderer::isRendering() const
     return m_isRendering;
 }
 
+void
+GenericRenderer::setRenderTarget( std::unique_ptr<Backend::IRenderTarget> target )
+{
+    m_renderTarget = std::move( target );
+}
+
 #ifdef WITH_GUI
 RendererEventWatcher*
 GenericRenderer::eventWatcher()
diff --git a/src/Renderer/GenericRenderer.h b/src/Renderer/GenericRenderer.h
index 6fb326a..b63ec22 100644
--- a/src/Renderer/GenericRenderer.h
+++ b/src/Renderer/GenericRenderer.h
@@ -24,11 +24,12 @@
 #define GENERICRENDERER_H
 
 #include "config.h"
-
+#include <memory>
 #include <QObject>
 
 #include "Workflow/Types.h"
 #include "Tools/RendererEventWatcher.h"
+#include "Backend/IRenderTarget.h"
 
 class   Clip;
 class   Media;
@@ -135,6 +136,8 @@ public:
      */
     bool                            isRendering() const;
 
+    void                            setRenderTarget(  std::unique_ptr<Backend::IRenderTarget> target );
+
     RendererEventWatcher*           eventWatcher();
 protected:
     Backend::ISourceRenderer*       m_sourceRenderer;
@@ -150,6 +153,8 @@ protected:
     bool                            m_paused;
     bool                            m_isRendering;
 
+    std::unique_ptr<Backend::IRenderTarget>         m_renderTarget;
+
 public slots:
     /**
      *  \brief      This SLOT will be called when the time cursor has changed.
-- 
1.9.1



More information about the Vlmc-devel mailing list