Saturday, April 01, 2006

Of DirectShow and C#

I recently recived this mail that inquired about using Direct show with C#.

I was using C# for programming I want to develop a software which handles video recording/playback /video format handling etc. Will c# support DirectShow. Will DirectShow give support for Recording if I use with C#. The program written in C# or C++ will be better. I want the program in managed code. Help me pls to select the apt language pls.

My response:
I have never worked with DirectShow. But whatever little i know about Direct Show is that its API is COM based and primarily accessible through C++. C# can support COM based APIs through a concept called CCW (COM Callable Wrappers). But with CCW there is a cost associated with marshalling the calls b/w COM and .NET objects, so native C++ will always be faster in this case. You can use managed C++ for that as well.

No comments: