Unified · Split
| @@ -77,7 +77,9 @@ typedef struct AVClass { · 76 unmodified lines | |||
| 77 | const char* (*item_name)(void* ctx); | 77 | const char* (*item_name)(void* ctx); |
| 78 | 78 | ||
| 79 | /** | 79 | /** |
| 80 | * a pointer to the first option specified in the class if any or NULL | 80 | * An array of options for the structure or NULL. |
| 81 | * When non-NULL, the array must be terminated by an option with a NULL | ||
| 82 | * name. | ||
| 81 | * | 83 | * |
| 82 | * @see av_set_default_options() | 84 | * @see av_set_default_options() |
| 83 | */ | 85 | */ |
| @@ -85,43 +87,50 @@ typedef struct AVClass { · 1 unmodified line | |||
| 85 | 87 | ||
| 86 | /** | 88 | /** |
| 87 | * LIBAVUTIL_VERSION with which this structure was created. | 89 | * LIBAVUTIL_VERSION with which this structure was created. |
| 88 | * This is used to allow fields to be added without requiring major | 90 | * This is used to allow fields to be added to AVClass without requiring |
| 89 | * version bumps everywhere. | 91 | * major version bumps everywhere. |
| 90 | */ | 92 | */ |
| 91 | 93 | ||
| 92 | int version; | 94 | int version; |
| 93 | 95 | ||
| 94 | /** | 96 | /** |
| 95 | * Offset in the structure where log_level_offset is stored. | 97 | * Offset in the structure where the log level offset is stored. The log |
| 96 | * 0 means there is no such variable | 98 | * level offset is an int added to the log level for logging with this |
| 99 | * object as the context. | ||
| 100 | * | ||
| 101 | * 0 means there is no such variable. | ||
| 97 | */ | 102 | */ |
| 98 | int log_level_offset_offset; | 103 | int log_level_offset_offset; |
| 99 | 104 | ||
| 100 | /** | 105 | /** |
| 101 | * Offset in the structure where a pointer to the parent context for | 106 | * Offset in the structure where a pointer to the parent context for |
| 102 | * logging is stored. For example a decoder could pass its AVCodecContext | 107 | * logging is stored. For example a decoder could pass its AVCodecContext |
| 103 | * to eval as such a parent context, which an av_log() implementation | 108 | * to eval as such a parent context, which an ::av_log() implementation |
| 104 | * could then leverage to display the parent context. | 109 | * could then leverage to display the parent context. |
| 105 | * The offset can be NULL. | 110 | * |
| 111 | * When the pointer is NULL, or this offset is zero, the object is assumed | ||
| 112 | * to have no parent. | ||
| 106 | */ | 113 | */ |
| 107 | int parent_log_context_offset; | 114 | int parent_log_context_offset; |
| 108 | 115 | ||
| 109 | /** | 116 | /** |
| 110 | * Category used for visualization (like color) | 117 | * Category used for visualization (like color). |
| 111 | * This is only set if the category is equal for all objects using this class. | 118 | * |
| 112 | * available since version (51 << 16 | 56 << 8 | 100) | 119 | * Only used when ::get_category() is NULL. Use this field when all |
| 120 | * instances of this class have the same category, use ::get_category() | ||
| 121 | * otherwise. | ||
| 113 | */ | 122 | */ |
| 114 | AVClassCategory category; | 123 | AVClassCategory category; |
| 115 | 124 | ||
| 116 | /** | 125 | /** |
| 117 | * Callback to return the category. | 126 | * Callback to return the instance category. Use this callback when |
| 118 | * available since version (51 << 16 | 59 << 8 | 100) | 127 | * different instances of this class may have different categories, |
| 128 | * ::category otherwise. | ||
| 119 | */ | 129 | */ |
| 120 | AVClassCategory (*get_category)(void* ctx); | 130 | AVClassCategory (*get_category)(void* ctx); |
| 121 | 131 | ||
| 122 | /** | 132 | /** |
| 123 | * Callback to return the supported/allowed ranges. | 133 | * Callback to return the supported/allowed ranges. |
| 124 | * available since version (52.12) | ||
| 125 | */ | 134 | */ |
| 126 | int (*query_ranges)(struct AVOptionRanges **, void *obj, const char *key, int flags); | 135 | int (*query_ranges)(struct AVOptionRanges **, void *obj, const char *key, int flags); |
| 127 | 136 | ||
| @@ -139,9 +148,11 @@ typedef struct AVClass { · 11 unmodified lines | |||
| 139 | * @return AVClass for the next AVOptions-enabled child or NULL if there are | 148 | * @return AVClass for the next AVOptions-enabled child or NULL if there are |
| 140 | * no more such children. | 149 | * no more such children. |
| 141 | * | 150 | * |
| 142 | * @note The difference between child_next and this is that child_next | 151 | * @note The difference between ::child_next() and ::child_class_iterate() |
| 143 | * iterates over _already existing_ objects, while child_class_iterate | 152 | * is that ::child_next() iterates over _actual_ children of an |
| 144 | * iterates over _all possible_ children. | 153 | * _existing_ object instance, while ::child_class_iterate() iterates |
| 154 | * over the classes of all _potential_ children of any possible | ||
| 155 | * instance of this class. | ||
| 145 | */ | 156 | */ |
| 146 | const struct AVClass* (*child_class_iterate)(void **iter); | 157 | const struct AVClass* (*child_class_iterate)(void **iter); |
| 147 | } AVClass; | 158 | } AVClass; |