[vlmc-devel] commit: Generic renderer: don't define setRenderWidget if GUI is off. ( Hugo Beauzee-Luyssen )

git at videolan.org git at videolan.org
Sat Mar 20 16:29:34 CET 2010


vlmc | branch: master | Hugo Beauzee-Luyssen <beauze.h at gmail.com> | Fri Mar 19 00:42:34 2010 +0100| [53c985382788cf804c7259e1423c211b85d898de] | committer: Hugo Beauzee-Luyssen 

Generic renderer: don't define setRenderWidget if GUI is off.

> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=53c985382788cf804c7259e1423c211b85d898de
---

 src/Renderer/ClipRenderer.cpp    |    1 -
 src/Renderer/GenericRenderer.cpp |    2 ++
 src/Renderer/GenericRenderer.h   |    9 +++++++--
 3 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/src/Renderer/ClipRenderer.cpp b/src/Renderer/ClipRenderer.cpp
index 8837ad3..8af97f4 100644
--- a/src/Renderer/ClipRenderer.cpp
+++ b/src/Renderer/ClipRenderer.cpp
@@ -23,7 +23,6 @@
 
 #include <QtDebug>
 #include <QtGlobal>
-#include <QLabel>
 
 #include "Clip.h"
 #include "ClipRenderer.h"
diff --git a/src/Renderer/GenericRenderer.cpp b/src/Renderer/GenericRenderer.cpp
index daa5446..c90c535 100644
--- a/src/Renderer/GenericRenderer.cpp
+++ b/src/Renderer/GenericRenderer.cpp
@@ -35,9 +35,11 @@ GenericRenderer::~GenericRenderer()
     delete m_mediaPlayer;
 }
 
+#ifdef WITH_GUI
 void
 GenericRenderer::setRenderWidget(QWidget *renderWidget)
 {
     m_mediaPlayer->setDrawable( renderWidget->winId() );
     m_renderWidget = renderWidget;
 }
+#endif
diff --git a/src/Renderer/GenericRenderer.h b/src/Renderer/GenericRenderer.h
index 6c8c768..0da409d 100644
--- a/src/Renderer/GenericRenderer.h
+++ b/src/Renderer/GenericRenderer.h
@@ -23,9 +23,12 @@
 #ifndef GENERICRENDERER_H
 #define GENERICRENDERER_H
 
+#include "config.h"
+
 #include <QObject>
-#include <QWidget>
-class   QLabel;
+#ifdef WITH_GUI
+# include <QWidget>
+#endif
 
 #include "MainWorkflow.h"
 
@@ -49,12 +52,14 @@ public:
     explicit GenericRenderer();
     virtual ~GenericRenderer();
 
+#ifdef WITH_GUI
     /**
      *  \brief  Set the widget used for rendering the output.
      *  \param  renderWidget    The widget to use for render.
      *  \sa     setPreviewLabel( QLabel* )
      */
     void                setRenderWidget( QWidget* renderWidget );
+#endif
     /**
      *  \brief          Play or pause the media.
      *



More information about the Vlmc-devel mailing list