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.
Memory High on RVMedia
-
- Posts: 4
- Joined: Wed Apr 13, 2022 7:03 pm
Memory High on RVMedia
- Attachments
-
- ErroRVMedia.png (11.33 KiB) Viewed 20390 times
-
- Site Admin
- Posts: 17520
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: Memory High on RVMedia
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)
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)
-
- Posts: 4
- Joined: Wed Apr 13, 2022 7:03 pm
Re: Memory High on RVMedia
Good Morning
Solved problem.
Grateful
var ImageWrapper: TRVImageWrapper;
begin
try
ImageWrapper := RVCamera.GetSnapShot;
Image.Picture.Graphic := ImageWrapper.Bitmap.GetBitmap;
ImageWrapper.Free;
EXCEPT
end;
Solved problem.
Grateful
var ImageWrapper: TRVImageWrapper;
begin
try
ImageWrapper := RVCamera.GetSnapShot;
Image.Picture.Graphic := ImageWrapper.Bitmap.GetBitmap;
ImageWrapper.Free;
EXCEPT
end;