|
|
|
date: Wed, 22 Mar 2006 13:57:57 +0100,
group: microsoft.public.win32.programmer.directx.sdk
back
Implement your own filter example?
Hi there,
I'm trying to create some kind of media-center application where I need
to get the sound data that comes from the source filter and do some
stuff with it before sending it to the output filter.
In the DirectX SDK, I see the base classes to create your own filter,
and in the "Programming with DirectShow" book, I can see an example to
create your own DLL.
But I need to create my filter for use just inside my application, no
registerable COM DLL or stuff like that.
IMO, that SDK and the book go too deep in all the possibilities of
DShow, but don't help you with the basics.
Can someone please send me a minimal C++ code example to implement this?
Just a simple filter that copies the input to the output pin would be
fine, so just that I see how the COM stuff works, and how the filter
gets added and implemented.
I have compiled the BaseClasses library.
Please help!
Kind regards,
Dirk.
date: Wed, 22 Mar 2006 13:57:57 +0100
author: Dirk Schippers
Re: Implement your own filter example?
On Wed, 22 Mar 2006 13:57:57 +0100, Dirk Schippers wrote:
> I'm trying to create some kind of media-center application where I need
> to get the sound data that comes from the source filter and do some
> stuff with it before sending it to the output filter.
> In the DirectX SDK, I see the base classes to create your own filter,
> and in the "Programming with DirectShow" book, I can see an example to
> create your own DLL.
>
> But I need to create my filter for use just inside my application, no
> registerable COM DLL or stuff like that.
Just #ifdef out the DLL specific lines of one of the sample filters in the
SDK, create an instance of it with "new" and add it to the graph.
BTW, see the help link in my sig below for the appropriate places for dshow
questions (this newsgroup is not one of them).
CComPtr<IBaseFilter> m_dv_buffer;
m_dv_buffer = new CDVBuffer(t("DV Buffer"), NULL, &hr);
if (!m_dv_buffer || FAILED(hr))
return E_FAIL;
m_graph_builder->AddFilter(m_dv_buffer, L"DV Buffer"));
--
Please read this before replying:
1. Dshow & posting help: http://tmhare.mvps.org/help.htm
2. Trim & respond inline (please don't top post or snip everything)
3. Benefit others: follow up if you are helped or you found a solution
date: Wed, 22 Mar 2006 07:41:49 -0700
author: The March Hare [MVP]
|
|