Page 1 of 1

RVCamera doesn't show video if VideoDeviceIndex is set and SetCamVideoMode(0) is called before PlayVideoStream

Posted: Sat Jul 25, 2020 1:56 pm
by ya_vanka
Found an issue with RVCamera.

In my project I should set RVCamera.VideoDeviceIndex and call RVCamera.SetCamVideoMode() just before RVCamera.PlayVideoStream.

The issue is that if I pass 0 to RVCamera.SetCamVideoMode() then video is not shown (and RVCameraGetImage() is not being called). If I pass any other value (> 0) then everything is ok.
This issue appeared in version 7. In version 6 there was no such a problem.

You can reproduce the issue by adding two lines in procedure TfrmMain.btnOnClick of the demo project "WebCamera":

Code: Select all

procedure TfrmMain.btnOnClick(Sender: TObject);
begin
  RVCamera1.VideoDeviceIndex := cmbCamera.ItemIndex;
  RVCamera1.SetCamVideoMode(cmbVideoResolution.ItemIndex);

  RVCamera1.PlayVideoStream;
end;
Could you please fix the issue.

Re: RVCamera doesn't show video if VideoDeviceIndex is set and SetCamVideoMode(0) is called before PlayVideoStream

Posted: Tue Jul 28, 2020 6:54 am
by ya_vanka
Have you reproduced the issue?

Re: RVCamera doesn't show video if VideoDeviceIndex is set and SetCamVideoMode(0) is called before PlayVideoStream

Posted: Tue Jul 28, 2020 8:02 pm
by Sergey Tkachenko
Sorry, not yet. I'll check it tomorrow.

Re: RVCamera doesn't show video if VideoDeviceIndex is set and SetCamVideoMode(0) is called before PlayVideoStream

Posted: Wed Jul 29, 2020 7:03 pm
by Sergey Tkachenko
It looks like the problem occurs when you call SetCamVideoMode with the parameter equal to GetCamVideoModeIndex.
It can be reproduced in the original webcam demo by choosing a video mode in the combo box that is already selected.
While it can easily be fixed by checking for this case, I am still trying to understand why it happens...

Re: RVCamera doesn't show video if VideoDeviceIndex is set and SetCamVideoMode(0) is called before PlayVideoStream

Posted: Wed Aug 12, 2020 12:15 pm
by Sergey Tkachenko
Fixed in RVMedia 7.5

Re: RVCamera doesn't show video if VideoDeviceIndex is set and SetCamVideoMode(0) is called before PlayVideoStream

Posted: Thu Aug 13, 2020 10:50 am
by ya_vanka
Great!
Going to upgrade and test.