In certain instances it is not appropriate for a source stream handler to report cuepoints to an application (or media driver), but to allow the target to report the cuepoint. Usually, an application awaiting a cuepoint wants to receive it at the time the data is being output on the target side of a stream. One such circumstance involves the System Memory Stream Handler.
The System Memory Stream Handler has the ability to stream data from a playlist. A playlist is basically a little program that specifies what memory objects from a user application should be streamed and in what order. It consists of control information to enable looping, branching, and subroutines calls within the playlist. Another feature of a playlist is the CUEPOINT instruction, which allows the playlist to specify where in the data stream that cuepoints need to be sent to the application. Since the playlist is "played" within the source stream handler, it needs to notify the target stream handler to report the cuepoint at the appropriate time in the data stream.
The Sync/Stream Manager provides the ability for a source stream handler to associate a cuepoint with a buffer that it passes to the target stream handler (through the Sync/Stream Manager). This buffer and attribute remain in the data stream until the target stream handler requests it. The attribute for the buffer is passed with the buffer to the target (refer to the SMH_NOTIFY message in the OS/2 Multimedia Programming Reference). The target stream handler must then flag the event (for example, EVENT_CUE_DATA) when it receives a buffer with a non-zero attribute. The value of the attribute is passed as a parameter to the event on the SMH_REPORTEVENT call to the Sync/Stream Manager.
This feature of the Sync/Stream Manager supports the memory playlist ability to send a cuepoint event as close to actual time it occurs as possible. For this to work, it must be the target stream handler that must flag the cuepoint event to the application, in this case the media driver. If the System Memory Stream Handler is the source stream handler, it must notify the target stream handler to flag a cuepoint event. Refer to the OS/2 Multimedia Programming Reference for more information on playlists.