Re: Connecting a raw file to transform filter.
- From: "Alessandro Angeli" <nobody@xxxxxxxxxxxxxxxxxx>
- Date: Thu, 21 Feb 2008 12:43:06 -0500
From: "taklubaba"
[...]
What should I do to get the raw source filter to DIRECTLY
connect to the transform function input pin.
Also what should be done to make the transform filter
connect DIRECTLY to a file output.
What you are experiencing is the expected behavior. The
AsyncReader only works in pull-mode through the IAsyncReader
interface while almost any other filter only works in
push-mode through IMemInputPin, including your transform
filter, so a direct connection is impossible and
IntelligentConnect inserts a filter than can adapt from
pull- to push-mode and accepts the proposed media type
(which is empty because the AsyncReader can not determine
the file type), that is a parser filter, which happens to be
an MPEG parser because MPEG parsers are the one that usually
accept empty media types.
The easiest and best solution is to write a custom push
source filter that will simply push blocks of data to your
transform and that offers a media type your transform filter
accepts. You can take a look at the PushSource and Ball
samples.
Otherwise, if you don't want to write a push source, you can
modify your transform's input pin to work in pull-mode,
which will also imply spawning a streaming thread to pull
the data. The MPEG-1 parser on www.gdcl.co.uk is a sample of
such a filter.
Last, you can write an actual parser filter to insert in
between the AsyncReader and you transform that does nothing
but spawn a thread that pulls from the reader and pushes to
the transform.
--
// Alessandro Angeli
// MVP :: DirectShow / MediaFoundation
// mvpnews at riseoftheants dot com
// http://www.riseoftheants.com/mmx/faq.htm
.
- Follow-Ups:
- Re: Connecting a raw file to transform filter.
- From: taklubaba
- Re: Connecting a raw file to transform filter.
- From: taklubaba
- Re: Connecting a raw file to transform filter.
- References:
- Connecting a raw file to transform filter.
- From: taklubaba
- Connecting a raw file to transform filter.
- Prev by Date: Connecting a raw file to transform filter.
- Next by Date: Re: AVStream minidriver - How does it connect to USB stack?
- Previous by thread: Connecting a raw file to transform filter.
- Next by thread: Re: Connecting a raw file to transform filter.
- Index(es):
Relevant Pages
|