Under aarch64-linux, I have a problem with the RVCamera1GetImage event
Posted: Wed Jun 24, 2026 5:28 am
Under aarch64-linux, I have a problem with the RVCamera1GetImage event. I use a USB camera to record video and want to add a watermark. The code (drawing text on the bitmap in OnGetImage) works fine on Windows, but on aarch64-linux, when I include the watermark code, the USB camera cannot be opened and the record button does nothing. It may even cause a SIGSEGV. How should I handle this? Thank you!
Code: Select all
procedure TForm1.RVCamera1GetImage(Sender: TObject; img: TRVMBitmap);
var
bmp: TBitmap;
S: String;
Sz: TSize; //Types
DANWEIMC: string;
begin
if CheckBox_shijiancuo.Checked then
begin
bmp := img.GetBitmap;
with bmp.Canvas do
begin
Lock;
try
DANWEIMC := 'XXX';
Brush.Style := bsClear;
Font.PixelsPerInch := 96;
Font.Name := 'Tahoma';
// Font.Color := clRed;
Font.Color := clWhite;
Font.Size := 12;
// S := TimeToStr(Now); //DateTimeToStr
S := DANWEIMC + ' ' + DateTimeToStr(Now);
// DateTimeToStr\DateTimeToString
Sz := TextExtent(S);
TextOut(bmp.Width - Sz.cx - 2, bmp.Height - Sz.cy - 2, S);
finally
Unlock;
end;
end;
img.UpdateData;
end;
end;