[outdated][offline] DirectDraw (+dx8) capture support

[outdated][offline] DirectDraw (+dx8) capture support

So we finally made it into OBS master, so with the next release we will have native capture support for both DirectDraw (win7 only for the time) and DirectX8. :)
This means that I won't post any more binary updates, but I will still maintain the code.
I noticed switching scenes has been broken for the last few releases and I finally came around to fix that issue. Scene switching should work now for DDraw and DX8 capture sources.

By the way: I think the code is now stable enough so we can probably include it into OBS master, I will talk with Jim about that. :)
This is just a convenience update, because a Win8 bug was fixed today in the original gamecapture-plugin. I also removed injectHelper/injectHelper64 from the archive, because they are not needed.

Download: obs-v0.624b-ddraw-1.2.5
If you watch this thread, I'm terribly sorry for spamming your inbox. :D

Version 1.2.4 features:
  • Full Windows 8 support for D3D8 gamecapture
  • 16bit and (exotic) 8bit RGB color formats for D3D8 (may be slow, untested)
I implemented some hooks for Win8-DirectDraw, but I'm not sure if I used the right offset values.

Version 1.2.4 also fixes the crash-on-exit bug that occured as you close a previously captured application.

Edit: DirectDraw capture is still disabled at the moment, stay tuned.
I decided to install Win8 and test capture for Windows 8, and well it works - for d3d8. I have some issues with ddraw, at the moment it crashes all the time and I'm not sure why. You can try out plugin version 1.2.3b2 which should work with all mentioned DX8 games.
Yesterday was a bad night obviously, I mistakenly provided a wrong URL. The 1.2.2 release now really is 1.2.2.
So apparently I was very dumb and forgot one line in the code that made the capture turn black when a 32bpp framebuffer with 8bit alphabuffer was present... Release 1.2.2 should fix this.
I finally came around to implement DX8 capture \o/. At the moment the only accepted color format of the framebuffer is 32bit X8R8G8B8. I will implement 16bit R5G6R5 and 16bit A1R5G5B5 in the future (as well as maybe exotic 8bit), if requested I will try to speed up my efforts (being a bit lazy as usual).

Three things regarding the plugin:

When you exit a game while capturing ddraw or dx8, the game will crash. I'm not exactly sure what the reason for that happening is, but I'm investigating.

I did not bother to optimize log output, so it can happen that you get some megabytes of logfiles especially if you reset the capture by switching scenes. You've been warned. Scene switching works btw.

DX8 capture might be very slow with 16bit framebuffer formats in the future, but I can try to optimize. Because DirectX8 did not support shared textures, I had to use memory capture which is very slow - basically I have to download the framebuffer from graphics memory and then copy it to a shared OBS-buffer, which in turn copies it back to graphics memory. You might have noticed that there are a lot of copies involved already, and it gets even worse when you have to convert 16bit pixels to 32bit (the format OBS likes). But I'm confident that capture performance will be alright (it's alright for DirectDraw).


That said, please give me feedback when you use the plugin so I can be confident when I send Jim a pull request to merge the code into master. :)
So I was informed that switching scenes did not work, but I think I fixed it now. New archive here:
obs-v0.622b-ddraw-1.1
Uploaded build for OBSv0.622b. This build should use the old hook method, so it doesn't differ from the original obs capture-plugin.
Top