[aravis] Re: Does the aravis GStreamer plugin implement a GstDeviceProvider and register it?

  • From: Matthew Thyer <matthew.thyer@xxxxxxxxxxxxxxx>
  • To: "aravis@xxxxxxxxxxxxx" <aravis@xxxxxxxxxxxxx>
  • Date: Wed, 12 Sep 2018 00:02:36 +0000

Thanks Emmanuel,

I think that providing a GstDeviceProvider implementation in the Aravis 
GStreamer plugin will be the only way that I can programmatically validate the 
user specified GStreamer pixel format. Is there another method?
I’ve abandoned my validation attempts for now but advised my end users to:

  *   Consult the Enumeration: 'PixelFormat' in the output of: “arv-tool 
features” to understand that capabilities of the camera
  *   Examine the Aravis arvenums.h header to see what Pixel formats Aravis 
implements
  *   Use the Gst utility method arv_pixel_format_to_gst_caps_string() that 
Aravis provides to convert Aravis pixel format magic numbers into GStreamer 
capability strings
The problem with this approach is that I can’t find a reliable way of mapping 
the Enumeration: 'PixelFormat' strings to the Aravis pixel format names as seen 
in the arvenums.h header.
Do you have any advice for this?

It was through trial and error that I stumbled upon “UYVY” as a working 
GStreamer pixel format.
Maybe I should just be trying to use the default camera pixel format (BayerRG8) 
and simply not specify a pixel format with GStreamer (i.e. let videoconvert do 
it’s magic).

My current GStreamer launch pipeline for the GStreamer RTSP server is:
aravissrc ! capsfilter 
caps=video/x-raw,format=(string)UYVY,width=1280,height=1024,framerate=(fraction)90/1
 ! queue ! videoconvert ! vaapih264enc ! capsfilter 
caps=video/x-h264,profile=high ! rtph264pay name=pay0 pt=96

Matt

From: aravis-bounce@xxxxxxxxxxxxx <aravis-bounce@xxxxxxxxxxxxx> On Behalf Of 
Emmanuel Pacaud
Sent: Tuesday, 11 September 2018 10:09 PM
To: aravis@xxxxxxxxxxxxx
Subject: [aravis] Re: Does the aravis GStreamer plugin implement a 
GstDeviceProvider and register it?

Hi Matthew,

Le lun. 3 sept. 2018 à 2:35, Matthew Thyer 
<matthew.thyer@xxxxxxxxxxxxxxx<mailto:matthew.thyer@xxxxxxxxxxxxxxx>> a écrit :

I’m now trying to validate whether a user supplied FOURCC is valid for the 
camera but this seems to rely on the aravis plugin including a 
GstDeviceProvider and registering it. You can see why this is required from 
GStreamer-devel mailing list message:  
https://lists.freedesktop.org/archives/gstreamer-devel/2018-August/069054.html

So far I have tried to query the device using the commandline 
gst-device-monitor-1.0 as follows but I cannot get the camera to appear:
$ gst-device-monitor-1.0 
--gst-plugin-path=/usr/local/aravis-0.5/lib/gstreamer-1.0 
--gst-plugin-load=aravis --follow

I am able to successfully query the camera with arv-tool-0.6:
$ /usr/local/aravis-0.5/bin/arv-tool-0.6
PointGrey-0115138B (USB3)

The Gstreamer plugin bundled in aravis is quite simple, and does not support 
device discovery.

A simple pipeline would be:

gst-launch-1.0 aravissrc camera-name="PointGrey-0115138B" ! videoconvert ! 
xvimagesink

You can check which pixel format are supported by your camera using:

arv-tool --name="PointGrey-0115138B" control PixelFormat

The correspondance between aravis pixel formats and GStreamer formats are 
unfortunately only available in aravis sources:

https://github.com/AravisProject/aravis/blob/9d21cda6499ab49ba10a6a0cbb3b317149b70b33/src/arvmisc.c#L590-L687

Cheers,

Emmanuel.

Other related posts: