[FFmpeg-devel] [PATCH] Add "unofficial" command line option

Stefano Sabatini stefano.sabatini-lala
Wed Jun 16 01:03:43 CEST 2010


On date Wednesday 2010-06-16 08:06:06 +0930, Rodney Baker encoded:
> On Wed, 16 Jun 2010 07:36:10 Stefano Sabatini wrote:
> > On date Wednesday 2010-06-16 01:42:46 +0930, Rodney Baker encoded:
> > > This adds the "unofficial" command line option and leaves the current
> > > "inofficial" with a change to the description to note that it is to be
> > > deprecated.
> > > 
> > > There may be a cleaner way to do this - I am a rank beginner at this so I
> > > don't know if this is the right way handle this or not. I'm happy for
> > > someone to propose a better solution...
> > 
> > We use the
> > #if LIBAVSTUFF_VERSION_MAJOR < NEXT
> > ...
> > #endif
> > 
> > construct when we want to deprecate something, this way we're sure
> > that old stuff won't be kept around when we'll break compatibility
> > (which happens *only* at major version bumps).
> > 
> > [...]
> > 
> > Regards.
> 
> You mean like the attached? I note that there is a similar block of code 
> further up the options list. Is it OK to move these options up and use the 
> same #if...#endif block or would you prefer to leave them where they are (as 
> in the attached patch)?
> 
> BTW, this patch currently has the changes from the other proposed patches that 
> Michael has not yet approved because they break API, so I will revert those 
> changes for this patch if it is OK - just checking that this is what you 
> meant.
[...]
> Index: .
> ===================================================================
> --- .	(revision 23615)
> +++ .	(working copy)
> @@ -160,7 +160,10 @@
>  {"very", "strictly conform to a older more strict version of the spec or reference software", 0, FF_OPT_TYPE_CONST, FF_COMPLIANCE_VERY_STRICT, INT_MIN, INT_MAX, V|D|E, "strict"},
>  {"strict", "strictly conform to all the things in the spec no matter what consequences", 0, FF_OPT_TYPE_CONST, FF_COMPLIANCE_STRICT, INT_MIN, INT_MAX, V|D|E, "strict"},
>  {"normal", NULL, 0, FF_OPT_TYPE_CONST, FF_COMPLIANCE_NORMAL, INT_MIN, INT_MAX, V|D|E, "strict"},
> -{"inofficial", "allow unofficial extensions", 0, FF_OPT_TYPE_CONST, FF_COMPLIANCE_UNOFFICIAL, INT_MIN, INT_MAX, V|D|E, "strict"},
> +#if LIBAVCODEC_VERSION_MAJOR < 53
> +{"inofficial", "allow unofficial extensions (deprecated - use unofficial instead)", 0, FF_OPT_TYPE_CONST, FF_COMPLIANCE_UNOFFICIAL, INT_MIN, INT_MAX, V|D|E, "strict"},
> +#endif
> +{"unofficial", "allow unofficial extensions", 0, FF_OPT_TYPE_CONST, FF_COMPLIANCE_UNOFFICIAL, INT_MIN, INT_MAX, V|D|E, "strict"},
>  {"experimental", "allow non standardized experimental things", 0, FF_OPT_TYPE_CONST, FF_COMPLIANCE_EXPERIMENTAL, INT_MIN, INT_MAX, V|D|E, "strict"},
>  {"b_qoffset", "qp offset between P and B frames", OFFSET(b_quant_offset), FF_OPT_TYPE_FLOAT, 1.25, -FLT_MAX, FLT_MAX, V|E},
>  {"er", "set error detection aggressivity", OFFSET(error_recognition), FF_OPT_TYPE_INT, FF_ER_CAREFUL, INT_MIN, INT_MAX, A|V|D, "er"},

Yes, same should be done with FF_COMPLIANCE_INOFFICIAL, in the same
patch or maybe split if Michael prefers so (I prefer just one patch in
this case).

Also you may need to bump minor, as you're adding a new option and a
new symbol.

Regards.
-- 
FFmpeg = Formidable & Free Miracolous Pitiless Egregious Glue



More information about the ffmpeg-devel mailing list