The multimedia system supports sharing of physical devices among multiple applications. If a device is capable of being shared; that is, if it can maintain state information, the system can establish a unique device state, much like a Presentation Manager device context, for each application that uses the device.
The scope of a device state is defined by each device. The state of a simple device like the digital video player contains information about the current frame position, whether the device is playing or stopped, what its current playback speed is set to, and so on. The state of a compound device can include the name of the currently selected file, RIFF object, and playback position.
Media devices vary in their ability to support multiple device contexts concurrently. The different types of device use that are supported by media devices are:
The following table contains descriptions and examples of these device use types.
┌─────────────────────────┬─────────────────────────────────────────────┐│Context Use Type │Description │ ├─────────────────────────┼─────────────────────────────────────────────┤ │Fixed single-context │A fixed single-context device can establish │ │ │only one device context. The state of a │ │ │fixed single-context device cannot be queried│ │ │or set by software. │ │ │An example of a fixed single-context device │ │ │is a video cassette recorder that does not │ │ │report the tape position to the driver. │ ├─────────────────────────┼─────────────────────────────────────────────┤ │Dynamic single-context │A dynamic single-context device is serially │ │ │shareable. That is, the device can be used by│ │ │only one application at a time but can be │ │ │passed from one application to another. A │ │ │device state for each application is saved │ │ │and restored appropriately. │ │ │This is the most common concurrent use type │ │ │for a media device. An example of a dynamic │ │ │single-context device is a CD-ROM player. │ ├─────────────────────────┼─────────────────────────────────────────────┤ │Limited multiple-context │A limited multiple-context device can │ │ │establish multiple device contexts, but the │ │ │number of device contexts is limited by the │ │ │physical device. │ │ │An example of a limited multiple-context │ │ │device is a 4-channel amp-mixer audio device,│ │ │which can concurrently support any of the │ │ │following multiple-contexts: │ │ │Four monaural contexts, two stereo contexts, │ │ │and one stereo and two monaural contexts. │ ├─────────────────────────┼─────────────────────────────────────────────┤ │Unlimited context │An unlimited context device can support an │ │ │arbitrary number of concurrent device │ │ │contexts. The number of concurrent contexts │ │ │is limited only by the resource limits of the│ │ │system. │ └─────────────────────────┴─────────────────────────────────────────────┘