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

Nico nsabbi at libero.it
Mon Apr 14 23:35:53 CEST 2003



Arpi wrote:

> 
> Yes it's not so common, the only case i've seen is on multi-track VCD with
> ES on first track on PS on the second.
> The real reason for impelmenting this ability to handle misdetections well.
> Imagine a badly cutted ('dd' is not an GOP-accurate mpeg editor :)) PS file,
> which looks like PES or ES when you check the first few blocks.

So even for merging files it can be very useful :)

> Now my parser starts parsing it, if it begins with ES packets it will be
> read as ES (so even broken PS packets will be recovered) but if it sees PS
> headers it switch to PS parser until it lost sync and then resync again.
> The parser is not optimized for stream type changes but it handls it as a
> side-effect :)

This is  being smart :)


> Btw i've just finished merging demux_ts into demux_mpeg, so no more
> redundant PES parser code. CUrrently it's a 2-in-1 demuxer, but I'm thinking
> about moving TS detection into the ES/PS parser's sync loop so it will even
> allow TS<->PS/PES<->ES transitions :)

This is what I hoped to read soon :)

> 
> 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.

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
is it possible to use that method in mplayer too?
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.
If it's possible  to collect bitrate statistics about all streams 
present the problem is theoretically solved, right?

> A'rpi / Astral & ESP-team
> 
> --
> Developer of MPlayer, the Movie Player for Linux - http://www.MPlayerHQ.hu
> 
> _______________________________________________
> MPlayer-dev-eng mailing list
> MPlayer-dev-eng at mplayerhq.hu
> http://mplayerhq.hu/mailman/listinfo/mplayer-dev-eng
> 




More information about the MPlayer-dev-eng mailing list