Important: The information in this document is obsolete and should not be used for new development.
QuickTime 6 introduces a new group of Idle Manager APIs that let media handlers, data handlers, and movie importers report their various QuickTime idling needs. These new APIs, discussed in this section, include
QTIdleManagerSetNextIdleTime
QTIdleManagerSetNextIdleTimeNow
QTIdleManagerSetNextIdleTimeNever
QTIdleManagerSetNextIdleTimeDelta
MCSetIdleManager
MovieImportSetIdleManager
DataHSetIdleManager
MediaGGetIdleManager
MediaGSetIdleManager
The Idle Manager introduced in QuickTime 6 is an opaque object that your component can make calls against.
To work with the Idle Manager object, you have to implement
the appropriate SetIdleManager component
APIs, so that your component can be handed an Idle Manager. When
your component is handed an Idle Manager, you will need to tell
the Idle Manager when you next need to be idled. (Note that media
handlers also need to implement a GetIdleManager routine.)
When you next need to be idled means: if you idle me before this time, I will do no work, so don’t bother. It’s a hint, not explicit instructions. If you don’t tell the Idle Manager anything different, then you’ll continue to be idled all the time because the Idle Manager still thinks you need one back then, which is now.
In QuickTime 6, there are three types of components that can get handed an Idle Manager object:
media handlers
data handlers
movie importers (but only certain types).
Using these various Idle Manager routines, your component can specify when it needs to be idled.
Derived media handlers are so called because they derive much
of their functionality from the base (or generic) media handler.
Historically, derived media handlers have requested idles from the
generic media handler by means of flags passed to MediaSetHandlerCapabilities. There
are three basic modes the derived media handler can request:
Don’t idle me (noIdle).
Idle me once per sample in my track (0).
No flags are set.
Idle me all the time (noScheduler, wantsTime,
or both).
These modes can be changed at any time by calling MediaSetHandlerCapabilities again.
Derived media handlers that only use modes 1 and 2 don’t
need to do anything with Idle Management. All their Idle Management
will be handled for them by the generic media handler. They should
not implement MediaGSetIdleManager or MediaGGetIdleManager.
Derived media handlers that currently use mode 3, but would
like the ability to throttle back the idle rate, should implement MediaGSetIdleManager and MediaGGetIdleManager.
They can then use various Idle Manager routines to tell QuickTime
when they would like to be idled next.
Retrieves the Idle Manager object from a derived media handler.
MediaGGetIdleManager (MediaHandler mh, IdleManager * pim);
A media handler component instance.
A pointer to an idle manager that the media handler will fill in.
This routine must be implemented by a derived media handler that wants to report its idling needs.
Introduced in QuickTime 6.
MediaHandlers.h
Gives an Idle Manager object to a derived media handler, so it can report its idling needs.
MediaGSetIdleManager (MediaHandler mh, IdleManager im);
A media handler component instance.
An idle manager.
This routine must be implemented by a derived media handler that wants to report its idling needs.
Introduced in QuickTime 6.
MediaHandlers.h
Last updated: 2002-07-01