]> git.sesse.net Git - ffmpeg/blobdiff - libavutil/log.c
add the possibility to choose aac profile
[ffmpeg] / libavutil / log.c
index 7786ea211ddc9fed5e9fe6b6b22991180c75dd4b..4fd503d0dee9ebfdcdfb4ec060c93d7df200c996 100644 (file)
@@ -2,18 +2,20 @@
  * log functions
  * Copyright (c) 2003 Michel Bardiaux
  *
- * This library is free software; you can redistribute it and/or
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
  * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
+ * version 2.1 of the License, or (at your option) any later version.
  *
- * This library is distributed in the hope that it will be useful,
+ * FFmpeg is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
+ * License along with FFmpeg; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
@@ -24,9 +26,9 @@
 
 #include "avutil.h"
 
-static int av_log_level = AV_LOG_INFO;
+int av_log_level = AV_LOG_INFO;
 
-static void av_log_default_callback(void* ptr, int level, const char* fmt, va_list vl)
+void av_log_default_callback(void* ptr, int level, const char* fmt, va_list vl)
 {
     static int print_prefix=1;
     AVClass* avc= ptr ? *(AVClass**)ptr : NULL;
@@ -43,7 +45,11 @@ static void av_log_default_callback(void* ptr, int level, const char* fmt, va_li
     vfprintf(stderr, fmt, vl);
 }
 
+#if LIBAVUTIL_VERSION_INT < (50<<16)
 static void (*av_log_callback)(void*, int, const char*, va_list) = av_log_default_callback;
+#else
+void (*av_vlog)(void*, int, const char*, va_list) = av_log_default_callback;
+#endif
 
 void av_log(void* avcl, int level, const char *fmt, ...)
 {
@@ -53,6 +59,7 @@ void av_log(void* avcl, int level, const char *fmt, ...)
     va_end(vl);
 }
 
+#if LIBAVUTIL_VERSION_INT < (50<<16)
 void av_vlog(void* avcl, int level, const char *fmt, va_list vl)
 {
     av_log_callback(avcl, level, fmt, vl);
@@ -72,3 +79,4 @@ void av_log_set_callback(void (*callback)(void*, int, const char*, va_list))
 {
     av_log_callback = callback;
 }
+#endif