[FFmpeg-devel] [PATCH] show-banner and show-license as cmdutils.c functions
Stefano Sabatini
stefano.sabatini-lala
Wed Aug 8 10:57:29 CEST 2007
On date Tuesday 2007-08-07 22:34:29 +0200, Michael Niedermayer encoded:
[...]
> > Second attempt, regression test passed.
> >
> > Suggested log: implement show_version and show_license as cmdutils.c functions.
[...]
> > @@ -3575,9 +3576,9 @@
> >
> > const OptionDef options[] = {
> > /* main options */
> > - { "L", 0, {(void*)show_license}, "show license" },
> > + { "L", 0, {(void*)opt_show_license}, "show license" },
> > { "h", 0, {(void*)show_help}, "show help" },
> > - { "version", 0, {(void*)show_version}, "show version" },
> > + { "version", 0, {(void*)opt_show_version}, "show version" },
> > { "formats", 0, {(void*)show_formats}, "show available formats, codecs, protocols, ..." },
>
> these changes do NOT belong in this patch, they are not needed for
> moving the code to cmdutils
No they belong to this patch, since I defined the symbols show_version
and show_license in cmdutils.o, so I can't use them for handling the
-license and -version options. Anyway it's also better to prefix
opt_show_version and opt_show_license with "opt", to highlight that
they're option handler functions (and for consistency with the
prelevant use in ffmpeg.c).
> [...]
> > int main(int argc, char **argv)
> > {
> > int i;
> > @@ -3810,12 +3753,12 @@
> > avformat_opts = av_alloc_format_context();
> > sws_opts = sws_getContext(16,16,0, 16,16,0, sws_flags, NULL,NULL,NULL);
> >
> > - show_banner();
> > + show_version(stderr, "ffmpeg");
>
> this changes FFmpeg to ffmpeg
Fixed.
> > if (argc <= 1)
> > show_help();
> >
> > /* parse options */
> > - parse_options(argc, argv, options);
> > + parse_options(argc, argv, options, opt_output_file);
> >
>
> this belongs into a seperate patch
Fixed; this also means that corresponding changes in ffplay.c and
ffserver.c will go into different patches.
Cheers.
--
Stefano Sabatini
Linux user number 337176 (see http://counter.li.org)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: show-banner-and-license-as-cmdutils-functions-02.patch
Type: text/x-diff
Size: 8044 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070808/7b7870f2/attachment.patch>
More information about the ffmpeg-devel
mailing list