views:

836

answers:

3

I am working on a video processing library in C# and would like to display videos on Windows XP up. For this purpose, I currently use a custom double-buffered UserControl with overridden OnPaint that uses Graphics.DrawImageUnscaled. This works okay, but is not ideal.

Therefore I would like to implement a video display using hardware overlay, like so many other video players.

How do I do this? In C#? Or C/C++?

Any help is appreciated.

A: 

Have you considered using DirectShow? Here's an example.

Keltex
I looked into this and it would be quite clumsy to use, as Microsoft does not officially support DirectShow use in a managed environment.
cr333
+1  A: 

Have you looked at using WPF and the MediaElement Class?

Sebastian Gray
Thanks for this suggestion, but I'm currently not using WPF.
cr333
A: 

I ended up using OpenGL via the excellent OpenTK library which works on Windows, Linux and Mac OS X. In effect, I copy frames into a texture which is then mapped onto a quad that fills out the entire viewport. Works like an ace.

Thanks for all your suggestions,

Christian.

cr333