[MPlayer-dev-eng] [PATCH] Improving handling of PES files
Christian Aistleitner
zaek7q at gmx.net
Wed Jan 24 18:59:30 CET 2007
Hello,
>> [ short description of patch ]
>
> there are two problems with this patch:
> 1) cosmetics overflow
I do not really understand that point.
I did not tamper with the spacings of existing code.
I did not change positions of braces.
I did not rename of variables.
I could not find a document describing MPlayer's coding conventions.
Can you please point me towards what you mean by "cosmetics overflow"
I added two comments to existing members of the mpg_demuxer.
One for last_pts, as without the comment it is not obvious whether or not
it refers to the most recently found one or the last one in the stream.
Another comment has been applied to has_valid_timestamps as its name daes
not describe what it means and additionally my patch gives it a breader
more well defined sense.
Are you refering to that?
> 2) too much seeking (unacceptable, think of what happens on non-file
> streams) and too much complication (that is not worth the result, in any
> case).
>
> If you want precise seeking you should implement -idx instead
Currently MPlayer performs two seeks (although these are rather
obfuscated). The first seek ggoes to half_pos, the second near the end of
the stream. For the PES files I record, these two seeks never lead to
"has_valid_timestamps" being true, although my timestamps are neither
wrong nor fancy.
My patch performs three seeks (i.e.: one additional seek). I made these
seeks more evident, as I am factored the seeking code into the new
function read_first_mpeg_pts_at_position. However, with these three seeks
all of my PES files (except for those where the timestamp overruns) have
"has_valid_timestamps" set to true. And additionally, I know the runtime
of the file.
These seeks are performed only once when opening the stream.
I'd rather go for three initial seeks which give me better seeking
accuracy and runtime information instead of two wasted seeks as for
MPlayer without my patch.
Kind regerds,
Christian
More information about the MPlayer-dev-eng
mailing list