feat: imagorvideo init

This commit is contained in:
Adrian Shum 2022-09-08 20:44:10 +08:00
commit 2451fa1b5a
20 changed files with 2601 additions and 0 deletions

29
ffmpeg/logging.go Normal file
View file

@ -0,0 +1,29 @@
package ffmpeg
// #include "ffmpeg.h"
import "C"
// AVLogLevel defines the ffmpeg threshold for dumping information to stderr.
type AVLogLevel int
// Possible values for AVLogLevel.
const (
AVLogQuiet AVLogLevel = (iota - 1) * 8
AVLogPanic
AVLogFatal
AVLogError
AVLogWarning
AVLogInfo
AVLogVerbose
AVLogDebug
AVLogTrace
)
func logLevel() AVLogLevel {
return AVLogLevel(C.av_log_get_level())
}
// SetFFmpegLogLevel allows you to change the log level from the default (AVLogInfo).
func SetFFmpegLogLevel(logLevel AVLogLevel) {
C.av_log_set_level(C.int(logLevel))
}