Hi, I’m trying to load the Aravis as an element through the Gstreamer API, rather than using it as a plugin through gst-launch-1.0. Is this supported?
I am able to get Aravis to work as a plugin to my FLIR Blackfly S camera using the following:
gst-launch-1.0 aravissrc camera-name="Point Grey Research-20373903" packet-size=9000 packet-delay=1000 features="PixelFormat=BayerRG8" ! bayer2rgb ! videoconvert ! x264enc ! flvmux ! filesink location=out.flv
After I run that pipeline, I run
arv-tool-0.8 control featurename
and confirm that the features are properly set in the camera register. (i.e. GevSCPSPacketSize = 9000, as expected)
However, when I load aravis as a source element in Gstreamer, it doesn’t negotiate and capture any video. Also arv-tool-0.8 shows that none of the features were set in the camera.
As a sanity check, I confirmed that I am setting the GObject properties correctly, but for some reason, it’s not making it to the camera.
Here’s what my gstreamer code looks like:
//create Element
GstElement* src_elem = gst_element_factory_make("aravissrc", "src_elem");
//write properties of element
g_object_set(G_OBJECT(src_elem), "camera-name", "Point Grey Research-20373903", NULL);
g_object_set(G_OBJECT(src_elem), "packet-size", 9000, NULL);
g_object_set(G_OBJECT(src_elem), "packet-delay", 1400, NULL);
g_object_set(G_OBJECT(src_elem), "features", "PixelFormat='BayerRG8'", NULL);
//check after writing
gchar *val_camera_name;
gint val_packet_size;
gint64 val_packet_delay;
gchar *val_features;
g_object_get(G_OBJECT(bin->src_elem),
"camera-name", &val_camera_name,
"packet-size", &val_packet_size,
"packet-delay", &val_packet_delay,
"features", &val_features,
NULL);
NVGSTDS_INFO_MSG_V("camera-name: %s, packet-size: %d, packet-delay: %ld, features: %s", val_camera_name, val_packet_size, val_packet_delay, val_features);
Am I missing something? Is this not the correct way to load aravis as an element? Is this the wrong way to set the properties?
Thank you for your help!