Changing RVCamView source while streaming

RVMedia support and discussion (components for displaying and controlling IP cameras, webcams, video conferencing, video chats, recording audio and video files)
Post Reply
RogerioUK
Posts: 7
Joined: Mon May 02, 2016 2:39 pm
Location: Brazil

Changing RVCamView source while streaming

Post 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 28066 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
Sergey Tkachenko
Site Admin
Posts: 17579
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Changing RVCamView source while streaming

Post 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.
RogerioUK
Posts: 7
Joined: Mon May 02, 2016 2:39 pm
Location: Brazil

Re: Changing RVCamView source while streaming

Post by RogerioUK »

The two cameras I am using are webcam.
Sergey Tkachenko
Site Admin
Posts: 17579
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Changing RVCamView source while streaming

Post by Sergey Tkachenko »

Can you create a simple project reproducing this problem and send its source code to me (or attach to the forum)
RogerioUK
Posts: 7
Joined: Mon May 02, 2016 2:39 pm
Location: Brazil

Re: Changing RVCamView source while streaming

Post 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.
Attachments
Main.zip
(15.27 KiB) Downloaded 1801 times
Sergey Tkachenko
Site Admin
Posts: 17579
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Changing RVCamView source while streaming

Post by Sergey Tkachenko »

This problem is fixed in RVMedia 5.2 BETA (available for registered users)
Post Reply