Revision 85770f2a libavutil/opt.h

View differences:

libavutil/opt.h
64 64
    /**
65 65
     * the default value for scalar options
66 66
     */
67
    double default_val;
68
    double min;                 ///< minimum valid value for the option
69
    double max;                 ///< maximum valid value for the option
70

  
71
    int flags;
72
#define AV_OPT_FLAG_ENCODING_PARAM  1   ///< a generic parameter which can be set by the user for muxing or encoding
73
#define AV_OPT_FLAG_DECODING_PARAM  2   ///< a generic parameter which can be set by the user for demuxing or decoding
74
#define AV_OPT_FLAG_METADATA        4   ///< some data extracted or inserted into the file like title, comment, ...
75
#define AV_OPT_FLAG_AUDIO_PARAM     8
76
#define AV_OPT_FLAG_VIDEO_PARAM     16
77
#define AV_OPT_FLAG_SUBTITLE_PARAM  32
78
//FIXME think about enc-audio, ... style flags
79

  
80
    /**
81
     * The logical unit to which the option belongs. Non-constant
82
     * options and corresponding named constants share the same
83
     * unit. May be NULL.
84
     */
85
    const char *unit;
86
} AVOption;
87

  
88
/**
89
 * AVOption2.
90
 * THIS IS NOT PART OF THE API/ABI YET!
91
 * This is identical to AVOption except that default_val was replaced by
92
 * an union, it should be compatible with AVOption on normal platforms.
93
 */
94
typedef struct AVOption2 {
95
    const char *name;
96

  
97
    /**
98
     * short English help text
99
     * @todo What about other languages?
100
     */
101
    const char *help;
102

  
103
    /**
104
     * The offset relative to the context structure where the option
105
     * value is stored. It should be 0 for named constants.
106
     */
107
    int offset;
108
    enum AVOptionType type;
109

  
110
    /**
111
     * the default value for scalar options
112
     */
113 67
    union {
114 68
        double dbl;
115 69
        const char *str;
70
        int64_t i64;
71
        AVRational q;
116 72
    } default_val;
117

  
118 73
    double min;                 ///< minimum valid value for the option
119 74
    double max;                 ///< maximum valid value for the option
120 75

  
121 76
    int flags;
122
/*
123 77
#define AV_OPT_FLAG_ENCODING_PARAM  1   ///< a generic parameter which can be set by the user for muxing or encoding
124 78
#define AV_OPT_FLAG_DECODING_PARAM  2   ///< a generic parameter which can be set by the user for demuxing or decoding
125 79
#define AV_OPT_FLAG_METADATA        4   ///< some data extracted or inserted into the file like title, comment, ...
126 80
#define AV_OPT_FLAG_AUDIO_PARAM     8
127 81
#define AV_OPT_FLAG_VIDEO_PARAM     16
128 82
#define AV_OPT_FLAG_SUBTITLE_PARAM  32
129
*/
130 83
//FIXME think about enc-audio, ... style flags
131 84

  
132 85
    /**
......
135 88
     * unit. May be NULL.
136 89
     */
137 90
    const char *unit;
138
} AVOption2;
139

  
91
} AVOption;
140 92

  
141 93
/**
142 94
 * Look for an option in obj. Look only for the options which

Also available in: Unified diff