Directshow Preview Only and Capture & Preview with a single Graph

前端 未结 2 1320
抹茶落季
抹茶落季 2020-12-21 21:59

I have a Directshow application that needs to preview a webcam video, and when user clicks \'Record\' it needs to start capturing the video to a file.

To that end I

2条回答
  •  时光取名叫无心
    2020-12-21 22:52

    Filter graph can change state as a whole, you cannot run its part individually and separately.

    The easiest solution is to build preview graph separately, and when you need to start recording, stop/close preview graph and rebuild new capture graph. This certainly would involve a certain delay in response to "start recording" command.

    Another option is to use multiple graphs, share data between the two, in code or using "bridging", and start/stop graphs separately.

提交回复
热议问题