[MPlayer-dev-eng] [PATCH] Play longest track of a DVD - list DVD length - Try 2

danny guru at digitalfantasy.it
Tue Jul 20 00:08:52 CEST 2004


This is the second try, made against  (almost) last CVS.

The sintax, for mplayer, is 
	
	dvd://list

or

	dvd://longest

(or both separated by a :, like dvd://list:longest or dvd://longest:list ).

dvd://list list the times of all title of the dvd, dvd://longest play the 
longest one.

Passing both the options make the program list all titles AND play the 
longest.

The messages (info ones) are put on the include file, the error message (one) 
is left in the code, like the others.

If you pass something like dvd://list:-4 the parameter parsing is not done 
(the test against alpha parameter is done after the '-' one).

If you pass something wrong (like dvd://list:goodbye) the program exit.

With mencoder the program recognize -1, -2 and -3 as longest, list and 
longest:list option (it is the old way of setting dvd title).

There is a way (a variable, in this case) to know, at runtime, if the program 
running in mplayer or mencoder ?

In the parsing code I put a little helper function to get the string 
parameter.

This function should be 'buffer overflow' safe (one of the parameter is the 
size of the buffer that must be at least 2 bytes) but there are something 
already done in the common code ?

	Daniele Forghieri


-------------- next part --------------
A non-text attachment was scrubbed...
Name: longest.diff
Type: text/x-diff
Size: 7488 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20040720/59fa606b/attachment.diff>


More information about the MPlayer-dev-eng mailing list