ARGUS calling setFramerate with max value on initialization

Hey guys,
I have the following problem when calling an ARGUS stream either from GStreamer or C++ API.

When I set my framerate to another value than the max value, it always first calls setFramerate with the max value in the device tree for frame_rate, and later on it calls setFramerate with the right value I gave to ARGUS.

This would not be a problem, but in my driver I handle it like this:
If setFramerate is set to a value too high for my exposure time, I reduce the exposure time to maximum possible with the given framerate. That way, my exposure time is reduced when framerate is to max value and later on not increased when set to the wanted framerate.

This leads to another problem, that v4l2 is not recognizing me reducing exposure. It still thinks exposure is the value from before.

So my 2 questions are:
Why is ARGUS handling framerate like this, is it intended or a bug and can it be fixed?
Is there a better way to handle framerate values outside of exposure range or exposure values outside of framerate range? Would you recommend handling it in my userspace application?

Did you call Argus::ISourceSettings::setFrameDurationRange() to set framerate?

EDIT: If you tell me, this is not intended and also not reproducable for you, I would make bigger effort to debug my driver if the problem is coming from there. But I would not know why the problem should be there, so I wanted to ask about this issue first.

Yes! This is my initialization:

void createInputStream(CameraDevice* cameraDevice, ICaptureSession *iCaptureSession){
    int sensor_mode = 1;
    int fps = 60;

    SensorMode* sensorMode = ArgusHelpers::getSensorMode(cameraDevice, sensor_mode);
    ISensorMode *iSensorMode = interface_cast<ISensorMode>(sensorMode);
    if (!iSensorMode)
        printf("Selected sensor mode not available");

    if (!iCaptureSession)
        printf("Failed to create CaptureSession");

    UniqueObj<OutputStreamSettings> streamSettings(
    IEGLOutputStreamSettings *iEGLStreamSettings =
    if (!iEGLStreamSettings)
        printf("Failed to create OutputStreamSettings");
    outputStream = UniqueObj<OutputStream>(iCaptureSession->createOutputStream(streamSettings.get()));

    // Create capture request and enable output stream.
    request = UniqueObj<Request>(iCaptureSession->createRequest());
    IRequest *iRequest = interface_cast<IRequest>(request);


    IAutoControlSettings* iAutoControlSettings =

    if (!iRequest)
        printf("Failed to create Request");

    // Set the sensor mode in the request.
    ISourceSettings *iSourceSettings = interface_cast<ISourceSettings>(request);
    if (!iSourceSettings)
        printf("Failed to get source settings request interface");






    Range<uint64_t> limitExposureTimeRange;
    Range<float> sensorModeAnalogGainRange;

    limitExposureTimeRange.min() = 16600000;
    limitExposureTimeRange.max() = 16600000;

    sensorModeAnalogGainRange.min() = 15.5;
    sensorModeAnalogGainRange.max() = 15.5;



    m_inputStream = outputStream.get();

    Argus::Status status;
    status = iCaptureSession->repeat(request.get());

Could you check argus_camera set frame range from GUI after launch camera if have the same problem.

Sorry, I have never worked with argus_camera. Always GStreamer.

Do I need to compile it first? Do I need to have X-Server and gmd3 running? (since you said GUI)
Any way to achieve this with console application?

It’s multimedia API sample code and yes need run on X-server.
I think your driver should reduce the exposure when framerate is max value. Instead you can set the exposure range to limit the exposure as your request.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.