Celebrating the 22th anniversary of the UltraVNC: https://forum.uvnc.com/viewtopic.php?t=38031
Update: UltraVNC 1.4.3.6 and UltraVNC SC 1.4.3.6: https://forum.uvnc.com/viewtopic.php?t=37885
Important: Please update to latest version before to create a reply, a topic or an issue: https://forum.uvnc.com/viewtopic.php?t=37864

Join us on social networks and share our announcements:
- Website: https://uvnc.com/
- GitHub: https://github.com/ultravnc
- Mastodon: https://mastodon.social/@ultravnc
- Bluesky/AT Protocol: https://bsky.app/profile/ultravnc.bsky.social
- Facebook: https://www.facebook.com/ultravnc1
- X/Twitter: https://x.com/ultravnc1
- Reddit community: https://www.reddit.com/r/ultravnc
- OpenHub: https://openhub.net/p/ultravnc

DirectDraw Mirror Driver Bug Bounty

Post Reply
Skinney46
8
8
Posts: 31
Joined: 2004-11-05 17:27

DirectDraw Mirror Driver Bug Bounty

Post by Skinney46 »

I have been working on a screen capture application, which uses a modified version of UltraVNC and DirectShow to capture both screens of a dual headed workstation. Third party Java 1.4.2 applications are being displayed on the workstation, when displaying these applications on a dual headed machine; DirectDraw is used to draw the applications. Here is where the problem comes in; at present the mirror driver does not support the capture of DirectDraw, therefore the applications show as blank windows through the VNC viewer and are captured as empty rectangles.

If the hardware acceleration is reduced on the dual headed display, the system is forced to use GDI, which is captured by UltraVNC. Unfortunately this is not a solution for us because the applications that are running on the workstation are running some fairly intense graphics in places, so we need to keep the benefits of the hardware acceleration.

To demonstrate the problem two machines need to be set up, one to display a DirectDraw application and one to run an ultravnc viewer looking at the host machine. A test drawing application can be downloaded from http://www.codeproject.com/directx/drawing.asp, this allows the user to switch between DirectDraw and GDI drawing for the background bitmap, when the application is running in DirectDraw mode the background does not show if viewing remotely using the VNC viewer. I am also able to provide an application which displays a bouncing ball that is being rendered using DirectDraw, again using this the contents of the pane displaying the bouncing ball are not displayed when it is viewed using a VNC viewer. If you are interested please contact me at chris.skinner@weston.co.uk and I will send you the application.

Low CPU consumption is a priority for this issue because our capture application is restricted to a certain CPU performance, so while capturing DirectDraw the mirror driver needs to perform efficiently.

We would like to offer $500US as a reward to the first person within the community who is able to provide us with a mirror driver install, that is capable of capturing DirectDraw applications, aswell as GDI inputs, subject to internal testing.
User avatar
Rudi De Vos
Admin & Developer
Admin & Developer
Posts: 6879
Joined: 2004-04-23 10:21
Contact:

Post by Rudi De Vos »

A mirror driver can't support directx.
Hardware acceleration bypass the driver and don't make use of gdi.
Even if we could add some directx code in the mirror driver, it would need
to emulate it, so speed would not be any faster.

The only way it could be done is by overloading the directx dll.
The good thing is that there is some sample code available on sourceforge
that is capable of recording directx and opengl games to avi.
I never has tesed the code, but perhpas you could try to run some test to
see if it capture the hardware accelerated stuff and cpu use in combination with the FPS.

To record an avi you need access to the screen data and position, so this code could be almost for 90% used to add directx support to vnc.

I don't have time, but some other people could be interested.

Sourceforeg project
http://taksi.sourceforge.net/

Fast tested it, seems to work with the 3D screensavers in hardware acceleration mode.
Skinney46
8
8
Posts: 31
Joined: 2004-11-05 17:27

Taksi

Post by Skinney46 »

I have had a look at Taksi, however unfortunately it seems to be designed around tapping into the Direct3D portion of DirectX. It certainly allows me to capture some video from Quake 3 (although the performance of the game was noticeably affected by capturing). However unless something that is using direct3D is running, it does not allow you to capture. I am more interested in capturing DirectDraw, RealVNC seems to be able to capture DirectDraw, although it is slow. Would it be possible to capture the normal windows position information using the mirror driver, but have an additional DirectDraw feed into winvnc which then gets combined with the normal updates within the winvnc server?
Skinney46
8
8
Posts: 31
Joined: 2004-11-05 17:27

Post by Skinney46 »

Thanks that is very helpful.
camperdave
Posts: 3
Joined: 2006-05-02 01:41

Use this?

Post by camperdave »

I was looking for someone to do this also.

However, I found a DLL that might work, but did not know how to interface it.

My old post:
I understand that DirectX goes straight to hardware, not allowing the VNC program access to the "pictures" on the screen. I have found a DLL that may help with this problem:

http://www.mikoweb.eu/index.php?node=21
Will that help?
Skinney46
8
8
Posts: 31
Joined: 2004-11-05 17:27

Proxy-Dll

Post by Skinney46 »

Thanks for the update.

It looks like a proxy-dll could potentially solve the problem, but I don't know what would be involved in getting the code into the mirror driver.
camperdave
Posts: 3
Joined: 2006-05-02 01:41

same.

Post by camperdave »

That's what kept me from modding it myself- I have little knowledge of C,

and even less of how to use DLL's :(
Post Reply