SGPrepare
TheSGPreparefunction instructs the sequence grabber to get ready to begin a preview or record operation (or to commence both operations). You specify the operations.
pascal ComponentResult SGPrepare (SeqGrabComponent s, Boolean prepareForPreview, Boolean prepareForRecord);
s- Specifies the component instance that identifies your connection to the sequence grabber component. You obtain this value from the Component Manager's
OpenDefaultComponentorOpenComponentfunction.prepareForPreview- Instructs the sequence grabber component to prepare for a preview operation. Set this parameter to
trueto prepare for a preview operation. You may set both theprepareForPreviewandprepareForRecordparameters totrue.prepareForRecord- Instructs the sequence grabber component to prepare for a record operation. Set this parameter to
trueto prepare for a record operation. You may set both theprepareForPreviewandprepareForRecordparameters totrue.DESCRIPTION
The sequence grabber component does whatever is necessary to get ready to start the preview or record operation. This may involve allocating memory, readying hardware, and notifying the sequence grabber's channels. By calling this function, you ensure that theSGStartRecordorSGStartPreviewfunction starts as quickly as possible.If you do not call this function before starting a record or preview operation, the sequence grabber component makes these preparations when you start the operation. You cannot call this function after you start a preview or record operation.
If you call
SGPreparewithout subsequently starting a record or preview operation, you should call theSGReleasefunction (described in the next section). This allows the sequence grabber component to release any system resources it allocated when you calledSGPrepare.SPECIAL CONSIDERATIONS
The window in which the sequence grabber is to draw video frames (as defined by
theSGSetGWorldfunction, described on page 5-27) must be visible before you call theSGPreparefunction. Otherwise, the sequence grabber does not display the frames properly. If the window isn't visible andSGPrepareis called with theprepareForPreviewparameter set totrueand theprepareForRecordparameter set tofalse, and the window is subsequently shown via the Window Manager'sShowWindowroutine, the sequence grabber won't display frames properly in the video window. The visible region of the window wasn't valid when theSGPreparecall
was made.RESULT CODES
File Manager errors
paramErr -50 Invalid parameter specified cantDoThatInCurrentMode -9402 Request invalid in current mode notEnoughMemoryToGrab -9403 Insufficient memory for record operation notEnoughDiskSpaceToGrab -9404 Insufficient disk space for record operation deviceCantMeetRequest -9408 Device cannot support grabber
Memory Manager errors