2

I'm playing with the "Capture Source Filter" from http://tmhare.mvps.org/downloads.htm. After registering the ax driver, I'm trying to understand its compatibility across applications that use video sources.

For example, Skype recognize it while browsers (Edge, Chrome) don't.

I wonder if it's a limitation of the used approach (DirectShow filter) or it's just a matter of configuration. The purpose of the question is to understand if that approach is still useful or it's better to move on Media Foundation.

Roman R.
  • 68,205
  • 6
  • 94
  • 158
Mark
  • 4,338
  • 7
  • 58
  • 120

1 Answers1

4

I described this here: Applicability of Virtual DirectShow Sources

Your virtual camera and the applications capable to recognize and pick it up are highlighted with green on the figure below.

Applicability of Virtual DirectShow Sources

... if that approach is still useful or it's better to move on Media Foundation.

Media Foundation does not even have a concept of virtual video source. It does not have a compatibility layer to connect to DirectShow video sources. Obviously, in other direction DirectShow applications won't be able to see virtual Media Foundation streams (well, again, because they do not exist in compatible concept in first place).

If you want to expose your video source to all applications, you need a driver for this (see red box on the figure above). Applciations exist out there that implement such concept, even though writing a new one from the ground up is not something compatibly easy with the DirectShow virtual source you referenced in your question.

Further reading on MSDN on Media Foundation: How to register a live media source - media foundation

Though it is technically possible to write a virtual driver that shows up as a capture device, policies will probably prevent this. In Media Foundation, a device must have a certificate to appear as a capture device, and so far only actual hardware devices through the USB video class driver have been certified. Supporting a scheme through a scheme handler, or a file type with a byte stream handler, is the way to expose a new source to applications.

Roman R.
  • 68,205
  • 6
  • 94
  • 158
  • Very good explanation! Just a clarification: why a 64-bit application cannot use a 32-bit DirectShow API? I thought the vice-versa isn't allowed. Anyway, this is not a big issue: I would provide both 32- and 64-bit binaries. – Mark Mar 21 '17 at 10:29
  • 2
    Because processes can load DLLs of the same bitness only. You are on your own to implement interprocess communication to fill the gap. – Roman R. Mar 21 '17 at 10:35
  • Check out the recent Virtual Camera API that Microsoft has added to the Media Foundation: https://learn.microsoft.com/en-us/windows/win32/api/mfvirtualcamera/nf-mfvirtualcamera-mfcreatevirtualcamera There's also apparently an example of a virtual camera built using MF, not sure how it works: https://github.com/microsoft/Windows-Camera/tree/4825decdbfa8b9ee8ec9d214612874ede9cc2dc7/Samples/VirtualCamera – Kosau Jul 08 '22 at 19:44