Windows Dev Intro - Using a Capture Device for Media Foundation

来源:互联网 发布:node request cookie 编辑:程序博客网 时间:2024/06/06 21:55


https://msdn.microsoft.com/en-us/library/windows/desktop/dd317912(v=vs.85).aspx


Using a Capture Device

After you create the media source for a capture device, use the Source Reader to get data from the device. The Source Reader delivers media samples that contain the capture audio data or video frames. The next step depends on your application scenario:

  • Video preview: Use Microsoft Direct3D or Direct2D to display the video.
  • File capture: Use the Sink Writer to encode the file.
  • Audio preview: Use WASAPI.

If you want to combine audio capture with video capture, use the aggregate media source. The aggregate media source contains a collection of media sources and combines all of their streams into a single media source object. To create an instance of the aggregate media source, call the MFCreateAggregateSource function.


0 0
原创粉丝点击