]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/opt.h
convert svn:ignore properties to .gitignore files
[ffmpeg] / libavcodec / opt.h
index cbb7b565c1000135617506198975272edfcca37c..95147595b7fb8f5d3909d5b580fd92b5b1d61e17 100644 (file)
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
-#ifndef FFMPEG_OPT_H
-#define FFMPEG_OPT_H
+#ifndef AVCODEC_OPT_H
+#define AVCODEC_OPT_H
 
 /**
- * @file opt.h
+ * @file
  * AVOptions
  */
 
 #include "libavutil/rational.h"
+#include "avcodec.h"
+#include "libavutil/opt.h"
 
-enum AVOptionType{
-    FF_OPT_TYPE_FLAGS,
-    FF_OPT_TYPE_INT,
-    FF_OPT_TYPE_INT64,
-    FF_OPT_TYPE_DOUBLE,
-    FF_OPT_TYPE_FLOAT,
-    FF_OPT_TYPE_STRING,
-    FF_OPT_TYPE_RATIONAL,
-    FF_OPT_TYPE_BINARY,  ///< offset must point to a pointer immediately followed by an int for the length
-    FF_OPT_TYPE_CONST=128,
-};
-
+#if FF_API_SET_STRING_OLD
 /**
- * AVOption
+ * @see av_set_string2()
  */
-typedef struct AVOption {
-    const char *name;
-
-    /**
-     * short English help text
-     * @todo What about other languages?
-     */
-    const char *help;
-
-    /**
-     * The offset relative to the context structure where the option
-     * value is stored. It should be 0 for named constants.
-     */
-    int offset;
-    enum AVOptionType type;
-
-    /**
-     * the default value for scalar options
-     */
-    double default_val;
-    double min;                 ///< minimum valid value for the option
-    double max;                 ///< maximum valid value for the option
-
-    int flags;
-#define AV_OPT_FLAG_ENCODING_PARAM  1   ///< a generic parameter which can be set by the user for muxing or encoding
-#define AV_OPT_FLAG_DECODING_PARAM  2   ///< a generic parameter which can be set by the user for demuxing or decoding
-#define AV_OPT_FLAG_METADATA        4   ///< some data extracted or inserted into the file like title, comment, ...
-#define AV_OPT_FLAG_AUDIO_PARAM     8
-#define AV_OPT_FLAG_VIDEO_PARAM     16
-#define AV_OPT_FLAG_SUBTITLE_PARAM  32
-//FIXME think about enc-audio, ... style flags
-
-    /**
-     * The logical unit to which the option belongs. Non-constant
-     * options and corresponding named constants share the same
-     * unit. May be NULL.
-     */
-    const char *unit;
-} AVOption;
+attribute_deprecated const AVOption *av_set_string(void *obj, const char *name, const char *val);
 
+/**
+ * @return a pointer to the AVOption corresponding to the field set or
+ * NULL if no matching AVOption exists, or if the value val is not
+ * valid
+ * @see av_set_string3()
+ */
+attribute_deprecated const AVOption *av_set_string2(void *obj, const char *name, const char *val, int alloc);
+#endif
+#if FF_API_OPT_SHOW
+/**
+ * @deprecated Use av_opt_show2() instead.
+ */
+attribute_deprecated int av_opt_show(void *obj, void *av_log_obj);
+#endif
 
-const AVOption *av_find_opt(void *obj, const char *name, const char *unit, int mask, int flags);
-const AVOption *av_set_string(void *obj, const char *name, const char *val);
-const AVOption *av_set_double(void *obj, const char *name, double n);
-const AVOption *av_set_q(void *obj, const char *name, AVRational n);
-const AVOption *av_set_int(void *obj, const char *name, int64_t n);
-double av_get_double(void *obj, const char *name, const AVOption **o_out);
-AVRational av_get_q(void *obj, const char *name, const AVOption **o_out);
-int64_t av_get_int(void *obj, const char *name, const AVOption **o_out);
-const char *av_get_string(void *obj, const char *name, const AVOption **o_out, char *buf, int buf_len);
-const AVOption *av_next_option(void *obj, const AVOption *last);
-int av_opt_show(void *obj, void *av_log_obj);
-void av_opt_set_defaults(void *s);
-void av_opt_set_defaults2(void *s, int mask, int flags);
-
-#endif /* FFMPEG_OPT_H */
+#endif /* AVCODEC_OPT_H */