The File System Stream Handler DLL transports data to or from file system devices (local or remote) on behalf of a real-time application. This handler is unique in that it utilizes the MMIO subsystem to interface to a very wide variety of devices, such as hard disk drives, diskette drives, CD-ROM drives, WORM drives, and so forth. These devices can be physically installed in the local system hardware, or they can be accessed across a LAN on a server machine.
In a playback scenario (for example, waveform audio from a RIFF file), the File System Stream Handler uses MMIO to perform I/O on specified data files, and then performs stream processing to maintain a continuously available supply which is then streamed to a target stream handler; for example, the Waveform Audio Stream Handler. This handler does not operate fully in a real-time mode, but it must support continuous data streaming. It also does not support synchronization mastering, because the file system devices are not real-time devices.
External Interface Description
The description for the File System Stream Handler external interface follows:
Device Control Blocks
None.
Associate Control Blocks
This handler supports type ACBTYPE_MMIO associate control blocks.
/****************************************************** * FSSH - File System Stream Handler MMIO Object ACB ******************************************************/ #define ACBTYPE_MMIO 0x0001L /* MMIO object */ typedef struct _acb_mmio /* acbmmio - MMIO ACB */ { ULONG ulACBLen; /* Length of structure */ ULONG ulObjType; /* ACB_MMIO */ HMMIO hmmio; /* Handle of MMIO object */ } ACB_MMIO;
Implicit (EVENT_IMPLICIT_TYPE) Events Supported
The following implicit (EVENT_IMPLICIT_TYPE) events for the File System Stream Handler are supported:
The error type will be set in the ulFlag field of the event control block. The three types of errors that will be reported are:
An error occurred during streaming but the stream handler, the SSM, or both the stream handler and the SSM were able to continue streaming.
An error occurred that required the stream to be stopped. The application can restart the stream if appropriate.
A severe error occurred causing the stream handler to stop this stream. The stream cannot be restarted. The application must issue a call to SpiDestroyStream.
Also, errors from the following APIs can be returned:
This will be generated only when this stream handler is a target and it finds a cuepoint indicator in the buffer table from the Sync/Stream Manager. The event will be reported after the data has been written to the file system using MMIO. The ulMessageParm field of the PLAYL_EVCB will be filled in with the message supplied in the playlist instruction. The mmtimeStream field will not be filled in.
Explicit Events Supported
No explicit events are supported for the File System Stream Handler.
Stream Handler Commands Supported
The following stream handler commands (SHCs) are supported. Refer to the OS/2 Multimedia Programming Reference for a description of these SHC commands and the error return codes.
Note: A stream requires a file to be opened and associated to the stream before a stream can be started. Reassociating a new object without stopping the stream is not supported.
Possible return codes:
Note: If the spcbkey passed does not match any of the installed protocols, the last installed stream protocol control block with DATATYPE_GENERIC will be used.
Possible return codes:
Possible return codes:
Possible return codes:
Possible return codes:
Note: If you are adding support in the system for a new nonlinear data type, you can write a MMIO IOProc to support the MMIOM_SEEKBYTIME message. This message will be sent (mmioSendMessage) when the File System Stream Handler gets a seek by time (for information on the SpiSeekStream SPI_SEEKMMTIME parameter, refer to the OS/2 Multimedia Programming Reference.) and the SPCB indicates this is a nonlinear data type by having a 0 in the spcb.ulBytesPerUnit field, the spcb.mmtimePerUnit fields, or both fields.
Possible return codes:
Return codes from the following APIs are also returned:
Possible return codes:
Note: This stream handler allows any data type and subtype to be installed.
Possible return codes:
Possible return codes:
Possible return codes:
Base Stream Protocol Control Blocks Data Types Supported
The File System Stream Handler has only 1 base SPCB. It is DATATYPE_GENERIC. When a stream is created with a SPCBKEY that is not installed, this stream handler copies over the last installed SPCB of type DATATYPE_GENERIC and uses it. The data type, subtype and intkey passed are used in place of the generic values for these fields. The base generic SPCB has:
┌───────────────┬─────────────────────────────────────────────┐│SPCB Field │DATATYPE_GENERIC Values │ ├───────────────┼─────────────────────────────────────────────┤ │ulBufSize │16KB │ ├───────────────┼─────────────────────────────────────────────┤ │ulMinBuf │2 │ ├───────────────┼─────────────────────────────────────────────┤ │ulMaxBuf │5 │ ├───────────────┼─────────────────────────────────────────────┤ │ulSrcStart │1 │ ├───────────────┼─────────────────────────────────────────────┤ │ulTgtStart │1 │ ├───────────────┼─────────────────────────────────────────────┤ │ulBufFlag │SPCBBUF_NONCONTIGUOUS │ ├───────────────┼─────────────────────────────────────────────┤ │ulHandFlag │SPCBHAND_NOSYNC | SPCB_PHYS_SEEK │ └───────────────┴─────────────────────────────────────────────┘
Stream Handler Limits
Maximum number of streams (only limited by available memory).