Sync/stream subsystem events identify a specific change of state for either a master or slave stream handler. Some of these events do not have any effect on synchronization and merely indicate status of the data stream.

Two classes of events are defined: implicit and explicit. Implicit events are those events which all stream handlers must always support (such as end of stream or preroll complete). Explicit events are events which are supported only by some handlers (such as a custom event unique to a particular type of data). The application automatically receives notification of implicit events; however, the application must enable explicit events by using the SpiEnableEvent function if it wants to receive notification of any other events. Events remain enabled until they are disabled. The SSM and stream handlers are the only components that generate events.

The following table lists the events that are currently defined for the sync/stream subsystem. Stream handlers can also define new events for use as a communication mechanism between the stream handler and the application. Refer to the ulType and ulSubType fields in the EVCB data structure in the OS/2 Multimedia Programming Reference.

ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³Event                   ³Data      ³Description                             ³
³                        ³Structure ³                                        ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³EVENT_CUE_DATA          ³DATA_EVCB ³A cuepoint in terms of some specific    ³
³(Explicit)              ³          ³piece of data in a stream. This event   ³
³                        ³          ³can be enabled as a single event or as a³
³                        ³          ³recurring event.                        ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³EVENT_CUE_TIME          ³TIME_EVCB ³A cuepoint in terms of stream time from ³
³(Explicit)              ³          ³the start of the stream. This event can ³
³                        ³          ³be enabled as a single event or as a    ³
³                        ³          ³recurring event. Recurring events are   ³
³                        ³          ³events that are defined as a time       ³
³                        ³          ³interval. An event is generated an each ³
³                        ³          ³occurrence of this time interval. Single³
³                        ³          ³events remain enabled, even after they  ³
³                        ³          ³are reported. In case the stream is     ³
³                        ³          ³seeked backwards in time to a position  ³
³                        ³          ³before a cuepoint and play is resumed,  ³
³                        ³          ³the cuepoint will be reported again.    ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³EVENT_CUE_TIME_PAUSE    ³TIME_EVCB ³A cuepoint in terms of stream time from ³
³(Explicit)              ³          ³the start of the stream. This event will³
³                        ³          ³cause the stream to be paused when the  ³
³                        ³          ³cuepoint is reached. This event can be  ³
³                        ³          ³enabled as a single event.              ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³EVENT_DATAOVERRUN       ³EVCB      ³A stream handler detected a data        ³
³(Explicit)              ³          ³overrun. Data could be lost in a        ³
³                        ³          ³recording situation.                    ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³EVENT_DATAUNDERRUN      ³EVCB      ³A target stream handler detected a data ³
³(Explicit)              ³          ³underrun condition. There was no data   ³
³                        ³          ³available to output to the output       ³
³                        ³          ³device. Usually in this situation, the  ³
³                        ³          ³target stream handler will attempt to   ³
³                        ³          ³get another buffer and then pause it's  ³
³                        ³          ³device. The target stream handler will  ³
³                        ³          ³be re-started when more data is         ³
³                        ³          ³available to be output. This condition  ³
³                        ³          ³results in a break in the output data   ³
³                        ³          ³stream. Interleaved data format can     ³
³                        ³          ³cause underruns to occur when the end of³
³                        ³          ³the data is reached, but the end of file³
³                        ³          ³has not been reached.                   ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³EVENT_EOS (Implicit)    ³IMPL_EVCB ³End of stream event.  This event is     ³
³                        ³          ³generated after the target stream       ³
³                        ³          ³handler has consumed the last buffer in ³
³                        ³          ³the stream. This signals to the         ³
³                        ³          ³application that the stream has         ³
³                        ³          ³completed processing.                   ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³EVENT_ERROR (Implicit)  ³IMPL_EVCB ³An error has occurred while streaming.  ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³EVENT_PLAYLISTCUEPOINT  ³PLAYL_EVCB³A memory stream handler playlist        ³
³(Implicit)              ³          ³cuepoint event.                         ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³EVENT_PLAYLISTMESSAGE   ³PLAYL_EVCB³A memory stream handler playlist        ³
³(Implicit)              ³          ³message.                                ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³EVENT_QUEUE_OVERFLOW    ³IMPL_EVCB ³Event queue overflow. Indicates that an ³
³(Implicit)              ³          ³event has been lost due to too many     ³
³                        ³          ³events being generated. The application ³
³                        ³          ³(MCD) should use this event to clear any³
³                        ³          ³waiting conditions.                     ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³EVENT_STREAM_STOPPED    ³IMPL_EVCB ³The stream has been emptied or          ³
³(Implicit)              ³          ³discarded. (See the SpiStopStream       ³
³                        ³          ³function in the OS/2 Multimedia         ³
³                        ³          ³Programming Reference.)                 ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³EVENT_SYNC_PREROLLED    ³IMPL_EVCB ³All synchronized streams are prerolled. ³
³(Implicit)              ³          ³(See the SpiStartStream function in the ³
³                        ³          ³OS/2 Multimedia Programming Reference.) ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³EVENT_SYNCOVERRUN       ³OVRU_EVCB ³A sync overrun has been detected in the ³
³(Explicit)              ³          ³stream.                                 ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ

The Sync/Stream Manager propagates events to the application through the media driver by doing a call-back to an event routine that the application registered with the SSM on an SpiCreateStream call. Use the event routine as if it were a second-level interrupt routine and do not attempt to do a lot of processing. The event routine is on a per-process basis; it receives only one process at a time. Therefore, when an event is sent to be processed, it must wait until the current event has completed processing.

Because there is only one EVCB for implicit events, it is a good idea to copy any needed information from the EVCB into local variables for processing by the event routine. The event routine has the following interface:

Event_Entry(PEVCB pEVCB, rc)


[Back] [Next]