Reads data prior to playback.
int32 DSPreRollStream (Item msgItem, DSRequestMsgPtr reqMsg, DSStreamCBPtr streamCBPtr)
Sends a message to the DataStreamer telling it to fill the buffers for a specific stream. DSPreRollStream()
loads the DataStreamer buffers with data chunks from the specified stream so that they can be immediately accessed by subscribers.
DSPreRollStream()
does not expect the specified stream to be running. It is normally called to fill the buffers for a stream before it is started.
DSPreRollStream()
sets the members of the message data structure required to fill the data buffers. (The message is the DSRequestMsg
identified by reqMsg
.) If a message is specified, DSPreRollStream()
sends the message and returns immediately. However, if no message is specified (if reqMsg
is NULL
), DSPreRollStream()
creates a message, sends it to the DataStreamer, and waits until the message has been received before returning.
msgItem
Item of the request message.reqMsg
Pointer to the DSRequestMsg
message that is formatted and sent to the DataStreamer. A value of NULL
forces creation of an internal DSRequestMsg
message and synchronous operation.streamCBPtr
Pointer to the stream context block.
The members of reqMsg
are set to the following values:
whatToDo
kDSOpPreRollStreamThese values are returned if the DataStreamer encounters an error while processing the message request:
kDSInvalidDSRequest
Invalid message (whatToDo
set to invalid value)kDSNoReplyPortErr
Could not locate item of the reply portSendMsg()
or WaitPort()
failed
The DataStreamer checks the validity of messages only if message checking is enabled when the DataStreamer is compiled (if the VALIDATE_REQUEST_CODE
symbol is enabled).
See “Error Messages” in the 3DO Portfolio Reference Manual for a listing of error messages returned by SendMsg()
and WaitPort()
.
DataStreamLib.h