Problem using new DeviceType := rvdtUserData

RVMedia support and discussion (components for displaying and controlling IP cameras, webcams, video conferencing, video chats, recording audio and video files)
Post Reply
[email protected]
Posts: 9
Joined: Wed Jan 04, 2017 10:55 pm

Problem using new DeviceType := rvdtUserData

Post by [email protected] »

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;
[email protected]
Posts: 9
Joined: Wed Jan 04, 2017 10:55 pm

Re: Problem using new DeviceType := rvdtUserData

Post by [email protected] »

-- 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: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Problem using new DeviceType := rvdtUserData

Post by Sergey Tkachenko »

Start the camera, call PlayVideoStream method.
Post Reply