Commit Graph

68 Commits

Author SHA1 Message Date
Aurelien Jacobs
838dc131f1 add FF_API_SET_STRING_OLD define to disable the deprecated av_set_string API
Originally committed as revision 25276 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-30 20:34:35 +00:00
Michael Niedermayer
6ed040408b Move AVOptions from libavcodec to libavutil
Originally committed as revision 25210 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-26 14:25:22 +00:00
Stefano Sabatini
e44c01563f Deprecate av_opt_show() in favor of a new function av_opt_show2(),
which allows to specify only a subset of all the options to show.

Originally committed as revision 25166 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-24 00:51:40 +00:00
Stefano Sabatini
0b99215c0e Move eval.c and eval.h from libavcodec to libavutil, and make the eval
API public.

Originally committed as revision 23485 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-05 12:01:28 +00:00
Stefano Sabatini
9ace13b416 Make ff_parse_expr() and ff_parse_and_eval_expr() return an int
containing an error code.

Allow these functions to convey the reason of the failure to the
calling function, failure which is not always due to a parsing error
but it may depend for example on a memory problem.

Also fix several potential memleaks.

Originally committed as revision 23402 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-01 08:07:07 +00:00
Michael Niedermayer
2b65bb45b5 Change eval API to take parent log context and log level offset.
this is based on stefanos work, especially all bugs are his fault ;)

Originally committed as revision 23201 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-19 22:55:29 +00:00
Stefano Sabatini
edd259f92f Change the order of parameters for ff_eval_expr() and
ff_parse_and_eval_expr(), place the names for constants/functions
before the corresponding values.

This looks more readable, as the user is expected to know the names
before the values.

Originally committed as revision 23149 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-16 23:00:22 +00:00
Diego Biurrun
ba87f0801d Remove explicit filename from Doxygen @file commands.
Passing an explicit filename to this command is only necessary if the
documentation in the @file block refers to a file different from the
one the block resides in.

Originally committed as revision 22921 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-04-20 14:45:34 +00:00
Stefano Sabatini
a367be1e88 Rename ff_eval2() to ff_parse_and_eval_expr().
The new name better expresses what the function does.

Originally committed as revision 22845 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-04-11 22:32:04 +00:00
Stefano Sabatini
e8a9d01846 Fix misc typos, patch by
Fabian Greffrath base64_decode(PGZhYmlhbkBncmVmZnJhdGguY29tPg==).

Originally committed as revision 21473 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-27 00:31:52 +00:00
Michael Niedermayer
c69b3e0dc1 Revert r20249, it seems the union trick works everywhere
Original commit message:
	Very evil missuse of svn to test if AVOption and AVOption2 are compatible.
	If this test triggers anywhere for anyone, revert this commit immedeatly.
	Ill revert this in a day or 2, its just so we know beforehand if the idea
	with the union is doable or not without breaking ABI/API.

Originally committed as revision 20264 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-10-17 19:35:47 +00:00
Michael Niedermayer
b388d5e4c6 Very evil missuse of svn to test if AVOption and AVOption2 are compatible.
If this test triggers anywhere for anyone, revert this commit immedeatly.
Ill revert this in a day or 2, its just so we know beforehand if the idea
with the union is doable or not without breaking ABI/API.

Originally committed as revision 20249 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-10-16 12:35:49 +00:00
Michael Niedermayer
1fe4abf397 Revert:
r18826 | stefano | 2009-05-14 20:50:58 +0200 (Thu, 14 May 2009) | 2 lines
	Make av_set_string3() print a message in case of unknown option.

This change led to multiple identical error messages to be printed if an option
was not found.

Originally committed as revision 20172 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-10-05 20:18:16 +00:00
Stefano Sabatini
be1fb76fa1 Make av_set_string3() print a message in case of unknown option.
Originally committed as revision 18826 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-05-14 18:50:58 +00:00
Stefano Sabatini
50f68bdebf Provide a context to av_log() calls in av_set_number2() and
av_set_string3().

Originally committed as revision 18825 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-05-14 18:43:43 +00:00
Diego Biurrun
bad5537e2c Use full internal pathname in doxygen @file directives.
Otherwise doxygen complains about ambiguous filenames when files exist
under the same name in different subdirectories.

Originally committed as revision 16912 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-02-01 02:00:19 +00:00
Andreas Öman
11c23b64ac Revert r16257:
Include "libavutil/common.h" where we use llrint() in case ffmpeg's
own llrint() is to be used.

Originally committed as revision 16282 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-12-22 22:39:55 +00:00
Andreas Öman
1af34f094e Include "libavutil/common.h" where we use llrint() in case ffmpeg's
own llrint() is to be used.

Originally committed as revision 16257 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-12-21 21:53:42 +00:00
Stefano Sabatini
64e74b68a4 Put under #if LIBAVCODEC_VERSION_MAJOR < 53 the deprecated functions
av_set_string() and av_set_string2(), they will be dropped at the next
major bump.

Originally committed as revision 16243 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-12-19 22:37:56 +00:00
Stefano Sabatini
f16dd7e65a Remove calls to deprecated av_set_string2() with calls to
av_set_string3().

Originally committed as revision 16241 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-12-19 22:29:30 +00:00
Stefano Sabatini
7b1454c439 Implement av_set_string3().
Originally committed as revision 16175 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-12-16 21:35:35 +00:00
Stefano Sabatini
301cc4f370 Implement the av_set_number2() internal function, which makes possible
to distinguish between a not found option failure and a not valid
value failure.

Originally committed as revision 16156 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-12-15 22:48:10 +00:00
Stefano Sabatini
a59d44fdf4 Remove ending period in a log message, which was inconsistent with
most other messages.

Originally committed as revision 16155 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-12-15 22:40:28 +00:00
Stefano Sabatini
54c441c860 Remove set_all_opt() and its use in av_set_string2(). Make
av_set_string() and av_set_string2() do not accept as parameter the
name of a named constant.

This avoids av_set_string2() and av_set_string() to misbehave when
there is an option and a named constant with the same name.

See the thread: "[PATCH] Remove libavcodec/opt.c:set_all_opt()".

Originally committed as revision 16134 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-12-14 21:34:12 +00:00
Michael Niedermayer
36d5b17514 Fix FF_OPT_TYPE_INT64 support of defaults.
Originally committed as revision 16008 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-12-05 14:55:43 +00:00
Stefano Sabatini
f969058998 Fix the logic to access the location of a string to free when setting
a new value for a string with av_set_string2(). Fix a segmentation
fault.

Originally committed as revision 14219 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-13 21:28:17 +00:00
Michael Niedermayer
8dbee6538d Fix the av_set_string() free / alloc issue.
Originally committed as revision 14134 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-08 23:50:03 +00:00
Stefan Gehrer
cf2baeb338 mark read-only data as const
Originally committed as revision 13947 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-06-24 20:01:31 +00:00
Michael Niedermayer
9d2e6e84ce Anoter try to make +- behave sanely.
Originally committed as revision 13281 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-05-24 12:58:20 +00:00
Michael Niedermayer
4a13a2d4f7 Fix + - bug with non flags.
Originally committed as revision 13243 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-05-23 00:29:21 +00:00
Stefano Sabatini
5cec11b612 Make av_set_string() fail when number could not be set.
Patch by Stefano Sabatini stefano§sabatini-lalaATposte§it

Originally committed as revision 13155 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-05-15 01:03:48 +00:00
Stefano Sabatini
9203741a46 Update offset in the option string later, to have a better error message.
Patch by Stefano Sabatini stefanoTODsabatini-lalaCHEZposteTODit

Originally committed as revision 13153 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-05-14 02:14:11 +00:00
Stefano Sabatini
0be2f1e3f0 Fix a typo.
Patch by Stefano Sabatini stefanoDOTsabatini-lalaATpostePOINTit

Originally committed as revision 13140 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-05-13 00:49:38 +00:00
Michael Niedermayer
378774e9a8 Fix handling flags with the MSB set.
Originally committed as revision 12324 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-03-05 03:59:07 +00:00
Luca Abeni
408ed51cdb Fix
opt.c: In function ‘av_set_string’:
opt.c:164: warning: passing argument 9 of ‘ff_eval2’ from incompatible pointer type

Originally committed as revision 11937 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-02-15 11:38:38 +00:00
Reimar Döffinger
841f39a7f3 Add FF_OPT_TYPE_BINARY and use it to add a cryptokey option
Originally committed as revision 11250 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-12-17 17:41:24 +00:00
Reimar Döffinger
603972fc53 Add a missing break, before av_set_number would always return NULL for
FF_OPT_TYPE_RATIONAL options instead of the corresponding AVOption

Originally committed as revision 11213 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-12-13 19:00:53 +00:00
Michael Niedermayer
b81f2b3d2f simplify
Originally committed as revision 11141 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-12-03 01:06:00 +00:00
Michael Niedermayer
24cdc39e9d make the AVOption code work with strings instead of crash
Originally committed as revision 11140 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-12-03 01:03:54 +00:00
Diego Biurrun
e5a389a1b7 license header consistency cosmetics
Originally committed as revision 9484 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-07-05 10:40:25 +00:00
Kamil Nowosad
a4072c453b Fix a bug in av_find_opt(). Because some of the AVOption structures have field
unit = NULL, the function could pass NULL to strcmp and cause a segfault.

Patch by Kamil Nowosad, k nowosad % students mimuw edu pl.

Original thread:
Subject: [PATCH] small bugfix in av_find_opt()
Date: 03/23/2007 12:20 PM

Originally committed as revision 8553 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-03-30 09:26:13 +00:00
Limin Wang
226d6947bc add 'all' and 'none' options for partitions config
Patch by Limin Wang % lance P lmwang A gmail P com %
Original thread:
date: Mar 24, 2007 3:53 PM
subject: [Ffmpeg-devel] [PATCH] add all and none options for partitions config

Originally committed as revision 8552 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-03-30 09:05:52 +00:00
Michael Niedermayer
20e708cbbe add av_opt_set_defaults2() which sets just defaults from AVOptions whos flags match a user specified & mask = flags
Originally committed as revision 8280 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-03-07 02:21:35 +00:00
Michael Niedermayer
bc2a1c340a make av_find_opt() available to the public and add a mask+flags parameter to search for specific AVOptions
Originally committed as revision 8279 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-03-07 02:03:44 +00:00
Luca Barbato
f8a32f450a Constantize AVOption, solve few warnings, patch from flameeyes@gentoo.org aka "the other Diego"
Originally committed as revision 7601 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-01-21 12:32:01 +00:00
Dominik Mierzejewski
a10c779f76 Fixes:
opt.c:327: warning: no return statement in function returning non-void

opt_list return value is never checked.

Approved by Michael.

Originally committed as revision 6593 to svn://svn.ffmpeg.org/ffmpeg/trunk
2006-10-08 21:25:22 +00:00
Diego Biurrun
b78e7197a8 Change license headers to say 'FFmpeg' instead of 'this program/this library'
and fix GPL/LGPL version mismatches.

Originally committed as revision 6577 to svn://svn.ffmpeg.org/ffmpeg/trunk
2006-10-07 15:30:46 +00:00
Panagiotis Issaris
d70ef6d761 Reformat the output of the list of available AVOptions, by indenting the
parameters of certain options and displaying them _right after_ the actual
option taking the parameter.

Originally committed as revision 6385 to svn://svn.ffmpeg.org/ffmpeg/trunk
2006-09-29 19:36:12 +00:00
Panagiotis Issaris
4d7b4613a1 Pull out the ff_eval* from the mpegvideo header, as it doesn't belong there and
put it in a separate file.

Originally committed as revision 6383 to svn://svn.ffmpeg.org/ffmpeg/trunk
2006-09-29 19:33:04 +00:00
Panagiotis Issaris
95c9943081 Make AVOption parsign code use ff_eval2()
Originally committed as revision 6357 to svn://svn.ffmpeg.org/ffmpeg/trunk
2006-09-27 20:01:39 +00:00