Libargus: strange behaviour when setting the frame rate for a camera device

Hi,

I’m reading from a camera device using the libargus way. By default, this camera delivers frames at 30 fps, but I want to change it to 15. For that I’m doing the following call.
iSourceSettings->setFrameDurationRange(Range<uint64_t>(66666666, 66666666)

To see what happens at the camera driver level, I’ve added some printf in the callback “set_frame_rate” of the “tegracam_ctrl_ops”, which is the function that gets called whenever the frame rate is changed (the one that sends the proper I2C to the camera). With those printf I see the log below:

[ 445.208584] set_frame_rate: value=26
[ 445.238118] set_frame_rate: value=19
[ 445.272300] set_frame_rate: value=15
[ 445.495146] set_frame_rate: value=14
[ 445.616664] set_frame_rate: value=12

So, according to that log, the framerate doesn’t change in one step to 15 fps as expected, and also the final value is 12 instead of 15. Does anyone know why this could be happening?
If I run the “argus_camera” application with the same camera, and change the frame rate there I see only one call to the same driver function as expected.
[ 1862.277649] set_frame_rate: value=15

In addition to that question, is there any way in libargus to know when the camera has been started, I mean, to know if the camera driver function “start_streaming()” of the structure camera_common_sensor_ops has been called?

Thanks

May I know which Jetson platform and JetPack version you’re using?

Hi kayccc,

Platform is AGX Xavier and JetPack 4.3.

For the frame rate it could be the AE alg adjust it.
Could you try to disable AE to try? You can run the argus_camera APP, there’s a UI checkbox to disable it.

The start_streaming() was not public API it was package it the capture class.

hi ShaneCCC,

After setting AE lock to true I don’t see any more that variation in the frame rate. Thanks for that. However, it sticks to 30 fps even though I try to change it to 15 with the setFrameDurationRange() function. Thanks to these printfs in the driver I see that the function to change the frame rate there is called only once and with the value 30.