Documentation ¶
Index ¶
- Constants
- func AudioCodecHandler(h *avutil.RegisterHandler)
- func GetFFErrorMessage(code int) (msg string)
- func HasDecoder(name string) bool
- func HasEncoder(name string) bool
- func SetLogLevel(level int)
- type AudioDecoder
- type AudioEncoder
- func (encoder *AudioEncoder) Close()
- func (encoder *AudioEncoder) CodecData() (codec av.AudioCodecData, err error)
- func (encoder *AudioEncoder) Encode(frame av.AudioFrame) (pkts [][]byte, err error)
- func (encoder *AudioEncoder) GetOption(key string, val interface{}) (err error)
- func (encoder *AudioEncoder) SetBitrate(bitrate int) (err error)
- func (encoder *AudioEncoder) SetChannelLayout(ch av.ChannelLayout) (err error)
- func (encoder *AudioEncoder) SetOption(key string, val interface{}) (err error)
- func (encoder *AudioEncoder) SetSampleFormat(fmt av.SampleFormat) (err error)
- func (encoder *AudioEncoder) SetSampleRate(rate int) (err error)
- func (encoder *AudioEncoder) Setup() (err error)
- type Resampler
- type VideoDecoder
- type VideoFrame
Constants ¶
View Source
const ( // QUIET mode QUIET = int(C.AV_LOG_QUIET) // PANIC mode PANIC = int(C.AV_LOG_PANIC) // FATAL mode FATAL = int(C.AV_LOG_FATAL) // ERROR mode ERROR = int(C.AV_LOG_ERROR) // WARNING mode WARNING = int(C.AV_LOG_WARNING) // INFO mode INFO = int(C.AV_LOG_INFO) // VERBOSE mode VERBOSE = int(C.AV_LOG_VERBOSE) // DEBUG mode DEBUG = int(C.AV_LOG_DEBUG) // TRACE mode TRACE = int(C.AV_LOG_TRACE) )
Variables ¶
This section is empty.
Functions ¶
func GetFFErrorMessage ¶
GetFFErrorMessage get ffmpeg error message by code
Types ¶
type AudioDecoder ¶
type AudioDecoder struct { ChannelLayout av.ChannelLayout SampleFormat av.SampleFormat SampleRate int Extradata []byte // contains filtered or unexported fields }
AudioDecoder type
func NewAudioDecoder ¶
func NewAudioDecoder(codec av.AudioCodecData) (dec *AudioDecoder, err error)
NewAudioDecoder func
func (*AudioDecoder) Decode ¶
func (decoder *AudioDecoder) Decode(pkt []byte) (bool, av.AudioFrame, error)
Decode frame
type AudioEncoder ¶
type AudioEncoder struct { SampleRate int Bitrate int ChannelLayout av.ChannelLayout SampleFormat av.SampleFormat FrameSampleCount int // contains filtered or unexported fields }
AudioEncoder struct
func NewAudioEncoderByCodecType ¶
func NewAudioEncoderByCodecType(typ av.CodecType) (enc *AudioEncoder, err error)
NewAudioEncoderByCodecType func
func NewAudioEncoderByName ¶
func NewAudioEncoderByName(name string) (enc *AudioEncoder, err error)
NewAudioEncoderByName func
func (*AudioEncoder) CodecData ¶
func (encoder *AudioEncoder) CodecData() (codec av.AudioCodecData, err error)
CodecData func
func (*AudioEncoder) Encode ¶
func (encoder *AudioEncoder) Encode(frame av.AudioFrame) (pkts [][]byte, err error)
Encode func
func (*AudioEncoder) GetOption ¶
func (encoder *AudioEncoder) GetOption(key string, val interface{}) (err error)
GetOption func
func (*AudioEncoder) SetBitrate ¶
func (encoder *AudioEncoder) SetBitrate(bitrate int) (err error)
SetBitrate func
func (*AudioEncoder) SetChannelLayout ¶
func (encoder *AudioEncoder) SetChannelLayout(ch av.ChannelLayout) (err error)
SetChannelLayout func
func (*AudioEncoder) SetOption ¶
func (encoder *AudioEncoder) SetOption(key string, val interface{}) (err error)
SetOption func
func (*AudioEncoder) SetSampleFormat ¶
func (encoder *AudioEncoder) SetSampleFormat(fmt av.SampleFormat) (err error)
SetSampleFormat func
func (*AudioEncoder) SetSampleRate ¶
func (encoder *AudioEncoder) SetSampleRate(rate int) (err error)
SetSampleRate func
type Resampler ¶
type Resampler struct { OutSampleFormat av.SampleFormat OutChannelLayout av.ChannelLayout OutSampleRate int // contains filtered or unexported fields }
Resampler struct
func NewResampler ¶
func NewResampler(fmt av.SampleFormat, layout av.ChannelLayout, rate int) (*Resampler, error)
NewResampler create new audio resampler
func (*Resampler) Resample ¶
func (sampler *Resampler) Resample(in av.AudioFrame) (out av.AudioFrame, err error)
Resample func
type VideoDecoder ¶
type VideoDecoder struct { Extradata []byte // contains filtered or unexported fields }
VideoDecoder instance
func NewDecoder ¶
func NewDecoder(codecType av.CodecType) (*VideoDecoder, error)
NewDecoder initialize new decoder
func (*VideoDecoder) Decode ¶
func (decoder *VideoDecoder) Decode(pkt []byte) (bool, *VideoFrame, error)
Decode decode video frame
func (*VideoDecoder) Setup ¶
func (decoder *VideoDecoder) Setup() error
Setup initialize VideoDecoder
type VideoFrame ¶
VideoFrame decoded frame
Click to show internal directories.
Click to hide internal directories.