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.

61 lines
2.0KB

  1. /*
  2. * copyright (c) 2006 Michael Niedermayer <michaelni@gmx.at>
  3. *
  4. * This library is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU Lesser General Public
  6. * License as published by the Free Software Foundation; either
  7. * version 2 of the License, or (at your option) any later version.
  8. *
  9. * This library is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. * Lesser General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU Lesser General Public
  15. * License along with this library; if not, write to the Free Software
  16. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  17. */
  18. #ifndef LOG_H
  19. #define LOG_H
  20. #include <stdarg.h>
  21. /**
  22. * Used by av_log
  23. */
  24. typedef struct AVCLASS AVClass;
  25. struct AVCLASS {
  26. const char* class_name;
  27. const char* (*item_name)(void*); /* actually passing a pointer to an AVCodecContext
  28. or AVFormatContext, which begin with an AVClass.
  29. Needed because av_log is in libavcodec and has no visibility
  30. of AVIn/OutputFormat */
  31. struct AVOption *option;
  32. };
  33. /* av_log API */
  34. #define AV_LOG_QUIET -1
  35. #define AV_LOG_ERROR 0
  36. #define AV_LOG_INFO 1
  37. #define AV_LOG_DEBUG 2
  38. extern int av_log_level;
  39. #ifdef __GNUC__
  40. extern void av_log(void*, int level, const char *fmt, ...) __attribute__ ((__format__ (__printf__, 3, 4)));
  41. #else
  42. extern void av_log(void*, int level, const char *fmt, ...);
  43. #endif
  44. #if LIBAVUTIL_VERSION_INT < (50<<16)
  45. extern void av_vlog(void*, int level, const char *fmt, va_list);
  46. extern int av_log_get_level(void);
  47. extern void av_log_set_level(int);
  48. extern void av_log_set_callback(void (*)(void*, int, const char*, va_list));
  49. #else
  50. extern void (*av_vlog)(void*, int, const char*, va_list);
  51. #endif
  52. #endif /* LOG_H */