annotate opt.h @ 3944:edacbbf46a19 libavcodec

Compilation fix, printf gets redefined to please_use_av_log.
author diego
date Sat, 07 Oct 2006 11:30:24 +0000
parents 7e7d8a3fe080
children c8c591fe26f8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3699
c537a97eec66 Add official LGPL license headers to the files that were missing them.
diego
parents: 2967
diff changeset
1 /*
c537a97eec66 Add official LGPL license headers to the files that were missing them.
diego
parents: 2967
diff changeset
2 * AVOptions
c537a97eec66 Add official LGPL license headers to the files that were missing them.
diego
parents: 2967
diff changeset
3 * copyright (c) 2005 Michael Niedermayer <michaelni@gmx.at>
c537a97eec66 Add official LGPL license headers to the files that were missing them.
diego
parents: 2967
diff changeset
4 *
c537a97eec66 Add official LGPL license headers to the files that were missing them.
diego
parents: 2967
diff changeset
5 * This library is free software; you can redistribute it and/or
c537a97eec66 Add official LGPL license headers to the files that were missing them.
diego
parents: 2967
diff changeset
6 * modify it under the terms of the GNU Lesser General Public
c537a97eec66 Add official LGPL license headers to the files that were missing them.
diego
parents: 2967
diff changeset
7 * License as published by the Free Software Foundation; either
c537a97eec66 Add official LGPL license headers to the files that were missing them.
diego
parents: 2967
diff changeset
8 * version 2 of the License, or (at your option) any later version.
c537a97eec66 Add official LGPL license headers to the files that were missing them.
diego
parents: 2967
diff changeset
9 *
c537a97eec66 Add official LGPL license headers to the files that were missing them.
diego
parents: 2967
diff changeset
10 * This library is distributed in the hope that it will be useful,
c537a97eec66 Add official LGPL license headers to the files that were missing them.
diego
parents: 2967
diff changeset
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
c537a97eec66 Add official LGPL license headers to the files that were missing them.
diego
parents: 2967
diff changeset
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
c537a97eec66 Add official LGPL license headers to the files that were missing them.
diego
parents: 2967
diff changeset
13 * Lesser General Public License for more details.
c537a97eec66 Add official LGPL license headers to the files that were missing them.
diego
parents: 2967
diff changeset
14 *
c537a97eec66 Add official LGPL license headers to the files that were missing them.
diego
parents: 2967
diff changeset
15 * You should have received a copy of the GNU Lesser General Public
c537a97eec66 Add official LGPL license headers to the files that were missing them.
diego
parents: 2967
diff changeset
16 * License along with this library; if not, write to the Free Software
c537a97eec66 Add official LGPL license headers to the files that were missing them.
diego
parents: 2967
diff changeset
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
c537a97eec66 Add official LGPL license headers to the files that were missing them.
diego
parents: 2967
diff changeset
18 */
c537a97eec66 Add official LGPL license headers to the files that were missing them.
diego
parents: 2967
diff changeset
19
2874
b6def74f5811 flags and named constants with type checking of course for AVOption
michael
parents:
diff changeset
20 #ifndef AVOPT_H
b6def74f5811 flags and named constants with type checking of course for AVOption
michael
parents:
diff changeset
21 #define AVOPT_H
b6def74f5811 flags and named constants with type checking of course for AVOption
michael
parents:
diff changeset
22
b6def74f5811 flags and named constants with type checking of course for AVOption
michael
parents:
diff changeset
23 /**
b6def74f5811 flags and named constants with type checking of course for AVOption
michael
parents:
diff changeset
24 * @file opt.h
b6def74f5811 flags and named constants with type checking of course for AVOption
michael
parents:
diff changeset
25 * AVOptions
b6def74f5811 flags and named constants with type checking of course for AVOption
michael
parents:
diff changeset
26 */
b6def74f5811 flags and named constants with type checking of course for AVOption
michael
parents:
diff changeset
27
b6def74f5811 flags and named constants with type checking of course for AVOption
michael
parents:
diff changeset
28 enum AVOptionType{
b6def74f5811 flags and named constants with type checking of course for AVOption
michael
parents:
diff changeset
29 FF_OPT_TYPE_FLAGS,
b6def74f5811 flags and named constants with type checking of course for AVOption
michael
parents:
diff changeset
30 FF_OPT_TYPE_INT,
b6def74f5811 flags and named constants with type checking of course for AVOption
michael
parents:
diff changeset
31 FF_OPT_TYPE_INT64,
b6def74f5811 flags and named constants with type checking of course for AVOption
michael
parents:
diff changeset
32 FF_OPT_TYPE_DOUBLE,
b6def74f5811 flags and named constants with type checking of course for AVOption
michael
parents:
diff changeset
33 FF_OPT_TYPE_FLOAT,
b6def74f5811 flags and named constants with type checking of course for AVOption
michael
parents:
diff changeset
34 FF_OPT_TYPE_STRING,
b6def74f5811 flags and named constants with type checking of course for AVOption
michael
parents:
diff changeset
35 FF_OPT_TYPE_RATIONAL,
b6def74f5811 flags and named constants with type checking of course for AVOption
michael
parents:
diff changeset
36 FF_OPT_TYPE_CONST=128,
b6def74f5811 flags and named constants with type checking of course for AVOption
michael
parents:
diff changeset
37 };
b6def74f5811 flags and named constants with type checking of course for AVOption
michael
parents:
diff changeset
38
b6def74f5811 flags and named constants with type checking of course for AVOption
michael
parents:
diff changeset
39 /**
b6def74f5811 flags and named constants with type checking of course for AVOption
michael
parents:
diff changeset
40 * AVOption.
b6def74f5811 flags and named constants with type checking of course for AVOption
michael
parents:
diff changeset
41 */
b6def74f5811 flags and named constants with type checking of course for AVOption
michael
parents:
diff changeset
42 typedef struct AVOption {
b6def74f5811 flags and named constants with type checking of course for AVOption
michael
parents:
diff changeset
43 const char *name;
b6def74f5811 flags and named constants with type checking of course for AVOption
michael
parents:
diff changeset
44
b6def74f5811 flags and named constants with type checking of course for AVOption
michael
parents:
diff changeset
45 /**
b6def74f5811 flags and named constants with type checking of course for AVOption
michael
parents:
diff changeset
46 * short English text help.
b6def74f5811 flags and named constants with type checking of course for AVOption
michael
parents:
diff changeset
47 * @fixme what about other languages
b6def74f5811 flags and named constants with type checking of course for AVOption
michael
parents:
diff changeset
48 */
b6def74f5811 flags and named constants with type checking of course for AVOption
michael
parents:
diff changeset
49 const char *help;
2967
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2876
diff changeset
50 int offset; ///< offset to context structure where the parsed value should be stored
2874
b6def74f5811 flags and named constants with type checking of course for AVOption
michael
parents:
diff changeset
51 enum AVOptionType type;
2967
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2876
diff changeset
52
2874
b6def74f5811 flags and named constants with type checking of course for AVOption
michael
parents:
diff changeset
53 double default_val;
b6def74f5811 flags and named constants with type checking of course for AVOption
michael
parents:
diff changeset
54 double min;
b6def74f5811 flags and named constants with type checking of course for AVOption
michael
parents:
diff changeset
55 double max;
2967
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2876
diff changeset
56
2874
b6def74f5811 flags and named constants with type checking of course for AVOption
michael
parents:
diff changeset
57 int flags;
b6def74f5811 flags and named constants with type checking of course for AVOption
michael
parents:
diff changeset
58 #define AV_OPT_FLAG_ENCODING_PARAM 1 ///< a generic parameter which can be set by the user for muxing or encoding
b6def74f5811 flags and named constants with type checking of course for AVOption
michael
parents:
diff changeset
59 #define AV_OPT_FLAG_DECODING_PARAM 2 ///< a generic parameter which can be set by the user for demuxing or decoding
b6def74f5811 flags and named constants with type checking of course for AVOption
michael
parents:
diff changeset
60 #define AV_OPT_FLAG_METADATA 4 ///< some data extracted or inserted into the file like title, comment, ...
b6def74f5811 flags and named constants with type checking of course for AVOption
michael
parents:
diff changeset
61 #define AV_OPT_FLAG_AUDIO_PARAM 8
b6def74f5811 flags and named constants with type checking of course for AVOption
michael
parents:
diff changeset
62 #define AV_OPT_FLAG_VIDEO_PARAM 16
b6def74f5811 flags and named constants with type checking of course for AVOption
michael
parents:
diff changeset
63 #define AV_OPT_FLAG_SUBTITLE_PARAM 32
b6def74f5811 flags and named constants with type checking of course for AVOption
michael
parents:
diff changeset
64 //FIXME think about enc-audio, ... style flags
b6def74f5811 flags and named constants with type checking of course for AVOption
michael
parents:
diff changeset
65 const char *unit;
b6def74f5811 flags and named constants with type checking of course for AVOption
michael
parents:
diff changeset
66 } AVOption;
b6def74f5811 flags and named constants with type checking of course for AVOption
michael
parents:
diff changeset
67
b6def74f5811 flags and named constants with type checking of course for AVOption
michael
parents:
diff changeset
68
b6def74f5811 flags and named constants with type checking of course for AVOption
michael
parents:
diff changeset
69 AVOption *av_set_string(void *obj, const char *name, const char *val);
b6def74f5811 flags and named constants with type checking of course for AVOption
michael
parents:
diff changeset
70 AVOption *av_set_double(void *obj, const char *name, double n);
b6def74f5811 flags and named constants with type checking of course for AVOption
michael
parents:
diff changeset
71 AVOption *av_set_q(void *obj, const char *name, AVRational n);
b6def74f5811 flags and named constants with type checking of course for AVOption
michael
parents:
diff changeset
72 AVOption *av_set_int(void *obj, const char *name, int64_t n);
b6def74f5811 flags and named constants with type checking of course for AVOption
michael
parents:
diff changeset
73 double av_get_double(void *obj, const char *name, AVOption **o_out);
b6def74f5811 flags and named constants with type checking of course for AVOption
michael
parents:
diff changeset
74 AVRational av_get_q(void *obj, const char *name, AVOption **o_out);
b6def74f5811 flags and named constants with type checking of course for AVOption
michael
parents:
diff changeset
75 int64_t av_get_int(void *obj, const char *name, AVOption **o_out);
b6def74f5811 flags and named constants with type checking of course for AVOption
michael
parents:
diff changeset
76 const char *av_get_string(void *obj, const char *name, AVOption **o_out, char *buf, int buf_len);
b6def74f5811 flags and named constants with type checking of course for AVOption
michael
parents:
diff changeset
77 AVOption *av_next_option(void *obj, AVOption *last);
2876
8026edf6a349 avoid stdio.h
michael
parents: 2874
diff changeset
78 int av_opt_show(void *obj, void *av_log_obj);
3702
7e7d8a3fe080 make AVOptions default value field work.
gpoirier
parents: 3699
diff changeset
79 void av_opt_set_defaults(void *s);
2874
b6def74f5811 flags and named constants with type checking of course for AVOption
michael
parents:
diff changeset
80
b6def74f5811 flags and named constants with type checking of course for AVOption
michael
parents:
diff changeset
81 #endif