Page 1 of 1

Problem using new DeviceType := rvdtUserData

Posted: Thu Feb 15, 2018 8:17 am
Hi Sergey,

Attached please find some sample code that demonstrates the problem with RVMedia. I am using DeviceType := rvdtUserData to write my own images to a video file. A file is written but the OnNewImage event of the MRVCamera is never called. I get a video with blank (black) images. Also fails to work with your new recording demo with the DeviceType set to rvdtUserData.

Thanks in advance,

John Sigoloff



procedure TForm4.StartButton(Sender: TObject);
begin
RVCamRecorder1.DeviceType := rvdtUserData
RVCamRecorder1.OnNewImage := RVCamera1NewImage
RVCamRecorder1.OutputFileName := Edit1.Text;
RVCamRecorder1.Active := True;
end;

procedure TForm4.StopButton(Sender: TObject);
begin
RVCamRecorder1.Active := False;
end;

procedure TForm4.RVCamera1NewImage(Sender: TObject; img: TRVMBitmap);
begin
img.Assign(Image2.Picture.Bitmap);
Showmessage('Never gets here !!')
end;

Re: Problem using new DeviceType := rvdtUserData

Posted: Thu Feb 15, 2018 8:28 am
-- CODE SHOULD READ --

procedure TForm4.StartClick(Sender: TObject);
begin
RVCamera1.DeviceType := rvdtUserData;
RVCamera1.OnNewImage := RVCamera1NewImage;
//
RVCamRecorder1.VideoSource := RVCamera1;
RVCamRecorder1.VideoCodec := rvvcMPEG4;
RVCamRecorder1.OutputFileName := Edit1.Text;
RVCamRecorder1.Active := True;
end;

procedure TForm4.StopClick(Sender: TObject);
begin
RVCamRecorder1.Active := False;
end;

procedure TForm4.RVCamera1NewImage(Sender: TObject; img: TRVMBitmap);
begin
img.Assign(Image2.Picture.Bitmap);
Showmessage('IT NEVER GETS HERE !!');
end;

Re: Problem using new DeviceType := rvdtUserData

Posted: Thu Feb 15, 2018 11:58 am
by Sergey Tkachenko
Start the camera, call PlayVideoStream method.