[英]GPUImageMovieWriter starting new recording
Can i reuse an existing GPUImageMovieWriter
(after calling finishRecording
) or is there a method to pause and resume the recording? 我可以重用现有的GPUImageMovieWriter
(在调用finishRecording
),还是可以暂停和继续记录的方法?
I get error if i call startRecoding
after a finishRecording
. 如果在finishRecording
之后调用startRecoding
,则会收到错误消息。
Terminating app due to uncaught exception 'NSInternalInconsistencyException',
reason: '*** -[AVAssetWriter addInput:] Cannot call method when status is 2'
You can't call startRecording()
on the same movieWriter instance after calling finishRecording()
. 在调用finishRecording()
之后,不能在同一movieWriter实例上调用startRecording()
finishRecording()
。
finishRecording()
writes the completion block for the video into file, thus all subsequent frames added to the video file would be useless anyway. finishRecording()
将视频的完成块写入文件,因此添加到视频文件的所有后续帧无论如何都将无用。 If what you want to achieve is to pause recording for a bit and append video at the end again after pausing, you should probably create a "pause" state where you don't record, but simply measure the amount of time paused, and then use an adjusted frame time for when you resume recording again. 如果要实现的目的是暂停录制一点点,然后在暂停后再次添加视频,那么您可能应该创建一个“暂停”状态,不进行录制,而只需测量一下暂停的时间,然后重新调整录制时间时,请使用调整后的帧时间。
Cheers! 干杯! Vijay 维杰
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.