From 486862d5e1057bd0c5d374bee8c75751ba90d564 Mon Sep 17 00:00:00 2001 From: nareix Date: Mon, 6 Jun 2016 16:48:12 +0800 Subject: [PATCH] add SetLogLevel --- ffmpeg.go | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/ffmpeg.go b/ffmpeg.go index b9b5468..04f596c 100644 --- a/ffmpeg.go +++ b/ffmpeg.go @@ -5,11 +5,26 @@ package ffmpeg #include "ffmpeg.h" void ffinit() { av_register_all(); - av_log_set_level(AV_LOG_DEBUG); } */ import "C" +const ( + QUIET = int(C.AV_LOG_QUIET) + PANIC = int(C.AV_LOG_PANIC) + FATAL = int(C.AV_LOG_FATAL) + ERROR = int(C.AV_LOG_ERROR) + WARNING = int(C.AV_LOG_WARNING) + INFO = int(C.AV_LOG_INFO) + VERBOSE = int(C.AV_LOG_VERBOSE) + DEBUG = int(C.AV_LOG_DEBUG) + TRACE = int(C.AV_LOG_TRACE) +) + +func SetLogLevel(level int) { + C.av_log_set_level(C.int(level)) +} + func init() { C.ffinit() }