Re: Connecting a raw file to transform filter.



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


.



Relevant Pages

  • Re: New transform for video
    ... to handle motion without blocks. ... The new transform is compatible with bocks. ... if you stop the filter there (at ... Something like this: an inter frame can be divided into 2 regions: one ...
    (comp.compression)
  • Re: How to do to get mediatype
    ... It's up to the source filter whether to provide this ... you enumerate its output pins after connecting the ... have to provide a useful media type. ... the source and parser are the same filter. ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: DVD grabbing sample
    ... the transform and rendererer agree a media type. ... VMR will propose and allocator based around a DS surface ... filter REJECTS this, the connection will fail. ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: Delay between two Transform() calls
    ... i think if it is a transform filter, you have not de delay or to sleep ... the render filter manages the playing rate (as ... decoder using libavcodec from ffmpeg in a dll. ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: interpolation for a color image?
    ... A typical way to do that is to first transform ... YUV is linear, ... YUV, run there a bilinear filter, then transform back, or run the bilinear ...
    (sci.image.processing)