Capture Frame Buffers

Hello All,

I have a task of capturing frame buffers of a WDDM driver and sending to the application software that is already running. I believe there are two alternatives to achieve this, developing a virtual WDDM driver or with WDDM filter (hook) driver. I’m not sure which approach is an ideal one which solves my problem. Can any one provide right direction?

In either approach is it possible to develop this driver using KMDF?

Considering I’m a starter in WDDM driver development, can any one suggest where I can start to get the architecture. I see lot of documentation under WDK (Display Devices) but not sure where to begin with.

Thanks and Regards,
Madhukar

The “frame buffer” of a wddm driver is unlikely to be useful. There is a
user mode facility that replaces the mirror mode XPDM functionality - see
Desktop Duplication API for win8 and later. Or there are third party
implementations that attempt to replicate traditional XPDM style mirroring
for WDDM.

Mark Roddy

On Mon, Jan 5, 2015 at 9:16 AM, wrote:

> Hello All,
>
> I have a task of capturing frame buffers of a WDDM driver and sending to
> the application software that is already running. I believe there are two
> alternatives to achieve this, developing a virtual WDDM driver or with WDDM
> filter (hook) driver. I’m not sure which approach is an ideal one which
> solves my problem. Can any one provide right direction?
>
> In either approach is it possible to develop this driver using KMDF?
>
> Considering I’m a starter in WDDM driver development, can any one suggest
> where I can start to get the architecture. I see lot of documentation under
> WDK (Display Devices) but not sure where to begin with.
>
> Thanks and Regards,
> Madhukar
>
>
> —
> NTDEV is sponsored by OSR
>
> Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev
>
> OSR is HIRING!! See http://www.osr.com/careers
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>

Thanks Mark for quick reply.

My target operating systems are Microsoft Windows Vista onwards.

We thought of having our own implementation. Is it not possible to develop a WDDM filter driver for what we want to achieve?

Regards,
Madhukar

It is possible, it is difficult, it is not the same as XPDM mirror driver,
it is unsupported officially for Win8+ but seems to be possibly supported
unofficially. The supported functionality for win8+ is the user mode api.

Mark Roddy

On Mon, Jan 5, 2015 at 10:06 AM, wrote:

> Thanks Mark for quick reply.
>
> My target operating systems are Microsoft Windows Vista onwards.
>
> We thought of having our own implementation. Is it not possible to develop
> a WDDM filter driver for what we want to achieve?
>
> Regards,
> Madhukar
>
> —
> NTDEV is sponsored by OSR
>
> Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev
>
> OSR is HIRING!! See http://www.osr.com/careers
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>

Thanks Mark.

I had come across a similar software Air display which is what I was looking for. I believe it implements virtual display driver. Can I achieve the same by having a WDDM filter driver instead of a virtual driver?

Regards,
Madhukar

xxxxx@hotmail.com wrote:

I have a task of capturing frame buffers of a WDDM driver and sending to the application software that is already running. I believe there are two alternatives to achieve this, developing a virtual WDDM driver or with WDDM filter (hook) driver. I’m not sure which approach is an ideal one which solves my problem. Can any one provide right direction?

Have you taken a look at any of the dozens of existing products that
already solve this problem? Many of the VNC variants are open source.
They include multiple approaches to solving what turns out to be a
non-trivial problem in Windows.

Clearly, the simplest solution is just to have an application do a
BitBlt from the desktop window or a DirectDraw primary surface
periodically. No kernel nonsense at all.

In either approach is it possible to develop this driver using KMDF?

You CAN use KMDF in miniport mode, but it’s not clear there is any
gain. WDDM drivers don’t use IRPs, so you can’t use I/O queues and
dispatching assistance.

Considering I’m a starter in WDDM driver development, can any one suggest where I can start to get the architecture. I see lot of documentation under WDK (Display Devices) but not sure where to begin with.

I only have discouraging words. All of the WDDM driver knowhow in the
world is sequestered in no more than 5 companies, and they hold that
knowledge pretty closely. It is not a world for dabblers.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

First, the requirements need to be checked! What is really needed?

  1. For Windows Desktop duplication/mirroring
    NO WDDM technique is needed.

1.a. On Win7- old school GDI screen capturing can easily be used.
1.b. On Win8+ DXGI Desktop Duplication API can be used.
1.c. Various other techniques also give partial solutions
(some of them indicated above).

  1. For Windows Desktop extension
    (additional virtual display monitors)
    WDDM techniques ARE needed indeed.

2.a.Virtual WDDM drivers are very problematic with respect to features and performance.
AirDisplay is the last known product that hasn’t given up this technology/approach yet.
It will be very interesting to see what maximum performance and features they will ever
be able to achieve (especially when it comes to video playback, 4K monitors etc.).
2.b.WDDM filter hook drivers are successfully used by USB display driver manufacturers
(e.g. DisplayLink) since 2007. The downside: Massive effort in reverse engineering,
and development (10+ man years). Massive test resources (years of testing on 100s
of different consumer PC platforms with different chipsets, different graphics adapters, etc.).
Still the target is moving. Nvidia releases a new driver update every ~8 weeks.
Sometimes, their new driver update breaks the WDDM filter hook driver.
E.g. one time, during the recent year, NVidia suddenly released a display driver which
was not relying on DPCs any more. Then their next release uses DPCs again.
A WDDM filter hook driver can only survive if it is constantly being maintained.
If you want to experiment with a WDDM filter hook driver, buy a USB display
or play around with our networked display freeware “spacedesk”.

PS: I really wonder why this number of five companies is being reiterated here since years…
I already know more GPU manufacturers having their own WDDM drivers
(e.g. one starting with letter I which is not Intel),
then there are the virtual machine DX9 full WDDM drivers
(e.g. VMWare, VirtualBox open source, etc.),
then there are at least 7 USB display manufacturers with
at least 4 completely different WDDM filter hook drivers,
then there are quite a few other companies which have done substantial WDDM driver development (e.g. AirDisplay, some digital signage vendors, etc.).

Marcel Ruedinger
datronicsoft