Commit 9d2e93c7 authored by Rohit Yadav's avatar Rohit Yadav

ClipRenderer.cpp: Add interfaces to control volume and handle volume change signal

as needed.
parent 855b5ecd
......@@ -44,6 +44,7 @@ ClipRenderer::ClipRenderer() :
connect( m_mediaPlayer, SIGNAL( stopped() ), this, SLOT( __videoStopped() ) );
connect( m_mediaPlayer, SIGNAL( paused() ), this, SIGNAL( paused() ) );
connect( m_mediaPlayer, SIGNAL( playing() ), this, SIGNAL( playing() ) );
connect( m_mediaPlayer, SIGNAL( volumeChanged() ), this, SIGNAL( volumeChanged() ) );
connect( m_mediaPlayer, SIGNAL( timeChanged( qint64 ) ), this, SLOT( __timeChanged( qint64 ) ) );
connect( m_mediaPlayer, SIGNAL( endReached() ), this, SLOT( __endReached() ) );
}
......@@ -149,6 +150,19 @@ ClipRenderer::togglePlayPause( bool forcePause )
}
}
int
ClipRenderer::getVolume() const
{
return m_mediaPlayer->getVolume();
}
int
ClipRenderer::setVolume( int volume )
{
//Returns 0 if the volume was set, -1 if it was out of range
return m_mediaPlayer->setVolume( volume );
}
void
ClipRenderer::nextFrame()
{
......
......@@ -47,6 +47,8 @@ public:
virtual void togglePlayPause( bool forcePause );
virtual void stop();
virtual int setVolume( int volume );
virtual int getVolume() const;
virtual void nextFrame();
virtual void previousFrame();
virtual qint64 length() const;
......
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