Commit 1181f464 authored by Ludovic Fauvet's avatar Ludovic Fauvet
Browse files

Add support for pause and stop in the media.

parent 273057c5
...@@ -126,3 +126,13 @@ void InputMedia::play() ...@@ -126,3 +126,13 @@ void InputMedia::play()
{ {
Media::play(); Media::play();
} }
void InputMedia::pause()
{
Media::pause();
}
void InputMedia::stop()
{
Media::stop();
}
...@@ -65,6 +65,8 @@ public: ...@@ -65,6 +65,8 @@ public:
QImage& getImage(); QImage& getImage();
virtual void play(); virtual void play();
virtual void pause();
virtual void stop();
void setDrawable( WId handle ); void setDrawable( WId handle );
private: private:
......
...@@ -27,7 +27,7 @@ Media::Media(LibVLCpp::Instance* instance, const QString& mrl ) ...@@ -27,7 +27,7 @@ Media::Media(LibVLCpp::Instance* instance, const QString& mrl )
: m_instance( NULL ), m_vlcMedia( NULL ), m_vlcMediaPlayer( NULL ), : m_instance( NULL ), m_vlcMedia( NULL ), m_vlcMediaPlayer( NULL ),
m_mrl( mrl ), m_instanceOwned( false ) m_mrl( mrl ), m_instanceOwned( false )
{ {
if ( instance == NULL ) if ( !instance )
{ {
char const *vlc_argv[] = char const *vlc_argv[] =
{ {
...@@ -92,7 +92,7 @@ void Media::setupMedia() ...@@ -92,7 +92,7 @@ void Media::setupMedia()
void Media::play() void Media::play()
{ {
if ( m_vlcMediaPlayer == NULL ) if ( !m_vlcMediaPlayer )
setupMedia(); setupMedia();
m_vlcMediaPlayer->play(); m_vlcMediaPlayer->play();
} }
......
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