add SetLogLevel

This commit is contained in:
nareix 2016-06-06 16:48:12 +08:00
parent 8d1ff3f208
commit 486862d5e1

View File

@ -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()
}