You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
1.2KB

  1. #ifndef LOG_H
  2. #define LOG_H
  3. #include <stdarg.h>
  4. /**
  5. * Used by av_log
  6. */
  7. typedef struct AVCLASS AVClass;
  8. struct AVCLASS {
  9. const char* class_name;
  10. const char* (*item_name)(void*); /* actually passing a pointer to an AVCodecContext
  11. or AVFormatContext, which begin with an AVClass.
  12. Needed because av_log is in libavcodec and has no visibility
  13. of AVIn/OutputFormat */
  14. struct AVOption *option;
  15. };
  16. /* av_log API */
  17. #define AV_LOG_QUIET -1
  18. #define AV_LOG_ERROR 0
  19. #define AV_LOG_INFO 1
  20. #define AV_LOG_DEBUG 2
  21. extern int av_log_level;
  22. #ifdef __GNUC__
  23. extern void av_log(void*, int level, const char *fmt, ...) __attribute__ ((__format__ (__printf__, 3, 4)));
  24. #else
  25. extern void av_log(void*, int level, const char *fmt, ...);
  26. #endif
  27. #if LIBAVUTIL_VERSION_INT < (50<<16)
  28. extern void av_vlog(void*, int level, const char *fmt, va_list);
  29. extern int av_log_get_level(void);
  30. extern void av_log_set_level(int);
  31. extern void av_log_set_callback(void (*)(void*, int, const char*, va_list));
  32. #else
  33. extern void (*av_vlog)(void*, int, const char*, va_list);
  34. #endif
  35. #endif /* LOG_H */