[MPlayer-dev-eng] [PATCH] JPEG video output to multiple subdirectories v5

Ivo ivop at euronet.nl
Wed Aug 11 05:23:15 CEST 2004


It always feels funny, replying to your own e-mail :) Anyway:

On Tuesday 10 August 2004 18:20, Ivo wrote:
> On Monday 09 August 2004 14:28, Attila Kinali wrote:
> > Can you put those strings into mp-help ? so they can be translated.
> > Please also check whether some old msgs could be recycled.
>
> I'm not completely familiar with the MPlayer codebase yet and wasn't
> aware of this functionality. I will look into it tonight.

There where no old messages I could reuse. I also noticed that no other VO 
driver makes good use of help_mp yet. I took the liberty to create a 
separate section for Video Output Drivers messages (MSGTR_VO_*). Since 
nobody uses it yet, I don't think it needs a separate patch, although I 
kept moving around and renaming other MSGTR messages to a minimum. Didn't 
rename (because other, non vo_jpeg related files would be effected) and 
moved only one (out of two candidates) messages to that section.

> > Bad idea. If something fatal happends, and i call the inability to
> > create a directory something fatal, then MPlayer should imediatly
> > fail and thus exit with an error code. Letting MPlayer run and thus
> > keep the image of everything being ok is the wrong way (and not user
> > friendly).
>
> Ok. Agreed. Is there a prefered way to exit the program (i.e. some
> cleanup function) or can I just call exit() ?

I looked around a bit and found exit_player(). That's what I used at all 
places (included mplayer.h for that) and MPlayer will terminate whenever it 
encounters a fatal error in the JPEG video output driver.

I also applied all other suggestions you made. maxfiles now defaults to 1000 
(people can always change it to what suits their filesystem best) and 
perror() is no longer used. I pass strerror(errno) to mp_msg now.

On a sidenote: IMHO all printf's in all other VO drivers should be replaced 
by mp_msg calls with appropriate MSGTR_VO_* definitions. That's beyond the 
scope of this patch, but if I can be sure I got the hang of this codebase 
by now (sort-of), I'll be happy to do that. Also, I think all VO drivers 
should honour the "-vo driver:options" way of passing options, instead of 
having separate commandline switches like -jpeg, -adapter, -dfbopts, -zr* 
et cetera. Let me know what you think. I could get working on that after 
this.

Updated manpage with new default value(s) too. Patch is against current CVS.

--Ivo

-------------- next part --------------
A non-text attachment was scrubbed...
Name: vo_jpeg_patch_v5
Type: text/x-diff
Size: 9342 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20040811/00f9eeae/attachment.diff>


More information about the MPlayer-dev-eng mailing list