DDraw Capture Support

Bl00drav3n

Member
Hi, I just took a glance onto the sourcecode and noticed, that DDraw capturing is currently commented out. Is there a serious bug or is it incomplete? I'd really like to stream some older games but can't force them to windowmode sadly, so the only option would be to capture the ddraw framebuffer directly. :(
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
currently not supported but will probably be eventually if I can get finished with other stuff I'm currently working on. then again I suppose I say that for everything
 

Bl00drav3n

Member
zerocul said:
Try this libraries. Just unpack it to game folder and run game.
http://puu.sh/3q8fn.zip
Those libraries seem to be incompatible with OBS v0.522b.

@Jim: Looking at the source I am assuming that the original code for ddraw capture is pretty outdated and a bit messy, but I think I got the idea. Would it help if I shared an updated version with you guys once I got it worked out?
 

Bl00drav3n

Member
Sorry my bad. Tried it out but it doesn't work 100%. Game starts in windowed mode but it crashes when I move the cursor. Did you write those libraries or are there any sources/documentation available?
 

Bl00drav3n

Member
I exaggerated a bit, it actually did not crash. As long as I don't move the cursor it's working perfectly. But when I touch my mouse the application freezes, maybe it can be fixed by a certain option, but no luck so far. :/
 

Bl00drav3n

Member
I am wondering, is it sufficient for the capture plugin to copy the pixeldata into the buffers created by InitializeSharedMemoryCPUCapture and setting the MemoryCopyData::lastRendered parameter to 0 or 1? Cause I've done that and hooked into DDraw's Flip method, mapped the surface data to client memory and fed the data to the created buffers, but OBS preview window stays black. (the hook itself however works)

Edit: Never mind, got it working. A bit slow though. It's so sad that D3D10 does not support R5G6B5 format. :(

Edit2: I made a fork and added a rudimentary implementation for DDraw capture, you can obtain it from https://github.com/Bl00drav3n/OBS. The current big issue I have is my lack of experience with multithreaded applications, but I am happy that it captures anything at all. xD Next things to improve are stability and perfromance, for the latter one I will have a look into D3D and the possibilities to use GPU memory capture with DirectDrawSurfaces, as CPU memory capture is obviously pretty slow.
 
Top