English 中文(简体)
How to convert DirectShow Filter to C++C#?
原标题:

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#?

最佳回答

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

问题回答

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.





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

热门标签