views:

277

answers:

3

Is it possible to write DirectShow filters in C# (not in c\c++)?

I mean not only to create source filters but renderers or compressors etc?

A: 

Yes it is. You can use the DirectShow.net Lib to help bridge the gap.

They even have a sample, if you look down the page you will see the GSSF sample description:

GSSF – The Generic Sample Source Filter – A way to implement a source filter in c#. If you have samples (for example video frames from bitmap files) that you want to use as a source in a graph, this filter will show you how.

Simon P Stevens
And is there any way to create not only source filters but for example renderers or compressorsetc?
Superior0
+1  A: 

You can, but it can be difficult unless you know DirectShow and .NET native interop pretty well. Even then it can be a little uphill.

Here is an example of it being done: http://www.sichbo.ca/Free_Code/100_C_Sharp_directshow_filters

Jeremiah Morrill
A: 

Basically you can export you .NET classes as COM. TO use DShow interfaces, simply link to CM objects from your .NET projects. Anyway, writing DShow filters in .NET without some support of libraries like BaseClasses for C++ could be challenging.

dominolog