Page 1 of 1

Redirect video to TImage

Posted: Tue Oct 11, 2022 8:42 am
by CharleIII
Hi,
I am using Trial version for RVMedia, i can connect to IP Camera and i want to display video in the TImage (because i use some routines to make facial recognition wich use TImage).
Did the RVMedia comonents have a similar object like TImage ? if not how can i redirect the video to the TImage ?
If i can i do this is it programaticly safe ?
I am open for any suggestion.
An example can be very helpful.
Thank's
Charle

Re: Redirect video to TImage

Posted: Tue Oct 11, 2022 2:04 pm
by Sergey Tkachenko
You can use OnGetImage event:

Code: Select all

uses MRVBitmap;
procedure TfrmMain.RVCamera1GetImage(Sender: TObject; img: TRVMBitmap);
begin
  if Image1 <> nil then
    Image1.Picture.Bitmap := img.GetBitmap;
end;
Please be careful, this event is called in a thread context. It looks like this assignment works ok in a thread context, but if you execute other code, it may require a context of the main process. It can be implemented using PostMessage or a timer. Let me know if you need more information.