libArgus Flip IFaceDetect

I know I can flip the image with an NvVideoConverter, but this method seems to flip the image after the face detection is done. Is there a way to change the readout method using Argus?

My camera driver has horizontal/vertical flip V4L2 controls, can I access those through the CameraProvider object?

I tried just setting the ioctl using the v4l2 framework like below. But the camera gets reset when it’s getting initialized.

struct v4l2_control ctrl;

int fd = open("/dev/video0", O_RDWR | O_NONBLOCK);
if(fd < 0)
{
    perror("Failed to open /dev/video0\n");
    return EXIT_FAILURE;
}

ctrl.id = V4L2_CID_HFLIP;
ctrl.value = 1;
if(ioctl(fd, VIDIOC_S_CTRL, &ctrl))
{
    perror("Failed to set ioctl\n");
    return EXIT_FAILURE;
}

close(fd);

I managed to set the ioctl by sleeping long enough in the main thread for the consumer to get going.