[MPlayer-dev-eng] NUT, what's left

Oded Shimon ods15 at ods15.dyndns.org
Sat Sep 17 18:17:52 CEST 2005


On Sat, Sep 17, 2005 at 12:16:12PM -0400, Rich Felker wrote:
> On Sat, Sep 17, 2005 at 06:45:29PM +0300, Oded Shimon wrote:
> > I think we should have a compromise - both info packets (with an info 
> > startcode and packet header), and info streams, which never have a 
> > startcode and conform exactly as in this patch.
> > 
> > This is most sane imo. the global info packets have no pts, can be repeated 
> > easily, etc.
> > the info frames have an associated pts, and index, etc.
> 
> I agree, this is what I like.
> 
> > if we do agree on this, we should also make it a requirement that info 
> > packets can only ever comes after the headers! i.e. they'd be identical to 
> > stream headers - only after the header, and repeated together with the 
> > header. although come to think of it, the repeating should not be manditory 
> > because it could be very big (ugly png cover image or whatever).
> 
> The better to discourage idiots from including png covers and other
> nonsense.. :)
> 
> Actually this brings up a VERY good question with header repetition --
> what do we do when the global headers are huge and the user wants to
> repeat them in a way that violates max_distance? (The requirement that
> they all be together forbids putting a syncpoint between them, and it
> wouldn't make sense to put one there, but the requirement that
> syncpoints never be more than max_distance apart unless they have a
> single frame between them conflicts.. :)

Well, in this respect, my implementation already violates the spec.

nut_write_frame() is like this:

{
	check header repetition, put_headers();
	check if keyframe, decide smartly if to put a syncpoint;
	check syncpoint distance, put_syncpoint();
	write position in file in index now if necessary;
	put_frame();
}

note the check syncpoint distance is AFTER header repetition, so after a 
40kb frame and right before a header repetition, the syncpoint will be at 
the wrong place. IMO this is not a problem, the spec should be exntended 
slightly -
max_distance should be the max distance between startcodes!
and add a slight addition, after a header repetition, you MUST put a syncpoint!

how about that?

- ods15




More information about the MPlayer-dev-eng mailing list