loplugin:expandablemethods in avmedia
Change-Id: I215230d3b7e3649146083f00e7c10c03a4d3154e Reviewed-on: https://gerrit.libreoffice.org/30470 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
parent
a7369d9899
commit
2db81e7336
@ -334,10 +334,10 @@ void MediaWindowImpl::updateMediaItem( MediaItem& rItem ) const
|
||||
|
||||
rItem.setDuration( getDuration() );
|
||||
rItem.setTime( getMediaTime() );
|
||||
rItem.setLoop( isPlaybackLoop() );
|
||||
rItem.setMute( isMute() );
|
||||
rItem.setVolumeDB( getVolumeDB() );
|
||||
rItem.setZoom( getZoom() );
|
||||
rItem.setLoop( mxPlayer.is() && mxPlayer->isPlaybackLoop() );
|
||||
rItem.setMute( mxPlayer.is() && mxPlayer->isMute() );
|
||||
rItem.setVolumeDB( mxPlayer.is() ? mxPlayer->getVolumeDB() : 0 );
|
||||
rItem.setZoom( mxPlayerWindow.is() ? mxPlayerWindow->getZoomLevel() : media::ZoomLevel_NOT_AVAILABLE );
|
||||
rItem.setURL( getURL(), mTempFileURL, maReferer );
|
||||
}
|
||||
|
||||
@ -356,17 +356,17 @@ void MediaWindowImpl::executeMediaItem( const MediaItem& rItem )
|
||||
if (nMaskSet & AVMediaSetMask::TIME)
|
||||
setMediaTime(std::min(rItem.getTime(), getDuration()));
|
||||
|
||||
if (nMaskSet & AVMediaSetMask::LOOP)
|
||||
setPlaybackLoop(rItem.isLoop());
|
||||
if (nMaskSet & AVMediaSetMask::LOOP && mxPlayer.is() )
|
||||
mxPlayer->setPlaybackLoop( rItem.isLoop() );
|
||||
|
||||
if (nMaskSet & AVMediaSetMask::MUTE)
|
||||
setMute(rItem.isMute());
|
||||
if (nMaskSet & AVMediaSetMask::MUTE && mxPlayer.is() )
|
||||
mxPlayer->setMute( rItem.isMute() );
|
||||
|
||||
if (nMaskSet & AVMediaSetMask::VOLUMEDB)
|
||||
setVolumeDB(rItem.getVolumeDB());
|
||||
if (nMaskSet & AVMediaSetMask::VOLUMEDB && mxPlayer.is() )
|
||||
mxPlayer->setVolumeDB( rItem.getVolumeDB() );
|
||||
|
||||
if (nMaskSet & AVMediaSetMask::ZOOM)
|
||||
setZoom(rItem.getZoom());
|
||||
if (nMaskSet & AVMediaSetMask::ZOOM && mxPlayerWindow.is() )
|
||||
mxPlayerWindow->setZoomLevel( rItem.getZoom() );
|
||||
|
||||
// set play state at last
|
||||
if (nMaskSet & AVMediaSetMask::STATE)
|
||||
@ -401,16 +401,6 @@ void MediaWindowImpl::executeMediaItem( const MediaItem& rItem )
|
||||
}
|
||||
}
|
||||
|
||||
bool MediaWindowImpl::setZoom(css::media::ZoomLevel eLevel)
|
||||
{
|
||||
return mxPlayerWindow.is() && mxPlayerWindow->setZoomLevel( eLevel );
|
||||
}
|
||||
|
||||
css::media::ZoomLevel MediaWindowImpl::getZoom() const
|
||||
{
|
||||
return( mxPlayerWindow.is() ? mxPlayerWindow->getZoomLevel() : media::ZoomLevel_NOT_AVAILABLE );
|
||||
}
|
||||
|
||||
void MediaWindowImpl::stop()
|
||||
{
|
||||
if( mxPlayer.is() )
|
||||
@ -438,39 +428,6 @@ double MediaWindowImpl::getMediaTime() const
|
||||
return( mxPlayer.is() ? mxPlayer->getMediaTime() : 0.0 );
|
||||
}
|
||||
|
||||
void MediaWindowImpl::setPlaybackLoop( bool bSet )
|
||||
{
|
||||
if( mxPlayer.is() )
|
||||
mxPlayer->setPlaybackLoop( bSet );
|
||||
}
|
||||
|
||||
bool MediaWindowImpl::isPlaybackLoop() const
|
||||
{
|
||||
return mxPlayer.is() && mxPlayer->isPlaybackLoop();
|
||||
}
|
||||
|
||||
void MediaWindowImpl::setMute( bool bSet )
|
||||
{
|
||||
if( mxPlayer.is() )
|
||||
mxPlayer->setMute( bSet );
|
||||
}
|
||||
|
||||
bool MediaWindowImpl::isMute() const
|
||||
{
|
||||
return mxPlayer.is() && mxPlayer->isMute();
|
||||
}
|
||||
|
||||
void MediaWindowImpl::setVolumeDB( sal_Int16 nVolumeDB )
|
||||
{
|
||||
if( mxPlayer.is() )
|
||||
mxPlayer->setVolumeDB( nVolumeDB );
|
||||
}
|
||||
|
||||
sal_Int16 MediaWindowImpl::getVolumeDB() const
|
||||
{
|
||||
return (mxPlayer.is() ? mxPlayer->getVolumeDB() : 0);
|
||||
}
|
||||
|
||||
void MediaWindowImpl::stopPlayingInternal(bool bStop)
|
||||
{
|
||||
if (isPlaying())
|
||||
|
@ -123,9 +123,6 @@ private:
|
||||
// DragSourceHelper
|
||||
virtual void StartDrag( sal_Int8 nAction, const Point& rPosPixel ) override;
|
||||
|
||||
bool setZoom(css::media::ZoomLevel eLevel);
|
||||
css::media::ZoomLevel getZoom() const;
|
||||
|
||||
void stop();
|
||||
|
||||
bool isPlaying() const;
|
||||
@ -135,15 +132,6 @@ private:
|
||||
void setMediaTime( double fTime );
|
||||
double getMediaTime() const;
|
||||
|
||||
void setPlaybackLoop( bool bSet );
|
||||
bool isPlaybackLoop() const;
|
||||
|
||||
void setMute( bool bSet );
|
||||
bool isMute() const;
|
||||
|
||||
void setVolumeDB( sal_Int16 nVolumeDB );
|
||||
sal_Int16 getVolumeDB() const;
|
||||
|
||||
void stopPlayingInternal( bool );
|
||||
|
||||
void onURLChanged();
|
||||
|
Loading…
x
Reference in New Issue
Block a user