[FFmpeg-devel] [PATCH] Implement common show_banner and show_version functions

Michael Niedermayer michaelni
Wed Sep 12 20:34:30 CEST 2007


Hi

On Sun, Sep 09, 2007 at 11:15:50PM +0200, Stefano Sabatini wrote:
> On date Sunday 2007-09-09 19:47:04 +0200, Michael Niedermayer encoded:
> > Hi
> > 
> > On Sun, Sep 09, 2007 at 06:18:55PM +0200, Stefano Sabatini wrote:
> > > Hi all,
> > > 
> > > the idea is to provide more consistency in behaviour and appearance
> > > across the ff* utils. For example to show up the banner on stderr at
> > > program startup seems like a good idea, and this patch makes trivial
> > > to implement such a feature for ffserver and ffplay too in a
> > > consistent manner.
> > > 
> > > A drawback of this patch is that it requires to define for each
> > > ff* tool the variables program_name and program_birth_year.
> > 
> > you can pass these as arguments or?
> 
> Yes like in the attached patch.
> 
> But I still somehow prefer the previous way, program_name and
> program_birth_year are better defined just one time at the beginning
> of the file rather than to be passed around as function arguments.

so why not
static const char *application_name= "my program";
...

show_banner(application_name, ...);


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I do not agree with what you have to say, but I'll defend to the death your
right to say it. -- Voltaire
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070912/544fd4b5/attachment.pgp>



More information about the ffmpeg-devel mailing list