[vlmc-devel] Backend: ISourceRenderer: expose a setPause method

Hugo Beauzée-Luyssen git at videolan.org
Thu Mar 24 13:22:20 CET 2016


vlmc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Tue Mar 15 23:23:36 2016 +0100| [aebedc5f798bc45cfa416f7e657fcf89a3416333] | committer: Hugo Beauzée-Luyssen

Backend: ISourceRenderer: expose a setPause method

> https://code.videolan.org/videolan/vlmc/commit/aebedc5f798bc45cfa416f7e657fcf89a3416333
---

 src/Backend/ISourceRenderer.h               | 1 +
 src/Backend/VLC/LibVLCpp/VLCMediaPlayer.cpp | 6 ++++++
 src/Backend/VLC/LibVLCpp/VLCMediaPlayer.h   | 1 +
 src/Backend/VLC/VLCSourceRenderer.cpp       | 6 ++++++
 src/Backend/VLC/VLCSourceRenderer.h         | 1 +
 5 files changed, 15 insertions(+)

diff --git a/src/Backend/ISourceRenderer.h b/src/Backend/ISourceRenderer.h
index eada311..21efa50 100644
--- a/src/Backend/ISourceRenderer.h
+++ b/src/Backend/ISourceRenderer.h
@@ -66,6 +66,7 @@ namespace Backend
         virtual void    start() = 0;
         virtual void    stop() = 0;
         virtual void    playPause() = 0;
+        virtual void    setPause( bool isPaused ) = 0;
         virtual void    nextFrame() = 0;
         virtual void    previousFrame() = 0;
 
diff --git a/src/Backend/VLC/LibVLCpp/VLCMediaPlayer.cpp b/src/Backend/VLC/LibVLCpp/VLCMediaPlayer.cpp
index d8d4193..636149a 100644
--- a/src/Backend/VLC/LibVLCpp/VLCMediaPlayer.cpp
+++ b/src/Backend/VLC/LibVLCpp/VLCMediaPlayer.cpp
@@ -96,6 +96,12 @@ MediaPlayer::pause()
 }
 
 void
+MediaPlayer::setPause( bool isPaused )
+{
+    libvlc_media_player_set_pause( m_internalPtr, isPaused );
+}
+
+void
 MediaPlayer::stop()
 {
     //vlmcDebug() << "Asking for stop media player";
diff --git a/src/Backend/VLC/LibVLCpp/VLCMediaPlayer.h b/src/Backend/VLC/LibVLCpp/VLCMediaPlayer.h
index 7f4d06e..2408090 100644
--- a/src/Backend/VLC/LibVLCpp/VLCMediaPlayer.h
+++ b/src/Backend/VLC/LibVLCpp/VLCMediaPlayer.h
@@ -46,6 +46,7 @@ namespace   LibVLCpp
         ~MediaPlayer();
         void                                play();
         void                                pause();
+        void                                setPause( bool isPaused );
         void                                stop();
         int                                 getVolume();
         int                                 setVolume( int volume );
diff --git a/src/Backend/VLC/VLCSourceRenderer.cpp b/src/Backend/VLC/VLCSourceRenderer.cpp
index 05d9a5a..8f092ce 100644
--- a/src/Backend/VLC/VLCSourceRenderer.cpp
+++ b/src/Backend/VLC/VLCSourceRenderer.cpp
@@ -189,6 +189,12 @@ VLCSourceRenderer::playPause()
 }
 
 void
+VLCSourceRenderer::setPause( bool isPaused )
+{
+    m_mediaPlayer->setPause( isPaused );
+}
+
+void
 VLCSourceRenderer::nextFrame()
 {
     m_mediaPlayer->nextFrame();
diff --git a/src/Backend/VLC/VLCSourceRenderer.h b/src/Backend/VLC/VLCSourceRenderer.h
index a51bb1d..cb62179 100644
--- a/src/Backend/VLC/VLCSourceRenderer.h
+++ b/src/Backend/VLC/VLCSourceRenderer.h
@@ -60,6 +60,7 @@ public:
     virtual void    start();
     virtual void    stop();
     virtual void    playPause();
+    virtual void    setPause( bool isPaused ) override;
     virtual void    nextFrame();
     virtual void    previousFrame();
     virtual void    setOutputWidget( void *target );



More information about the Vlmc-devel mailing list