Problem using new DeviceType := rvdtUserData

New product: VCL components for displaying and controlling IP cameras, webcams, video conferencing, video chats
Post Reply
john_siggy@yahoo.com
Posts: 9
Joined: Wed Jan 04, 2017 10:55 pm

Problem using new DeviceType := rvdtUserData

Post by john_siggy@yahoo.com » 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;

john_siggy@yahoo.com
Posts: 9
Joined: Wed Jan 04, 2017 10:55 pm

Re: Problem using new DeviceType := rvdtUserData

Post by john_siggy@yahoo.com » 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;

Sergey Tkachenko
Site Admin
Posts: 13936
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Problem using new DeviceType := rvdtUserData

Post by Sergey Tkachenko » Thu Feb 15, 2018 11:58 am

Start the camera, call PlayVideoStream method.

Post Reply