[FFmpeg-devel] [PATCH] Make ffserver use parse_options()

Michael Niedermayer michaelni
Sun May 18 14:29:48 CEST 2008


On Sun, May 18, 2008 at 09:38:55AM +0200, Stefano Sabatini wrote:
> On date Sunday 2008-05-18 03:11:56 +0200, Michael Niedermayer encoded:
> > On Sun, May 18, 2008 at 12:57:10AM +0200, Stefano Sabatini wrote:
> > > 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
> > 
> > You are sure aware that your code above contains that forward declaration
> > as well.
> 
> Yes but it was late night yesterday...

And now its early in the morning i assume?


>  
> > > I prefer to define consistently all the opt_* before the options
> > > array, anyway i reckon this is just pickyness so do as you prefer.
> > 
> > Well then define them all before the array, its not my fault if you do not.
> 
> No I can't because opt_show_help() uses the options array itself, so I
> have to define it before.

You can forward declare the array ...

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

Breaking DRM is a little like attempting to break through a door even
though the window is wide open and the only thing in the house is a bunch
of things you dont want and which you would get tomorrow for free anyway
-------------- 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/20080518/19a93592/attachment.pgp>



More information about the ffmpeg-devel mailing list