Directshow Preview Only and Capture & Preview with a single Graph

前端 未结 2 1307
抹茶落季
抹茶落季 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.

    0 讨论(0)
  • 2020-12-21 23:03

    You can try to switch between two different graphs:

    1) First simple graph, than user just watch

    2) Second complex graph, than user watch and record simultaneously

    0 讨论(0)
自定义标题
段落格式
字体
字号
代码语言
提交回复
热议问题