[vlmc-devel] [PATCH 5/5] RenderTarget: File
Yikai Lu
luyikei.qmltu at gmail.com
Thu Apr 14 10:10:21 CEST 2016
---
src/Backend/Target/FileTarget.cpp | 16 ++++++++++++++++
src/Backend/Target/FileTarget.h | 18 ++++++++++++++++++
src/CMakeLists.txt | 1 +
3 files changed, 35 insertions(+)
create mode 100644 src/Backend/Target/FileTarget.cpp
create mode 100644 src/Backend/Target/FileTarget.h
diff --git a/src/Backend/Target/FileTarget.cpp b/src/Backend/Target/FileTarget.cpp
new file mode 100644
index 0000000..f77b1e6
--- /dev/null
+++ b/src/Backend/Target/FileTarget.cpp
@@ -0,0 +1,16 @@
+#include "FileTarget.h"
+
+#include "Backend/ISourceRenderer.h"
+
+using namespace Backend;
+
+FileTarget::FileTarget( const char* filePath )
+ : m_filePath( filePath )
+{
+}
+
+void
+FileTarget::configure( Backend::ISourceRenderer *renderer )
+{
+ renderer->setOutputFile( m_filePath );
+}
diff --git a/src/Backend/Target/FileTarget.h b/src/Backend/Target/FileTarget.h
new file mode 100644
index 0000000..d4a7c47
--- /dev/null
+++ b/src/Backend/Target/FileTarget.h
@@ -0,0 +1,18 @@
+#ifndef FILETARGET_H
+#define FILETARGET_H
+
+#include "Backend/IRenderTarget.h"
+
+namespace Backend
+{
+ class FileTarget : public IRenderTarget
+ {
+ public:
+ FileTarget( const char* filePath );
+ virtual void configure( ISourceRenderer *renderer );
+ private:
+ const char* m_filePath;
+ };
+}
+
+#endif // FILETARGET_H
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 4c59e63..a7cee9c 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -47,6 +47,7 @@ SET(VLMC_SRCS
Backend/VLC/VLCSource.cpp
Backend/VLC/VLCMemorySource.cpp
Backend/Target/WidgetTarget.cpp
+ Backend/Target/FileTarget.cpp
EffectsEngine/EffectsEngine.cpp
EffectsEngine/Effect.cpp
EffectsEngine/EffectUser.cpp
--
1.9.1
More information about the Vlmc-devel
mailing list