diff options
author | Jennifer Liebel <jliebel94@gmail.com> | 2014-11-13 13:10:55 +0000 |
---|---|---|
committer | Tobias Madl <tobias.madl.dev@gmail.com> | 2014-12-09 12:34:57 +0000 |
commit | e5f67b2e943366042bed9995327840c5a71eae2a (patch) | |
tree | 26b7fdbbca4ca8151209575c71a5efb53839e6d4 /avmedia | |
parent | 85e384f32b9f38e1cdcb4801dd6d8c66831f784e (diff) |
changed timers to idle
Change-Id: I05ccb8bd73070462edcc911956859aa7967b5901
Diffstat (limited to 'avmedia')
-rw-r--r-- | avmedia/source/framework/soundhandler.cxx | 10 | ||||
-rw-r--r-- | avmedia/source/framework/soundhandler.hxx | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/avmedia/source/framework/soundhandler.cxx b/avmedia/source/framework/soundhandler.cxx index a3527182cd8d..048365f76d9c 100644 --- a/avmedia/source/framework/soundhandler.cxx +++ b/avmedia/source/framework/soundhandler.cxx @@ -189,7 +189,7 @@ SoundHandler::SoundHandler( const css::uno::Reference< css::lang::XMultiServiceF , m_bError ( false ) , m_xFactory ( xFactory ) { - m_aUpdateTimer.SetTimeoutHdl(LINK(this, SoundHandler, implts_PlayerNotify)); + m_aUpdateIdle.SetIdleHdl(LINK(this, SoundHandler, implts_PlayerNotify)); } /*-************************************************************************************************************ @@ -246,7 +246,7 @@ void SAL_CALL SoundHandler::dispatchWithNotification(const css::util::URL& // If player currently used for other dispatch() requests ... // cancel it by calling stop()! - m_aUpdateTimer.Stop(); + m_aUpdateIdle.Stop(); if (m_xPlayer.is()) { if (m_xPlayer->isPlaying()) @@ -264,8 +264,8 @@ void SAL_CALL SoundHandler::dispatchWithNotification(const css::util::URL& // Count this request and initialize self-holder against dying by uno ref count ... m_xSelfHold = css::uno::Reference< css::uno::XInterface >(static_cast< ::cppu::OWeakObject* >(this), css::uno::UNO_QUERY); m_xPlayer->start(); - m_aUpdateTimer.SetTimeout( 200 ); - m_aUpdateTimer.Start(); + m_aUpdateIdle.SetPriority( VCL_IDLE_PRIORITY_LOWER ); + m_aUpdateIdle.Start(); } catch( css::uno::Exception& e ) { @@ -348,7 +348,7 @@ IMPL_LINK_NOARG(SoundHandler, implts_PlayerNotify) if (m_xPlayer.is() && m_xPlayer->isPlaying() && m_xPlayer->getMediaTime() < m_xPlayer->getDuration()) { - m_aUpdateTimer.Start(); + m_aUpdateIdle.Start(); return 0L; } m_xPlayer.clear(); diff --git a/avmedia/source/framework/soundhandler.hxx b/avmedia/source/framework/soundhandler.hxx index 53c2f746a68f..687bbb25b3ba 100644 --- a/avmedia/source/framework/soundhandler.hxx +++ b/avmedia/source/framework/soundhandler.hxx @@ -130,7 +130,7 @@ class SoundHandler : // interfaces css::uno::Reference< css::media::XPlayer > m_xPlayer ; // uses avmedia player to play sounds... css::uno::Reference< css::frame::XDispatchResultListener > m_xListener ; - Timer m_aUpdateTimer; + Idle m_aUpdateIdle; }; // class SoundHandler |