[MPlayer-dev-eng] MP-G2 - new mpeg demuxer

Arpi arpi at thot.banki.hu
Tue Apr 15 21:28:54 CEST 2003


Hi,

> > Btw, did you know that the payload size field of the PES header is always
> > zero in TS streams?
> > 
> 
> As far as I know it can be zero for video streams only, but I may be 
> wrong (I read a faq about it). Effectively the actual code never uses 
> that field.
your code... i've implemented it but then found that it results dropped
packages so i removed that part.
anyway it has some sence to allow zero for video only, as there is another
demuxing layer (ES demuxer) which will drop junk data. but for audio it's
more problematic.

> A curiosity:
> In pes_parse2 you use new_demuxer_stream; in mplayer it's only used in 
> demuxer.c
> is it becase G2 is multi-stream from the start and mplayer isn't or

yes

> is it possible to use that method in mplayer too?

no

in mplayer you allocate sh_audio/sh_video structs for each available stream,
and have a single fixed audio and a single fixed video demuxer steram
(allocated by demuxer.c).

in g2, there is no sh_* struct (yet), your demuxer allocates demuxer streams
directly, as many as it want. this is one of teh major changes in g2.

> I ask it because one of the problems of demux_ts (mplayer) is that if 
> you want to seek precisely you have to know the bitrates of all streams 
> present, otherwise you can only make a very rough guesstimate.
> In TS there can be more VS, so this problems may exacerbate.
you can count bitrate in mplayer too, whenever you register a new stream
(allocate ts stream struct) you can add teh bitrate of the given stream to
the summarized total bitrate field of demuxer's priv struct.
maybe you need a 2-pass thing if you don't know teh bitrate imemdiately, so
first you flag that it's a new stream, and when bitrate is available and
this flag set, then add it to the totals.

> If it's possible  to collect bitrate statistics about all streams 
> present the problem is theoretically solved, right?

yes, but demuxers shouldn't do such things imho


A'rpi / Astral & ESP-team

--
Developer of MPlayer, the Movie Player for Linux - http://www.MPlayerHQ.hu



More information about the MPlayer-dev-eng mailing list