How to set the exposure time range or gain range with nvarguscamerasrc and make it effective immediately


I am using the gstreamer pipeline to capture images from a CSI camera, and I want to change the camera controls in runtime and make the modification effective immediately.

However, I find that the image is still captured using the previous camera controls after I set the new camera controls such as exposure time range and gain range in the nvarguscamerasrc element of the gstreamer pipeline.

Only after a certain period of time, the image is captured using the new parameters. If the frame rate is set to 30 fps, the wrong captured images flow usually lasts 5-10 frames.

Here is the code of modifying camera controls:

gst_element_set_state(pipeline_, GST_STATE_PAUSED);
g_object_set(G_OBJECT(element_nv), “exposuretimerange”, “1000000 1000000”, NULL);
g_object_set(G_OBJECT(element_nv), “gainrange”, “5 5”, NULL);
gst_element_set_state(pipeline_, GST_STATE_PLAYING);

5 - 6 frames is current design.

Is there any way I can get the exact exposure time of the image taken ? By doing so , I can tell which image is taken under which exposure time parameter.

Sorry to tell current argus and the AE alg need few frame to take effect.

well, I could get the the exposure time range which is set in the nvarguscamerasrc plugin now, and i want to know the exact value of the exposure time not the range value when some image is captured. Is there any way I can do that? Or the argus doesn’t support this operation now?

There’s no this API for current release, sorry.
But I think you can get it from the v4l2 interface like v4l2-ctl do.

Thanks for your reply, and I will try it.