Memory High on RVMedia

RVMedia support and discussion (components for displaying and controlling IP cameras, webcams, video conferencing, video chats, recording audio and video files)
Post Reply
cueiogordo
Posts: 4
Joined: Wed Apr 13, 2022 7:03 pm

Memory High on RVMedia

Post by cueiogordo »

I use RVMedia to make a stream and capture the image with GetCurrentImage and put it in a TIMAGE.
When performing the process, the system increases the memory. Using ReportMemoryLeaksOnShutdown := True;, returns the attached image.
If I don't use the process, no error happens.
Attachments
ErroRVMedia.png
ErroRVMedia.png (11.33 KiB) Viewed 20511 times
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Memory High on RVMedia

Post by Sergey Tkachenko »

You should use one of two methods to get the image:
1. RVCamera.GetSnapShot. In this case, you must free the returned object yourself.
2. In RVCamera.OnGetImage, use Img parameter. Do not free Img, but do not use it outside this event (copy to your image)
cueiogordo
Posts: 4
Joined: Wed Apr 13, 2022 7:03 pm

Re: Memory High on RVMedia

Post by cueiogordo »

Good Morning
Solved problem.

Grateful

var ImageWrapper: TRVImageWrapper;
begin

try
ImageWrapper := RVCamera.GetSnapShot;
Image.Picture.Graphic := ImageWrapper.Bitmap.GetBitmap;
ImageWrapper.Free;
EXCEPT
end;
Post Reply