Re: media seeking can't work in my decoder filter

Tech-Archive recommends: Fix windows errors by optimizing your registry



Thanks for your reply. I've checked when my filter receives a flush
operation, the operation flow is just as same as you said, but I don't
know how to check if ImediaSeeking parameters are passed correctly, can
you suggest me something about where does the media seeking happen in
baseclass?

Geraint Davies wrote:
On 7 Sep 2006 01:32:16 -0700, hbtmzrui@xxxxxxxxx wrote:

the problem is when I try to play a H.264 avi file with my decoder
filter, media seeking doesn't work. as soon as I try to seek, the graph
stopped immediately and restart to run from first frame.
I build the graph like this:
file source(H.264 avi file) -> avi splitter -> decoder -> video render
I've checked other filters such as xvid or ffdshow's implementation,
and I can find nothing different from my filter and nothing about media
seeking in these transform filters, but they all work correctly.
maybe I should set timestamp for every samples passed to next filter,
so I add such code:
...
CRefTime rtEnd = m_time + m_avgFrameTime;
pOutSample->SetTime(&m_time.m_time, &rtEnd.m_time);
m_time = rtEnd;
but it don't help, what's wrong with my filter?
Thanks a lot!

First check that the IMediaSeeking parameters are passed upstream
correctly. If you derive from the standard transform base class, then a QI
on your output pin for IMediaSeeking should create a CPosPassThru.

Then check what happens when your filter receives a flush operation. When
the app seeks, the following things happen:
- graph pauses
- seeking call is passed upstream to demux
- demux issues BeginFlush
- demux stops worker threads
- demux issues EndFlush
- demux starts worker threads
- worker threads begin Receive calls to your transform, preceded by a
NewSegment call.

G

.



Relevant Pages

  • Re: Seeking in an Mpeg graph
    ... I'm using the Microsoft MPEG Demux filter, and feeding it from my own ... push-source filter which has seeking methods as per the Ball seeking sample ... filter I'm setting the stream timestamps to the number of bytes offset into ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: Using WMAsfWriter with a file-based push-source
    ... So it seems the demux filter depends on the graph clock to run correctly. ... I'm not very familiar with the demux itself, but you can install the debug ...
    (microsoft.public.multimedia.directx.dshow.programming)
  • Re: Using WMAsfWriter with a file-based push-source
    ... I think I found the real culprit: the Cyberlink MPEG-2 decoder ("Cyberlink ... > So it seems the demux filter depends on the graph clock to run correctly. ...
    (microsoft.public.multimedia.directx.dshow.programming)
  • Re: Source filter which receives MPEG2 Program Stream via network
    ... Why does the Demux care about where and how I get the data? ... even create the pin on that filter myself? ... Program Stream and more or less just forward it to the demux / ... Your source filter has to create the pins on the demux and you will ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: Using WMAsfWriter with a file-based push-source
    ... The first thing I would do is to find which filter hangs the graph: ... Have you tested connecting the demux filter directly to the Dump filter? ... > I have stored MPEG-2 transport stream data into files. ... > So far I have implemented the push-source that reads data from a file. ...
    (microsoft.public.multimedia.directx.dshow.programming)