GNOME Bugzilla – Bug 590208
GstNavigation interface support for directdrawsink
Last modified: 2009-07-31 05:17:16 UTC
There's only two working video sinks for Windows: glimagesink and directdrawsink. Former is pretty good by all accounts, but is not really native (lots of abstracted code due to that, all in all it is not the-sink-most-easy-to-hack). Latter basically sux, but it's sooo native (and there is a lot of example code on working with DirectX, and WinAPI parts are trivial for any Windows developer). So, i've decided to hack directdrawsink and add GstNavigation to finally be able to watch DVD (if only GstNavigation was the sole problem here...)
Created attachment 139521 [details] [review] Adds support for GstNavigation It's a bit rough in the edges. Mouse clicks do work perfectly. Mouse movement works good too (it's just that resindvd doesn't know how to handle mouse-move events...). It's more difficult with keyboard. Obviously, WM_CHAR and WM_KEYDOWN handlers should be separate, but i am not quite sure WHAT exactly i should send down the GstNavigation...At the very least, i'm worried about all WM_CHAR-generated chars being uppercase.
Patch is totally wrong - perhaps line ending conversion? Anyway, it removes all lines and then adds all lines, so it's not a useful patch. DirectDraw is not really native either - directdraw is an emulation layer on vista/win7, and doesn't provide particularly great performance, or good features. DirectShowVideoSink is (other than glimagesink) the only properly-functional windows video sink right now - it doesn't do navigation either though. The ideal windows video sink would be a native sink using Direct3D; all the native windows APIs, plus low-level access to the fast-path video acceleration stuff. Nobody's even started writing anything like that yet, though.
Probably because i've disabled autoCRLF in gitconfig. Ok, i'll enable it then. I could try to poke around and assemble Direct3D sink from the parts laying around (after all, rendering video via Direct3D is not something new - MPC does it).
Created attachment 139596 [details] [review] Adds support for GstNavigation (fixed lineends) After looking for Direct3D video rendering information, i've decided that it's easier to hack GstNavigation for glimagesink rather than try to understand Direct3D.
Looks good, thanks :) commit afca8b5ecb2ee0e09edb093bd2ac9ca202582c79 Author: Руслан Ижбулатов <lrn1986@gmail.com> Date: Fri Jul 31 02:05:41 2009 +0400 directdraw: Implement GstNavigation interface Fixes bug #590208.