Documentation ¶
Index ¶
- Constants
- func SetFFmpegLogLevel(logLevel AVLogLevel)
- func SetLogging(handler LoggingHandlerFunction)
- type AVContext
- func (av *AVContext) Close()
- func (av *AVContext) Export(bands int) (buf []byte, err error)
- func (av *AVContext) Metadata() *Metadata
- func (av *AVContext) ProcessFrames(maxFrames int) (err error)
- func (av *AVContext) SeekDuration(ts time.Duration) error
- func (av *AVContext) SeekPosition(f float64) error
- func (av *AVContext) SelectDuration(ts time.Duration) (err error)
- func (av *AVContext) SelectFrame(n int) (err error)
- func (av *AVContext) SelectPosition(f float64) (err error)
- type AVLogLevel
- type LoggingHandlerFunction
- type Metadata
Constants ¶
const ( ErrNoMem = avError(-C.ENOMEM) ErrEOF = avError(C.AVERROR_EOF) ErrUnknown = avError(C.AVERROR_UNKNOWN) ErrDecoderNotFound = avError(C.AVERROR_DECODER_NOT_FOUND) ErrInvalidData = avError(C.AVERROR_INVALIDDATA) ErrTooBig = avError(C.ERR_TOO_BIG) )
AV Error enum
Variables ¶
This section is empty.
Functions ¶
func SetFFmpegLogLevel ¶
func SetFFmpegLogLevel(logLevel AVLogLevel)
SetFFmpegLogLevel allows you to change the log level from the default (AVLogInfo).
func SetLogging ¶ added in v0.0.2
func SetLogging(handler LoggingHandlerFunction)
SetLogging set AV logging handler
Types ¶
type AVContext ¶
type AVContext struct {
// contains filtered or unexported fields
}
AVContext manages lifecycle of AV contexts and reader stream
func LoadAVContext ¶
LoadAVContext load and create AVContext from reader stream
func (*AVContext) ProcessFrames ¶ added in v0.2.0
ProcessFrames triggers frame processing limit under max num of frames if maxFrames > 0
func (*AVContext) SeekDuration ¶ added in v0.3.2
SeekDuration seeks to keyframe before the specified duration
func (*AVContext) SeekPosition ¶ added in v0.3.2
SeekPosition seeks to keyframe before specified position percentage between 0 and 1 then process frames to find precise position
func (*AVContext) SelectDuration ¶ added in v0.3.0
SelectDuration seeks to keyframe before the specified duration then process frames to find precise duration
func (*AVContext) SelectFrame ¶ added in v0.2.0
SelectFrame triggers frame processing and select specific frame index
func (*AVContext) SelectPosition ¶ added in v0.3.0
type AVLogLevel ¶
type AVLogLevel int
AVLogLevel defines the ffmpeg threshold for dumping information to stderr.
const ( AVLogQuiet AVLogLevel = (iota - 1) * 8 AVLogPanic AVLogFatal AVLogError AVLogWarning AVLogInfo AVLogVerbose AVLogDebug AVLogTrace )
AVLogLevel enum
type LoggingHandlerFunction ¶ added in v0.0.2
type LoggingHandlerFunction func(messageLevel AVLogLevel, message string)
type Metadata ¶
type Metadata struct { Orientation int `json:"orientation"` Duration int `json:"duration,omitempty"` Width int `json:"width,omitempty"` Height int `json:"height,omitempty"` Title string `json:"title,omitempty"` Artist string `json:"artist,omitempty"` FPS float64 `json:"fps,omitempty"` HasVideo bool `json:"has_video"` HasAudio bool `json:"has_audio"` }
Metadata AV metadata