I'm trying to use MediaFrameReader (based on this article) in order to receive a stream of frames from the camera and process them. However, I get a strange behavior: the camera is defined as 30 fps, so I would expects each frame to arrive at 33 milliseconds, right? instead, most of them actually arrive at 31 milliseconds, when every once in a while I get a slow frame that is about 45 milliseconds. Sure, it averges out to exactly 30 frames per seconds, but the frames themselves are inconsistent.
I understand that for most use cases it might not be a big deal, however, my processing require accurate frame speed. I could "flatten the curve" myself using a queue, of course, but this seems backwards. Also, I would suspect this might cause data corruption. Any idea how should I resolve this strange behavior?