Re: custom source filter implementation
- From: Andreas <yoass@xxxxxxxx>
- Date: Thu, 05 May 2005 21:46:54 +0200
thank you for your answer, but it's not working IBaseFilter *pAS = NULL; IFileSourceFilter *pFS = NULL; CoCreateInstance(CLSID_AsyncSample, NULL, CLSCTX_INPROC_SERVER, IID_IBaseFilter, (void **)&pAS); pAS->QueryInterface(IID_IAsyncReader, (void **)&pFS);
I've been trying around, but I never have access to the GetPin() function... how do I have to create my custom filter?
Do I have to do some more registering (the IID), as described in http://groups.google.de/group/microsoft.public.win32.programmer.directx.video/browse_thread/thread/37edaf948f5c582b/d23bfb5e3dbf5de7?q=directshow+filter+iid&rnum=2&hl=de#d23bfb5e3dbf5de7
But as GetPin() is a function of CAsyncReader and
STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, void **ppv)
{
if (riid == IID_IAsyncReader) {
return GetInterface((IAsyncReader *)this, ppv);
....is also part of CAsyncReader, I should have access to the GetPin() function(?)
This is not right:
IBaseFilter *pAS = NULL; CoCreateInstance(CLSID_AsyncSample, NULL, CLSCTX_INPROC_SERVER, IID_IBaseFilter, (void **)&pAS);
pGB->QueryInterface(IID_IAsyncReader, (void **)&pAS); <---THIS IS WRONG, cannot use pAS like this
...You first create an instance of your filter using pAS, but then you use that same IBaseFilter to aquire an interface with (IID_IAsyncReader), which isn't going to have a pin.
You need to create a separate pointer to use with the query interface call.
.
- Follow-Ups:
- Re: custom source filter implementation
- From: Jeremy Noring
- Re: custom source filter implementation
- References:
- custom source filter implementation
- From: Andreas
- Re: custom source filter implementation
- From: Jeremy Noring
- custom source filter implementation
- Prev by Date: Re: YV12 question
- Next by Date: Command line switches for redistributable
- Previous by thread: Re: custom source filter implementation
- Next by thread: Re: custom source filter implementation
- Index(es):