TVideoGrabber.OnFrameBitmap

Prev

Next

TVideoGrabber

Events

 




































































































Gives access to each frame bitmap


Declaration
property OnFrameBitmap: TOnFrameBitmap read FOnFrameBitmap write FOnFrameBitmap;


__property TOnFrameBitmap OnFrameBitmap=read=FOnFrameBitmap, write=FOnFrameBitmap


Event OnFrameBitmap(ByVal FrameInfo As Long, ByVal BitmapInfo As Long)

Description


This event occurs for each frame bitmap when the FrameGrabber is enabled.

To perserve the performance while offering a lot of useful values, this event returns 2 parameters that are pointers to structures:

A) the FrameInfo parameter, that is a pointer to a TFrameInfo structure.
It returns time and frame number information about the current video frames

B) the BitmapInfo parameter, which is a pointer to a TFrameBitmapInfo structure.
It returns all the useful bitmap information, and also the current mouse information (current position, last clicked position, button states, mouse down, etc...)

From this event you can perform powerful bitmap tasks, like line drawing, mouse-based drawing, pixel modifications, etc...

You will find a lot of sample code in the OnFrameBitmap event of the MainDemo project (seach "FrameBitmap" in the MainForm)
To activate this sample code, run the MainDemo project -> the chekboxes are located in the "Overlay" tab.

NOTE:
1. from this event you should not perform any actions with the potential to block:
1. do not hold a critical section or wait on another thread,
2. do not call any GDI or USER32.DLL APIs that might cause a window to move,
3. do not invoke component properties that send messages, e.g. do not read the ItemIndex property of a ListBox component.
If you need to read a such property, set an intermediary variable when the property changes, and then read the intermediary variable from the OnFrameOverlay... event.

2. if you need to perform blocking operations from this event, enable the OnFrameBitmapEventSynchrone property.
Enabling the OnFrameBitmapEventSynchrone property may slow down the application and/or introduce latency in the video stream.


See Also
TCardinalDirection TAutoFileName TFrameCaptureDest TFrameGrabberRGBFormat TOnFrameCaptureCompleted TOnFrameOverlayUsingDC TOnFrameOverlayUsingDIB TTextOverlayAlign TVideoDeinterlacing AdjustOverlayAspectRatio BurstCount BurstInterval BurstMode BurstType CaptureFrameSyncTo CaptureFrameTo DrawBitmapOverFrame FrameCaptureHeight FrameCaptureWidth FrameCaptureWithoutOverlay FrameCaptureZoomSize FrameGrabber FrameGrabberCurrentRGBFormat FrameGrabberRGBFormat GetFrameInfo GetFrameInfoString GetLastFrameAsHBITMAP GetLastFrameAsTBitmap GetLastFrameBitmapBits GetLastFrameBitmapBits2 GetLastFrameWaitTimeoutMs ImageOverlay_StretchToVideoSize InFrameProgressEvent JPEGPerformance JPEGProgressiveDisplay JPEGQuality Last_BurstFrameCapture_FileName Last_CaptureFrameTo_FileName MouseWheelEventEnabled OnDiskFull OnFrameBitmapEventSynchrone OnFrameOverlayUsingDC OnFrameOverlayUsingDIB OnFrameOverlayUsingVIDEOHDR OnMouseDown OnMouseMove OnMouseUp OnMouseWheel OverlayAfterTransform RefreshPlayerOverlays RetrieveInitialXYAfterRotation SetFrameCaptureBounds SetImageOverlay_AlphaBlend SetImageOverlay_AlphaBlendValue SetImageOverlay_ChromaKey SetImageOverlay_ChromaKeyLeewayPercent SetImageOverlay_ChromaKeyRGBColor SetImageOverlay_Enabled SetImageOverlay_Height SetImageOverlay_LeftLocation SetImageOverlay_RotationAngle SetImageOverlay_StretchToVideoSize SetImageOverlay_TargetDisplay SetImageOverlay_TopLocation SetImageOverlay_Transparent SetImageOverlay_TransparentColorValue SetImageOverlay_UseTransparentColor SetImageOverlay_Width SetImageOverlayFromBMPFile SetImageOverlayFromHBitmap SetImageOverlayFromHBitmap2 SetImageOverlayFromImageFile SetImageOverlayFromImageFile2 SetImageOverlayFromJPEGFile SetImageOverlayFromTBitmap SetImageOverlayFromTBitmap2 SetImageOverlayFromTImage SetImageOverlayFromTImage2 SetTextOverlay_Align SetTextOverlay_BkColor SetTextOverlay_CustomVar SetTextOverlay_Enabled SetTextOverlay_Font SetTextOverlay_FontColor SetTextOverlay_GradientColor SetTextOverlay_GradientMode SetTextOverlay_HighResFont SetTextOverlay_Left SetTextOverlay_Right SetTextOverlay_Scrolling SetTextOverlay_ScrollingSpeed SetTextOverlay_Shadow SetTextOverlay_ShadowColor SetTextOverlay_ShadowDirection SetTextOverlay_String SetTextOverlay_TargetDisplay SetTextOverlay_Top SetTextOverlay_Transparent ShapeOverlay ShapeOverlayEnabled ShapeOverlayList StoragePath TextOverlay_Align TextOverlay_BkColor TextOverlay_CreateCustomFont TextOverlay_CreateCustomFont2 TextOverlay_Enabled TextOverlay_Font TextOverlay_FontColor TextOverlay_Left TextOverlay_Right TextOverlay_Scrolling TextOverlay_ScrollingSpeed TextOverlay_Selector TextOverlay_Shadow TextOverlay_ShadowColor TextOverlay_ShadowDirection TextOverlay_String TextOverlay_Top TextOverlay_Transparent TranslateMouseCoordinates VideoProcessing_Brightness VideoProcessing_Contrast VideoProcessing_Deinterlacing VideoProcessing_FlipHorizontal VideoProcessing_FlipVertical VideoProcessing_GrayScale VideoProcessing_Hue VideoProcessing_InvertColors VideoProcessing_Pixellization VideoProcessing_Rotation VideoProcessing_RotationCustomAngle VideoProcessing_Saturation WebcamStillCaptureButton TVideoRotation