Remarks
Executes a frames grabbing session whose output will be stored inside a set of memory bitmaps. After completing the grabbing session, you can enumerate all of the grabbed frames through the combination of the VideoPlayer.FrameGrabberResultsGetBitmapsCount and VideoPlayer.FrameGrabberResultsGetBitmap methods.
For further details about frames grabbing see the How to grab frames from video files tutorial.
For further details about the use of the embedded video player see the VideoPlayer class section.
For details about video clips rendering refer to the How to play video files through DirectShow tutorial.
Syntax
[Visual Basic]
Public Function FrameGrabberExecToMemory (
nPlayerIndex as Int16,
nStopType as enumVideoGrabberStopTypes,
nStartPosition as Int32,
nEndPosition as Int32,
nNumberOfFrames as Int32
) as enumErrorCodes
|
|
Parameter
|
Description
|
|
|
nPlayerIndex
|
Number representing the zero-based index of the player that will use the video player.
|
nStopType
|
Condition under which the stop of the grabbing session will occur.
Supported values are the following:
Mnemonic value
|
Value
|
Meaning
|
VIDEOGRABBER_STOP_POSITION
|
0
|
When this option is selected, the beginning of the grabbing is defined by the value set into the nStartPosition and the end of the grabbing is defined by the value set into the nEndPosition parameter. In this case the nNumberOfFrames parameter is ignored.
|
VIDEOGRABBER_STOP_FRAMES_NUM
|
1
|
When this option is selected, the beginning of the grabbing is defined by the value set into the nStartPosition and the end of the grabbing will occur after grabbing the number of frames set into the nNumberOfFrames parameter. In this case the nEndPosition parameter is ignored.
|
|
nStartPosition
|
Start position, expressed in milliseconds, where the grabbing session will begin. The value 0 represents the sound's beginning.
|
nEndPosition
|
Stop position, expressed in milliseconds, where the grabbing session will end. The value -1 represents the end of the video clip.
This parameter is ignored if the nStopType parameter is set to VIDEOGRABBER_STOP_FRAMES_NUM.
|
nNumberOfFrames
|
Number of frames to grab before stopping the grabbing session.
This parameter is ignored if the nStopType parameter is set to VIDEOGRABBER_STOP_POSITION.
|
Return value
Value
|
Meaning
|
|
|
Negative value
|
An error occurred (see the LastError property for further error details)
|
enumErrorCodes.NOERROR (0)
|
The method call was successful.
|
|