Nvarguscamerasrc available resolutions

How can I get available resolutions/framerates for the currently connected CSI camera using gstreamer API? With v4l2src I can just query caps for src pad when stream is ready. But nvarguscamerasrc returns no caps in this case.

Also I see that I can set sensor-mode but how can I get details about available modes?

Hi,
All sensor modes are printed when you execute the gstreamer command:

nvidia@nvidia-desktop:~$ gst-launch-1.0 nvarguscamerasrc ! nvoverlaysink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected...
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 2592 x 1944 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 16.000000; Exposure Range min 34000, max 550385000;

GST_ARGUS: 2592 x 1458 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 16.000000; Exposure Range min 34000, max 550385000;

GST_ARGUS: 1280 x 720 FR = 120.000005 fps Duration = 8333333 ; Analog Gain range min 1.000000, max 16.000000; Exposure Range min 22000, max 358733000;

GST_ARGUS: Running with following settings:
   Camera index = 0
   Camera mode  = 1
   Output Stream W = 2592 H = 1458
   seconds to Run    = 0
   Frame Rate = 29.999999
GST_ARGUS: PowerService: requested_clock_Hz=27216000
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.

I’m trying to make some kind of frontend for nvarguscamerasrc and therefore need to access this values programatically. I can’t just parse log output.

What I’m trying to do now actually is

  • create nvarguscamerasrc element with gst_element_factory_make
  • set it to ready state
  • wait a bit
  • call gst_pad_query_caps to get available resolutions. But result is empty.

It works for USB cameras and v4l2src but does not work for CSI cameras and nvarguscamerasrc for some reason.

Hi,
In nvarguscamerasrc, the sensor mode is automatically selected according to caps of source pad. If you would like to set the sensor mode, you can use sensor-mode property:

  sensor-mode         : Set the camera sensor mode to use. Default -1 (Select the best match)
                        flags: readable, writable
                        Integer. Range: -1 - 255 Default: -1

If the behavior does not meet your usecase. You may consider to upgrade to r32.4.2. We have nvarguscamerasrc open source in the release.
https://developer.nvidia.com/embedded/L4T/r32_Release_v4.2/Sources/T186/public_sources.tbz2
https://developer.nvidia.com/embedded/L4T/r32_Release_v4.2/Sources/T210/public_sources.tbz2

I would like to get all the available caps before setting the caps of source pad.

Hi,

Please check above comment to download the source code of nvarguscamerasrc and build/run it.