diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2017-01-23 19:37:51 +0100 |
---|---|---|
committer | Jan-Marek Glogowski <glogow@fbihome.de> | 2017-01-23 20:49:05 +0100 |
commit | bf110d40efcc79efb9247fdce5d2f54bafa6550b (patch) | |
tree | 4e9fad96d91adfd5159b009b430a64d4a6863bd6 /avmedia | |
parent | 75d8b305bbc1c2377f23361ecd64816a350baa4c (diff) |
Change all Idle* LINKs to be Timer*
Seem UBSAN doesn't like my forced reinterpret_cast to set the Idles
Link in the Timer class. Now there are two possible solution:
1. convert all (DECL|IMPL).*_LINK call sites to use a Timer* or
2. split the inheritance of Idle from Timer again to maintain
different Link<>s and move all common code into a TimerBase.
While the 1st is more correct, the 2nd has a better indicator for
Idles. This implements the first solution.
And while at it, this also converts all call sites of SetTimeoutHdl
and SetIdleHdl to SetInvokeHandler and gets rid of some local Link
objects, which are just passed to the SetInvokeHandler call.
It also introduces ClearInvokeHandler() and replaces the respective
call sites of SetInvokeHandler( Link<Timer *, void>() ).
Change-Id: I40c4167b1493997b7f136add4dad2f4ff5504b69
Diffstat (limited to 'avmedia')
-rw-r--r-- | avmedia/inc/mediacontrol.hxx | 2 | ||||
-rw-r--r-- | avmedia/source/framework/mediacontrol.cxx | 4 | ||||
-rw-r--r-- | avmedia/source/framework/soundhandler.cxx | 4 | ||||
-rw-r--r-- | avmedia/source/framework/soundhandler.hxx | 2 | ||||
-rw-r--r-- | avmedia/source/opengl/oglplayer.cxx | 2 |
5 files changed, 7 insertions, 7 deletions
diff --git a/avmedia/inc/mediacontrol.hxx b/avmedia/inc/mediacontrol.hxx index 9feb1c15a486..a6c247b7c687 100644 --- a/avmedia/inc/mediacontrol.hxx +++ b/avmedia/inc/mediacontrol.hxx @@ -69,7 +69,7 @@ private: DECL_LINK( implVolumeHdl, Slider*, void ); DECL_LINK( implSelectHdl, ToolBox*, void ); DECL_LINK( implZoomSelectHdl, ListBox&, void ); - DECL_LINK(implTimeoutHdl, Idle *, void); + DECL_LINK(implTimeoutHdl, Timer *, void); Idle maIdle; MediaItem maItem; diff --git a/avmedia/source/framework/mediacontrol.cxx b/avmedia/source/framework/mediacontrol.cxx index 0f257eff36ad..18d4f5599618 100644 --- a/avmedia/source/framework/mediacontrol.cxx +++ b/avmedia/source/framework/mediacontrol.cxx @@ -115,7 +115,7 @@ MediaControl::MediaControl( vcl::Window* pParent, MediaControlStyle eControlStyl } maIdle.SetPriority( TaskPriority::LOW ); - maIdle.SetIdleHdl( LINK( this, MediaControl, implTimeoutHdl ) ); + maIdle.SetInvokeHandler( LINK( this, MediaControl, implTimeoutHdl ) ); maIdle.Start(); } @@ -343,7 +343,7 @@ IMPL_LINK( MediaControl, implZoomSelectHdl, ListBox&, p, void ) } -IMPL_LINK_NOARG(MediaControl, implTimeoutHdl, Idle *, void) +IMPL_LINK_NOARG(MediaControl, implTimeoutHdl, Timer *, void) { update(); } diff --git a/avmedia/source/framework/soundhandler.cxx b/avmedia/source/framework/soundhandler.cxx index 0907555bfe84..65a10ba3d3bb 100644 --- a/avmedia/source/framework/soundhandler.cxx +++ b/avmedia/source/framework/soundhandler.cxx @@ -146,7 +146,7 @@ SoundHandler::SoundHandler() , m_bError ( false ) , m_aUpdateIdle ( "avmedia SoundHandler Update" ) { - m_aUpdateIdle.SetIdleHdl(LINK(this, SoundHandler, implts_PlayerNotify)); + m_aUpdateIdle.SetInvokeHandler(LINK(this, SoundHandler, implts_PlayerNotify)); } /*-************************************************************************************************************ @@ -298,7 +298,7 @@ OUString SAL_CALL SoundHandler::detect( css::uno::Sequence< css::beans::Property @return 0 every time... it doesn't matter for us. @threadsafe yes *//*-*************************************************************************************************************/ -IMPL_LINK_NOARG(SoundHandler, implts_PlayerNotify, Idle *, void) +IMPL_LINK_NOARG(SoundHandler, implts_PlayerNotify, Timer *, void) { // SAFE { ::osl::ClearableMutexGuard aLock( m_aLock ); diff --git a/avmedia/source/framework/soundhandler.hxx b/avmedia/source/framework/soundhandler.hxx index de718d5b9897..f055fdf82931 100644 --- a/avmedia/source/framework/soundhandler.hxx +++ b/avmedia/source/framework/soundhandler.hxx @@ -110,7 +110,7 @@ class SoundHandler : // interfaces // private methods private: - DECL_LINK( implts_PlayerNotify, Idle*, void ); + DECL_LINK( implts_PlayerNotify, Timer*, void ); // variables // (should be private everyway!) diff --git a/avmedia/source/opengl/oglplayer.cxx b/avmedia/source/opengl/oglplayer.cxx index 12b746a384dd..4c5eba196713 100644 --- a/avmedia/source/opengl/oglplayer.cxx +++ b/avmedia/source/opengl/oglplayer.cxx @@ -124,7 +124,7 @@ bool OGLPlayer::create( const OUString& rURL ) // Set timer m_aTimer.SetTimeout(8); // is 125fps enough for anyone ? m_aTimer.SetPriority(TaskPriority::LOW); - m_aTimer.SetTimeoutHdl(LINK(this,OGLPlayer,TimerHandler)); + m_aTimer.SetInvokeHandler(LINK(this,OGLPlayer,TimerHandler)); return true; } |