Mercurial > libavcodec.hg
annotate opt.h @ 3420:54814e15aa3d libavcodec
Mark some read-only datastructures as const.
patch by Stefan Huehner, stefan & at & huehner & dot & org
author | diego |
---|---|
date | Thu, 06 Jul 2006 13:53:07 +0000 |
parents | ef2149182f1c |
children | c537a97eec66 |
rev | line source |
---|---|
2874
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
1 #ifndef AVOPT_H |
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
2 #define AVOPT_H |
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
3 |
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
4 /** |
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
5 * @file opt.h |
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
6 * AVOptions |
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
7 */ |
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
8 |
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
9 enum AVOptionType{ |
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
10 FF_OPT_TYPE_FLAGS, |
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
11 FF_OPT_TYPE_INT, |
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
12 FF_OPT_TYPE_INT64, |
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
13 FF_OPT_TYPE_DOUBLE, |
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
14 FF_OPT_TYPE_FLOAT, |
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
15 FF_OPT_TYPE_STRING, |
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
16 FF_OPT_TYPE_RATIONAL, |
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
17 FF_OPT_TYPE_CONST=128, |
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
18 }; |
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
19 |
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
20 /** |
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
21 * AVOption. |
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 typedef struct AVOption { |
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
24 const char *name; |
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
25 |
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 * short English text help. |
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
28 * @fixme what about other languages |
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
29 */ |
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
30 const char *help; |
2967 | 31 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
|
32 enum AVOptionType type; |
2967 | 33 |
2874
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
34 double default_val; |
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
35 double min; |
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
36 double max; |
2967 | 37 |
2874
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
38 int flags; |
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
39 #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
|
40 #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
|
41 #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
|
42 #define AV_OPT_FLAG_AUDIO_PARAM 8 |
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
43 #define AV_OPT_FLAG_VIDEO_PARAM 16 |
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
44 #define AV_OPT_FLAG_SUBTITLE_PARAM 32 |
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
45 //FIXME think about enc-audio, ... style flags |
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
46 const char *unit; |
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
47 } AVOption; |
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 |
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
50 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
|
51 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
|
52 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
|
53 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
|
54 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
|
55 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
|
56 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
|
57 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
|
58 AVOption *av_next_option(void *obj, AVOption *last); |
2876 | 59 int av_opt_show(void *obj, void *av_log_obj); |
2874
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
60 |
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
61 #endif |