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;
Problem using new DeviceType := rvdtUserData
-
- Posts: 9
- Joined: Wed Jan 04, 2017 10:55 pm
-
- Posts: 9
- Joined: Wed Jan 04, 2017 10:55 pm
Re: Problem using new DeviceType := rvdtUserData
-- 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;
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;
-
- Site Admin
- Posts: 17555
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: Problem using new DeviceType := rvdtUserData
Start the camera, call PlayVideoStream method.