Remarks
Executes a frames grabbing session whose output will be stored on disk files. After completing the grabbing session, you can enumerate all of the grabbed frames through the combination of the VideoPlayer.FrameGrabberResultsGetFilesCount and VideoPlayer.FrameGrabberResultsGetFilePathname 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 object section.
For details about video clips rendering refer to the How to play video files through DirectShow tutorial.
Syntax
[Visual Basic]
control.VideoPlayer.FrameGrabberExecToFile (
nPlayer as Integer,
nStopType as enumVideoGrabberStopTypes,
nStartPosition as Long,
nEndPosition as Long,
nNumberOfFrames as Long,
strOutputPath as String,
strOutputFilenamePrefix as String,
nFormat as enumGraphicFormats,
nFormatParameter as long
) as enumErrorCodes
|
|
[C++]
short control.VideoPlayer.FrameGrabberExecToFile (
short nPlayer,
short nStopType,
long nStartPosition,
long nEndPosition,
long nNumberOfFrames,
LPCTSTR strOutputPath,
LPCTSTR strOutputFilenamePrefix,
short nFormat,
long nFormatParameter
);
|
|
Parameter
|
Description
|
|
|
nPlayer
|
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.
|
strOutputPath
|
String containing the absolute path where grabbed frames will be stored.
|
strOutputFilenamePrefix
|
Fixed prefix of the filename for each grabbed frame.
|
nFormat
|
Graphic format used to save the bitmap.
Supported values are the following:
Mnemonic value
|
Value
|
Meaning
|
GRAPHIC_FORMAT_BMP
|
0
|
BMP format
|
GRAPHIC_FORMAT_JPEG
|
1
|
JPEG format
|
GRAPHIC_FORMAT_PNG
|
2
|
PNG format
|
GRAPHIC_FORMAT_GIF
|
3
|
GIF format
|
GRAPHIC_FORMAT_TIFF
|
4
|
TIFF format
|
|
nFormatParameter
|
Eventual parameters required by the chosen graphic format.
When the nFormat parameter is set to GRAPHIC_FORMAT_JPEG, this parameter defines the JPEG compression factor whose range can be in the range from 0 (Maximum compression, Lower Quality) to 100 (Minimum compression, Higher Quality).
|
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
|
|