OnVideoFromBitmapsNextFrameNeeded
property OnVideoFromBitmapsNextFrameNeeded: TOnVideoFromBitmapsNextFrameNeeded read FOnVideoFromBitmapsNextFrameNeeded write FOnVideoFromBitmapsNextFrameNeeded;
__property TOnVideoFromBitmapsNextFrameNeeded OnVideoFromBitmapsNextFrameNeeded = {read=FOnVideoFromBitmapsNextFrameNeeded, write=FOnVideoFromBitmapsNextFrameNeeded};
typedef void __fastcall (__closure *TOnVideoFromBitmapsNextFrameNeeded)(System::TObject* Sender, bool FirstSample);
public event OnVideoFromBitmapsNextFrameNeededEventHandler OnVideoFromBitmapsNextFrameNeeded;
public delegate void OnVideoFromBitmapsNextFrameNeededEventHandler(object sender, TOnVideoFromBitmapsNextFrameNeededEventArgs e);
Public Event OnVideoFromBitmapsNextFrameNeeded As OnVideoFromBitmapsNextFrameNeededEventHandler
Public Delegate Sub OnVideoFromBitmapsNextFrameNeededEventHandler(sender As Object, e As TOnVideoFromBitmapsNextFrameNeededEventArgs)
void SetOnVideoFromBitmapsNextFrameNeeded (TOnVideoFromBitmapsNextFrameNeededCb OnVideoFromBitmapsNextFrameNeededCb);
typedef void CALLBACK TOnVideoFromBitmapsNextFrameNeededCb (void *Object, void *Sender, BOOL FirstSample);
This TOnVideoFromBitmapsNextFrameNeeded event requests a bitmap handle to build the next video frame. It occurs for each video frame that will be built from a bitmap handle when a preview or recording graph is running and VideoSource = vs_JPEGsOrBitmaps.
From this event, invoke SendImageToVideoFromBitmaps and pass:
-
either a file path to a BMP or JPEG file through the ImageFilePath parameter; in this case (non-empty ImageFilePath string), set the BitmapHandle parameter to 0,
-
or a bitmap handle through the BitmapHandle parameter; in this case, set the CanFreeBitmapHandle parameter to true if TVideoGrabber must free the bitmap handle, or to false to reuse the bitmap later.
If no more images are available, set the EndOfData parameter to true to notify the end of the recording or preview.
Sample code is available in the MainDemo project included in the package.