Re: mpeg2 demux output pin buffer size
- From: Geraint Davies <geraintd@xxxxxxxxxx>
- Date: Thu, 18 Sep 2008 21:21:08 +0100
On Thu, 18 Sep 2008 07:32:10 -0700 (PDT), dev <krt.dev@xxxxxxxxx>
wrote:
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.
When you get a timestamp on a buffer, that timestamp applies (as with
the mpeg standard) to the first picture which begins in that packet
(even if it is only the first bits of the start code that is in that
packet). This means that you should not get more than one timestamp
for each picture.
You need to keep that timestamp and attach it to the corresponding
output picture (the one that is decoded from these bits). This
requires some support from your decoder -- remember that (for example)
if your data stream starts mid-gop the first few frames you feed into
the decoder will not come out.
On output from your decoder, you should attach a timestamp to each
picture. If there was one on input, use that. If not, extrapolate. If
you have to output a picture before you have any timestamp you can
validly choose to either drop it, extrapolate from 0 or set no
timestamp (I would extrapolate from 0). Also set the stop time to the
frame duration or the next frame start on every frame.
G
.
- Follow-Ups:
- Re: mpeg2 demux output pin buffer size
- From: dev
- 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
- Re: mpeg2 demux output pin buffer size
- From: dev
- mpeg2 demux output pin buffer size
- Prev by Date: Re: DirectShow timestamps vs RTP
- Next by Date: GMFBridge, Windowless VMR and Multiple Monitors
- Previous by thread: Re: mpeg2 demux output pin buffer size
- Next by thread: Re: mpeg2 demux output pin buffer size
- Index(es):
Relevant Pages
|
Loading