avcodec

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

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

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

Documentation

Index

Constants

View Source
const (
	ProfileUnknown int = C.FF_PROFILE_UNKNOWN
)

Variables

View Source
var (
	ErrAllocationError         = errors.New("allocation error")
	ErrEncoderNotFound         = errors.New("encoder not found")
	ErrDecoderNotFound         = errors.New("decoder not found")
	ErrBitStreamFilterNotFound = errors.New("bitstreamfilter not found")
)

Functions

func FindBestPixelFormat

func FindBestPixelFormat(list []avutil.PixelFormat, src avutil.PixelFormat, alpha bool) avutil.PixelFormat

func FindBestPixelFormatWithLossFlags

func FindBestPixelFormatWithLossFlags(list []avutil.PixelFormat, src avutil.PixelFormat, alpha bool, lossFlags avutil.LossFlags) (avutil.PixelFormat, avutil.LossFlags)

func RegisterAll

func RegisterAll()

func Version

func Version() (int, int, int)

Types

type Capabilities

type Capabilities int
const (
	CapabilityDrawHorizBand     Capabilities = C.CODEC_CAP_DRAW_HORIZ_BAND
	CapabilityDR1               Capabilities = C.CODEC_CAP_DR1
	CapabilityTruncated         Capabilities = C.CODEC_CAP_TRUNCATED
	CapabilityHWAccel           Capabilities = C.GO_CODEC_CAP_HWACCEL
	CapabilityDelay             Capabilities = C.CODEC_CAP_DELAY
	CapabilitySmallLastFrame    Capabilities = C.CODEC_CAP_SMALL_LAST_FRAME
	CapabilityHWAccelVDPAU      Capabilities = C.GO_CODEC_CAP_HWACCEL_VDPAU
	CapabilitySubframes         Capabilities = C.CODEC_CAP_SUBFRAMES
	CapabilityExperimental      Capabilities = C.CODEC_CAP_EXPERIMENTAL
	CapabilityChannelConf       Capabilities = C.CODEC_CAP_CHANNEL_CONF
	CapabilityFrameThreads      Capabilities = C.CODEC_CAP_FRAME_THREADS
	CapabilitySliceThreads      Capabilities = C.CODEC_CAP_SLICE_THREADS
	CapabilityParamChange       Capabilities = C.CODEC_CAP_PARAM_CHANGE
	CapabilityAutoThreads       Capabilities = C.CODEC_CAP_AUTO_THREADS
	CapabilityVariableFrameSize Capabilities = C.CODEC_CAP_VARIABLE_FRAME_SIZE
	CapabilityIntraOnly         Capabilities = C.CODEC_CAP_INTRA_ONLY
	CapabilityLossless          Capabilities = C.CODEC_CAP_LOSSLESS
)

type Codec

type Codec struct {
	CAVCodec *C.AVCodec
}

func FindDecoderByID

func FindDecoderByID(codecID CodecID) *Codec

func FindDecoderByName

func FindDecoderByName(name string) *Codec

func FindEncoderByID

func FindEncoderByID(codecID CodecID) *Codec

func FindEncoderByName

func FindEncoderByName(name string) *Codec

func NewCodecFromC

func NewCodecFromC(cCodec unsafe.Pointer) *Codec

func (*Codec) Capabilities

func (c *Codec) Capabilities() Capabilities

func (*Codec) ID

func (c *Codec) ID() CodecID

func (*Codec) Name

func (c *Codec) Name() string

func (*Codec) NameOk

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

func (*Codec) PrivateClass

func (c *Codec) PrivateClass() *avutil.Class

func (*Codec) ProfileName

func (c *Codec) ProfileName(id int) string

func (*Codec) ProfileNameOK

func (c *Codec) ProfileNameOK(id int) (string, bool)

func (*Codec) Profiles

func (c *Codec) Profiles() []*Profile

func (*Codec) SupportedChannelLayouts

func (c *Codec) SupportedChannelLayouts() []avutil.ChannelLayout

func (*Codec) SupportedFrameRates

func (c *Codec) SupportedFrameRates() []*avutil.Rational

func (*Codec) SupportedPixelFormats

func (c *Codec) SupportedPixelFormats() []avutil.PixelFormat

func (*Codec) SupportedSampleFormats

func (c *Codec) SupportedSampleFormats() []avutil.SampleFormat

func (*Codec) SupportedSampleRates

func (c *Codec) SupportedSampleRates() []int

func (*Codec) Type

func (c *Codec) Type() avutil.MediaType

type CodecDescriptor

type CodecDescriptor struct {
	CAVCodecDescriptor *C.AVCodecDescriptor
}

func CodecDescriptorByID

func CodecDescriptorByID(codecID CodecID) *CodecDescriptor

func CodecDescriptorByName

func CodecDescriptorByName(name string) *CodecDescriptor

func CodecDescriptors

func CodecDescriptors() []*CodecDescriptor

func NewCodecDescriptorFromC

func NewCodecDescriptorFromC(cCodec unsafe.Pointer) *CodecDescriptor

func (*CodecDescriptor) CodecType

func (c *CodecDescriptor) CodecType() avutil.MediaType

func (*CodecDescriptor) ID

func (c *CodecDescriptor) ID() CodecID

func (*CodecDescriptor) LongName

func (c *CodecDescriptor) LongName() string

func (*CodecDescriptor) LongNameOk

func (c *CodecDescriptor) LongNameOk() (string, bool)

func (*CodecDescriptor) MimeTypes

func (c *CodecDescriptor) MimeTypes() []string

func (*CodecDescriptor) Name

func (c *CodecDescriptor) Name() string

func (*CodecDescriptor) NameOk

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

func (*CodecDescriptor) Profiles

func (c *CodecDescriptor) Profiles() []*Profile

func (*CodecDescriptor) Props

func (c *CodecDescriptor) Props() CodecProps

type CodecID

type CodecID C.enum_AVCodecID
const (
	CodecIDNone  CodecID = C.AV_CODEC_ID_NONE
	CodecIDMJpeg CodecID = C.AV_CODEC_ID_MJPEG
	CodecIDLJpeg CodecID = C.AV_CODEC_ID_LJPEG
)

type CodecProps

type CodecProps int
const (
	CodecPropIntraOnly CodecProps = C.AV_CODEC_PROP_INTRA_ONLY
	CodecPropLossy     CodecProps = C.AV_CODEC_PROP_LOSSY
	CodecPropLossless  CodecProps = C.AV_CODEC_PROP_LOSSLESS
	CodecPropReorder   CodecProps = C.AV_CODEC_PROP_REORDER
	CodecPropBitmapSub CodecProps = C.AV_CODEC_PROP_BITMAP_SUB
	CodecPropTextSub   CodecProps = C.AV_CODEC_PROP_TEXT_SUB
)

type Compliance

type Compliance int
const (
	ComplianceVeryStrict   Compliance = C.FF_COMPLIANCE_VERY_STRICT
	ComplianceStrict       Compliance = C.FF_COMPLIANCE_STRICT
	ComplianceNormal       Compliance = C.FF_COMPLIANCE_NORMAL
	ComplianceUnofficial   Compliance = C.FF_COMPLIANCE_UNOFFICIAL
	ComplianceExperimental Compliance = C.FF_COMPLIANCE_EXPERIMENTAL
)

type Context

type Context struct {
	CAVCodecContext *C.AVCodecContext
	*avutil.OptionAccessor
}

func NewContextFromC

func NewContextFromC(cCtx unsafe.Pointer) *Context

func NewContextWithCodec

func NewContextWithCodec(codec *Codec) (*Context, error)

func (*Context) ActiveThreadType

func (ctx *Context) ActiveThreadType() ThreadType

func (*Context) BFrameStrategy

func (ctx *Context) BFrameStrategy() int

func (*Context) BQuantFactor

func (ctx *Context) BQuantFactor() float32

func (*Context) BQuantOffset

func (ctx *Context) BQuantOffset() float32

func (*Context) BSensitivity

func (ctx *Context) BSensitivity() int

func (*Context) BidirRefine

func (ctx *Context) BidirRefine() int

func (*Context) BitRate

func (ctx *Context) BitRate() int64

func (*Context) BitRateTolerance

func (ctx *Context) BitRateTolerance() int

func (*Context) BitsPerCodedSample

func (ctx *Context) BitsPerCodedSample() int

func (*Context) BitsPerRawSample

func (ctx *Context) BitsPerRawSample() int

func (*Context) BlockAlign

func (ctx *Context) BlockAlign() int

func (*Context) BrdScale

func (ctx *Context) BrdScale() int

func (*Context) ChannelLayout

func (ctx *Context) ChannelLayout() avutil.ChannelLayout

func (*Context) Channels

func (ctx *Context) Channels() int

func (*Context) ChromaOffset

func (ctx *Context) ChromaOffset() int

func (*Context) ChromaSampleLocation

func (ctx *Context) ChromaSampleLocation() avutil.ChromaLocation

func (*Context) Class

func (ctx *Context) Class() *avutil.Class

func (*Context) Close

func (ctx *Context) Close()

func (*Context) Codec

func (ctx *Context) Codec() *Codec

func (*Context) CodecID

func (ctx *Context) CodecID() CodecID

func (*Context) CodecTag

func (ctx *Context) CodecTag() uint

func (*Context) CodecType

func (ctx *Context) CodecType() avutil.MediaType

func (*Context) CodecWhitelist

func (ctx *Context) CodecWhitelist() []string

func (*Context) CodedHeight

func (ctx *Context) CodedHeight() int

func (*Context) CodedWidth

func (ctx *Context) CodedWidth() int

func (*Context) CompressionLevel

func (ctx *Context) CompressionLevel() int

func (*Context) ContextModel

func (ctx *Context) ContextModel() int

func (*Context) Cutoff

func (ctx *Context) Cutoff() int

func (*Context) DCTAlgorithm

func (ctx *Context) DCTAlgorithm() DCTAlgorithm

func (*Context) DarkMasking

func (ctx *Context) DarkMasking() float32

func (*Context) Delay

func (ctx *Context) Delay() int

func (*Context) DiaSize

func (ctx *Context) DiaSize() int

func (*Context) ExtraData

func (ctx *Context) ExtraData() unsafe.Pointer

func (*Context) ExtraDataSize

func (ctx *Context) ExtraDataSize() int

func (*Context) Flags

func (ctx *Context) Flags() Flags

func (*Context) Flags2

func (ctx *Context) Flags2() Flags2

func (*Context) FrameBits

func (ctx *Context) FrameBits() int

func (*Context) FrameNumber

func (ctx *Context) FrameNumber() int

func (*Context) FrameRate

func (ctx *Context) FrameRate() *avutil.Rational

func (*Context) FrameSize

func (ctx *Context) FrameSize() int

func (*Context) FrameSkipCmp

func (ctx *Context) FrameSkipCmp() int

func (*Context) FrameSkipExp

func (ctx *Context) FrameSkipExp() int

func (*Context) FrameSkipFactor

func (ctx *Context) FrameSkipFactor() int

func (*Context) FrameSkipThreshold

func (ctx *Context) FrameSkipThreshold() int

func (*Context) Free

func (ctx *Context) Free()

func (*Context) GOPSize

func (ctx *Context) GOPSize() int

func (*Context) GlobalQuality

func (ctx *Context) GlobalQuality() int

func (*Context) HasBFrames

func (ctx *Context) HasBFrames() int

func (*Context) HeaderBits

func (ctx *Context) HeaderBits() int

func (*Context) Height

func (ctx *Context) Height() int

func (*Context) ICount

func (ctx *Context) ICount() int

func (*Context) IDCTAlgorithm

func (ctx *Context) IDCTAlgorithm() IDCTAlgorithm

func (*Context) ILDCTCmp

func (ctx *Context) ILDCTCmp() int

func (*Context) IQuantFactor

func (ctx *Context) IQuantFactor() float32

func (*Context) IQuantOffset

func (ctx *Context) IQuantOffset() float32

func (*Context) ITexBits

func (ctx *Context) ITexBits() int

func (*Context) InitialPadding

func (ctx *Context) InitialPadding() int

func (*Context) IntraDCPrecision

func (ctx *Context) IntraDCPrecision() int

func (*Context) KeyIntMin

func (ctx *Context) KeyIntMin() int

func (*Context) LastPredictorCount

func (ctx *Context) LastPredictorCount() int

func (*Context) Level

func (ctx *Context) Level() int

func (*Context) LowRes

func (ctx *Context) LowRes() int

func (*Context) LumiMasking

func (ctx *Context) LumiMasking() float32

func (*Context) MBCmp

func (ctx *Context) MBCmp() int

func (*Context) MBDecision

func (ctx *Context) MBDecision() int

func (*Context) MBLmax

func (ctx *Context) MBLmax() int

func (*Context) MBLmin

func (ctx *Context) MBLmin() int

func (*Context) MECmp

func (ctx *Context) MECmp() int

func (*Context) MEPenaltyCompensation

func (ctx *Context) MEPenaltyCompensation() int

func (*Context) MEPreCmp

func (ctx *Context) MEPreCmp() int

func (*Context) MERange

func (ctx *Context) MERange() int

func (*Context) MESubCmp

func (ctx *Context) MESubCmp() int

func (*Context) MESubpelQuality

func (ctx *Context) MESubpelQuality() int

func (*Context) MPEGQuant

func (ctx *Context) MPEGQuant() int

func (*Context) MV0Threshold

func (ctx *Context) MV0Threshold() int

func (*Context) MVBits

func (ctx *Context) MVBits() int

func (*Context) MaxBFrames

func (ctx *Context) MaxBFrames() int

func (*Context) MaxPredictionOrder

func (ctx *Context) MaxPredictionOrder() int

func (*Context) MaxQDiff

func (ctx *Context) MaxQDiff() int

func (*Context) MinPredictionOrder

func (ctx *Context) MinPredictionOrder() int

func (*Context) MiscBits

func (ctx *Context) MiscBits() int

func (*Context) NSSEWeight

func (ctx *Context) NSSEWeight() int

func (*Context) NoiseReduction

func (ctx *Context) NoiseReduction() int

func (*Context) Opaque

func (ctx *Context) Opaque() unsafe.Pointer

func (*Context) Open

func (ctx *Context) Open(options *avutil.Dictionary) error

func (*Context) OpenForDecoding

func (ctx *Context) OpenForDecoding(options *avutil.Dictionary) error

func (*Context) OpenForEncoding

func (ctx *Context) OpenForEncoding(options *avutil.Dictionary) error

func (*Context) OpenWithCodec

func (ctx *Context) OpenWithCodec(codec *Codec, options *avutil.Dictionary) error

func (*Context) PCount

func (ctx *Context) PCount() int

func (*Context) PMasking

func (ctx *Context) PMasking() float32

func (*Context) PTSCorrectionLastDTS

func (ctx *Context) PTSCorrectionLastDTS() int64

func (*Context) PTSCorrectionLastPTS

func (ctx *Context) PTSCorrectionLastPTS() int64

func (*Context) PTexBits

func (ctx *Context) PTexBits() int

func (*Context) PixelFormat

func (ctx *Context) PixelFormat() avutil.PixelFormat

func (*Context) PreDiaSize

func (ctx *Context) PreDiaSize() int

func (*Context) PreME

func (ctx *Context) PreME() int

func (*Context) PredictionMethod

func (ctx *Context) PredictionMethod() int

func (*Context) PrivData

func (ctx *Context) PrivData() unsafe.Pointer

func (*Context) Profile

func (ctx *Context) Profile() int

func (*Context) QBlur

func (ctx *Context) QBlur() float32

func (*Context) QCompress

func (ctx *Context) QCompress() float32

func (*Context) QMax

func (ctx *Context) QMax() int

func (*Context) QMin

func (ctx *Context) QMin() int

func (*Context) RCBufferSize

func (ctx *Context) RCBufferSize() int

func (*Context) RCInitialBufferOccupancy

func (ctx *Context) RCInitialBufferOccupancy() int

func (*Context) RCMaxAvailableVBVUse

func (ctx *Context) RCMaxAvailableVBVUse() float32

func (*Context) RCMaxRate

func (ctx *Context) RCMaxRate() int64

func (*Context) RCMinRate

func (ctx *Context) RCMinRate() int64

func (*Context) RCMinVBVOverflowUse

func (ctx *Context) RCMinVBVOverflowUse() float32

func (*Context) RCOverrideCount

func (ctx *Context) RCOverrideCount() int

func (*Context) RTPPayloadSize

func (ctx *Context) RTPPayloadSize() int

func (*Context) RefCountedFrames

func (ctx *Context) RefCountedFrames() bool

func (*Context) Refs

func (ctx *Context) Refs() int

func (*Context) ReorderedOpaque

func (ctx *Context) ReorderedOpaque() int64

func (*Context) RequestChannelLayout

func (ctx *Context) RequestChannelLayout() avutil.ChannelLayout

func (*Context) RequestSampleFormat

func (ctx *Context) RequestSampleFormat() avutil.SampleFormat

func (*Context) SampleAspectRatio

func (ctx *Context) SampleAspectRatio() *avutil.Rational

func (*Context) SampleFormat

func (ctx *Context) SampleFormat() avutil.SampleFormat

func (*Context) SampleRate

func (ctx *Context) SampleRate() int

func (*Context) ScenechangeThreshold

func (ctx *Context) ScenechangeThreshold() int

func (*Context) SeekPreRoll

func (ctx *Context) SeekPreRoll() int

func (*Context) SetActiveThreadType

func (ctx *Context) SetActiveThreadType(threadType ThreadType)

func (*Context) SetBFrameStrategy

func (ctx *Context) SetBFrameStrategy(bFrameStrategy int)

func (*Context) SetBQuantFactor

func (ctx *Context) SetBQuantFactor(bQuantFactor float32)

func (*Context) SetBQuantOffset

func (ctx *Context) SetBQuantOffset(bQuantOffset float32)

func (*Context) SetBSensitivity

func (ctx *Context) SetBSensitivity(sensivity int)

func (*Context) SetBidirRefine

func (ctx *Context) SetBidirRefine(refine int)

func (*Context) SetBitRate

func (ctx *Context) SetBitRate(bitRate int64)

func (*Context) SetBitRateTolerance

func (ctx *Context) SetBitRateTolerance(bitRateTolerance int)

func (*Context) SetBitsPerCodedSample

func (ctx *Context) SetBitsPerCodedSample(bits int)

func (*Context) SetBitsPerRawSample

func (ctx *Context) SetBitsPerRawSample(bits int)

func (*Context) SetBlockAlign

func (ctx *Context) SetBlockAlign(blockAlign int)

func (*Context) SetBrdScale

func (ctx *Context) SetBrdScale(brdScale int)

func (*Context) SetChannelLayout

func (ctx *Context) SetChannelLayout(layout avutil.ChannelLayout)

func (*Context) SetChannels

func (ctx *Context) SetChannels(channels int)

func (*Context) SetChromaOffset

func (ctx *Context) SetChromaOffset(offset int)

func (*Context) SetChromaSampleLocation

func (ctx *Context) SetChromaSampleLocation(location avutil.ChromaLocation)

func (*Context) SetCodec

func (ctx *Context) SetCodec(codec *Codec)

func (*Context) SetCodecID

func (ctx *Context) SetCodecID(id CodecID)

func (*Context) SetCodecTag

func (ctx *Context) SetCodecTag(codecTag uint)

func (*Context) SetCodecType

func (ctx *Context) SetCodecType(codecType avutil.MediaType)

func (*Context) SetCodedHeight

func (ctx *Context) SetCodedHeight(codedHeight int)

func (*Context) SetCodedWidth

func (ctx *Context) SetCodedWidth(codedWidth int)

func (*Context) SetCompressionLevel

func (ctx *Context) SetCompressionLevel(compressionLevel int)

func (*Context) SetContextModel

func (ctx *Context) SetContextModel(contextModel int)

func (*Context) SetCutoff

func (ctx *Context) SetCutoff(cutoff int)

func (*Context) SetDCTAlgorithm

func (ctx *Context) SetDCTAlgorithm(algo DCTAlgorithm)

func (*Context) SetDarkMasking

func (ctx *Context) SetDarkMasking(darkMasking float32)

func (*Context) SetDiaSize

func (ctx *Context) SetDiaSize(diaSize int)

func (*Context) SetExtraData

func (ctx *Context) SetExtraData(data unsafe.Pointer)

func (*Context) SetExtraDataSize

func (ctx *Context) SetExtraDataSize(extraDataSize int)

func (*Context) SetFlags

func (ctx *Context) SetFlags(flags Flags)

func (*Context) SetFlags2

func (ctx *Context) SetFlags2(flags2 Flags2)

func (*Context) SetFrameBits

func (ctx *Context) SetFrameBits(bits int)

func (*Context) SetFrameNumber

func (ctx *Context) SetFrameNumber(number int)

func (*Context) SetFrameRate

func (ctx *Context) SetFrameRate(frameRate *avutil.Rational)

func (*Context) SetFrameSize

func (ctx *Context) SetFrameSize(size int)

func (*Context) SetFrameSkipCmp

func (ctx *Context) SetFrameSkipCmp(skip int)

func (*Context) SetFrameSkipExp

func (ctx *Context) SetFrameSkipExp(skip int)

func (*Context) SetFrameSkipFactor

func (ctx *Context) SetFrameSkipFactor(factor int)

func (*Context) SetFrameSkipThreshold

func (ctx *Context) SetFrameSkipThreshold(threshold int)

func (*Context) SetGOPSize

func (ctx *Context) SetGOPSize(gOPSize int)

func (*Context) SetGlobalQuality

func (ctx *Context) SetGlobalQuality(globalQuality int)

func (*Context) SetHasBFrames

func (ctx *Context) SetHasBFrames(hasBFrames int)

func (*Context) SetHeaderBits

func (ctx *Context) SetHeaderBits(bits int)

func (*Context) SetHeight

func (ctx *Context) SetHeight(height int)

func (*Context) SetICount

func (ctx *Context) SetICount(count int)

func (*Context) SetIDCTAlgorithm

func (ctx *Context) SetIDCTAlgorithm(algo IDCTAlgorithm)

func (*Context) SetILDCTCmp

func (ctx *Context) SetILDCTCmp(ildctCmp int)

func (*Context) SetIQuantFactor

func (ctx *Context) SetIQuantFactor(iQuantFactor float32)

func (*Context) SetIQuantOffset

func (ctx *Context) SetIQuantOffset(iQuantOffset float32)

func (*Context) SetITexBits

func (ctx *Context) SetITexBits(bits int)

func (*Context) SetInitialPadding

func (ctx *Context) SetInitialPadding(initialPadding int)

func (*Context) SetIntraDCPrecision

func (ctx *Context) SetIntraDCPrecision(precision int)

func (*Context) SetKeyIntMin

func (ctx *Context) SetKeyIntMin(min int)

func (*Context) SetLastPredictorCount

func (ctx *Context) SetLastPredictorCount(count int)

func (*Context) SetLevel

func (ctx *Context) SetLevel(level int)

func (*Context) SetLowRes

func (ctx *Context) SetLowRes(res int)

func (*Context) SetLumiMasking

func (ctx *Context) SetLumiMasking(lumiMasking float32)

func (*Context) SetMBCmp

func (ctx *Context) SetMBCmp(mbCmp int)

func (*Context) SetMBDecision

func (ctx *Context) SetMBDecision(mbDecision int)

func (*Context) SetMBLmax

func (ctx *Context) SetMBLmax(max int)

func (*Context) SetMBLmin

func (ctx *Context) SetMBLmin(min int)

func (*Context) SetMECmp

func (ctx *Context) SetMECmp(meCmp int)

func (*Context) SetMEPenaltyCompensation

func (ctx *Context) SetMEPenaltyCompensation(compensation int)

func (*Context) SetMEPreCmp

func (ctx *Context) SetMEPreCmp(mePreCmp int)

func (*Context) SetMERange

func (ctx *Context) SetMERange(meRange int)

func (*Context) SetMESubCmp

func (ctx *Context) SetMESubCmp(meSubCmp int)

func (*Context) SetMESubpelQuality

func (ctx *Context) SetMESubpelQuality(meSubpelQuality int)

func (*Context) SetMPEGQuant

func (ctx *Context) SetMPEGQuant(mPEGQuant int)

func (*Context) SetMV0Threshold

func (ctx *Context) SetMV0Threshold(threshold int)

func (*Context) SetMVBits

func (ctx *Context) SetMVBits(bits int)

func (*Context) SetMaxBFrames

func (ctx *Context) SetMaxBFrames(maxBFrames int)

func (*Context) SetMaxPredictionOrder

func (ctx *Context) SetMaxPredictionOrder(max int)

func (*Context) SetMaxQDiff

func (ctx *Context) SetMaxQDiff(max int)

func (*Context) SetMinPredictionOrder

func (ctx *Context) SetMinPredictionOrder(min int)

func (*Context) SetMiscBits

func (ctx *Context) SetMiscBits(bits int)

func (*Context) SetNSSEWeight

func (ctx *Context) SetNSSEWeight(weight int)

func (*Context) SetNoiseReduction

func (ctx *Context) SetNoiseReduction(reduction int)

func (*Context) SetOpaque

func (ctx *Context) SetOpaque(opaque unsafe.Pointer)

func (*Context) SetPCount

func (ctx *Context) SetPCount(count int)

func (*Context) SetPMasking

func (ctx *Context) SetPMasking(pMasking float32)

func (*Context) SetPTexBits

func (ctx *Context) SetPTexBits(bits int)

func (*Context) SetPixelFormat

func (ctx *Context) SetPixelFormat(pixelFormat avutil.PixelFormat)

func (*Context) SetPreDiaSize

func (ctx *Context) SetPreDiaSize(preDiaSize int)

func (*Context) SetPreME

func (ctx *Context) SetPreME(preME int)

func (*Context) SetPredictionMethod

func (ctx *Context) SetPredictionMethod(predictionMethod int)

func (*Context) SetPrivData

func (ctx *Context) SetPrivData(privData unsafe.Pointer)

func (*Context) SetProfile

func (ctx *Context) SetProfile(profile int)

func (*Context) SetQBlur

func (ctx *Context) SetQBlur(qblur float32)

func (*Context) SetQCompress

func (ctx *Context) SetQCompress(qcompress float32)

func (*Context) SetQMax

func (ctx *Context) SetQMax(qmax int)

func (*Context) SetQMin

func (ctx *Context) SetQMin(qmin int)

func (*Context) SetRCBufferSize

func (ctx *Context) SetRCBufferSize(size int)

func (*Context) SetRCInitialBufferOccupancy

func (ctx *Context) SetRCInitialBufferOccupancy(initial int)

func (*Context) SetRCMaxAvailableVBVUse

func (ctx *Context) SetRCMaxAvailableVBVUse(max float32)

func (*Context) SetRCMaxRate

func (ctx *Context) SetRCMaxRate(max int64)

func (*Context) SetRCMinRate

func (ctx *Context) SetRCMinRate(min int64)

func (*Context) SetRCMinVBVOverflowUse

func (ctx *Context) SetRCMinVBVOverflowUse(min float32)

func (*Context) SetRCOverrideCount

func (ctx *Context) SetRCOverrideCount(count int)

func (*Context) SetRTPPayloadSize

func (ctx *Context) SetRTPPayloadSize(size int)

func (*Context) SetRefCountedFrames

func (ctx *Context) SetRefCountedFrames(refCounted bool)

func (*Context) SetRefs

func (ctx *Context) SetRefs(refs int)

func (*Context) SetReorderedOpaque

func (ctx *Context) SetReorderedOpaque(opaque int64)

func (*Context) SetRequestChannelLayout

func (ctx *Context) SetRequestChannelLayout(layout avutil.ChannelLayout)

func (*Context) SetRequestSampleFormat

func (ctx *Context) SetRequestSampleFormat(format avutil.SampleFormat)

func (*Context) SetSampleAspectRatio

func (ctx *Context) SetSampleAspectRatio(aspectRatio *avutil.Rational)

func (*Context) SetSampleFormat

func (ctx *Context) SetSampleFormat(format avutil.SampleFormat)

func (*Context) SetSampleRate

func (ctx *Context) SetSampleRate(rate int)

func (*Context) SetScenechangeThreshold

func (ctx *Context) SetScenechangeThreshold(threshold int)

func (*Context) SetSeekPreRoll

func (ctx *Context) SetSeekPreRoll(seek int)

func (*Context) SetSideDataOnlyPackets

func (ctx *Context) SetSideDataOnlyPackets(sideDataOnly bool)

func (*Context) SetSkipAlpha

func (ctx *Context) SetSkipAlpha(skip bool)

func (*Context) SetSkipBottom

func (ctx *Context) SetSkipBottom(skip int)

func (*Context) SetSkipCount

func (ctx *Context) SetSkipCount(skip int)

func (*Context) SetSkipTop

func (ctx *Context) SetSkipTop(skip int)

func (*Context) SetSliceCount

func (ctx *Context) SetSliceCount(sliceCount int)

func (*Context) SetSliceOffset

func (ctx *Context) SetSliceOffset(sliceOffset unsafe.Pointer)

func (*Context) SetSlices

func (ctx *Context) SetSlices(slices int)

func (*Context) SetSpatialCplxMasking

func (ctx *Context) SetSpatialCplxMasking(spatialCplxMasking float32)

func (*Context) SetStatsIn

func (ctx *Context) SetStatsIn(in []byte) error

func (*Context) SetStatsOut

func (ctx *Context) SetStatsOut(out []byte) error

func (*Context) SetStrictStdCompliance

func (ctx *Context) SetStrictStdCompliance(compliance Compliance)

func (*Context) SetSubtitleHeaderSize

func (ctx *Context) SetSubtitleHeaderSize(size int)

func (*Context) SetSubtitlesEncodingMode

func (ctx *Context) SetSubtitlesEncodingMode(mode SubtitlesEncodingMode)

func (*Context) SetTemporalCplxMasking

func (ctx *Context) SetTemporalCplxMasking(temporalCplxMasking float32)

func (*Context) SetThreadCount

func (ctx *Context) SetThreadCount(count int)

func (*Context) SetThreadSafeCallbacks

func (ctx *Context) SetThreadSafeCallbacks(count int)

func (*Context) SetThreadType

func (ctx *Context) SetThreadType(threadType ThreadType)

func (*Context) SetTimeBase

func (ctx *Context) SetTimeBase(timeBase *avutil.Rational)

func (*Context) SetTimecodeFrameStart

func (ctx *Context) SetTimecodeFrameStart(start int64)

func (*Context) SetTrellis

func (ctx *Context) SetTrellis(trellis int)

func (*Context) SetVBVDelay

func (ctx *Context) SetVBVDelay(delay uint64)

func (*Context) SetWidth

func (ctx *Context) SetWidth(width int)

func (*Context) SideDataOnlyPackets

func (ctx *Context) SideDataOnlyPackets() bool

func (*Context) SkipAlpha

func (ctx *Context) SkipAlpha() bool

func (*Context) SkipBottom

func (ctx *Context) SkipBottom() int

func (*Context) SkipCount

func (ctx *Context) SkipCount() int

func (*Context) SkipTop

func (ctx *Context) SkipTop() int

func (*Context) SliceCount

func (ctx *Context) SliceCount() int

func (*Context) SliceOffset

func (ctx *Context) SliceOffset() unsafe.Pointer

func (*Context) Slices

func (ctx *Context) Slices() int

func (*Context) SpatialCplxMasking

func (ctx *Context) SpatialCplxMasking() float32

func (*Context) StatsIn

func (ctx *Context) StatsIn() []byte

func (*Context) StatsOut

func (ctx *Context) StatsOut() []byte

func (*Context) StrictStdCompliance

func (ctx *Context) StrictStdCompliance() Compliance

func (*Context) SubtitleHeaderSize

func (ctx *Context) SubtitleHeaderSize() int

func (*Context) SubtitlesEncoding

func (ctx *Context) SubtitlesEncoding() (string, bool)

func (*Context) SubtitlesEncodingMode

func (ctx *Context) SubtitlesEncodingMode() SubtitlesEncodingMode

func (*Context) TemporalCplxMasking

func (ctx *Context) TemporalCplxMasking() float32

func (*Context) ThreadCount

func (ctx *Context) ThreadCount() int

func (*Context) ThreadSafeCallbacks

func (ctx *Context) ThreadSafeCallbacks() int

func (*Context) ThreadType

func (ctx *Context) ThreadType() ThreadType

func (*Context) TicksPerFrame

func (ctx *Context) TicksPerFrame() int

func (*Context) TimeBase

func (ctx *Context) TimeBase() *avutil.Rational

func (*Context) TimecodeFrameStart

func (ctx *Context) TimecodeFrameStart() int64

func (*Context) Trellis

func (ctx *Context) Trellis() int

func (*Context) VBVDelay

func (ctx *Context) VBVDelay() uint64

func (*Context) Width

func (ctx *Context) Width() int

type DCTAlgorithm

type DCTAlgorithm int
const (
	DCTAlgorithmAuto    DCTAlgorithm = C.FF_DCT_AUTO
	DCTAlgorithmFastInt DCTAlgorithm = C.FF_DCT_FASTINT
	DCTAlgorithmInt     DCTAlgorithm = C.GO_FF_DCT_INT
	DCTAlgorithmMMX     DCTAlgorithm = C.FF_DCT_MMX
	DCTAlgorithmAltiVec DCTAlgorithm = C.FF_DCT_ALTIVEC
	DCTAlgorithmFAAN    DCTAlgorithm = C.FF_DCT_FAAN
)

type Flags

type Flags int
const (
	FlagUnaligned     Flags = C.CODEC_FLAG_UNALIGNED
	FlagQScale        Flags = C.CODEC_FLAG_QSCALE
	Flag4MV           Flags = C.CODEC_FLAG_4MV
	FlagOutputCorrupt Flags = C.CODEC_FLAG_OUTPUT_CORRUPT
	FlagQPEL          Flags = C.CODEC_FLAG_QPEL
	FlagPass1         Flags = C.CODEC_FLAG_PASS1
	FlagPass2         Flags = C.CODEC_FLAG_PASS2
	FlagGray          Flags = C.CODEC_FLAG_GRAY
	FlagPSNR          Flags = C.CODEC_FLAG_PSNR
	FlagTruncated     Flags = C.CODEC_FLAG_TRUNCATED
	FlagInterlacedDCT Flags = C.CODEC_FLAG_INTERLACED_DCT
	FlagLowDelay      Flags = C.CODEC_FLAG_LOW_DELAY
	FlagGlobalHeader  Flags = C.CODEC_FLAG_GLOBAL_HEADER
	FlagBitExact      Flags = C.CODEC_FLAG_BITEXACT
	FlagACPred        Flags = C.CODEC_FLAG_AC_PRED
	FlagLoopFilter    Flags = C.CODEC_FLAG_LOOP_FILTER
	FlagInterlacedME  Flags = C.CODEC_FLAG_INTERLACED_ME
	FlagClosedGOP     Flags = C.CODEC_FLAG_CLOSED_GOP
)

type Flags2

type Flags2 int
const (
	Flag2Fast              Flags2 = C.CODEC_FLAG2_FAST
	Flag2NoOutput          Flags2 = C.CODEC_FLAG2_NO_OUTPUT
	Flag2LocalHeader       Flags2 = C.CODEC_FLAG2_LOCAL_HEADER
	Flag2DropFrameTimecode Flags2 = C.CODEC_FLAG2_DROP_FRAME_TIMECODE
	Flag2IgnoreCrop        Flags2 = C.CODEC_FLAG2_IGNORE_CROP
	Flag2Chunks            Flags2 = C.CODEC_FLAG2_CHUNKS
	Flag2ShowAll           Flags2 = C.CODEC_FLAG2_SHOW_ALL
	Flag2ExportMvs         Flags2 = C.CODEC_FLAG2_EXPORT_MVS
	Flag2SkipManual        Flags2 = C.CODEC_FLAG2_SKIP_MANUAL
)

type IDCTAlgorithm

type IDCTAlgorithm int
const (
	IDCTAlgorithmAuto          IDCTAlgorithm = C.FF_IDCT_AUTO
	IDCTAlgorithmInt           IDCTAlgorithm = C.FF_IDCT_INT
	IDCTAlgorithmSimple        IDCTAlgorithm = C.FF_IDCT_SIMPLE
	IDCTAlgorithmSimpleMMX     IDCTAlgorithm = C.FF_IDCT_SIMPLEMMX
	IDCTAlgorithmARM           IDCTAlgorithm = C.FF_IDCT_ARM
	IDCTAlgorithmAltiVec       IDCTAlgorithm = C.FF_IDCT_ALTIVEC
	IDCTAlgorithmSH4           IDCTAlgorithm = C.GO_FF_IDCT_SH4
	IDCTAlgorithmSimpleARM     IDCTAlgorithm = C.FF_IDCT_SIMPLEARM
	IDCTAlgorithmIPP           IDCTAlgorithm = C.GO_FF_IDCT_IPP
	IDCTAlgorithmXvid          IDCTAlgorithm = C.FF_IDCT_XVID
	IDCTAlgorithmXvidMMX       IDCTAlgorithm = C.GO_FF_IDCT_XVIDMMX
	IDCTAlgorithmSimpleARMv5TE IDCTAlgorithm = C.FF_IDCT_SIMPLEARMV5TE
	IDCTAlgorithmSimpleARMv6   IDCTAlgorithm = C.FF_IDCT_SIMPLEARMV6
	IDCTAlgorithmSimpleVis     IDCTAlgorithm = C.GO_FF_IDCT_SIMPLEVIS
	IDCTAlgorithmFAAN          IDCTAlgorithm = C.FF_IDCT_FAAN
	IDCTAlgorithmSimpleNEON    IDCTAlgorithm = C.FF_IDCT_SIMPLENEON
	IDCTAlgorithmSimpleAlpha   IDCTAlgorithm = C.GO_FF_IDCT_SIMPLEALPHA
	IDCTAlgorithmSimpleAuto    IDCTAlgorithm = C.FF_IDCT_SIMPLEAUTO
)

type Packet

type Packet struct {
	CAVPacket *C.AVPacket
}

func NewPacket

func NewPacket() (*Packet, error)

func NewPacketFromC

func NewPacketFromC(cPkt unsafe.Pointer) *Packet

func (*Packet) ConsumeData

func (pkt *Packet) ConsumeData(size int)

func (*Packet) ConvergenceDuration

func (pkt *Packet) ConvergenceDuration() int64

func (*Packet) DTS

func (pkt *Packet) DTS() int64

func (*Packet) Data

func (pkt *Packet) Data() unsafe.Pointer

func (*Packet) Duration

func (pkt *Packet) Duration() int64

func (*Packet) Flags

func (pkt *Packet) Flags() PacketFlags

func (*Packet) Free

func (pkt *Packet) Free()

func (*Packet) PTS

func (pkt *Packet) PTS() int64

func (*Packet) Position

func (pkt *Packet) Position() int64

func (*Packet) Ref

func (pkt *Packet) Ref(dst *Packet) error

func (*Packet) RescaleTime

func (pkt *Packet) RescaleTime(srcTimeBase, dstTimeBase *avutil.Rational)

func (*Packet) SetConvergenceDuration

func (pkt *Packet) SetConvergenceDuration(convergenceDuration int64)

func (*Packet) SetDTS

func (pkt *Packet) SetDTS(dts int64)

func (*Packet) SetData

func (pkt *Packet) SetData(data unsafe.Pointer)

func (*Packet) SetDuration

func (pkt *Packet) SetDuration(duration int64)

func (*Packet) SetFlags

func (pkt *Packet) SetFlags(flags PacketFlags)

func (*Packet) SetPTS

func (pkt *Packet) SetPTS(pts int64)

func (*Packet) SetPosition

func (pkt *Packet) SetPosition(position int64)

func (*Packet) SetSize

func (pkt *Packet) SetSize(size int)

func (*Packet) SetStreamIndex

func (pkt *Packet) SetStreamIndex(streamIndex int)

func (*Packet) SideData

func (pkt *Packet) SideData() []*PacketSideData

func (*Packet) Size

func (pkt *Packet) Size() int

func (*Packet) StreamIndex

func (pkt *Packet) StreamIndex() int

func (*Packet) Unref

func (pkt *Packet) Unref()

type PacketFlags

type PacketFlags int
const (
	PacketFlagKey     PacketFlags = C.AV_PKT_FLAG_KEY
	PacketFlagCorrupt PacketFlags = C.AV_PKT_FLAG_CORRUPT
)

type PacketSideData

type PacketSideData struct {
	CAVPacketSideData *C.AVPacketSideData
}

func NewPacketSideDataFromC

func NewPacketSideDataFromC(cPSD unsafe.Pointer) *PacketSideData

func (*PacketSideData) Data

func (psd *PacketSideData) Data() unsafe.Pointer

func (*PacketSideData) SetData

func (psd *PacketSideData) SetData(data unsafe.Pointer)

func (*PacketSideData) SetSize

func (psd *PacketSideData) SetSize(size int)

func (*PacketSideData) SetType

func (psd *PacketSideData) SetType(t PacketSideDataType)

func (*PacketSideData) Size

func (psd *PacketSideData) Size() int

func (*PacketSideData) Type

func (psd *PacketSideData) Type() PacketSideDataType

type PacketSideDataType

type PacketSideDataType C.enum_AVPacketSideDataType
const (
	PacketSideDataPalette                 PacketSideDataType = C.AV_PKT_DATA_PALETTE
	PacketSideDataNewExtraData            PacketSideDataType = C.AV_PKT_DATA_NEW_EXTRADATA
	PacketSideDataParamChange             PacketSideDataType = C.AV_PKT_DATA_PARAM_CHANGE
	PacketSideDataH263MBInfo              PacketSideDataType = C.AV_PKT_DATA_H263_MB_INFO
	PacketSideDataReplayGain              PacketSideDataType = C.AV_PKT_DATA_REPLAYGAIN
	PacketSideDataDisplayMatrix           PacketSideDataType = C.AV_PKT_DATA_DISPLAYMATRIX
	PacketSideDataStereo3D                PacketSideDataType = C.AV_PKT_DATA_STEREO3D
	PacketSideDataAudioServiceType        PacketSideDataType = C.AV_PKT_DATA_AUDIO_SERVICE_TYPE
	PacketSideDataSkipSamples             PacketSideDataType = C.AV_PKT_DATA_SKIP_SAMPLES
	PacketSideDataJPDualMono              PacketSideDataType = C.AV_PKT_DATA_JP_DUALMONO
	PacketSideDataStringsMetaData         PacketSideDataType = C.AV_PKT_DATA_STRINGS_METADATA
	PacketSideDataSubtitlePosition        PacketSideDataType = C.AV_PKT_DATA_SUBTITLE_POSITION
	PacketSideDataMatroskaBlockAdditional PacketSideDataType = C.AV_PKT_DATA_MATROSKA_BLOCKADDITIONAL
	PacketSideDataWebVTTIdentifier        PacketSideDataType = C.AV_PKT_DATA_WEBVTT_IDENTIFIER
	PacketSideDataWebVTTSettings          PacketSideDataType = C.AV_PKT_DATA_WEBVTT_SETTINGS
	PacketSideDataMetaDataUpdate          PacketSideDataType = C.AV_PKT_DATA_METADATA_UPDATE
)

type Profile

type Profile struct {
	CAVProfile *C.AVProfile
}

func NewProfileFromC

func NewProfileFromC(cProfile unsafe.Pointer) *Profile

func (*Profile) ID

func (p *Profile) ID() int

func (*Profile) Name

func (p *Profile) Name() string

func (*Profile) NameOK

func (p *Profile) NameOK() (string, bool)

type SubtitlesEncodingMode

type SubtitlesEncodingMode int
const (
	SubtitlesEncodingModeDoNothing  SubtitlesEncodingMode = C.FF_SUB_CHARENC_MODE_DO_NOTHING
	SubtitlesEncodingModeAutomatic  SubtitlesEncodingMode = C.FF_SUB_CHARENC_MODE_AUTOMATIC
	SubtitlesEncodingModePreDecoder SubtitlesEncodingMode = C.FF_SUB_CHARENC_MODE_PRE_DECODER
)

type ThreadType

type ThreadType int
const (
	ThreadTypeFrame ThreadType = C.FF_THREAD_FRAME
	ThreadTypeSlice ThreadType = C.FF_THREAD_SLICE
)

Source Files

Jump to

Keyboard shortcuts

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