如何限制项目 grafika 圆形连续摄像​​机的最大秒数?

how to limit project grafika circular continuous camera recorder maximum seconds?

我们可以设置一个 MAX_LENGTH 值。 该值大约限制了录音。有时它可以达到两倍。 所以假设我将 MAX_LENGTH 的值设置为 15 然后启动应用程序并开始录制有时它会超过该限制并达到 30! 那个限制机制被打破了.. 有办法硬限制它,所以它永远不会超过 MAX_LENGTH 吗? 谢谢

第一个

Grafika 是实验性的,没有任何支持。来自自述文件:

It's not stable.

It's not polished or well tested. Expect the UI to be ugly and awkward.

It's not intended as a demonstration of the proper way to do things. The code may handle edge cases poorly or not at all. Logging is often left enabled at a moderately verbose level.

It's barely documented.

It's generally just not supported.

第二

code comment本身指定FPS可以可变:

Opens a camera, and attempts to establish preview mode at the specified width and height.

Sets mCameraPreviewFps to the expected frame rate (which might actually be variable).

源代码https://github.com/google/grafika/blob/master/src/com/android/grafika/ContinuousCaptureActivity.java