[vlmc-devel] RenderTarget: Widget

Yikai Lu git at videolan.org
Sun Apr 17 09:20:13 CEST 2016


vlmc | branch: master | Yikai Lu <luyikei.qmltu at gmail.com> | Fri Apr 15 21:28:26 2016 +0900| [74f5420ededfacea653c3ba475775698ec8ed3b4] | committer: Hugo Beauzée-Luyssen

RenderTarget: Widget

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

> https://code.videolan.org/videolan/vlmc/commit/74f5420ededfacea653c3ba475775698ec8ed3b4
---

 src/Backend/Target/WidgetTarget.cpp | 16 ++++++++++++++++
 src/Backend/Target/WidgetTarget.h   | 19 +++++++++++++++++++
 src/CMakeLists.txt                  |  1 +
 3 files changed, 36 insertions(+)

diff --git a/src/Backend/Target/WidgetTarget.cpp b/src/Backend/Target/WidgetTarget.cpp
new file mode 100644
index 0000000..05f74ad
--- /dev/null
+++ b/src/Backend/Target/WidgetTarget.cpp
@@ -0,0 +1,16 @@
+#include "WidgetTarget.h"
+
+#include "Backend/ISourceRenderer.h"
+
+using namespace Backend;
+
+WidgetTarget::WidgetTarget( void* id )
+    : m_id( reinterpret_cast<quintptr>( id ) )
+{
+}
+
+void
+WidgetTarget::configure( ISourceRenderer *renderer )
+{
+    renderer->setOutputWidget( reinterpret_cast<void*>( m_id ) );
+}
diff --git a/src/Backend/Target/WidgetTarget.h b/src/Backend/Target/WidgetTarget.h
new file mode 100644
index 0000000..6b1a0f9
--- /dev/null
+++ b/src/Backend/Target/WidgetTarget.h
@@ -0,0 +1,19 @@
+#ifndef WIDGETTARGET_H
+#define WIDGETTARGET_H
+
+#include <QtGlobal>
+#include "Backend/IRenderTarget.h"
+
+namespace Backend
+{
+    class WidgetTarget : public IRenderTarget
+    {
+    public:
+        WidgetTarget( void* id );
+        virtual void configure( ISourceRenderer *renderer ) override;
+    private:
+        quintptr m_id;
+    };
+}
+
+#endif // WIDGETTARGET_H
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index ae426ff..4c59e63 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -46,6 +46,7 @@ SET(VLMC_SRCS
     Backend/VLC/VLCVmemRenderer.cpp
     Backend/VLC/VLCSource.cpp
     Backend/VLC/VLCMemorySource.cpp
+    Backend/Target/WidgetTarget.cpp
     EffectsEngine/EffectsEngine.cpp
     EffectsEngine/Effect.cpp
     EffectsEngine/EffectUser.cpp



More information about the Vlmc-devel mailing list