Directshow recording/preview problem

后端 未结 3 595
感情败类
感情败类 2021-01-20 01:53

I have a project where I need to record a video using DirectShow from a webcam, but I need to be able to stop recording while the preview continues to run.

I am usin

3条回答
  •  再見小時候
    2021-01-20 02:43

    If you can accept a momentary pause in preview when you start/stop recording and don't want to use something like a 2 graph GMFBridge approach, you can disconnect either the capture pin on the video capture source filter (assuming you are using separate preview and a capture pins from your source filter) or disconnect the File Writer chain portion of your capture sub-graph.

    The issue here is the filtergraph must be paused before changes can be made to its topology, so you'd need to:

    Pause Graph Disconnect or Reconnect File Writer chain Resume Graph

    In my experience the temporary pause is not very noticeable.

提交回复
热议问题