Forums - gstreamer access to the RB5 cameras

7 posts / 0 new
Last post
gstreamer access to the RB5 cameras
era_1
Join Date: 24 Sep 20
Posts: 6
Posted: Thu, 2020-09-24 02:22

Hi there.

I am having problems getting started with the cameras in the Vision mezzanine board.

I have a freshly installed firmware image (using the SDK manager), and I am trying to run the gst-launch-1.0 examples in the sofware reference manual. So far, all my attempts at running the first two examples, which access the cameras, end with this error (when using --gst-debug-level=1):

GBM_INFO::msmgbm_mapper(137)::gbm mapper instantiated
 
gbm_create_device(156): Info: backend name is: msm_drm
Setting pipeline to PAUSED ...
0:00:00.117353177  1664   0x559742e960 ERROR             qtiqmmfsrc qmmf_source_context.cc:865:gst_qmmf_context_open: QMMF Recorder StartCamera Failed!
0:00:00.117458437  1664   0x559742e960 ERROR             qtiqmmfsrc qmmf_source.c:543:qmmfsrc_change_state:<qmmf> Failed to Open!
ERROR: Pipeline doesn't want to pause.
Setting pipeline to NULL ...
Freeing pipeline ...
qmmf-server seems to be running normally according to system-ctl status, but when I run qmmf_camera_adaptor_gtest, all the test fail. I have tried to find out if any of the DIP switches in the vision board has an effect on the cameras, but so far I have not found any documentation about those switches.
 
Any idea on what could be going on?
 

 

  • Up0
  • Down0
mistry Moderator
Join Date: 18 Apr 18
Posts: 56
Posted: Thu, 2020-09-24 22:00

Hi Era,

We are looking into this and trying to provide more clarity in the software manual.
Meanwhile, can you please try to start the Weston Desktop and then test out the Gstreamer commands?
To enable Weston Client on HDMI, please try the following commands:

sh-4.4# mkdir -p /usr/bin/weston_socket
sh-4.4# export XDG_RUNTIME_DIR=/usr/bin/weston_socket
sh-4.4# weston --tty=1 --connector=29
 
You can also check camx test command to test the camera's connected.
Run the following commands: 
 
sh-4.4# camx-hal3-test
>>A:id=0,psize=1920x1080,pformat=yuv420,ssize=1920x1080,sformat=jpeg,zsl=1
>>P:1
>>s:1
>>Q
 
This will save the sample images in /data/misc/camera
You can see these images on Weston desktop using this command:
 
sh-4.4# weston-image /data/misc/camera/snapshot*<filename>
Hope this helps.
Best Regards,
  • Up0
  • Down0
era_1
Join Date: 24 Sep 20
Posts: 6
Posted: Tue, 2020-09-29 10:59
The camx-hal3-test commands worked. It generated an snapshot, and I could verify that the camera is working.
 
Unfortunately, running the gst-launch-1.0 examples from the Weston Desktop did not help; it generates the same error. Is it possible to use the Video For Linux gstreamer plugin (v4l2src) instead of qtiqmmfsrc to access the cameras? If so, some example of that in the documentation would be really useful.
 
Thanks a lot for the suggestions,
 
Enrique.
 
  • Up0
  • Down0
era_1
Join Date: 24 Sep 20
Posts: 6
Posted: Wed, 2020-09-30 07:44

A quick update:

The first two gst-launch-1.0 video capture examples now work perfectly, after reflashing the kit with the latest version of the firmware (QRB5165.1.0.0-200924) using the latest version of the SDK Manager (1.0.1).

I was using QRB5165.1.0.0-200731 before, when I was getting the errors. 

Enrique.

 

  • Up0
  • Down0
mistry Moderator
Join Date: 18 Apr 18
Posts: 56
Posted: Wed, 2020-09-30 13:03
Hi Enrique, Thanks for the update.
  • Up0
  • Down0
mistry Moderator
Join Date: 18 Apr 18
Posts: 56
Posted: Wed, 2020-10-07 09:16

Hi Enrique,

Glad the gstreamer plugin examples are working now. You had asked if V4L2 can be used directly instead of qtiqmmfsrc.

Here is an example GST command to get USB camera stream using V4L2:

gst-launch-1.0 v4l2src device=/dev/video2 ! waylandsink async=true

Hope this helps.

Rajan.

  • Up0
  • Down0
abhishek.u
Join Date: 5 Sep 22
Posts: 1
Posted: Mon, 2022-09-05 22:08

Hi QC/Ranjan,
Could you please let me know, can I use qmmfsrc to support usbcamera instead of V4L2src? If yes then how can I proceed?

Thanks.

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.