Pause/Resume limitations

The VideoCapture.pause() and VideoCapture.resume() methods has some limitations. On macOS and Linux they are not implemented at all. On Windows, we implemented this feature using the IMediaControl::Pause() method. After some time we faced an issue with this feature.

In case of capturing from a live source (e.g. microphone or webcam) the DirectShow filter can hang after several subsequent calls of the Pause/Resume() methods. We investigated this issue and didn’t found any stable solution for it. The fact is that the IMediaControl::Pause() was intended for pausing of the playback devices. In case of live sources, it has the issues related to incorrect timestamp calculation for the media sample.

Therefore, we marked the VideoCapture.pause() method as deprecated and do not recommend that you use it. It can be deleted in one of the next versions.