Redirect video to TImage

RVMedia support and discussion (components for displaying and controlling IP cameras, webcams, video conferencing, video chats, recording audio and video files)
Post Reply
CharleIII
Posts: 1
Joined: Tue Oct 11, 2022 7:45 am

Redirect video to TImage

Post 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
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Redirect video to TImage

Post 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.
Post Reply