Version: v0.0.0-...-6bf952d Latest Latest

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

Go to latest
Published: Jan 25, 2019 License: MIT Imports: 6 Imported by: 13




View Source
const (
	ErrorCodeBSFNotFound      ErrorCode = -1179861752
	ErrorCodeBug              ErrorCode = -558323010
	ErrorCodeBufferTooSmall   ErrorCode = -1397118274
	ErrorCodeDecoderNotFound  ErrorCode = -1128613112
	ErrorCodeDemuxerNotFound  ErrorCode = -1296385272
	ErrorCodeEncoderNotFound  ErrorCode = -1129203192
	ErrorCodeEOF              ErrorCode = -541478725
	ErrorCodeExit             ErrorCode = -1414092869
	ErrorCodeExternal         ErrorCode = -542398533
	ErrorCodeFilterNotFound   ErrorCode = -1279870712
	ErrorCodeInvalidData      ErrorCode = -1094995529
	ErrorCodeMuxerNotFound    ErrorCode = -1481985528
	ErrorCodeOptionNotFound   ErrorCode = -1414549496
	ErrorCodePatchWelcome     ErrorCode = -1163346256
	ErrorCodeProtocolNotFound ErrorCode = -1330794744
	ErrorCodeStreamNotFound   ErrorCode = -1381258232
	ErrorCodeBug2             ErrorCode = -541545794
	ErrorCodeUnknown          ErrorCode = -1313558101
	ErrorCodeExperimental     ErrorCode = -733130664
	ErrorCodeInputChanged     ErrorCode = -1668179713
	ErrorCodeOutputChanged    ErrorCode = -1668179714
	ErrorCodeHttpBadRequest   ErrorCode = -808465656
	ErrorCodeHttpUnauthorized ErrorCode = -825242872
	ErrorCodeHttpForbidden    ErrorCode = -858797304
	ErrorCodeHttpNotFound     ErrorCode = -875574520
	ErrorCodeHttpOther4xx     ErrorCode = -1482175736
	ErrorCodeHttpServerError  ErrorCode = -1482175992
	NoPTSValue                int64     = -9223372036854775808


View Source
var (
	ErrAllocationError     = errors.New("allocation error")
	ErrInvalidArgumentSize = errors.New("invalid argument size")
View Source
var StandardTimeBase = NewRational(1, C.AV_TIME_BASE)


func Clip

func Clip(x, min, max int) int

func ParseTime

func ParseTime(timestr string, duration bool) (int64, error)

func Rescale

func Rescale(a, b, c int64) int64

func RescaleByRationals

func RescaleByRationals(a int64, bq, cq *Rational) int64

func SetLogLevel

func SetLogLevel(level LogLevel)

func String

func String(str string) *string

func Version

func Version() (int, int, int)


type ChannelLayout

type ChannelLayout uint64
const (
	ChannelLayoutMono            ChannelLayout = C.AV_CH_LAYOUT_MONO
	ChannelLayoutStereo          ChannelLayout = C.AV_CH_LAYOUT_STEREO
	ChannelLayout2Point1         ChannelLayout = C.AV_CH_LAYOUT_2POINT1
	ChannelLayout21              ChannelLayout = C.AV_CH_LAYOUT_2_1
	ChannelLayoutSurround        ChannelLayout = C.AV_CH_LAYOUT_SURROUND
	ChannelLayout3Point1         ChannelLayout = C.AV_CH_LAYOUT_3POINT1
	ChannelLayout4Point0         ChannelLayout = C.AV_CH_LAYOUT_4POINT0
	ChannelLayout4Point1         ChannelLayout = C.AV_CH_LAYOUT_4POINT1
	ChannelLayout22              ChannelLayout = C.AV_CH_LAYOUT_2_2
	ChannelLayoutQuad            ChannelLayout = C.AV_CH_LAYOUT_QUAD
	ChannelLayout5Point0         ChannelLayout = C.AV_CH_LAYOUT_5POINT0
	ChannelLayout5Point1         ChannelLayout = C.AV_CH_LAYOUT_5POINT1
	ChannelLayout5Point0Back     ChannelLayout = C.AV_CH_LAYOUT_5POINT0_BACK
	ChannelLayout5Point1Back     ChannelLayout = C.AV_CH_LAYOUT_5POINT1_BACK
	ChannelLayout6Point0         ChannelLayout = C.AV_CH_LAYOUT_6POINT0
	ChannelLayout6Point0Front    ChannelLayout = C.AV_CH_LAYOUT_6POINT0_FRONT
	ChannelLayoutHexagonal       ChannelLayout = C.AV_CH_LAYOUT_HEXAGONAL
	ChannelLayout6Point1         ChannelLayout = C.AV_CH_LAYOUT_6POINT1
	ChannelLayout6Point1Back     ChannelLayout = C.AV_CH_LAYOUT_6POINT1_BACK
	ChannelLayout6Point1Front    ChannelLayout = C.AV_CH_LAYOUT_6POINT1_FRONT
	ChannelLayout7Point0         ChannelLayout = C.AV_CH_LAYOUT_7POINT0
	ChannelLayout7Point0Front    ChannelLayout = C.AV_CH_LAYOUT_7POINT0_FRONT
	ChannelLayout7Point1         ChannelLayout = C.AV_CH_LAYOUT_7POINT1
	ChannelLayout7Point1Wide     ChannelLayout = C.AV_CH_LAYOUT_7POINT1_WIDE
	ChannelLayout7Point1WideBack ChannelLayout = C.AV_CH_LAYOUT_7POINT1_WIDE_BACK
	ChannelLayoutOctagonal       ChannelLayout = C.AV_CH_LAYOUT_OCTAGONAL
	ChannelLayoutStereoDownmix   ChannelLayout = C.AV_CH_LAYOUT_STEREO_DOWNMIX

func ChannelLayouts

func ChannelLayouts() []ChannelLayout

func FindChannelLayoutByName

func FindChannelLayoutByName(name string) (ChannelLayout, bool)

func FindDefaultChannelLayout

func FindDefaultChannelLayout(numberOfChannels int) (ChannelLayout, bool)

func (ChannelLayout) DescriptionOk

func (cl ChannelLayout) DescriptionOk() (string, bool)

func (ChannelLayout) Name

func (cl ChannelLayout) Name() string

func (ChannelLayout) NameOk

func (cl ChannelLayout) NameOk() (string, bool)

func (ChannelLayout) NumberOfChannels

func (cl ChannelLayout) NumberOfChannels() int

type ChromaLocation

type ChromaLocation C.enum_AVChromaLocation
const (
	ChromaLocationUnspecified ChromaLocation = C.AVCHROMA_LOC_UNSPECIFIED
	ChromaLocationLeft        ChromaLocation = C.AVCHROMA_LOC_LEFT
	ChromaLocationCenter      ChromaLocation = C.AVCHROMA_LOC_CENTER
	ChromaLocationTopLeft     ChromaLocation = C.AVCHROMA_LOC_TOPLEFT
	ChromaLocationTop         ChromaLocation = C.AVCHROMA_LOC_TOP
	ChromaLocationBottomLeft  ChromaLocation = C.AVCHROMA_LOC_BOTTOMLEFT
	ChromaLocationBottom      ChromaLocation = C.AVCHROMA_LOC_BOTTOM

type Class

type Class struct {
	CAVClass *C.AVClass

func NewClassFromC

func NewClassFromC(cClass unsafe.Pointer) *Class

func (*Class) ChildrenClasses

func (c *Class) ChildrenClasses() []*Class

func (*Class) Name

func (c *Class) Name() string

func (*Class) NameOk

func (c *Class) NameOk() (string, bool)

func (*Class) Options

func (c *Class) Options() []*Option

type Dictionary

type Dictionary struct {
	CAVDictionary **C.AVDictionary
	// contains filtered or unexported fields

func NewDictionary

func NewDictionary() *Dictionary

func NewDictionaryFromC

func NewDictionaryFromC(cDictionary unsafe.Pointer) *Dictionary

func (*Dictionary) Copy

func (dict *Dictionary) Copy() *Dictionary

func (*Dictionary) Count

func (dict *Dictionary) Count() int

func (*Dictionary) Delete

func (dict *Dictionary) Delete(key string) error

func (*Dictionary) Free

func (dict *Dictionary) Free()

func (*Dictionary) Get

func (dict *Dictionary) Get(key string) string

func (*Dictionary) GetInsensitive

func (dict *Dictionary) GetInsensitive(key string) string

func (*Dictionary) GetInsensitiveOk

func (dict *Dictionary) GetInsensitiveOk(key string) (string, bool)

func (*Dictionary) GetOk

func (dict *Dictionary) GetOk(key string) (string, bool)

func (*Dictionary) Has

func (dict *Dictionary) Has(key string) bool

func (*Dictionary) HasInsensitive

func (dict *Dictionary) HasInsensitive(key string) bool

func (*Dictionary) Keys

func (dict *Dictionary) Keys() []string

func (*Dictionary) Map

func (dict *Dictionary) Map() map[string]string

func (*Dictionary) Pointer

func (dict *Dictionary) Pointer() unsafe.Pointer

func (*Dictionary) Set

func (dict *Dictionary) Set(key, value string) error

func (*Dictionary) SetInsensitive

func (dict *Dictionary) SetInsensitive(key, value string) error

func (*Dictionary) String

func (dict *Dictionary) String(keyValSep, pairsSep byte) (string, error)

func (*Dictionary) Value

func (dict *Dictionary) Value() unsafe.Pointer

func (*Dictionary) Values

func (dict *Dictionary) Values() []string

type Error

type Error struct {
	// contains filtered or unexported fields

func NewErrorFromCode

func NewErrorFromCode(code ErrorCode) *Error

func (*Error) Code

func (e *Error) Code() ErrorCode

func (*Error) Error

func (e *Error) Error() string

type ErrorCode

type ErrorCode int

func ErrnoErrorCode

func ErrnoErrorCode(e syscall.Errno) ErrorCode

type Expr

type Expr struct {
	CAVExpr *C.struct_AVExpr

func NewExpr

func NewExpr(value string, constNames []string) (*Expr, error)

func NewExprFromC

func NewExprFromC(cExpr unsafe.Pointer) *Expr

func (*Expr) Evaluate

func (e *Expr) Evaluate(constValues []float64) (float64, error)

func (*Expr) Free

func (e *Expr) Free()

type Frame

type Frame struct {
	CAVFrame *C.AVFrame

func NewFrame

func NewFrame() (*Frame, error)

func NewFrameFromC

func NewFrameFromC(cFrame unsafe.Pointer) *Frame

func (*Frame) BestEffortTimestamp

func (f *Frame) BestEffortTimestamp() int64

func (*Frame) CodedPictureNumber

func (f *Frame) CodedPictureNumber() int

func (*Frame) Data

func (f *Frame) Data(index int) unsafe.Pointer

func (*Frame) DisplayPictureNumber

func (f *Frame) DisplayPictureNumber() int

func (*Frame) ExtendedData

func (f *Frame) ExtendedData() unsafe.Pointer

func (*Frame) Free

func (f *Frame) Free()

func (*Frame) GetBuffer

func (f *Frame) GetBuffer() error

func (*Frame) GetBufferWithAlignment

func (f *Frame) GetBufferWithAlignment(alignment int) error

func (*Frame) Height

func (f *Frame) Height() int

func (*Frame) KeyFrame

func (f *Frame) KeyFrame() bool

func (*Frame) LineSize

func (f *Frame) LineSize(index int) int

func (*Frame) Metadata

func (f *Frame) Metadata() *Dictionary

func (*Frame) NumberOfSamples

func (f *Frame) NumberOfSamples() int

func (*Frame) Opaque

func (f *Frame) Opaque() unsafe.Pointer

func (*Frame) PTS

func (f *Frame) PTS() int64

func (*Frame) PacketDTS

func (f *Frame) PacketDTS() int64

func (*Frame) PacketDuration

func (f *Frame) PacketDuration() int64

func (*Frame) PacketPTS

func (f *Frame) PacketPTS() int64

func (*Frame) PictureType

func (f *Frame) PictureType() PictureType

func (*Frame) PixelFormat

func (f *Frame) PixelFormat() PixelFormat

func (*Frame) Quality

func (f *Frame) Quality() int

func (*Frame) Ref

func (f *Frame) Ref(dst *Frame) error

func (*Frame) SampleAspectRatio

func (f *Frame) SampleAspectRatio() *Rational

func (*Frame) SetCodedPictureNumber

func (f *Frame) SetCodedPictureNumber(number int)

func (*Frame) SetData

func (f *Frame) SetData(index int, data unsafe.Pointer)

func (*Frame) SetDisplayPictureNumber

func (f *Frame) SetDisplayPictureNumber(number int)

func (*Frame) SetExtendedData

func (f *Frame) SetExtendedData(data unsafe.Pointer)

func (*Frame) SetHeight

func (f *Frame) SetHeight(height int)

func (*Frame) SetKeyFrame

func (f *Frame) SetKeyFrame(keyFrame bool)

func (*Frame) SetLineSize

func (f *Frame) SetLineSize(index int, lineSize int)

func (*Frame) SetMetadata

func (f *Frame) SetMetadata(dict *Dictionary)

func (*Frame) SetNumberOfSamples

func (f *Frame) SetNumberOfSamples(samples int)

func (*Frame) SetOpaque

func (f *Frame) SetOpaque(opaque unsafe.Pointer)

func (*Frame) SetPTS

func (f *Frame) SetPTS(pts int64)

func (*Frame) SetPacketDTS

func (f *Frame) SetPacketDTS(dts int64)

func (*Frame) SetPacketPTS

func (f *Frame) SetPacketPTS(pts int64)

func (*Frame) SetPictureType

func (f *Frame) SetPictureType(ptype PictureType)

func (*Frame) SetPixelFormat

func (f *Frame) SetPixelFormat(format PixelFormat)

func (*Frame) SetQuality

func (f *Frame) SetQuality(quality int)

func (*Frame) SetSampleAspectRatio

func (f *Frame) SetSampleAspectRatio(aspectRatio *Rational)

func (*Frame) SetWidth

func (f *Frame) SetWidth(width int)

func (*Frame) Unref

func (f *Frame) Unref()

func (*Frame) Width

func (f *Frame) Width() int

type LogLevel

type LogLevel int
const (
	LogLevelQuiet   LogLevel = C.AV_LOG_QUIET
	LogLevelPanic   LogLevel = C.AV_LOG_PANIC
	LogLevelFatal   LogLevel = C.AV_LOG_FATAL
	LogLevelError   LogLevel = C.AV_LOG_ERROR
	LogLevelWarning LogLevel = C.AV_LOG_WARNING
	LogLevelInfo    LogLevel = C.AV_LOG_INFO
	LogLevelVerbose LogLevel = C.AV_LOG_VERBOSE
	LogLevelDebug   LogLevel = C.AV_LOG_DEBUG
	LogLevelTrace   LogLevel = C.GO_AV_LOG_TRACE

type LossFlags

type LossFlags int
const (
	LossFlagNone       LossFlags = 0
	LossFlagResolution LossFlags = C.FF_LOSS_RESOLUTION
	LossFlagDepth      LossFlags = C.FF_LOSS_DEPTH
	LossFlagColorspace LossFlags = C.FF_LOSS_COLORSPACE
	LossFlagAlpha      LossFlags = C.FF_LOSS_ALPHA
	LossFlagColorquant LossFlags = C.FF_LOSS_COLORQUANT
	LossFlagChroma     LossFlags = C.FF_LOSS_CHROMA
	LossFlagAll        LossFlags = -1

type MediaType

type MediaType C.enum_AVMediaType
const (
	MediaTypeUnknown    MediaType = C.AVMEDIA_TYPE_UNKNOWN
	MediaTypeVideo      MediaType = C.AVMEDIA_TYPE_VIDEO
	MediaTypeAudio      MediaType = C.AVMEDIA_TYPE_AUDIO
	MediaTypeData       MediaType = C.AVMEDIA_TYPE_DATA
	MediaTypeSubtitle   MediaType = C.AVMEDIA_TYPE_SUBTITLE
	MediaTypeAttachment MediaType = C.AVMEDIA_TYPE_ATTACHMENT

type Option

type Option struct {
	CAVOption *C.struct_AVOption

func NewOptionFromC

func NewOptionFromC(cOption unsafe.Pointer) *Option

func (*Option) Help

func (o *Option) Help() string

func (*Option) HelpOk

func (o *Option) HelpOk() (string, bool)

func (*Option) Name

func (o *Option) Name() string

func (*Option) NameOk

func (o *Option) NameOk() (string, bool)

type OptionAccessor

type OptionAccessor struct {
	// contains filtered or unexported fields

func NewOptionAccessor

func NewOptionAccessor(obj unsafe.Pointer, fake bool) *OptionAccessor

func (*OptionAccessor) GetChannelLayoutOption

func (oa *OptionAccessor) GetChannelLayoutOption(name string) (int64, bool, error)

func (*OptionAccessor) GetChannelLayoutOptionWithFlags

func (oa *OptionAccessor) GetChannelLayoutOptionWithFlags(name string, flags OptionSearchFlags) (int64, bool, error)

func (*OptionAccessor) GetDictionaryOption

func (oa *OptionAccessor) GetDictionaryOption(name string) (*Dictionary, error)

func (*OptionAccessor) GetDictionaryOptionWithFlags

func (oa *OptionAccessor) GetDictionaryOptionWithFlags(name string, flags OptionSearchFlags) (*Dictionary, error)

func (*OptionAccessor) GetFloat64Option

func (oa *OptionAccessor) GetFloat64Option(name string) (float64, bool, error)

func (*OptionAccessor) GetFloat64OptionWithFlags

func (oa *OptionAccessor) GetFloat64OptionWithFlags(name string, flags OptionSearchFlags) (float64, bool, error)

func (*OptionAccessor) GetImageSizeOption

func (oa *OptionAccessor) GetImageSizeOption(name string) (int, int, bool, error)

func (*OptionAccessor) GetImageSizeOptionWithFlags

func (oa *OptionAccessor) GetImageSizeOptionWithFlags(name string, flags OptionSearchFlags) (int, int, bool, error)

func (*OptionAccessor) GetInt64Option

func (oa *OptionAccessor) GetInt64Option(name string) (int64, bool, error)

func (*OptionAccessor) GetInt64OptionWithFlags

func (oa *OptionAccessor) GetInt64OptionWithFlags(name string, flags OptionSearchFlags) (int64, bool, error)

func (*OptionAccessor) GetOption

func (oa *OptionAccessor) GetOption(name string) (string, bool, error)

func (*OptionAccessor) GetOptionWithFlags

func (oa *OptionAccessor) GetOptionWithFlags(name string, flags OptionSearchFlags) (string, bool, error)

func (*OptionAccessor) GetPixelFormatOption

func (oa *OptionAccessor) GetPixelFormatOption(name string) (PixelFormat, bool, error)

func (*OptionAccessor) GetPixelFormatOptionWithFlags

func (oa *OptionAccessor) GetPixelFormatOptionWithFlags(name string, flags OptionSearchFlags) (PixelFormat, bool, error)

func (*OptionAccessor) GetRationalOption

func (oa *OptionAccessor) GetRationalOption(name string) (*Rational, error)

func (*OptionAccessor) GetRationalOptionWithFlags

func (oa *OptionAccessor) GetRationalOptionWithFlags(name string, flags OptionSearchFlags) (*Rational, error)

func (*OptionAccessor) GetSampleFormatOption

func (oa *OptionAccessor) GetSampleFormatOption(name string) (SampleFormat, bool, error)

func (*OptionAccessor) GetSampleFormatOptionWithFlags

func (oa *OptionAccessor) GetSampleFormatOptionWithFlags(name string, flags OptionSearchFlags) (SampleFormat, bool, error)

func (*OptionAccessor) GetVideoRateOption

func (oa *OptionAccessor) GetVideoRateOption(name string) (*Rational, error)

func (*OptionAccessor) GetVideoRateOptionWithFlags

func (oa *OptionAccessor) GetVideoRateOptionWithFlags(name string, flags OptionSearchFlags) (*Rational, error)

func (*OptionAccessor) SetBinaryOption

func (oa *OptionAccessor) SetBinaryOption(name string, value unsafe.Pointer, size int) error

func (*OptionAccessor) SetBinaryOptionWithFlags

func (oa *OptionAccessor) SetBinaryOptionWithFlags(name string, value unsafe.Pointer, size int, flags OptionSearchFlags) error

func (*OptionAccessor) SetChannelLayoutOption

func (oa *OptionAccessor) SetChannelLayoutOption(name string, value int64) error

func (*OptionAccessor) SetChannelLayoutOptionWithFlags

func (oa *OptionAccessor) SetChannelLayoutOptionWithFlags(name string, value int64, flags OptionSearchFlags) error

func (*OptionAccessor) SetDictionaryOption

func (oa *OptionAccessor) SetDictionaryOption(name string, value *Dictionary) error

func (*OptionAccessor) SetDictionaryOptionWithFlags

func (oa *OptionAccessor) SetDictionaryOptionWithFlags(name string, value *Dictionary, flags OptionSearchFlags) error

func (*OptionAccessor) SetFloat64Option

func (oa *OptionAccessor) SetFloat64Option(name string, value float64) error

func (*OptionAccessor) SetFloat64OptionWithFlags

func (oa *OptionAccessor) SetFloat64OptionWithFlags(name string, value float64, flags OptionSearchFlags) error

func (*OptionAccessor) SetImageSizeOption

func (oa *OptionAccessor) SetImageSizeOption(name string, width, height int) error

func (*OptionAccessor) SetImageSizeOptionWithFlags

func (oa *OptionAccessor) SetImageSizeOptionWithFlags(name string, width, height int, flags OptionSearchFlags) error

func (*OptionAccessor) SetInt64Option

func (oa *OptionAccessor) SetInt64Option(name string, value int64) error

func (*OptionAccessor) SetInt64OptionWithFlags

func (oa *OptionAccessor) SetInt64OptionWithFlags(name string, value int64, flags OptionSearchFlags) error

func (*OptionAccessor) SetIntArrayOption

func (oa *OptionAccessor) SetIntArrayOption(name string, value []int) error

func (*OptionAccessor) SetIntArrayOptionWithFlags

func (oa *OptionAccessor) SetIntArrayOptionWithFlags(name string, value []int, flags OptionSearchFlags) error

func (*OptionAccessor) SetOption

func (oa *OptionAccessor) SetOption(name, value string) error

func (*OptionAccessor) SetOptionWithFlags

func (oa *OptionAccessor) SetOptionWithFlags(name, value string, flags OptionSearchFlags) error

func (*OptionAccessor) SetPixelFormatOption

func (oa *OptionAccessor) SetPixelFormatOption(name string, value PixelFormat) error

func (*OptionAccessor) SetPixelFormatOptionWithFlags

func (oa *OptionAccessor) SetPixelFormatOptionWithFlags(name string, value PixelFormat, flags OptionSearchFlags) error

func (*OptionAccessor) SetRationalOption

func (oa *OptionAccessor) SetRationalOption(name string, value *Rational) error

func (*OptionAccessor) SetRationalOptionWithFlags

func (oa *OptionAccessor) SetRationalOptionWithFlags(name string, value *Rational, flags OptionSearchFlags) error

func (*OptionAccessor) SetVideoRateOption

func (oa *OptionAccessor) SetVideoRateOption(name string, value *Rational) error

func (*OptionAccessor) SetVideoRateOptionWithFlags

func (oa *OptionAccessor) SetVideoRateOptionWithFlags(name string, value *Rational, flags OptionSearchFlags) error

type OptionSearchFlags

type OptionSearchFlags int
const (
	OptionSearchChildren OptionSearchFlags = C.AV_OPT_SEARCH_CHILDREN
	OptionSearchFakeObj  OptionSearchFlags = C.AV_OPT_SEARCH_FAKE_OBJ

type PictureType

type PictureType C.enum_AVPictureType
const (
	PictureTypeNone PictureType = C.AV_PICTURE_TYPE_NONE
	PictureTypeI    PictureType = C.AV_PICTURE_TYPE_I
	PictureTypeP    PictureType = C.AV_PICTURE_TYPE_P
	PictureTypeB    PictureType = C.AV_PICTURE_TYPE_B
	PictureTypeS    PictureType = C.AV_PICTURE_TYPE_S
	PictureTypeSI   PictureType = C.AV_PICTURE_TYPE_SI
	PictureTypeSP   PictureType = C.AV_PICTURE_TYPE_SP
	PictureTypeBI   PictureType = C.AV_PICTURE_TYPE_BI

type PixelFormat

type PixelFormat C.enum_AVPixelFormat
const (
	PixelFormatNone PixelFormat = C.AV_PIX_FMT_NONE

func FindPixelFormatByName

func FindPixelFormatByName(name string) (PixelFormat, bool)

func (PixelFormat) Name

func (pfmt PixelFormat) Name() string

func (PixelFormat) NameOk

func (pfmt PixelFormat) NameOk() (string, bool)

type PixelFormatDescriptor

type PixelFormatDescriptor struct {
	CAVPixFmtDescriptor *C.AVPixFmtDescriptor

func FindPixelFormatDescriptorByPixelFormat

func FindPixelFormatDescriptorByPixelFormat(pixelFormat PixelFormat) *PixelFormatDescriptor

func NewPixelFormatDescriptorFromC

func NewPixelFormatDescriptorFromC(cCtx unsafe.Pointer) *PixelFormatDescriptor

func (*PixelFormatDescriptor) ComponentCount

func (d *PixelFormatDescriptor) ComponentCount() int

type Rational

type Rational struct {
	CAVRational C.AVRational

func NewRational

func NewRational(numerator, denominator int) *Rational

func NewRationalFromC

func NewRationalFromC(cRational unsafe.Pointer) *Rational

func ParseRational

func ParseRational(ratio string, max int) (*Rational, error)

func (*Rational) Add

func (r *Rational) Add(r2 *Rational)

func (*Rational) Compare

func (r *Rational) Compare(r2 *Rational) (int, bool)

func (*Rational) Copy

func (r *Rational) Copy() *Rational

func (*Rational) Denominator

func (r *Rational) Denominator() int

func (*Rational) Div

func (r *Rational) Div(r2 *Rational)

func (*Rational) Float64

func (r *Rational) Float64() float64

func (*Rational) Invert

func (r *Rational) Invert()

func (*Rational) Mul

func (r *Rational) Mul(r2 *Rational)

func (*Rational) Nearer

func (r *Rational) Nearer(r2 *Rational, r3 *Rational) int

func (*Rational) Nearest

func (r *Rational) Nearest(rs []*Rational) *Rational

func (*Rational) Numerator

func (r *Rational) Numerator() int

func (*Rational) Reduce

func (r *Rational) Reduce()

func (*Rational) SetDenominator

func (r *Rational) SetDenominator(denominator int)

func (*Rational) SetNumerator

func (r *Rational) SetNumerator(numerator int)

func (*Rational) String

func (r *Rational) String() string

func (*Rational) Sub

func (r *Rational) Sub(r2 *Rational)

type SampleFormat

type SampleFormat C.enum_AVSampleFormat
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

func FindSampleFormatByName

func FindSampleFormatByName(name string) (SampleFormat, bool)

func (SampleFormat) Name

func (sfmt SampleFormat) Name() string

func (SampleFormat) NameOk

func (sfmt SampleFormat) NameOk() (string, bool)

type Time

type Time struct {
	Point int64
	Base  *Rational

func NewTime

func NewTime(point int64, base *Rational) *Time

func (*Time) Duration

func (t *Time) Duration() (time.Duration, bool)

func (*Time) Valid

func (t *Time) Valid() bool

Jump to

Keyboard shortcuts

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