Commit 8729a1df authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

ISourceRenderer: Introduce a isStopped method

parent 62f69479
......@@ -65,6 +65,7 @@ namespace Backend
*/
virtual void start() = 0;
virtual void stop() = 0;
virtual bool isStopped() = 0;
virtual void playPause() = 0;
virtual void setPause( bool isPaused ) = 0;
virtual void nextFrame() = 0;
......
......@@ -259,3 +259,9 @@ LibVLCpp::MediaPlayer::willPlay()
{
return libvlc_media_player_will_play( *this ) != 0;
}
libvlc_state_t
MediaPlayer::state()
{
return libvlc_media_player_get_state( *this );
}
......@@ -77,6 +77,7 @@ namespace LibVLCpp
void setupVmem( const char* chroma, unsigned int width,
unsigned int height, unsigned int pitch );
bool willPlay();
libvlc_state_t state();
void registerEvents( libvlc_callback_t callback, void* data );
......
......@@ -182,6 +182,12 @@ VLCSourceRenderer::stop()
m_mediaPlayer->stop();
}
bool
VLCSourceRenderer::isStopped()
{
return m_mediaPlayer->state() == libvlc_Stopped;
}
void
VLCSourceRenderer::playPause()
{
......
......@@ -59,6 +59,7 @@ public:
virtual void setName( const char* name );
virtual void start();
virtual void stop();
virtual bool isStopped() override;
virtual void playPause();
virtual void setPause( bool isPaused ) override;
virtual void nextFrame();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment