Pairs of stream handlers implement the transport of data from a source to a target device while the Synchronization and Streaming Manager (SSM) provides coordination and central management of data buffers and synchronization data.
A stream handler can be built as a device driver run at Ring 0, or as a dynamic-link library (DLL) run at Ring 3. See DLL Model: File System Stream Handler and Device Driver Model: Video PDD for examples of these stream handler types.
Some streams are ideally controlled by a direct connection between the stream handler and a physical device driver, whereas other streams are not associated with a data source or target that maps physically to a specific device. For example, the File System Stream Handler is a DLL because all file system I/O functions are available as Ring 3 OS/2 functions that service all file system devices.
After you determine the type of stream handler you require (DLL or DD), you must incorporate the required functional modules in your stream handler design. Refer to the following figure, which represents the key modules in both DLL and device driver stream handler components.
Although the detailed coding practices of building OS/2 DLLs and device drivers differ considerably, most logic for a stream handler is not affected by this choice. The structure of the DLL stream handler closely resembles the device driver stream handler, with few exceptions.
The following figure illustrates the logical structure of the Sync/Stream
Manager (SSM) and its relationship with stream handlers. The Sync/Stream
Manager DLL exports SPI services to higher-level OS/2 multimedia components
(such as media drivers) and exports Stream Manager Helper (SMH) messages
to support the stream handler DLLs. Additional SMH messages are exported
by the Sync/Stream Manager device driver to stream handler device drivers
using standard OS/2 inter-device driver communication (IDC) interfaces (established
using DevHelp_AttachDD).
The following table illustrates the stream handlers are provided by OS/2 multimedia.
Note: See Stream Handler Module Definitions for information describing the high-level design and operation of the stream handlers provided with OS/2 multimedia.
┌───────────────┬────────────────────────────────────────┐ │Stream Handler │Description │ ├───────────────┼────────────────────────────────────────┤ │Audio │VSD interface to a vendor-specific │ │ │driver. Supports PCM, MIDI, ADPCM │ │ │formats. │ ├───────────────┼────────────────────────────────────────┤ │MIDI Mapper │Filters data using the selected MIDI │ │ │map. │ ├───────────────┼────────────────────────────────────────┤ │File system │Uses file system services to read or │ │ │write data from any associated device. │ ├───────────────┼────────────────────────────────────────┤ │Multi-track │Reads and splits interleaved data. │ ├───────────────┼────────────────────────────────────────┤ │Video │In conjunction with CODECs, outputs │ │ │video data to the display. │ ├───────────────┼────────────────────────────────────────┤ │System Memory │Transfers data to and from system memory│ │ │buffers. See Cuepoint Event Support. │ ├───────────────┼────────────────────────────────────────┤ │CD-ROM XA │Reads CD-ROM XA data and splits audio │ │ │sectors from video and data sectors. See│ │ │CD-ROM XA Stream Handler. │ ├───────────────┼────────────────────────────────────────┤ │CD-DA │Reads digital audio data directly from │ │ │the CD-ROM driver. Can be used to play │ │ │back CD audio data using an audio │ │ │adapter. │ └───────────────┴────────────────────────────────────────┘