Re: mpeg2 demux output pin buffer size



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
.



Relevant Pages

  • STOP 0XD1 Error on XP SP2
    ... WARNING: Frame IP not in any known module. ... Timestamp: unavailable ... Checksum: 00000000 ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: Pause and resume AVI capture (an old chestnut )
    ... Heres my fillbuffer logic... ... Wait until its time to render the new frame (using Advisetime for ... Timestamp with currenttime from a internal clock (I have a private ...
    (microsoft.public.win32.programmer.directx.video)
  • Windows XP crashing after every boot and login
    ... My desktop Windows XP SP2 is crashing after every boot and login attempt. ... Frame IP not in any known module. ... Timestamp: unavailable ... Checksum: ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: GetDeliveryBuffer - initiating call to FillBuffer
    ... that you have sent a frame with a timestamp in the future and the ... not releasing the buffers correctly ... Sometimes a source filter that is not being constrained as to how fast ...
    (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)

Loading