techyian / MMALSharp

C# wrapper to Broadcom's MMAL with an API to the Raspberry Pi camera.
MIT License
195 stars 33 forks source link

MMALCameraConfig.IntraPeriod not working? #207

Open tottaka opened 1 year ago

tottaka commented 1 year ago

Hi, I am trying to detect when an i-frame is inserted in my custom OutputCaptureHandler class like so:

public override void Process(ImageContext context)
{
    if (context.IFrame)
    {
        Console.WriteLine("IFrame");
    }

    base.Process(context);
}

It seems to only Console.WriteLine on the very first frame, none after that.

I have MMALCameraConfig.IntraPeriod set to 24, which is the same as the video capture framerate so it should be printing every 1 second, no?