Page 1 of 1

Changing RVCamView source while streaming

Posted: Sat Aug 26, 2017 2:29 pm
by RogerioUK
I am trying to use a RVCamView in the configuration window of my system so the user can preview the image of each camera while selecting one

Configuracao.png
Configuracao.png (11.8 KiB) Viewed 22566 times

The problem is:

If I change the camera with the Mostrar Imagem checkbox checked, the stream stops and don´t restart.
If I uncheck the checkbox, change the camera and check the checkbox the stream start.
I believe is a timing problem and I would prefer not to force the user stop the preview streaming before change the camera.

Is there a solution for this behavior ?

obs. The extra parameter in the CamListLoader.Select prevents the procedure to execute RunCamera if it is false.

The OnChange event of the Camera dropbox contain

Code: Select all

  if ckMostraImagem.Checked then begin
    RVCamera.Abort;
    RVCamera.WaitForVideo
  end;
  
  CamListLoader.Select(cmbCameras.ItemIndex, RVCamera,False);
  
  if ckMostraImagem.Checked then begin
    RVCamera.PlayVideoStream;
  end;
and the checkbox OnClick event contains

Code: Select all

  if ckMostraImagem.Checked then begin
    RVCamera.PlayVideoStream;
  end
  else begin
    RVCamera.Abort;
    RVCamera.WaitForVideo
  end

Re: Changing RVCamView source while streaming

Posted: Sun Aug 27, 2017 10:13 am
by Sergey Tkachenko
First question: which kind of cameras? If this is IP camera specified by CameraHost:CameraPort, you need to call SearchCamera, and call PlayVideoStream when the search is finished.

Re: Changing RVCamView source while streaming

Posted: Sun Aug 27, 2017 3:35 pm
by RogerioUK
The two cameras I am using are webcam.

Re: Changing RVCamView source while streaming

Posted: Mon Aug 28, 2017 5:57 pm
by Sergey Tkachenko
Can you create a simple project reproducing this problem and send its source code to me (or attach to the forum)

Re: Changing RVCamView source while streaming

Posted: Thu Aug 31, 2017 12:29 pm
by RogerioUK
Here is the example project.

Having two webcam in the computer, first let's try what work.

1. Select first camera
2. Check the preview checkbox (the image is displayed)
3. Uncheck the preview
4. Select second camera
5. Check the preview and the image is displayed.

You can continue with this process and it work everytime

Now let's try what NOT work.

1. Select first camera
2. Check the preview checkbox (the image is displayed)
3. Select second camera. The code uncheck the preview, change the camera and recheck the preview but the image don´t display.

Re: Changing RVCamView source while streaming

Posted: Thu Nov 02, 2017 10:26 pm
by Sergey Tkachenko
This problem is fixed in RVMedia 5.2 BETA (available for registered users)