[vlmc-devel] commit: Renderers: Don't provide a default implementation of getMedia ( Hugo Beauzee-Luyssen )

git at videolan.org git at videolan.org
Wed Mar 10 14:52:56 CET 2010


vlmc | branch: master | Hugo Beauzee-Luyssen <beauze.h at gmail.com> | Tue Mar  9 01:01:54 2010 +0100| [dfd60aaba0788c6537f03ab7521cfb57df2d680e] | committer: Hugo Beauzee-Luyssen 

Renderers: Don't provide a default implementation of getMedia

The constness difference was breaking renderers inheritance

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

 src/Renderer/GenericRenderer.h  |    6 +-----
 src/Renderer/WorkflowRenderer.h |    2 ++
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/src/Renderer/GenericRenderer.h b/src/Renderer/GenericRenderer.h
index 011bbf5..c0a68f3 100644
--- a/src/Renderer/GenericRenderer.h
+++ b/src/Renderer/GenericRenderer.h
@@ -116,11 +116,7 @@ public:
      *  \return     The currently rendered Media
      *  \todo       This method should not be here, as it is not generic at all.
      */
-    virtual  Media*                 getMedia() const
-    {
-        return 0;
-    }
-
+    virtual  Media*                 getMedia() = 0;
     /**
      *  \brief      Return the length in frames
      *  \warning    The returned value may not be accurate as it depends on FPS, that
diff --git a/src/Renderer/WorkflowRenderer.h b/src/Renderer/WorkflowRenderer.h
index 25dba5c..019d6b9 100644
--- a/src/Renderer/WorkflowRenderer.h
+++ b/src/Renderer/WorkflowRenderer.h
@@ -136,6 +136,8 @@ class   WorkflowRenderer : public GenericRenderer
          */
         void                killRenderer();
 
+        virtual Media*      getMedia() { return NULL; }
+
     private:
         /**
          *  \brief          This is a subpart of the togglePlayPause( bool ) method



More information about the Vlmc-devel mailing list