Using Capture Device as a Media Source

I am trying to build an application that uses the AUX input as the Media Source.

I can enumerate the capture devices just fine. But I want to use the capture device stream as the Media Source in the topology.

The documentation on IMFMediaSource mentions that you can generate media data streams that might come from hardware devices. How can you do this for the microphone and AUX input?

[397 byte] By [MarcGBeauchamp] at [2008-2-7]
# 1

In v1 of Media Foundation (i.e. what you get with Windows Vista), we're not providing a Media Source implementation that will get data from a capture device.

You should, however, be able to implement a Media Source that does this, and the Media Foundation pipeline should be able to work with your Media Source if you include it in your topology.

To help you implement your own Media Source, we've provided a code sample of a Media Source implementation in the WinSDK that reads from a WAV file. You should be able to use most of that sample more or less, substituting your own code to work with the capture device (possibly using Kernel Streaming) for the code that reads and parses the WAV file.

Good luck!

Becky

BeckyWeiss-MSFT at 2007-9-10 > top of Msdn Tech,Audio and Video Development,Media Foundation Development...