Re: mpeg2 demux output pin buffer size



On Sep 17, 3:20 pm, Geraint Davies <gerai...@xxxxxxxxxx> wrote:
On Tue, 16 Sep 2008 23:46:39 -0700 (PDT), dev <krt....@xxxxxxxxx>
wrote:

1.Buffering input media samples data into temporary buffer and
returning S_FALSE from transofrm for such media samples.Is this
approach right for buffering?

If you're going to stick with a filter derived from CTransformFilter,
then probably you probably want to override Receive to handle the
allocation of output samples only as needed.

2. When the video filter has so much data to be buffered would not the
audio/video sync go for a toss ? Can I control this in any way?

Sync should be ok. The issue is that you need to read more of the file
before you get the first frame output and so I suppose you think that
audio will have already started.

In fact, the cueing mechanism allows for this. The graph enters pause
mode and data flows through the decoders. It does not complete the
transition to Run until all renderers have received data. The increase
in buffering will increase the time for the pause to complete, and so
might slow down startup of the video very slightly, but the video and
audio will both start at the same time.

3. Do I have to handle timestamping manually for this?

I don't see any reason why you should. You just need to ensure that
the input timestamps you receive from the demux are retained with the
frame so they can be correctly attached to the outgoing buffer that
corresponds.

G

Hi Geraint,

Thank you so much for the info,it was knowledgable.

Scenario:

Network source --> mpeg 2 demux --> My mpeg2 decoder --> video
ernderer
|
|-->audio decoder -->audio renderer



Limitation on my mpeg2 decoder filter[derived from transform filter]
is it has to maintian a window size and feed it to the thrid party
decoder wrapped inside it.
This window size is width * height.
Considering worst case 720 * 576 bytes i.e. 410kb worth data needs to
be buffered every time I feed to decoder.
When I do so it consumes one frame worth of data say 'X' bytes and
rest I have to feed again by maintaining the window size constant and
so on.



1. There could be 10 frames worth of data in my window , I have to
keep track of time stamp of all the samples which made this window.Is
my assumption right?

2. When decoder gives 1st decoded frame as output I need to attach its
corresponding timestamp. As I have said earlier MPEG2 demux splits
frames into chunks of 8192 bytes or lesser.
So this frame is generated out of 'n' IMediaSamples i.e. 'X' bytes are
made of 'n' samples. In this case which time stamp do I attach to the
stream ? 1st sample's or 'n'th the sample's time stamp?
Moreover I get error 0x80040249 for few samples[no time stamp has been
set]. I do not know what exactly this means.

Any input would be great help.

Regards,
Dev
.



Relevant Pages

  • Re: mpeg2 demux output pin buffer size
    ... I am decoding mpeg2 transport stream. ... My mpeg2 decoder expects one ... Is there any alternative to buffering? ... Is my assumption right that every frame has ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: mpeg2 demux output pin buffer size
    ... frame worth of data at once for decoding.But mpeg2 demux filter ... sync goes for a toss because of this buffering involved. ... feed data to the decoder. ... Is my assumption right that every frame has ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: mpeg2 demux output pin buffer size
    ... corresponding timestamp. ... So this frame is generated out of 'n' IMediaSamples i.e. 'X' bytes are ... In this case which time stamp do I attach to the ... the decoder will not come out. ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: double buffering
    ... >the middle of drawing a frame. ... If you're learning about double buffering, you might also want to look ... Once upon a time, not so long ago, we did not have frame ... whole and to display that whole. ...
    (comp.graphics.algorithms)
  • Re: Quake performance SGI vs Sun
    ... > Not on an SGI. ... No triple buffering. ... And it introduces one extra frame ... > driver combinations. ...
    (comp.sys.sun.hardware)