diff --git a/avutil/log.go b/avutil/log.go new file mode 100644 index 0000000..cea62a8 --- /dev/null +++ b/avutil/log.go @@ -0,0 +1,31 @@ +// Use of this source code is governed by a MIT license that can be found in the LICENSE file. +// Giorgis (habtom@giorgis.io) + +package avutil + +/* + #cgo pkg-config: libavutil + #include + #include +*/ +import "C" + +const ( + AV_LOG_QUIET = -8 + AV_LOG_PANIC = 0 + AV_LOG_FATAL = 8 + AV_LOG_ERROR = 16 + AV_LOG_WARNING = 24 + AV_LOG_INFO = 32 + AV_LOG_VERBOSE = 40 + AV_LOG_DEBUG = 48 + AV_LOG_TRACE = 56 +) + +func AvLogSetLevel(level int) { + C.av_log_set_level(C.int(level)) +} + +func AvLogGetLevel() int { + return int(C.av_log_get_level()) +}