add SetLogLevel
This commit is contained in:
parent
8d1ff3f208
commit
486862d5e1
17
ffmpeg.go
17
ffmpeg.go
@ -5,11 +5,26 @@ package ffmpeg
|
|||||||
#include "ffmpeg.h"
|
#include "ffmpeg.h"
|
||||||
void ffinit() {
|
void ffinit() {
|
||||||
av_register_all();
|
av_register_all();
|
||||||
av_log_set_level(AV_LOG_DEBUG);
|
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
import "C"
|
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() {
|
func init() {
|
||||||
C.ffinit()
|
C.ffinit()
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user