TX1 gstreamer and nvcamerasrc manual white balance

I’m trying to run gstreamer with nvcamerasrc using manual white balance with the onboard camera on the TX1 board, but keep getting "could not set property “wbGains” in element nvcamerasrc0 error message? The docs say wbGains should be a GArray type, but I’m not sure the format wbGains need to be in on the command line, here is what I’ve been trying:

gst-launch-1.0 nvcamerasrc wbmode=9 wbManualMode=3 wbGains=“1.0 1.0 1.0 1.0” sensor-id=0 ! 'video/xraw(memory:NVMM), width=(int)1920, height=(int)1080, framerate=30/1, format=(string)NV12 ! nvvidconv flip-method=2 ! nvoverlaysink -ev

The wbmode=9 should set me in manual mode and the wbManualMode=3 should put me at external coefficients, but the wbGains=“1.0 1.0 1.0 1.0” must be in the wrong format.

Note: the wbGains parameter works in nvgstcapture-1.0, so the mode should be supported by the camera.

Appreciate the help.

Hi mpminn,
Not sure but it looks not possible to put GArray in the command line. Wish other users can share experience.

Please refer to source of nvgstcapture-1.0 in

Here is also a sample from @dk1900 to launch a command line

The following pseudo code should work

gst_pipeline  = (GstPipeline*) gst_parse_launch(launch_string.c_str(), &error);
GstElement *camerasource = gst_bin_get_by_name(GST_BIN(gst_pipeline), "NAME_OF_nvcamerasrc");
array = g_array_new (FALSE, FALSE, sizeof(gfloat));
g_array_append_val (array, 1.0);
g_array_append_val (array, 1.0);
g_array_append_val (array, 1.0);
g_array_append_val (array, 1.0);
g_object_set (G_OBJECT (camerasource), "wbGains", array, NULL);
g_array_free (array, FALSE);
gst_element_set_state((GstElement*)gst_pipeline, GST_STATE_PLAYING);