This is now checked into HEAD and 310Atlas.
=============================================
Eric Hyche (ehyche real.com)
Technical Lead
RealNetworks, Inc.
> -----Original Message-----
> From: common-dev-bounces helixcommunity.org
> [mailto:common-dev-bounces helixcommunity.org] On
Behalf Of Eric Hyche
> Sent: Friday, April 18, 2008 3:19 PM
> To: common-dev lists.helixcommunity.org
> Subject: [Common-dev] CR-Client: change CVideoPaceMaker
> suspend behavior
>
>
> Description
> ---------------------------------------------
> The CVideoPaceMaker class which implements
IHXPaceMaker
> is a class which provides regular callbacks at a
user-specified
> interval to IHXPaceMakerResponse::OnPace() by using an
internal
> thread and event. If the user-specified interval is
5ms, then
> the class starts up the internal thread which loops,
calling OnPace()
> calling IHXEvent::Wait(5ms) calling OnPace, calling
> IHXEvent::Wait(5ms),
> etc. When the user calls IHXPaceMaker::Suspend(TRUE),
> the user is saying that calls back to OnPace() are not
wanted
> until the user resumes by calling
IHXPaceMaker::Suspend(FALSE).
>
> Previously when the user suspended the pacemaker by
calling
> IHXPaceMaker::Suspend(TRUE), the thread continued to
run,
> still waking up every 5ms and then going right back to
sleep.
> The only thing different was that OnPace was not
called
> while the pacemaker was suspended. This constant waking
up
> and sleeping causes heavy power consumption on mobile
devices
> and is really not needed.
>
> This change changes the internal behavior of
CVideoPaceMaker
> (and one slight semantic change). With this change,
when
> the pacemaker is suspended, it calls
> IHXEvent::Wait(HX_EVENT_WAIT_FOREVER),
> where HX_EVENT_WAIT_FOREVER is 0xFFFFFFFF. When the
user
> then calls IHXPaceMaker::Suspend(FALSE) to resume the
pacemaker,
> we signal the event. So this way the thread is not
continuing to
> run while the pacemaker is suspended.
>
> The one slight semantic change is this: while
suspended, the
> user can call IHXPaceMaker::Signal() and it will
receive one
> callback to OnPace(). Previously, if suspended,
IHXPaceMaker::Signal()
> did not result in a callback to OnPace(). However, no
code that I
> know of was ever calling Signal() while in a suspended
state.
>
> Files Modified
> ---------------------------------------------
> common/include/hxengin.h - add definition of
HX_EVENT_WAIT_FOREVER
> common/util/cpacemkr.cpp
> common/util/pub/cpacemkr.h
>
> Branches
> ---------------------------------------------
> HEAD and hxclient_3_1_0_atlas
>
> =====================================
> Eric Hyche, Technical Lead
> RealNetworks, Inc.
> ehyche real.com
>
_______________________________________________
Common-dev mailing list
Common-dev helixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/comm
on-dev
|