Skip to content

GetFrameInfo

function

Delphi
function GetFrameInfo (FrameId: LongInt; FrameInfoId: TFrameInfoId): LargeInteger;
C++Builder
LargeInteger __fastcall GetFrameInfo(System::LongInt FrameId, TFrameInfoId FrameInfoId);
C#
public long GetFrameInfo(int FrameId, TFrameInfoId FrameInfoId);
VB.NET
Public Function GetFrameInfo(FrameId As Integer, FrameInfoId As TFrameInfoId) As Long
C++/Qt
__int64 GetFrameInfo (int FrameId, TFrameInfoId FrameInfoId);

Used to retrieve information about the current video frame. Must be invoked from the TVideoGrabber events that occur for video frames, like OnFrameProgress , OnFrameCaptureCompleted , OnMotionDetected , etc...

  • pass as the first parameter the FrameId parameter returned by the event,
  • pass as the second parameter the TFrameInfoId value corresponding to the desired information.

E.g.:

procedure TfrmMainForm.VideoGrabberFrameProgress(Sender: TObject; FrameNumber: Cardinal; FrameTime: Int64; FrameId: Integer);
begin
edtFrameCount.Text := 'frame: ' + IntToStr (FrameNumber)
+ ' dropped:' + IntToStr (VideoGrabber.GetFrameInfo (FrameId, fi_DroppedFrameCount))
+ ' time:' + Format ('%.2d:%.2d:%.2d %.2d', [VideoGrabber.GetFrameInfo (FrameId, fi_SampleTime_Hour),
VideoGrabber.GetFrameInfo (FrameId, fi_SampleTime_Min),
VideoGrabber.GetFrameInfo (FrameId, fi_SampleTime_Sec),
VideoGrabber.GetFrameInfo (FrameId, fi_SampleTime_Hs)]);
end;