TOnFrameOverlayUsingDIB
Type of the OnFrameOverlayUsingDIB event.
Unit
VidGrab
Declaration
TOnFrameOverlayUsingDIB=procedure(Sender: TObject; FrameBitmapHandle: HBITMAP; FrameNumber: LongWord; FrameTime: LargeInteger; FrameId: LongInt) of object;
typedef void __fastcall(__closure *TOnFrameOverlayUsingDIB)(System::TObject *Sender, HBITMAP FrameBitmapHandle, unsigned FrameNumber, __int64 FrameTime, int FrameId);
Description
Type of the OnFrameOverlayUsingDIB event.
FrameBitmapHandle: handle of the bitmap of the current video frame
FrameId: must be passed to GetFrameInfo to retrieve information about the current frame.
Use GetObject to retrieve the DIB section information. E.g.:
procedure TfrmMainForm.VideoGrabberFrameOverlayUsingDIB(Sender: TObject;
FrameBitmapHandle: HBITMAP; FrameNumber: Cardinal; FrameTime: Int64;
FrameId: Integer);
var
DibSection: TDibSection;
i: integer;
SkipLine: boolean;
begin
if GetObject (FrameBitmapHandle, sizeof (TDibSection), @DibSection) = 0 then Exit;
SkipLine := false;
for i := 0 to DibSection.dsBm.bmHeight - 1 do begin
if SkipLine then begin
ZeroMemory (Pointer (Integer(DibSection.dsBm.bmBits) + (i * DibSection.dsBm.bmWidthBytes)), DibSection.dsBm.bmWidthBytes);
end;
SkipLine := not SkipLine;
end;
end;
See Also
TCardinalDirection TOnFrameOverlayUsingDC TTextOverlayAlign AdjustOverlayAspectRatio DrawBitmapOverFrame GetFrameInfoString ImageOverlay_StretchToVideoSize MouseWheelEventEnabled OnFrameBitmap OnFrameBitmapEventSynchrone OnFrameOverlayUsingDC OnFrameOverlayUsingDIB OnFrameOverlayUsingVIDEOHDR OnMouseDown OnMouseMove OnMouseUp OnMouseWheel OverlayAfterTransform RefreshPlayerOverlays 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 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