0

Learning MS Media Foundation and trying to understand about the the so-called "stream descriptors". From the MSDN documentation follows that a single MMF device can have multiple of those.

However every single (of a dozen) devices I have at my disposal always show only ONE stream descriptor when enumerated (microphones, webcams, camcorders, digital cameras, both USB and non-USB).

Could anyone tell me if a single-stream device is a norm and what are some (any) examples of devices with multiple stream descriptors? I've searched the Web for about an hour now but to no avail:(

UPDATE: On a laptop the code shows two streams for a built-in webcam. First stream lists various modes running at 30 FPS and the second (inactive) stream lists the same modes but at 1 FPS. Still not sure what to make of it though... Can I ignore the second list when presenting user with video capture options?

YePhIcK
  • 5,816
  • 2
  • 27
  • 52

1 Answers1

1

Most webcams will have 2 concurrent streams (one for video and one for audio). I suspect you are looking at the video type only (MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_VIDCAP_GUID). Of course, the camera may be able to stream various types of video streams (IMFMediaType), but not concurrently. And when you pull samples from both the video and audio stream from a webcam, you will likely want to use an MFCreateAggregateSource.

I previously provided some information on that here.

Keep in mind there are several video capture cards (Datapath, matrox, black-magic, etc) which have multiple DVI or HDMI ports. For instance some medical imaging software will pull streams from multiple cards, each having more than one stream.

But you are right. It is not common for devices to have multiple video feeds. We can be sure that many higher end sound cards will have multiple audio streams (input 1, input 2, etc).

Hope this helps.

Community
  • 1
  • 1
Jeff
  • 2,495
  • 18
  • 38