ffmpeg

package
v1.0.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 13, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

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 AudioCodecHandler

func AudioCodecHandler(h *avutil.RegisterHandler)

AudioCodecHandler func

func GetFFErrorMessage

func GetFFErrorMessage(code int) (msg string)

GetFFErrorMessage get ffmpeg error message by code

func HasDecoder

func HasDecoder(name string) bool

HasDecoder func

func HasEncoder

func HasEncoder(name string) bool

HasEncoder func

func SetLogLevel

func SetLogLevel(level int)

SetLogLevel func

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) Close

func (decoder *AudioDecoder) Close()

Close decoder

func (*AudioDecoder) Decode

func (decoder *AudioDecoder) Decode(pkt []byte) (bool, av.AudioFrame, error)

Decode frame

func (*AudioDecoder) Setup

func (decoder *AudioDecoder) Setup() error

Setup audio codec

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) Close

func (encoder *AudioEncoder) Close()

Close 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

func (*AudioEncoder) Setup

func (encoder *AudioEncoder) Setup() (err error)

Setup 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) Close

func (sampler *Resampler) Close()

Close func

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) Close

func (decoder *VideoDecoder) Close()

Close close VideoDecoder

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

type VideoFrame struct {
	Image image.YCbCr
	// contains filtered or unexported fields
}

VideoFrame decoded frame

func (*VideoFrame) Free

func (instance *VideoFrame) Free()

Free VideoFrame

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL