Re: mpeg2 demux output pin buffer size
- From: dev <krt.dev@xxxxxxxxx>
- Date: Thu, 18 Sep 2008 07:32:10 -0700 (PDT)
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
.
- Follow-Ups:
- Re: mpeg2 demux output pin buffer size
- From: Geraint Davies
- Re: mpeg2 demux output pin buffer size
- References:
- mpeg2 demux output pin buffer size
- From: dev
- Re: mpeg2 demux output pin buffer size
- From: Geraint Davies
- Re: mpeg2 demux output pin buffer size
- From: dev
- Re: mpeg2 demux output pin buffer size
- From: Geraint Davies
- mpeg2 demux output pin buffer size
- Prev by Date: DirectShow timestamps vs RTP
- Next by Date: Re: DirectShow timestamps vs RTP
- Previous by thread: Re: mpeg2 demux output pin buffer size
- Next by thread: Re: mpeg2 demux output pin buffer size
- Index(es):
Relevant Pages
|