Apple Developer Connection
Member Login Log In | Not a Member? Contact ADC

< Previous PageNext Page > Hide TOC

Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

The Idle Manager APIs

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

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:

Using these various Idle Manager routines, your component can specify when it needs to be idled.

Derived Media Handlers

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:

  1. Don’t idle me (noIdle).

  2. Idle me once per sample in my track (0). No flags are set.

  3. 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.

MediaGGetIdleManager

Retrieves the Idle Manager object from a derived media handler.

MediaGGetIdleManager (MediaHandler mh,
   IdleManager * pim);

Parameters
mh

A media handler component instance.

pim

A pointer to an idle manager that the media handler will fill in.

Discussion

This routine must be implemented by a derived media handler that wants to report its idling needs.

Introduced in QuickTime 6.

Availability
Declared In
MediaHandlers.h

MediaGSetIdleManager

Gives an Idle Manager object to a derived media handler, so it can report its idling needs.

MediaGSetIdleManager (MediaHandler mh,
   IdleManager im);

Parameters
mh

A media handler component instance.

im

An idle manager.

Discussion

This routine must be implemented by a derived media handler that wants to report its idling needs.

Introduced in QuickTime 6.

Availability
Declared In
MediaHandlers.h

< Previous PageNext Page > Hide TOC


Last updated: 2002-07-01




Did this document help you?
Yes: Tell us what works for you.

It’s good, but: Report typos, inaccuracies, and so forth.

It wasn’t helpful: Tell us what would have helped.
Get information on Apple products.
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Copyright © 2007 Apple Inc.
All rights reserved. | Terms of use | Privacy Notice