0

We have some filter for DS. It works - uses standard win dll's.

We want to convert that filter to some sort of program that doesn't rely on using DS. We want it to call dlls in the right order, do all what DS is doing but not be in any way dependable on DS - only on filter dll's.

So... How to convert DirectShow Filter to C++\C#?

Mogsdad
46k21 gold badges166 silver badges289 bronze badges
asked Dec 30, 2009 at 1:14

2 Answers 2

1

A better solution is to use the filter within a single-purpose graph, in which you have a custom source feeding the filter from the app, and a custom sink receiving the output and delivering it to the app. There's an example of this on www.gdcl.co.uk. I know this isn't quite what you are asking for, but your dependencies on dshow are very limited, and it's hard to see an environment in which the filter binary works but dshow basics are not available.

G

answered Dec 30, 2009 at 12:21
Sign up to request clarification or add additional context in comments.

Comments

0

It is possible to use DirectShow filters without using DirectShow, but you will need to write your own Graph implementation.

That means that you will have to implement the IFilterGraph, IMemInputPin and IMemOutputPin interfaces to make the DirectShow filter think it is running in it's native environment.

In order to pass buffers through the filter, you may need to implement IMemAllocator and IMediaSample

The buffer passing, in particular cannot be done in managed code. You might be able to do it with interop, but I think this would be easier to do in C++ than in C#. I did this once many years ago. It took about 3 months.

answered Dec 30, 2009 at 1:42

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.