[FFmpeg-devel] [PATCH] Make ffserver use parse_options()
Stefano Sabatini
stefano.sabatini-lala
Sun May 18 00:57:10 CEST 2008
On date Saturday 2008-05-17 23:02:39 +0200, Michael Niedermayer encoded:
> On Sat, May 17, 2008 at 01:18:20PM +0200, Stefano Sabatini wrote:
> > Hi all, as in subject,
> >
> > somehow improves both the user and the programmer interface of
> > ffserver.
> [...]
> > @@ -4339,10 +4329,45 @@
> > need_to_start_children = 1;
> > }
> >
> > +static void show_help();
> > +
> > +static void opt_show_help(void)
> > +{
> > + show_help();
> > + exit(0);
> > +}
> [...]
> > +static void show_help()
> > +{
> > + printf("usage: ffserver [options]\n"
> > + "Hyper fast multi format Audio/Video streaming server\n");
> > + printf("\n");
> > + show_help_options(options, "Main options:\n", 0, 0);
> > +}
>
> Am i missing something or could these 2 be merged?
No, you can indeed do as in the attached patch, though I don't like it
very much partly because I don't like forward declarations and because
I prefer to define consistently all the opt_* before the options
array, anyway i reckon this is just pickyness so do as you prefer.
(In ffplay and ffmpeg there is a reason to define two different
show_help and opt_show_help functions, since the help message is
printed also in other places not only in opt_show_help.)
Regards.
--
FFmpeg = Fast Fast Multimedia Portable ExchanGer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: make-ffserver-use-parse-options-01.patch
Type: text/x-diff
Size: 2691 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080518/84cce798/attachment.patch>
More information about the ffmpeg-devel
mailing list