avutil

package
Version: v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OptionTypeBool      = OptionType(C.AV_OPT_TYPE_BOOL)
	OptionTypeFlags     = OptionType(C.AV_OPT_TYPE_FLAGS)
	OptionTypeInt       = OptionType(C.AV_OPT_TYPE_INT)
	OptionTypeInt64     = OptionType(C.AV_OPT_TYPE_INT64)
	OptionTypeUint64    = OptionType(C.AV_OPT_TYPE_UINT64)
	OptionTypeFloat     = OptionType(C.AV_OPT_TYPE_FLOAT)
	OptionTypeDouble    = OptionType(C.AV_OPT_TYPE_DOUBLE)
	OptionTypeVideoRate = OptionType(C.AV_OPT_TYPE_VIDEO_RATE)
	OptionTypeRational  = OptionType(C.AV_OPT_TYPE_RATIONAL)
	OptionTypeConst     = OptionType(C.AV_OPT_TYPE_CONST)
)
View Source
const (
	PixelFormatCuda = PixelFormat(C.AV_PIX_FMT_CUDA)
	PixelFormatNV12 = PixelFormat(C.AV_PIX_FMT_NV12)
)
View Source
const (
	RoundingPassMinMax   = Rounding(C.AV_ROUND_PASS_MINMAX)
	RoundingNearInfinity = Rounding(C.AV_ROUND_NEAR_INF)
)
View Source
const (
	SampleFormatNone = SampleFormat(C.AV_SAMPLE_FMT_NONE)
	SampleFormatU8   = SampleFormat(C.AV_SAMPLE_FMT_U8)
	SampleFormatS16  = SampleFormat(C.AV_SAMPLE_FMT_S16)
	SampleFormatS32  = SampleFormat(C.AV_SAMPLE_FMT_S32)
	SampleFormatFLT  = SampleFormat(C.AV_SAMPLE_FMT_FLT)
	SampleFormatDBL  = SampleFormat(C.AV_SAMPLE_FMT_DBL)
	SampleFormatU8P  = SampleFormat(C.AV_SAMPLE_FMT_U8P)
	SampleFormatS16P = SampleFormat(C.AV_SAMPLE_FMT_S16P)
	SampleFormatS32P = SampleFormat(C.AV_SAMPLE_FMT_S32P)
	SampleFormatFLTP = SampleFormat(C.AV_SAMPLE_FMT_FLTP)
	SampleFormatDBLP = SampleFormat(C.AV_SAMPLE_FMT_DBLP)
	SampleFormatS64  = SampleFormat(C.AV_SAMPLE_FMT_S64)
	SampleFormatS64P = SampleFormat(C.AV_SAMPLE_FMT_S64P)
)
View Source
const (
	TimeBase = C.AV_TIME_BASE
)

Variables

View Source
var Logger *log.Logger
View Source
var Verbosity = Info

Functions

func CopyFrameProps

func CopyFrameProps(p0 *Frame, p1 *Frame) int32

func DupeString

func DupeString(p0 string) *common.CChar

func Free

func Free(p0 unsafe.Pointer)

func FreeDict

func FreeDict(p0 **Dictionary)

func FreeFrame

func FreeFrame(p0 **Frame)

func GetHWFrameBuffer

func GetHWFrameBuffer(p0 *BufferRef, p1 *Frame, p2 int32) int32

func InitHWFramesContext

func InitHWFramesContext(p0 *BufferRef) int32

func InitLogging

func InitLogging()

func Malloc

func Malloc(p0 uint64) unsafe.Pointer

func NewHWDeviceContext

func NewHWDeviceContext(p0 **BufferRef, p1 HWDeviceType, p2 string, p3 *Dictionary, p4 int32) int32

func RefFrame

func RefFrame(p0 *Frame, p1 *Frame) int32

func RescaleQ

func RescaleQ(a int64, b, c Rational) int64

func RescaleQRound

func RescaleQRound(a int64, b, c Rational, flags Rounding) int64

func RescaleRound

func RescaleRound(p0 int64, p1 int64, p2 int64, p3 Rounding) int64

func SetDict

func SetDict(p0 **Dictionary, p1 string, p2 string, p3 int32) int32

func SetOpt

func SetOpt(p0 unsafe.Pointer, p1 string, p2 string, p3 int32) int32

func SetOptBin

func SetOptBin(p0 unsafe.Pointer, p1 string, p2 *uint8, p3 int32, p4 int32) int32

func SetOptDouble

func SetOptDouble(p0 unsafe.Pointer, p1 string, p2 float64, p3 int32) int32

func SetOptInt

func SetOptInt(p0 unsafe.Pointer, p1 string, p2 int64, p3 int32) int32

func SetOptPixelFormat

func SetOptPixelFormat(p0 unsafe.Pointer, p1 string, p2 PixelFormat, p3 int32) int32

func SetOptRational

func SetOptRational(p0 unsafe.Pointer, p1 string, p2 Rational, p3 int32) int32

func TransferHWFrameData

func TransferHWFrameData(p0 *Frame, p1 *Frame, p2 int32) int32

func UnrefBuffer

func UnrefBuffer(p0 **BufferRef)

func UnrefFrame

func UnrefFrame(p0 *Frame)

Types

type Buffer

type Buffer struct{}

type BufferRef

type BufferRef struct {
	Buffer *Buffer
	Data   *uint8
	Size   int32
	// contains filtered or unexported fields
}

func NewHWFramesContext

func NewHWFramesContext(p0 *BufferRef) *BufferRef

func RefBuffer

func RefBuffer(p0 *BufferRef) *BufferRef

type Class

type Class struct {
	ClassName              *common.CChar
	ItemName               *[0]byte
	Option                 *Option
	Version                int32
	LogLevelOffsetOffset   int32
	ParentLogContextOffset int32
	ChildNext              *[0]byte
	ChildClassNext         *[0]byte
	Category               C.AVClassCategory
	GetCategory            *[0]byte
	QueryRanges            *[0]byte
}

type Dictionary

type Dictionary struct{}

type Error

type Error int
const (
	ErrAgain Error = -C.EAGAIN
	ErrNoMem Error = -C.ENOMEM
	ErrInval Error = -C.EINVAL

	ErrOptionNotFound Error = C.AVERROR_OPTION_NOT_FOUND
	ErrInvalidData    Error = C.AVERROR_INVALIDDATA
	ErrStreamNotFound Error = C.AVERROR_STREAM_NOT_FOUND
	ErrEOF            Error = C.AVERROR_EOF
)

func (Error) Error

func (e Error) Error() string

type Frame

type Frame struct {
	Data                 [8]*uint8
	Linesize             [8]int32
	ExtendedData         **uint8
	Width                int32
	Height               int32
	NbSamples            int32
	Format               int32
	KeyFrame             int32
	PictType             uint32
	SampleAspectRatio    Rational
	Pts                  int64
	PktPts               int64
	PktDts               int64
	CodedPictureNumber   int32
	DisplayPictureNumber int32
	Quality              int32
	Opaque               unsafe.Pointer
	Error                [8]uint64
	RepeatPict           int32
	InterlacedFrame      int32
	TopFieldFirst        int32
	PaletteHasChanged    int32
	ReorderedOpaque      int64
	SampleRate           int32
	ChannelLayout        uint64
	Buf                  [8]*BufferRef
	ExtendedBuf          **BufferRef
	NbExtendedBuf        int32
	SideData             **FrameSideData
	NbSideData           int32
	Flags                int32
	ColorRange           uint32
	ColorPrimaries       uint32
	ColorTrc             uint32
	Colorspace           uint32
	ChromaLocation       uint32
	BestEffortTimestamp  int64
	PktPos               int64
	PktDuration          int64
	Metadata             *Dictionary
	DecodeErrorFlags     int32
	Channels             int32
	PktSize              int32
	QscaleTable          *int8
	Qstride              int32
	QscaleType           int32
	QpTableBuf           *BufferRef
	HwFramesCtx          *BufferRef
	OpaqueRef            *BufferRef
	CropTop              uint64
	CropBottom           uint64
	CropLeft             uint64
	CropRight            uint64
	PrivateRef           *BufferRef
}

func NewFrame

func NewFrame() *Frame

type FrameSideData

type FrameSideData struct {
	Type     uint32
	Data     *uint8
	Size     int32
	Metadata *Dictionary
	Buf      *BufferRef
}

type HWDeviceContext

type HWDeviceContext struct {
	AvClass    *Class
	Internal   *C.struct_AVHWDeviceInternal
	Type       uint32
	Hwctx      unsafe.Pointer
	Free       *[0]byte
	UserOpaque unsafe.Pointer
}

type HWDeviceType

type HWDeviceType C.enum_AVHWDeviceType

func (HWDeviceType) String

func (f HWDeviceType) String() string

type HWFramesContext

type HWFramesContext struct {
	AvClass         *Class
	Internal        *C.struct_AVHWFramesInternal
	DeviceRef       *BufferRef
	DeviceCtx       *HWDeviceContext
	Hwctx           unsafe.Pointer
	Free            unsafe.Pointer
	UserOpaque      unsafe.Pointer
	Pool            *C.struct_AVBufferPool
	InitialPoolSize int32
	Format          PixelFormat
	SwFormat        PixelFormat
	Width           int32
	Height          int32
	// contains filtered or unexported fields
}

type MediaType

type MediaType C.enum_AVMediaType

func (MediaType) String

func (t MediaType) String() string

type Option

type Option struct {
	Name       *common.CChar
	Help       *common.CChar
	Offset     int32
	Type       OptionType
	DefaultVal [8]byte
	Min        float64
	Max        float64
	Flags      int32
	Unit       *common.CChar
}

func FindOpt

func FindOpt(p0 unsafe.Pointer, p1 string, p2 string, p3 int32, p4 int32, p5 *unsafe.Pointer) *Option

type OptionType

type OptionType C.enum_AVOptionType

type PixelFormat

type PixelFormat C.enum_AVPixelFormat

func (PixelFormat) String

func (f PixelFormat) String() string

type Rational

type Rational struct {
	Num int32
	Den int32
}

func MultiplyRational

func MultiplyRational(p0 Rational, p1 Rational) Rational

func Rat

func Rat(num, den int32) Rational

Rat is a convenience function for creating a Rational

func (Rational) Eq

func (q Rational) Eq(rhs Rational) bool

func (Rational) Float64

func (q Rational) Float64() float64

func (Rational) Gt

func (q Rational) Gt(rhs Rational) bool

func (Rational) Gte

func (q Rational) Gte(rhs Rational) bool

func (Rational) Inverse

func (q Rational) Inverse() Rational

func (Rational) IsZero

func (q Rational) IsZero() bool

func (Rational) Lt

func (q Rational) Lt(rhs Rational) bool

func (Rational) Lte

func (q Rational) Lte(rhs Rational) bool

func (Rational) String

func (q Rational) String() string

type Rounding

type Rounding C.enum_AVRounding

type SampleFormat

type SampleFormat C.enum_AVSampleFormat

func (SampleFormat) String

func (f SampleFormat) String() string

type VerbosityLevel

type VerbosityLevel int

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL