SGSetChannelMaxFrames
TheSGSetChannelMaxFramesfunction allows you to limit the number of frames
that the sequence grabber will capture from a specified channel. This function works only with channels that have data that is organized into frames, such as video data from a video disc.
pascal ComponentResult SGSetChannelMaxFrames (SGChannel c, long frameCount);
c- Specifies the reference that identifies the channel for this operation. You obtain this reference from the
SGNewChannelfunction, described on page 5-29.frameCount- Specifies the maximum number of frames to capture during the preview or record operation. Set this value to -1 to remove the limit.
DESCRIPTION
You can use theSGSetChannelMaxFramesfunction in the context of a time-based function to control the number of frames you collect for each unit of time. For example, if you want to collect one frame of data per second, you can create a function that executes once per second. That function should callSGSetChannelMaxFramesto set the maximum frame count to 1. Your application can determine when the frame is captured by calling theSGGetChannelMaxFramesfunction and detecting when that function returns a value of 0. TheSGGetChannelMaxFramesfunction is described in the next section.You may use this function only after you have prepared the sequence grabber component for a record operation or during an active record operation. Note that sequence grabber components clear this value when you prepare for a record operation.
SEE ALSO
You can determine whether a channel's data is organized into frames by calling theSGGetChannelInfofunction, which is described on page 5-58.RESULT CODES
paramErr -50 Invalid parameter specified cantDoThatInCurrentMode -9402 Request invalid in current mode