diff options
author | Zolnai Tamás <tamas.zolnai@collabora.com> | 2014-05-23 16:14:30 +0200 |
---|---|---|
committer | Zolnai Tamás <tamas.zolnai@collabora.com> | 2014-05-23 22:08:33 +0200 |
commit | 4359ec6b0b89add9176df512fd50ba0d595c58db (patch) | |
tree | e271ecb69611179dc03e6e8a8f025a94e89e8b72 /avmedia | |
parent | 4ec3554a80f065c2d9c957d6ce7f577fb195be02 (diff) |
avmedia: remove unused code related to fast-forward
One part of that was removed by:
55d52165df003d253d813f3ea7085f4d89fdb3ce
e.g. setRate()
Change-Id: Ia5def0150029c1597cd505bbaf740a42819a7c73
Diffstat (limited to 'avmedia')
-rw-r--r-- | avmedia/source/framework/mediacontrol.cxx | 10 | ||||
-rw-r--r-- | avmedia/source/gstreamer/gstplayer.cxx | 17 | ||||
-rw-r--r-- | avmedia/source/gstreamer/gstplayer.hxx | 1 | ||||
-rw-r--r-- | avmedia/source/macavf/player.hxx | 2 | ||||
-rw-r--r-- | avmedia/source/macavf/player.mm | 24 | ||||
-rw-r--r-- | avmedia/source/opengl/oglplayer.cxx | 7 | ||||
-rw-r--r-- | avmedia/source/opengl/oglplayer.hxx | 1 | ||||
-rw-r--r-- | avmedia/source/quicktime/player.hxx | 1 | ||||
-rw-r--r-- | avmedia/source/quicktime/player.mm | 20 | ||||
-rw-r--r-- | avmedia/source/viewer/mediawindow_impl.cxx | 8 | ||||
-rw-r--r-- | avmedia/source/viewer/mediawindow_impl.hxx | 2 | ||||
-rw-r--r-- | avmedia/source/vlc/vlcplayer.cxx | 6 | ||||
-rw-r--r-- | avmedia/source/vlc/vlcplayer.hxx | 1 | ||||
-rw-r--r-- | avmedia/source/win/player.cxx | 13 | ||||
-rw-r--r-- | avmedia/source/win/player.hxx | 1 |
15 files changed, 3 insertions, 111 deletions
diff --git a/avmedia/source/framework/mediacontrol.cxx b/avmedia/source/framework/mediacontrol.cxx index 2a6e66d0167a..540613caaa26 100644 --- a/avmedia/source/framework/mediacontrol.cxx +++ b/avmedia/source/framework/mediacontrol.cxx @@ -40,7 +40,6 @@ #define AVMEDIA_PAGEINCREMENT 10.0 #define AVMEDIA_TOOLBOXITEM_PLAY 0x0001 -#define AVMEDIA_TOOLBOXITEM_PLAYFFW 0x0002 #define AVMEDIA_TOOLBOXITEM_PAUSE 0x0004 #define AVMEDIA_TOOLBOXITEM_STOP 0x0008 #define AVMEDIA_TOOLBOXITEM_MUTE 0x0010 @@ -290,7 +289,6 @@ void MediaControl::implUpdateToolboxes() maPlayToolBox.EnableItem( AVMEDIA_TOOLBOXITEM_INSERT, bValidURL ); maPlayToolBox.EnableItem( AVMEDIA_TOOLBOXITEM_PLAY, bValidURL ); - maPlayToolBox.EnableItem( AVMEDIA_TOOLBOXITEM_PLAYFFW, bValidURL ); maPlayToolBox.EnableItem( AVMEDIA_TOOLBOXITEM_PAUSE, bValidURL ); maPlayToolBox.EnableItem( AVMEDIA_TOOLBOXITEM_STOP, bValidURL ); maPlayToolBox.EnableItem( AVMEDIA_TOOLBOXITEM_LOOP, bValidURL ); @@ -310,24 +308,21 @@ void MediaControl::implUpdateToolboxes() maPlayToolBox.Enable(); maMuteToolBox.Enable(); - if( MEDIASTATE_PLAY == maItem.getState() || MEDIASTATE_PLAYFFW == maItem.getState() ) + if( MEDIASTATE_PLAY == maItem.getState() ) { maPlayToolBox.CheckItem( AVMEDIA_TOOLBOXITEM_PLAY, true ); - maPlayToolBox.CheckItem( AVMEDIA_TOOLBOXITEM_PLAYFFW, MEDIASTATE_PLAYFFW == maItem.getState() ); maPlayToolBox.CheckItem( AVMEDIA_TOOLBOXITEM_PAUSE, false ); maPlayToolBox.CheckItem( AVMEDIA_TOOLBOXITEM_STOP, false ); } else if( maItem.getTime() > 0.0 && ( maItem.getTime() < maItem.getDuration() ) ) { maPlayToolBox.CheckItem( AVMEDIA_TOOLBOXITEM_PLAY, false ); - maPlayToolBox.CheckItem( AVMEDIA_TOOLBOXITEM_PLAYFFW, false ); maPlayToolBox.CheckItem( AVMEDIA_TOOLBOXITEM_PAUSE, true ); maPlayToolBox.CheckItem( AVMEDIA_TOOLBOXITEM_STOP, false ); } else { maPlayToolBox.CheckItem( AVMEDIA_TOOLBOXITEM_PLAY, false ); - maPlayToolBox.CheckItem( AVMEDIA_TOOLBOXITEM_PLAYFFW, false ); maPlayToolBox.CheckItem( AVMEDIA_TOOLBOXITEM_PAUSE, false ); maPlayToolBox.CheckItem( AVMEDIA_TOOLBOXITEM_STOP, true ); } @@ -516,9 +511,8 @@ IMPL_LINK( MediaControl, implSelectHdl, ToolBox*, p ) break; case( AVMEDIA_TOOLBOXITEM_PLAY ): - case( AVMEDIA_TOOLBOXITEM_PLAYFFW ): { - aExecItem.setState( ( AVMEDIA_TOOLBOXITEM_PLAYFFW == p->GetCurItemId() ) ? MEDIASTATE_PLAYFFW : MEDIASTATE_PLAY ); + aExecItem.setState( MEDIASTATE_PLAY ); if( maItem.getTime() == maItem.getDuration() ) aExecItem.setTime( 0.0 ); diff --git a/avmedia/source/gstreamer/gstplayer.cxx b/avmedia/source/gstreamer/gstplayer.cxx index 11b26519051e..c89d423a64cd 100644 --- a/avmedia/source/gstreamer/gstplayer.cxx +++ b/avmedia/source/gstreamer/gstplayer.cxx @@ -502,23 +502,6 @@ double SAL_CALL Player::getMediaTime() return position; } - - -double SAL_CALL Player::getRate() - throw (uno::RuntimeException, std::exception) -{ - ::osl::MutexGuard aGuard(m_aMutex); - - double rate = 1.0; - - // TODO get the window rate - but no need since - // higher levels never set rate > 1 - - return rate; -} - - - void SAL_CALL Player::setPlaybackLoop( sal_Bool bSet ) throw (uno::RuntimeException, std::exception) { diff --git a/avmedia/source/gstreamer/gstplayer.hxx b/avmedia/source/gstreamer/gstplayer.hxx index f31dcb85f49a..2426eedbf9cc 100644 --- a/avmedia/source/gstreamer/gstplayer.hxx +++ b/avmedia/source/gstreamer/gstplayer.hxx @@ -58,7 +58,6 @@ public: virtual double SAL_CALL getDuration( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual void SAL_CALL setMediaTime( double fTime ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual double SAL_CALL getMediaTime( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; - virtual double SAL_CALL getRate( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual void SAL_CALL setPlaybackLoop( sal_Bool bSet ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual sal_Bool SAL_CALL isPlaybackLoop( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual void SAL_CALL setMute( sal_Bool bSet ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; diff --git a/avmedia/source/macavf/player.hxx b/avmedia/source/macavf/player.hxx index b03dfadadda7..de68fac1d379 100644 --- a/avmedia/source/macavf/player.hxx +++ b/avmedia/source/macavf/player.hxx @@ -54,8 +54,6 @@ public: virtual double SAL_CALL getMediaTime() throw (::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; virtual void SAL_CALL setStopTime( double fTime ) throw (::com::sun::star::uno::RuntimeException); virtual double SAL_CALL getStopTime() throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setRate( double fRate ) throw (::com::sun::star::uno::RuntimeException); - virtual double SAL_CALL getRate() throw (::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; virtual void SAL_CALL setPlaybackLoop( sal_Bool bSet ) throw (::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; virtual sal_Bool SAL_CALL isPlaybackLoop() throw (::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; virtual void SAL_CALL setMute( sal_Bool bSet ) throw (::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; diff --git a/avmedia/source/macavf/player.mm b/avmedia/source/macavf/player.mm index 14f8a073336a..2c89239e60c5 100644 --- a/avmedia/source/macavf/player.mm +++ b/avmedia/source/macavf/player.mm @@ -268,30 +268,6 @@ double SAL_CALL Player::getStopTime() // ------------------------------------------------------------------------------ -void SAL_CALL Player::setRate( double fRate ) - throw (uno::RuntimeException) -{ - OSL_TRACE ("Player::setRate( %.3f)", fRate); - if( !mpPlayer ) - return; - - // playback rate: 0 = stop, 1 = normal speed, 2 = double speed, -1 = normal speed backwards - [mpPlayer setRate: fRate]; -} - -// ------------------------------------------------------------------------------ - -double SAL_CALL Player::getRate() - throw (uno::RuntimeException) -{ - // macavf: 0 = stop, 1 = normal speed, 2 = double speed, -1 = normal speed backwards - const double fRate = mpPlayer ? (double)[mpPlayer rate] : 1.0; - OSL_TRACE ("Player::getRate() = %.3f", fRate); - return fRate; -} - -// ------------------------------------------------------------------------------ - void SAL_CALL Player::setPlaybackLoop( sal_Bool bSet ) throw (uno::RuntimeException) { diff --git a/avmedia/source/opengl/oglplayer.cxx b/avmedia/source/opengl/oglplayer.cxx index 00e1f1ac1479..e01a940217a8 100644 --- a/avmedia/source/opengl/oglplayer.cxx +++ b/avmedia/source/opengl/oglplayer.cxx @@ -150,13 +150,6 @@ double SAL_CALL OGLPlayer::getMediaTime() throw ( ::com::sun::star::uno::Runtime return 0.0; //gltf_animation_get_time(m_pHandle); } -double SAL_CALL OGLPlayer::getRate() throw ( uno::RuntimeException, std::exception ) -{ - osl::MutexGuard aGuard(m_aMutex); - // Seems unused - return 1.0; -} - void SAL_CALL OGLPlayer::setPlaybackLoop( sal_Bool bSet ) throw ( uno::RuntimeException, std::exception ) { osl::MutexGuard aGuard(m_aMutex); diff --git a/avmedia/source/opengl/oglplayer.hxx b/avmedia/source/opengl/oglplayer.hxx index 69f010ba8719..b41df21e5001 100644 --- a/avmedia/source/opengl/oglplayer.hxx +++ b/avmedia/source/opengl/oglplayer.hxx @@ -42,7 +42,6 @@ public: virtual double SAL_CALL getDuration() throw (com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual void SAL_CALL setMediaTime( double fTime ) throw (com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual double SAL_CALL getMediaTime() throw (com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; - virtual double SAL_CALL getRate() throw (com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual void SAL_CALL setPlaybackLoop( sal_Bool bSet ) throw (com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual sal_Bool SAL_CALL isPlaybackLoop() throw (com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual void SAL_CALL setVolumeDB( sal_Int16 nVolumeDB ) throw (com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; diff --git a/avmedia/source/quicktime/player.hxx b/avmedia/source/quicktime/player.hxx index 625103a7756e..513bb8973746 100644 --- a/avmedia/source/quicktime/player.hxx +++ b/avmedia/source/quicktime/player.hxx @@ -50,7 +50,6 @@ public: virtual double SAL_CALL getDuration( ) throw (::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; virtual void SAL_CALL setMediaTime( double fTime ) throw (::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; virtual double SAL_CALL getMediaTime( ) throw (::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; - virtual double SAL_CALL getRate( ) throw (::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; virtual void SAL_CALL setPlaybackLoop( sal_Bool bSet ) throw (::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; virtual sal_Bool SAL_CALL isPlaybackLoop( ) throw (::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; virtual void SAL_CALL setMute( sal_Bool bSet ) throw (::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; diff --git a/avmedia/source/quicktime/player.mm b/avmedia/source/quicktime/player.mm index a6b48869734c..5582b03f2907 100644 --- a/avmedia/source/quicktime/player.mm +++ b/avmedia/source/quicktime/player.mm @@ -201,26 +201,6 @@ double SAL_CALL Player::getMediaTime( ) return position; } - - -double SAL_CALL Player::getRate( ) - throw (uno::RuntimeException) -{ - // Quicktime: 0 = stop, 1 = normal speed, 2 = double speed, -1 = normal speed backwards - double rate = 1.0; - - OSL_TRACE ("Player::getRate"); - - if ( mpMovie ) - { - rate = (double) [mpMovie rate]; - } - - return rate; -} - - - void SAL_CALL Player::setPlaybackLoop( sal_Bool bSet ) throw (uno::RuntimeException) { diff --git a/avmedia/source/viewer/mediawindow_impl.cxx b/avmedia/source/viewer/mediawindow_impl.cxx index 8660a8288a55..1310832aaf99 100644 --- a/avmedia/source/viewer/mediawindow_impl.cxx +++ b/avmedia/source/viewer/mediawindow_impl.cxx @@ -343,7 +343,7 @@ bool MediaWindowImpl::start() void MediaWindowImpl::updateMediaItem( MediaItem& rItem ) const { if( isPlaying() ) - rItem.setState( ( getRate() > 1.0 ) ? MEDIASTATE_PLAYFFW : MEDIASTATE_PLAY ); + rItem.setState( MEDIASTATE_PLAY ); else rItem.setState( ( 0.0 == getMediaTime() ) ? MEDIASTATE_STOP : MEDIASTATE_PAUSE ); @@ -389,7 +389,6 @@ void MediaWindowImpl::executeMediaItem( const MediaItem& rItem ) switch( rItem.getState() ) { case( MEDIASTATE_PLAY ): - case( MEDIASTATE_PLAYFFW ): { if( !isPlaying() ) @@ -455,11 +454,6 @@ double MediaWindowImpl::getMediaTime() const return( mxPlayer.is() ? mxPlayer->getMediaTime() : 0.0 ); } -double MediaWindowImpl::getRate() const -{ - return( mxPlayer.is() ? mxPlayer->getRate() : 0.0 ); -} - void MediaWindowImpl::setPlaybackLoop( bool bSet ) { if( mxPlayer.is() ) diff --git a/avmedia/source/viewer/mediawindow_impl.hxx b/avmedia/source/viewer/mediawindow_impl.hxx index 2fcafc59e01b..d6084305b199 100644 --- a/avmedia/source/viewer/mediawindow_impl.hxx +++ b/avmedia/source/viewer/mediawindow_impl.hxx @@ -147,8 +147,6 @@ namespace avmedia void setMediaTime( double fTime ); double getMediaTime() const; - double getRate() const; - void setPlaybackLoop( bool bSet ); bool isPlaybackLoop() const; diff --git a/avmedia/source/vlc/vlcplayer.cxx b/avmedia/source/vlc/vlcplayer.cxx index 81a566419f10..60d7b87f496c 100644 --- a/avmedia/source/vlc/vlcplayer.cxx +++ b/avmedia/source/vlc/vlcplayer.cxx @@ -97,12 +97,6 @@ double SAL_CALL VLCPlayer::getMediaTime() throw ( ::com::sun::star::uno::Runtime return static_cast<double>( mPlayer.getTime() ) / MS_IN_SEC; } -double SAL_CALL VLCPlayer::getRate() throw ( ::com::sun::star::uno::RuntimeException, std::exception ) -{ - ::osl::MutexGuard aGuard(m_aMutex); - return mPlayer.getRate(); -} - void VLCPlayer::replay() { setPlaybackLoop( false ); diff --git a/avmedia/source/vlc/vlcplayer.hxx b/avmedia/source/vlc/vlcplayer.hxx index 455d5875e687..3d88798c59fc 100644 --- a/avmedia/source/vlc/vlcplayer.hxx +++ b/avmedia/source/vlc/vlcplayer.hxx @@ -68,7 +68,6 @@ public: double SAL_CALL getDuration() throw ( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE; void SAL_CALL setMediaTime( double fTime ) throw ( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE; double SAL_CALL getMediaTime() throw ( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE; - double SAL_CALL getRate() throw ( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE; void SAL_CALL setPlaybackLoop( sal_Bool bSet ) throw ( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE; sal_Bool SAL_CALL isPlaybackLoop() throw ( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE; void SAL_CALL setVolumeDB( ::sal_Int16 nDB ) throw ( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE; diff --git a/avmedia/source/win/player.cxx b/avmedia/source/win/player.cxx index 7b396815fc20..2a0fdf068521 100644 --- a/avmedia/source/win/player.cxx +++ b/avmedia/source/win/player.cxx @@ -349,19 +349,6 @@ double SAL_CALL Player::getMediaTime( ) return aRefTime; } -double SAL_CALL Player::getRate( ) - throw (uno::RuntimeException) -{ - ::osl::MutexGuard aGuard(m_aMutex); - - double fRet( 0.0 ); - - if( mpMP ) - mpMP->get_Rate( &fRet ); - - return fRet; -} - void SAL_CALL Player::setPlaybackLoop( sal_Bool bSet ) throw (uno::RuntimeException) { diff --git a/avmedia/source/win/player.hxx b/avmedia/source/win/player.hxx index b2e861df6811..701a8facabf3 100644 --- a/avmedia/source/win/player.hxx +++ b/avmedia/source/win/player.hxx @@ -72,7 +72,6 @@ public: virtual double SAL_CALL getDuration( ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL setMediaTime( double fTime ) throw (::com::sun::star::uno::RuntimeException); virtual double SAL_CALL getMediaTime( ) throw (::com::sun::star::uno::RuntimeException); - virtual double SAL_CALL getRate( ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL setPlaybackLoop( sal_Bool bSet ) throw (::com::sun::star::uno::RuntimeException); virtual sal_Bool SAL_CALL isPlaybackLoop( ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL setMute( sal_Bool bSet ) throw (::com::sun::star::uno::RuntimeException); |