Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results

Home NTDEV

More Info on Driver Writing and Debugging


The free OSR Learning Library has more than 50 articles on a wide variety of topics about writing and debugging device drivers and Minifilters. From introductory level to advanced. All the articles have been recently reviewed and updated, and are written using the clear and definitive style you've come to expect from OSR over the years.


Check out The OSR Learning Library at: https://www.osr.com/osr-learning-library/


Before Posting...

Please check out the Community Guidelines in the Announcements and Administration Category.

How to introduce a Custom Media Source as Video capture device like DirectShow filter?

minhptaminhpta Member Posts: 23

Dear experts,

MSDN has document about writing Custom Media Source for Media foundation.
But I want other third-party app see my Custom Media Source as a Video capture device.
I know DirectShow can do that with its filters.
How can I do that with Media foundation?

Comments

  • minhptaminhpta Member Posts: 23

    I've just found out that there is no exist approach to create virtual camera on Windows 10 using Media foundation.
    We must implement that driver in kernel driver.

    However, there is a new API on Media Foundation. It is MFCreateVirtualCamera but it is seem for Windows 11.

  • Tim_RobertsTim_Roberts Member - All Emails Posts: 14,163

    So far, I have not found anything Media Foundation can do that DirectShow can't. The mechanism for creating a fake video camera in DShow is well-understood. Why not just do it in DShow?

    Clearly, it is possible to write a Media Source or Source Reader object to produce a camera-like video stream, and the magic to get a filter recognized as a video camera is mostly registry entries, so it's probably possible.

    Tim Roberts, [email protected]
    Providenza & Boekelheide, Inc.

  • minhptaminhpta Member Posts: 23

    Just because Microsoft said that Directshow is obsolete and MF support more kinds of video format.
    I am in investigate stage to decide which one Directshow or MF will be used in my project.
    Thank you very much for your advice.

  • Tim_RobertsTim_Roberts Member - All Emails Posts: 14,163

    Just because Microsoft said that Directshow is obsolete...

    No, Microsoft said that DirectShow is "deprecated", which is a word that has virtually no meaning. It's still alive and vibrant. Video For Windows and the waveIn and waveOut APIs have been deprecated for decades. They still work exactly like they did in 1994.

    MF support more kinds of video format.

    I have heard that said before. I've never found an example.

    Now, let's be honest, I'm just being obstinate. I fully understand that some companies do not want to fund efforts on a technology that is not the latest, shiny model with finely polished chrome. I happen to be a huge fan of DirectShow (designed in 1994 and still alive and functional in 2021).

    This post from 2016 (https://alax.info/blog/1626) says that it's not possible to build a virtual camera in MF. Apparently, the registry magic that works for DShow doesn't work with MF.

    Tim Roberts, [email protected]
    Providenza & Boekelheide, Inc.

  • minhptaminhpta Member Posts: 23

    I've learned a lot from your feedback.
    I've chosen Directshow for my project without any doubts. Thank you so much.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. Sign in or register to get started.

Upcoming OSR Seminars
OSR has suspended in-person seminars due to the Covid-19 outbreak. But, don't miss your training! Attend via the internet instead!
Writing WDF Drivers 24 January 2022 Live, Online
Internals & Software Drivers 7 February 2022 Live, Online
Kernel Debugging 21 March 2022 Live, Online
Developing Minifilters 23 May 2022 Live, Online