对于 Windows.Media.Capture.MediaCapture,我们能否指定一个大小限制以便触发此事件 (RecordLimitationExceededEventHandler) 并停止录制?
如果不是,监控文件大小的正确方法是什么。
谢谢!
最佳答案
来自 MSDN :
If an app receives a RecordLimitationExceeded event, it is expected to finalize the file it is recording. If it does not finalize, the capture engine will stop sending samples to the file that the app was recording to.
In Windows 8, the current record limit is three hours.
所以平台会为你发起这个事件。
如果您对限制文件大小感兴趣,FileSystemWatcher MSDN page 上有一个很好的示例了解如何监视对文件的更改。查找 Changed
事件,并检查 ChangeType
参数。
关于c# - Windows 运行时 API : MediaCapture how to limit recording file size,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29982153/