diff mbox series

[FFmpeg-devel,02/38] lavu/opt: cosmetics, move AV_OPT_FLAG_* out of AVOption

Message ID 20240223143115.16521-3-anton@khirnov.net
State Accepted
Commit 39a3a1c69bed8d4a453410d049b0515df54348ad
Headers show
Series [FFmpeg-devel,01/38] lavu/opt: cosmetics, change option flags to (1 << N) style | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished

Commit Message

Anton Khirnov Feb. 23, 2024, 1:58 p.m. UTC
Also drop an obsolete FIXME.
---
 libavutil/opt.h | 69 ++++++++++++++++++++++++-------------------------
 1 file changed, 34 insertions(+), 35 deletions(-)
diff mbox series

Patch

diff --git a/libavutil/opt.h b/libavutil/opt.h
index 6ed3407b09..36e28249ee 100644
--- a/libavutil/opt.h
+++ b/libavutil/opt.h
@@ -245,40 +245,6 @@  enum AVOptionType{
     AV_OPT_TYPE_CHLAYOUT,
 };
 
-/**
- * AVOption
- */
-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
-     */
-    union {
-        int64_t i64;
-        double dbl;
-        const char *str;
-        /* TODO those are unused now */
-        AVRational q;
-    } default_val;
-    double min;                 ///< minimum valid value for the option
-    double max;                 ///< maximum valid value for the option
-
-    int flags;
-
 /**
  * A generic parameter which can be set by the user for muxing or encoding.
  */
@@ -321,7 +287,40 @@  typedef struct AVOption {
  * Set if option constants can also reside in child objects.
  */
 #define AV_OPT_FLAG_CHILD_CONSTS    (1 << 18)
-//FIXME think about enc-audio, ... style flags
+
+/**
+ * AVOption
+ */
+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
+     */
+    union {
+        int64_t i64;
+        double dbl;
+        const char *str;
+        /* TODO those are unused now */
+        AVRational q;
+    } default_val;
+    double min;                 ///< minimum valid value for the option
+    double max;                 ///< maximum valid value for the option
+
+    int flags;
 
     /**
      * The logical unit to which the option belongs. Non-constant