| @@ -233,6 +233,27 @@ typedef struct AVClass { · 232 unmodified lines |
| 233 | 233 | */ |
| 234 | 234 | void av_log(void *avcl, int level, const char *fmt, ...) av_printf_format(3, 4); |
| 235 | 235 | |
| 236 | +/** |
| 237 | + * Send the specified message to the log once with the initial_level and then with |
| 238 | + * the subsequent_level. By default, all logging messages are sent to |
| 239 | + * stderr. This behavior can be altered by setting a different logging callback |
| 240 | + * function. |
| 241 | + * @see av_log |
| 242 | + * |
| 243 | + * @param avcl A pointer to an arbitrary struct of which the first field is a |
| 244 | + * pointer to an AVClass struct or NULL if general log. |
| 245 | + * @param initial_level importance level of the message expressed using a @ref |
| 246 | + * lavu_log_constants "Logging Constant" for the first occurance. |
| 247 | + * @param subsequent_level importance level of the message expressed using a @ref |
| 248 | + * lavu_log_constants "Logging Constant" after the first occurance. |
| 249 | + * @param fmt The format string (printf-compatible) that specifies how |
| 250 | + * subsequent arguments are converted to output. |
| 251 | + * @param state a variable to keep trak of if a message has already been printed |
| 252 | + * this must be initialized to 0 before the first use. The same state |
| 253 | + * must not be accessed by 2 Threads simultaneously. |
| 254 | + */ |
| 255 | +void av_log_once(void* avcl, int initial_level, int subsequent_level, int *state, const char *fmt, ...) av_printf_format(5, 6); |
| 256 | + |
| 236 | 257 | |
| 237 | 258 | /** |
| 238 | 259 | * Send the specified message to the log if the level is less than or equal |