Documentation ¶
Overview ¶
Package vpx provides Go bindings for libvpx-1.6.0, the WebM Project VP8/VP9 codec implementation.
Index ¶
- Constants
- Variables
- func CodecBuildConfig() string
- func CodecErrToString(err CodecErr) string
- func CodecErrorDetail(ctx *CodecCtx) string
- func CodecGetError(ctx *CodecCtx) string
- func CodecIfaceName(iface *CodecIface) string
- func CodecVersion() int32
- func CodecVersionExtraStr() string
- func CodecVersionStr() string
- func Error(err CodecErr) error
- func ImageFlip(img *Image)
- func ImageFree(img *Image)
- func ImageSetRect(img *Image, x uint32, y uint32, w uint32, h uint32) int32
- type BitDepth
- type CodecCaps
- type CodecCtx
- type CodecCxPkt
- type CodecCxPktKind
- type CodecDecCfg
- type CodecEncCfg
- type CodecEncOutputCxPktCbFn
- type CodecErFlags
- type CodecErr
- func CodecDecInitVer(ctx *CodecCtx, iface *CodecIface, cfg *CodecDecCfg, flags CodecFlags, ...) CodecErr
- func CodecDecode(ctx *CodecCtx, data string, dataSz uint32, userPriv unsafe.Pointer, ...) CodecErr
- func CodecDestroy(ctx *CodecCtx) CodecErr
- func CodecEncConfigDefault(iface *CodecIface, cfg *CodecEncCfg, reserved uint32) CodecErr
- func CodecEncConfigSet(ctx *CodecCtx, cfg *CodecEncCfg) CodecErr
- func CodecEncInitMultiVer(ctx *CodecCtx, iface *CodecIface, cfg *CodecEncCfg, numEnc int32, ...) CodecErr
- func CodecEncInitVer(ctx *CodecCtx, iface *CodecIface, cfg *CodecEncCfg, flags CodecFlags, ...) CodecErr
- func CodecEncode(ctx *CodecCtx, img *Image, pts CodecPts, duration uint, flags EncFrameFlags, ...) CodecErr
- func CodecGetStreamInfo(ctx *CodecCtx, si *CodecStreamInfo) CodecErr
- func CodecPeekStreamInfo(iface *CodecIface, data string, dataSz uint32, si *CodecStreamInfo) CodecErr
- func CodecRegisterPutFrameCb(ctx *CodecCtx, cb CodecPutFrameCbFn, userPriv unsafe.Pointer) CodecErr
- func CodecRegisterPutSliceCb(ctx *CodecCtx, cb CodecPutSliceCbFn, userPriv unsafe.Pointer) CodecErr
- func CodecSetCxDataBuf(ctx *CodecCtx, buf *FixedBuf, padBefore uint32, padAfter uint32) CodecErr
- func CodecSetFrameBufferFunctions(ctx *CodecCtx, cbGet GetFrameBufferCbFn, cbRelease ReleaseFrameBufferCbFn, ...) CodecErr
- type CodecFlags
- type CodecFrameBuffer
- type CodecFrameFlags
- type CodecIface
- func DecoderFor(fourcc int) *CodecIface
- func DecoderIfaceVP8() *CodecIface
- func DecoderIfaceVP9() *CodecIface
- func EncoderFor(fourcc int) *CodecIface
- func EncoderIfaceVP8() *CodecIface
- func EncoderIfaceVP9() *CodecIface
- func NewCodecIface() *CodecIface
- func NewCodecIfaceRef(ref unsafe.Pointer) *CodecIface
- type CodecIter
- type CodecPriv
- type CodecPrivOutputCxPktCbPair
- func (x *CodecPrivOutputCxPktCbPair) Deref()
- func (x *CodecPrivOutputCxPktCbPair) Free()
- func (x *CodecPrivOutputCxPktCbPair) PassRef() (*C.vpx_codec_priv_output_cx_pkt_cb_pair_t, *cgoAllocMap)
- func (x CodecPrivOutputCxPktCbPair) PassValue() (C.vpx_codec_priv_output_cx_pkt_cb_pair_t, *cgoAllocMap)
- func (x *CodecPrivOutputCxPktCbPair) Ref() *C.vpx_codec_priv_output_cx_pkt_cb_pair_t
- type CodecPts
- type CodecPutFrameCbFn
- type CodecPutSliceCbFn
- type CodecStreamInfo
- type ColorRange
- type ColorSpace
- type EncFrameFlags
- type EncPass
- type FixedBuf
- type GetFrameBufferCbFn
- type Image
- func CodecGetFrame(ctx *CodecCtx, iter *CodecIter) *Image
- func CodecGetPreviewFrame(ctx *CodecCtx) *Image
- func ImageAlloc(img *Image, fmt ImageFormat, dW uint32, dH uint32, align uint32) *Image
- func ImageWrap(img *Image, fmt ImageFormat, dW uint32, dH uint32, align uint32, imgData *byte) *Image
- func NewImageRef(ref unsafe.Pointer) *Image
- type ImageFormat
- type ImageRect
- type KfMode
- type Rational
- type RawString
- type RcMode
- type ReleaseFrameBufferCbFn
- type SvcExtraCfg
Constants ¶
const ( // Vp8Fourcc as defined in libvpx-go/<predefine>:24 Vp8Fourcc = 808996950 // Vp9Fourcc as defined in libvpx-go/<predefine>:25 Vp9Fourcc = 809062486 // TsMaxPeriodicity as defined in vpx-1.6.0/vpx_encoder.h:37 TsMaxPeriodicity = 16 // TsMaxLayers as defined in vpx-1.6.0/vpx_encoder.h:40 TsMaxLayers = 5 // MaxLayers as defined in vpx-1.6.0/vpx_encoder.h:46 MaxLayers = 12 // SsMaxLayers as defined in vpx-1.6.0/vpx_encoder.h:52 SsMaxLayers = 5 // SsDefaultLayers as defined in vpx-1.6.0/vpx_encoder.h:55 SsDefaultLayers = 1 // EncoderABIVersion as defined in vpx-1.6.0/vpx_encoder.h:65 EncoderABIVersion = 14 + CodecABIVersion // CodecCapPsnr as defined in vpx-1.6.0/vpx_encoder.h:77 CodecCapPsnr = 65536 // CodecCapOutputPartition as defined in vpx-1.6.0/vpx_encoder.h:84 CodecCapOutputPartition = 131072 // CodecCapHighbitdepth as defined in vpx-1.6.0/vpx_encoder.h:88 CodecCapHighbitdepth = 262144 // CodecUsePsnr as defined in vpx-1.6.0/vpx_encoder.h:97 CodecUsePsnr = 65536 // CodecUseOutputPartition as defined in vpx-1.6.0/vpx_encoder.h:98 CodecUseOutputPartition = 131072 // CodecUseHighbitdepth as defined in vpx-1.6.0/vpx_encoder.h:100 CodecUseHighbitdepth = 262144 // FrameIsKey as defined in vpx-1.6.0/vpx_encoder.h:129 FrameIsKey = 1 // FrameIsDroppable as defined in vpx-1.6.0/vpx_encoder.h:130 FrameIsDroppable = 2 // FrameIsInvisible as defined in vpx-1.6.0/vpx_encoder.h:133 FrameIsInvisible = 4 // FrameIsFragment as defined in vpx-1.6.0/vpx_encoder.h:135 FrameIsFragment = 8 // ErrorResilientDefault as defined in vpx-1.6.0/vpx_encoder.h:145 ErrorResilientDefault = 1 // ErrorResilientPartitions as defined in vpx-1.6.0/vpx_encoder.h:147 ErrorResilientPartitions = 2 // EflagForceKf as defined in vpx-1.6.0/vpx_encoder.h:292 EflagForceKf = 1 // DlRealtime as defined in vpx-1.6.0/vpx_encoder.h:898 DlRealtime = 1 // DlGoodQuality as defined in vpx-1.6.0/vpx_encoder.h:900 DlGoodQuality = 1000000 // DlBestQuality as defined in vpx-1.6.0/vpx_encoder.h:902 DlBestQuality = 0 // CodecABIVersion as defined in vpx-1.6.0/vpx_codec.h:86 CodecABIVersion = 4 + ImageABIVersion // CodecCapDecoder as defined in vpx-1.6.0/vpx_codec.h:154 CodecCapDecoder = 1 // CodecCapEncoder as defined in vpx-1.6.0/vpx_codec.h:155 CodecCapEncoder = 2 // ImageABIVersion as defined in vpx-1.6.0/vpx_image.h:31 ImageABIVersion = 5 // ImageFormatPlanar as defined in vpx-1.6.0/vpx_image.h:34 ImageFormatPlanar = 256 // ImageFormatUvFlip as defined in vpx-1.6.0/vpx_image.h:35 ImageFormatUvFlip = 512 // ImageFormatHasAlpha as defined in vpx-1.6.0/vpx_image.h:36 ImageFormatHasAlpha = 1024 // ImageFormatHighbitdepth as defined in vpx-1.6.0/vpx_image.h:37 ImageFormatHighbitdepth = 2048 // PlanePacked as defined in vpx-1.6.0/vpx_image.h:111 PlanePacked = 0 // PlaneY as defined in vpx-1.6.0/vpx_image.h:112 PlaneY = 0 // PlaneU as defined in vpx-1.6.0/vpx_image.h:113 PlaneU = 1 // PlaneV as defined in vpx-1.6.0/vpx_image.h:114 PlaneV = 2 // PlaneAlpha as defined in vpx-1.6.0/vpx_image.h:115 PlaneAlpha = 3 // DecoderABIVersion as defined in vpx-1.6.0/vpx_decoder.h:43 DecoderABIVersion = 3 + CodecABIVersion // CodecCapPutSlice as defined in vpx-1.6.0/vpx_decoder.h:53 CodecCapPutSlice = 65536 // CodecCapPutFrame as defined in vpx-1.6.0/vpx_decoder.h:54 CodecCapPutFrame = 131072 // CodecCapPostproc as defined in vpx-1.6.0/vpx_decoder.h:55 CodecCapPostproc = 262144 // CodecCapErrorConcealment as defined in vpx-1.6.0/vpx_decoder.h:56 CodecCapErrorConcealment = 524288 // CodecCapInputFragments as defined in vpx-1.6.0/vpx_decoder.h:58 CodecCapInputFragments = 1048576 // CodecCapFrameThreading as defined in vpx-1.6.0/vpx_decoder.h:68 CodecCapFrameThreading = 2097152 // CodecCapExternalFrameBuffer as defined in vpx-1.6.0/vpx_decoder.h:70 CodecCapExternalFrameBuffer = 4194304 // CodecUsePostproc as defined in vpx-1.6.0/vpx_decoder.h:73 CodecUsePostproc = 65536 // CodecUseErrorConcealment as defined in vpx-1.6.0/vpx_decoder.h:74 CodecUseErrorConcealment = 131072 // CodecUseInputFragments as defined in vpx-1.6.0/vpx_decoder.h:76 CodecUseInputFragments = 262144 // CodecUseFrameThreading as defined in vpx-1.6.0/vpx_decoder.h:79 CodecUseFrameThreading = 524288 // MaximumWorkBuffers as defined in vpx-1.6.0/vpx_frame_buffer.h:29 MaximumWorkBuffers = 8 // Vp9MaximumRefBuffers as defined in vpx-1.6.0/vpx_frame_buffer.h:33 Vp9MaximumRefBuffers = 8 )
const ( CodecCxFramePkt = C.VPX_CODEC_CX_FRAME_PKT CodecStatsPkt = C.VPX_CODEC_STATS_PKT CodecFpmbStatsPkt = C.VPX_CODEC_FPMB_STATS_PKT CodecPsnrPkt = C.VPX_CODEC_PSNR_PKT CodecCustomPkt = C.VPX_CODEC_CUSTOM_PKT )
CodecCxPktKind enumeration from vpx-1.6.0/vpx_encoder.h:162
const ( RcOnePass = C.VPX_RC_ONE_PASS RcFirstPass = C.VPX_RC_FIRST_PASS RcLastPass = C.VPX_RC_LAST_PASS )
EncPass enumeration from vpx-1.6.0/vpx_encoder.h:253
RcMode enumeration from vpx-1.6.0/vpx_encoder.h:261
const ( KfFixed = C.VPX_KF_FIXED KfAuto = C.VPX_KF_AUTO KfDisabled = C.VPX_KF_DISABLED )
KfMode enumeration from vpx-1.6.0/vpx_encoder.h:277
Variables ¶
var ( ErrCodecUnknownError = errors.New("vpx: unknown error") ErrCodecMemError = errors.New("vpx: memory error") ErrCodecABIMismatch = errors.New("vpx: ABI mismatch") ErrCodecIncapable = errors.New("vpx: incapable") ErrCodecUnsupBitstream = errors.New("vpx: unsupported bitstream") ErrCodecUnsupFeature = errors.New("vpx: unsupported feature") ErrCodecCorruptFrame = errors.New("vpx: corrupt frame") ErrCodecInvalidParam = errors.New("vpx: invalid param") )
Functions ¶
func CodecBuildConfig ¶
func CodecBuildConfig() string
CodecBuildConfig function as declared in vpx-1.6.0/vpx_codec.h:282
func CodecErrToString ¶
CodecErrToString function as declared in vpx-1.6.0/vpx_codec.h:305
func CodecErrorDetail ¶
CodecErrorDetail function as declared in vpx-1.6.0/vpx_codec.h:331
func CodecGetError ¶
CodecGetError function as declared in vpx-1.6.0/vpx_codec.h:318
func CodecIfaceName ¶
func CodecIfaceName(iface *CodecIface) string
CodecIfaceName function as declared in vpx-1.6.0/vpx_codec.h:292
func CodecVersion ¶
func CodecVersion() int32
CodecVersion function as declared in vpx-1.6.0/vpx_codec.h:242
func CodecVersionExtraStr ¶
func CodecVersionExtraStr() string
CodecVersionExtraStr function as declared in vpx-1.6.0/vpx_codec.h:273
func CodecVersionStr ¶
func CodecVersionStr() string
CodecVersionStr function as declared in vpx-1.6.0/vpx_codec.h:264
func ImageFlip ¶
func ImageFlip(img *Image)
ImageFlip function as declared in vpx-1.6.0/vpx_image.h:221
Types ¶
type BitDepth ¶
type BitDepth int32
BitDepth as declared in vpx-1.6.0/vpx_codec.h:223
const ( Bits8 BitDepth = C.VPX_BITS_8 Bits10 BitDepth = C.VPX_BITS_10 Bits12 BitDepth = C.VPX_BITS_12 )
BitDepth enumeration from vpx-1.6.0/vpx_codec.h:223
type CodecCaps ¶
type CodecCaps int
CodecCaps type as declared in vpx-1.6.0/vpx_codec.h:153
func CodecGetCaps ¶
func CodecGetCaps(iface *CodecIface) CodecCaps
CodecGetCaps function as declared in vpx-1.6.0/vpx_codec.h:361
type CodecCtx ¶
type CodecCtx C.vpx_codec_ctx_t
CodecCtx as declared in vpx-1.6.0/vpx_codec.h:213
func NewCodecCtx ¶
func NewCodecCtx() *CodecCtx
NewCodecCtx allocates a new C object of this type and converts the reference into a raw struct reference without wrapping.
func NewCodecCtxRef ¶
NewCodecCtxRef converts the C object reference into a raw struct reference without wrapping.
func (*CodecCtx) PassRef ¶
func (x *CodecCtx) PassRef() *C.vpx_codec_ctx_t
PassRef returns a reference to C object as it is or allocates a new C object of this type.
func (*CodecCtx) Ref ¶
func (x *CodecCtx) Ref() *C.vpx_codec_ctx_t
Ref returns a reference to C object as it is.
type CodecCxPkt ¶
type CodecCxPkt struct { Kind CodecCxPktKind // contains filtered or unexported fields }
CodecCxPkt as declared in vpx-1.6.0/vpx_encoder.h:223
func CodecGetCxData ¶
func CodecGetCxData(ctx *CodecCtx, iter *CodecIter) *CodecCxPkt
CodecGetCxData function as declared in vpx-1.6.0/vpx_encoder.h:1019
func NewCodecCxPktRef ¶
func NewCodecCxPktRef(ref unsafe.Pointer) *CodecCxPkt
NewCodecCxPktRef creates a new wrapper struct with underlying reference set to the original C object. Returns nil if the provided pointer to C object is nil too.
func (*CodecCxPkt) Deref ¶
func (x *CodecCxPkt) Deref()
Deref uses the underlying reference to C object and fills the wrapping struct with values. Do not forget to call this method whether you get a struct for C object and want to read its values.
func (*CodecCxPkt) Free ¶
func (x *CodecCxPkt) Free()
Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. Does nothing if struct is nil or has no allocation map.
func (*CodecCxPkt) PassRef ¶
func (x *CodecCxPkt) PassRef() (*C.vpx_codec_cx_pkt_t, *cgoAllocMap)
PassRef returns the underlying C object, otherwise it will allocate one and set its values from this wrapping struct, counting allocations into an allocation map.
func (CodecCxPkt) PassValue ¶
func (x CodecCxPkt) PassValue() (C.vpx_codec_cx_pkt_t, *cgoAllocMap)
PassValue does the same as PassRef except that it will try to dereference the returned pointer.
func (*CodecCxPkt) Ref ¶
func (x *CodecCxPkt) Ref() *C.vpx_codec_cx_pkt_t
Ref returns the underlying reference to C object or nil if struct is nil.
type CodecCxPktKind ¶
type CodecCxPktKind int32
CodecCxPktKind as declared in vpx-1.6.0/vpx_encoder.h:162
type CodecDecCfg ¶
type CodecDecCfg struct { Threads uint32 W uint32 H uint32 // contains filtered or unexported fields }
CodecDecCfg as declared in vpx-1.6.0/vpx_decoder.h:111
func NewCodecDecCfgRef ¶
func NewCodecDecCfgRef(ref unsafe.Pointer) *CodecDecCfg
NewCodecDecCfgRef creates a new wrapper struct with underlying reference set to the original C object. Returns nil if the provided pointer to C object is nil too.
func (*CodecDecCfg) Deref ¶
func (x *CodecDecCfg) Deref()
Deref uses the underlying reference to C object and fills the wrapping struct with values. Do not forget to call this method whether you get a struct for C object and want to read its values.
func (*CodecDecCfg) Free ¶
func (x *CodecDecCfg) Free()
Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. Does nothing if struct is nil or has no allocation map.
func (*CodecDecCfg) PassRef ¶
func (x *CodecDecCfg) PassRef() (*C.vpx_codec_dec_cfg_t, *cgoAllocMap)
PassRef returns the underlying C object, otherwise it will allocate one and set its values from this wrapping struct, counting allocations into an allocation map.
func (CodecDecCfg) PassValue ¶
func (x CodecDecCfg) PassValue() (C.vpx_codec_dec_cfg_t, *cgoAllocMap)
PassValue does the same as PassRef except that it will try to dereference the returned pointer.
func (*CodecDecCfg) Ref ¶
func (x *CodecDecCfg) Ref() *C.vpx_codec_dec_cfg_t
Ref returns the underlying reference to C object or nil if struct is nil.
type CodecEncCfg ¶
type CodecEncCfg struct { GUsage uint32 GThreads uint32 GProfile uint32 GW uint32 GH uint32 GBitDepth BitDepth GInputBitDepth uint32 GTimebase Rational GErrorResilient CodecErFlags GPass EncPass GLagInFrames uint32 RcDropframeThresh uint32 RcResizeAllowed uint32 RcScaledWidth uint32 RcScaledHeight uint32 RcResizeUpThresh uint32 RcResizeDownThresh uint32 RcEndUsage RcMode RcTwopassStatsIn FixedBuf RcFirstpassMbStatsIn FixedBuf RcTargetBitrate uint32 RcMinQuantizer uint32 RcMaxQuantizer uint32 RcUndershootPct uint32 RcOvershootPct uint32 RcBufSz uint32 RcBufInitialSz uint32 RcBufOptimalSz uint32 Rc2passVbrBiasPct uint32 Rc2passVbrMinsectionPct uint32 Rc2passVbrMaxsectionPct uint32 KfMode KfMode KfMinDist uint32 KfMaxDist uint32 SsNumberLayers uint32 SsEnableAutoAltRef [5]int32 SsTargetBitrate [5]uint32 TsNumberLayers uint32 TsTargetBitrate [5]uint32 TsRateDecimator [5]uint32 TsPeriodicity uint32 TsLayerID [16]uint32 LayerTargetBitrate [12]uint32 TemporalLayeringMode int32 // contains filtered or unexported fields }
CodecEncCfg as declared in vpx-1.6.0/vpx_encoder.h:751
func NewCodecEncCfgRef ¶
func NewCodecEncCfgRef(ref unsafe.Pointer) *CodecEncCfg
NewCodecEncCfgRef creates a new wrapper struct with underlying reference set to the original C object. Returns nil if the provided pointer to C object is nil too.
func (*CodecEncCfg) Deref ¶
func (x *CodecEncCfg) Deref()
Deref uses the underlying reference to C object and fills the wrapping struct with values. Do not forget to call this method whether you get a struct for C object and want to read its values.
func (*CodecEncCfg) Free ¶
func (x *CodecEncCfg) Free()
Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. Does nothing if struct is nil or has no allocation map.
func (*CodecEncCfg) PassRef ¶
func (x *CodecEncCfg) PassRef() (*C.vpx_codec_enc_cfg_t, *cgoAllocMap)
PassRef returns the underlying C object, otherwise it will allocate one and set its values from this wrapping struct, counting allocations into an allocation map.
func (CodecEncCfg) PassValue ¶
func (x CodecEncCfg) PassValue() (C.vpx_codec_enc_cfg_t, *cgoAllocMap)
PassValue does the same as PassRef except that it will try to dereference the returned pointer.
func (*CodecEncCfg) Ref ¶
func (x *CodecEncCfg) Ref() *C.vpx_codec_enc_cfg_t
Ref returns the underlying reference to C object or nil if struct is nil.
type CodecEncOutputCxPktCbFn ¶
type CodecEncOutputCxPktCbFn func(pkt *CodecCxPkt, userData unsafe.Pointer)
CodecEncOutputCxPktCbFn type as declared in vpx-1.6.0/vpx_encoder.h:233
func NewCodecEncOutputCxPktCbFnRef ¶
func NewCodecEncOutputCxPktCbFnRef(ref unsafe.Pointer) *CodecEncOutputCxPktCbFn
func (CodecEncOutputCxPktCbFn) PassRef ¶
func (x CodecEncOutputCxPktCbFn) PassRef() (ref *C.vpx_codec_enc_output_cx_pkt_cb_fn_t, allocs *cgoAllocMap)
func (CodecEncOutputCxPktCbFn) PassValue ¶
func (x CodecEncOutputCxPktCbFn) PassValue() (ref C.vpx_codec_enc_output_cx_pkt_cb_fn_t, allocs *cgoAllocMap)
type CodecErFlags ¶
type CodecErFlags uint32
CodecErFlags type as declared in vpx-1.6.0/vpx_encoder.h:144
type CodecErr ¶
type CodecErr int32
CodecErr as declared in vpx-1.6.0/vpx_codec.h:142
const ( CodecOk CodecErr = C.VPX_CODEC_OK CodecError CodecErr = C.VPX_CODEC_ERROR CodecMemError CodecErr = C.VPX_CODEC_MEM_ERROR CodecABIMismatch CodecErr = C.VPX_CODEC_ABI_MISMATCH CodecIncapable CodecErr = C.VPX_CODEC_INCAPABLE CodecUnsupBitstream CodecErr = C.VPX_CODEC_UNSUP_BITSTREAM CodecUnsupFeature CodecErr = C.VPX_CODEC_UNSUP_FEATURE CodecCorruptFrame CodecErr = C.VPX_CODEC_CORRUPT_FRAME CodecInvalidParam CodecErr = C.VPX_CODEC_INVALID_PARAM CodecListEnd CodecErr = C.VPX_CODEC_LIST_END )
CodecErr enumeration from vpx-1.6.0/vpx_codec.h:142
func CodecDecInitVer ¶
func CodecDecInitVer(ctx *CodecCtx, iface *CodecIface, cfg *CodecDecCfg, flags CodecFlags, ver int32) CodecErr
CodecDecInitVer function as declared in vpx-1.6.0/vpx_decoder.h:136
func CodecDecode ¶
func CodecDecode(ctx *CodecCtx, data string, dataSz uint32, userPriv unsafe.Pointer, deadline int) CodecErr
CodecDecode function as declared in vpx-1.6.0/vpx_decoder.h:220
func CodecDestroy ¶
CodecDestroy function as declared in vpx-1.6.0/vpx_codec.h:351
func CodecEncConfigDefault ¶
func CodecEncConfigDefault(iface *CodecIface, cfg *CodecEncCfg, reserved uint32) CodecErr
CodecEncConfigDefault function as declared in vpx-1.6.0/vpx_encoder.h:861
func CodecEncConfigSet ¶
func CodecEncConfigSet(ctx *CodecCtx, cfg *CodecEncCfg) CodecErr
CodecEncConfigSet function as declared in vpx-1.6.0/vpx_encoder.h:880
func CodecEncInitMultiVer ¶
func CodecEncInitMultiVer(ctx *CodecCtx, iface *CodecIface, cfg *CodecEncCfg, numEnc int32, flags CodecFlags, dsf *Rational, ver int32) CodecErr
CodecEncInitMultiVer function as declared in vpx-1.6.0/vpx_encoder.h:824
func CodecEncInitVer ¶
func CodecEncInitVer(ctx *CodecCtx, iface *CodecIface, cfg *CodecEncCfg, flags CodecFlags, ver int32) CodecErr
CodecEncInitVer function as declared in vpx-1.6.0/vpx_encoder.h:789
func CodecEncode ¶
func CodecEncode(ctx *CodecCtx, img *Image, pts CodecPts, duration uint, flags EncFrameFlags, deadline uint) CodecErr
CodecEncode function as declared in vpx-1.6.0/vpx_encoder.h:940
func CodecGetStreamInfo ¶
func CodecGetStreamInfo(ctx *CodecCtx, si *CodecStreamInfo) CodecErr
CodecGetStreamInfo function as declared in vpx-1.6.0/vpx_decoder.h:186
func CodecPeekStreamInfo ¶
func CodecPeekStreamInfo(iface *CodecIface, data string, dataSz uint32, si *CodecStreamInfo) CodecErr
CodecPeekStreamInfo function as declared in vpx-1.6.0/vpx_decoder.h:167
func CodecRegisterPutFrameCb ¶
func CodecRegisterPutFrameCb(ctx *CodecCtx, cb CodecPutFrameCbFn, userPriv unsafe.Pointer) CodecErr
CodecRegisterPutFrameCb function as declared in vpx-1.6.0/vpx_decoder.h:279
func CodecRegisterPutSliceCb ¶
func CodecRegisterPutSliceCb(ctx *CodecCtx, cb CodecPutSliceCbFn, userPriv unsafe.Pointer) CodecErr
CodecRegisterPutSliceCb function as declared in vpx-1.6.0/vpx_decoder.h:321
func CodecSetCxDataBuf ¶
CodecSetCxDataBuf function as declared in vpx-1.6.0/vpx_encoder.h:990
func CodecSetFrameBufferFunctions ¶
func CodecSetFrameBufferFunctions(ctx *CodecCtx, cbGet GetFrameBufferCbFn, cbRelease ReleaseFrameBufferCbFn, cbPriv unsafe.Pointer) CodecErr
CodecSetFrameBufferFunctions function as declared in vpx-1.6.0/vpx_decoder.h:366
type CodecFrameBuffer ¶
type CodecFrameBuffer struct { Data []byte Size uint Priv unsafe.Pointer // contains filtered or unexported fields }
CodecFrameBuffer as declared in vpx-1.6.0/vpx_frame_buffer.h:43
func NewCodecFrameBufferRef ¶
func NewCodecFrameBufferRef(ref unsafe.Pointer) *CodecFrameBuffer
NewCodecFrameBufferRef creates a new wrapper struct with underlying reference set to the original C object. Returns nil if the provided pointer to C object is nil too.
func (*CodecFrameBuffer) Deref ¶
func (x *CodecFrameBuffer) Deref()
Deref uses the underlying reference to C object and fills the wrapping struct with values. Do not forget to call this method whether you get a struct for C object and want to read its values.
func (*CodecFrameBuffer) Free ¶
func (x *CodecFrameBuffer) Free()
Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. Does nothing if struct is nil or has no allocation map.
func (*CodecFrameBuffer) PassRef ¶
func (x *CodecFrameBuffer) PassRef() (*C.vpx_codec_frame_buffer_t, *cgoAllocMap)
PassRef returns the underlying C object, otherwise it will allocate one and set its values from this wrapping struct, counting allocations into an allocation map.
func (CodecFrameBuffer) PassValue ¶
func (x CodecFrameBuffer) PassValue() (C.vpx_codec_frame_buffer_t, *cgoAllocMap)
PassValue does the same as PassRef except that it will try to dereference the returned pointer.
func (*CodecFrameBuffer) Ref ¶
func (x *CodecFrameBuffer) Ref() *C.vpx_codec_frame_buffer_t
Ref returns the underlying reference to C object or nil if struct is nil.
type CodecFrameFlags ¶
type CodecFrameFlags uint32
CodecFrameFlags type as declared in vpx-1.6.0/vpx_encoder.h:128
type CodecIface ¶
type CodecIface C.vpx_codec_iface_t
CodecIface as declared in vpx-1.6.0/vpx_codec.h:173
func DecoderFor ¶
func DecoderFor(fourcc int) *CodecIface
func DecoderIfaceVP8 ¶
func DecoderIfaceVP8() *CodecIface
func DecoderIfaceVP9 ¶
func DecoderIfaceVP9() *CodecIface
func EncoderFor ¶
func EncoderFor(fourcc int) *CodecIface
func EncoderIfaceVP8 ¶
func EncoderIfaceVP8() *CodecIface
func EncoderIfaceVP9 ¶
func EncoderIfaceVP9() *CodecIface
func NewCodecIface ¶
func NewCodecIface() *CodecIface
NewCodecIface allocates a new C object of this type and converts the reference into a raw struct reference without wrapping.
func NewCodecIfaceRef ¶
func NewCodecIfaceRef(ref unsafe.Pointer) *CodecIface
NewCodecIfaceRef converts the C object reference into a raw struct reference without wrapping.
func (*CodecIface) Free ¶
func (x *CodecIface) Free()
Free cleanups the referenced memory using C free.
func (*CodecIface) PassRef ¶
func (x *CodecIface) PassRef() *C.vpx_codec_iface_t
PassRef returns a reference to C object as it is or allocates a new C object of this type.
func (*CodecIface) Ref ¶
func (x *CodecIface) Ref() *C.vpx_codec_iface_t
Ref returns a reference to C object as it is.
type CodecPriv ¶
type CodecPriv C.vpx_codec_priv_t
CodecPriv as declared in vpx-1.6.0/vpx_codec.h:181
func NewCodecPriv ¶
func NewCodecPriv() *CodecPriv
NewCodecPriv allocates a new C object of this type and converts the reference into a raw struct reference without wrapping.
func NewCodecPrivRef ¶
NewCodecPrivRef converts the C object reference into a raw struct reference without wrapping.
func (*CodecPriv) Free ¶
func (x *CodecPriv) Free()
Free cleanups the referenced memory using C free.
func (*CodecPriv) PassRef ¶
func (x *CodecPriv) PassRef() *C.vpx_codec_priv_t
PassRef returns a reference to C object as it is or allocates a new C object of this type.
func (*CodecPriv) Ref ¶
func (x *CodecPriv) Ref() *C.vpx_codec_priv_t
Ref returns a reference to C object as it is.
type CodecPrivOutputCxPktCbPair ¶
type CodecPrivOutputCxPktCbPair struct { OutputCxPkt CodecEncOutputCxPktCbFn UserPriv unsafe.Pointer // contains filtered or unexported fields }
CodecPrivOutputCxPktCbPair as declared in vpx-1.6.0/vpx_encoder.h:240
func NewCodecPrivOutputCxPktCbPairRef ¶
func NewCodecPrivOutputCxPktCbPairRef(ref unsafe.Pointer) *CodecPrivOutputCxPktCbPair
NewCodecPrivOutputCxPktCbPairRef creates a new wrapper struct with underlying reference set to the original C object. Returns nil if the provided pointer to C object is nil too.
func (*CodecPrivOutputCxPktCbPair) Deref ¶
func (x *CodecPrivOutputCxPktCbPair) Deref()
Deref uses the underlying reference to C object and fills the wrapping struct with values. Do not forget to call this method whether you get a struct for C object and want to read its values.
func (*CodecPrivOutputCxPktCbPair) Free ¶
func (x *CodecPrivOutputCxPktCbPair) Free()
Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. Does nothing if struct is nil or has no allocation map.
func (*CodecPrivOutputCxPktCbPair) PassRef ¶
func (x *CodecPrivOutputCxPktCbPair) PassRef() (*C.vpx_codec_priv_output_cx_pkt_cb_pair_t, *cgoAllocMap)
PassRef returns the underlying C object, otherwise it will allocate one and set its values from this wrapping struct, counting allocations into an allocation map.
func (CodecPrivOutputCxPktCbPair) PassValue ¶
func (x CodecPrivOutputCxPktCbPair) PassValue() (C.vpx_codec_priv_output_cx_pkt_cb_pair_t, *cgoAllocMap)
PassValue does the same as PassRef except that it will try to dereference the returned pointer.
func (*CodecPrivOutputCxPktCbPair) Ref ¶
func (x *CodecPrivOutputCxPktCbPair) Ref() *C.vpx_codec_priv_output_cx_pkt_cb_pair_t
Ref returns the underlying reference to C object or nil if struct is nil.
type CodecPutFrameCbFn ¶
CodecPutFrameCbFn type as declared in vpx-1.6.0/vpx_decoder.h:260
func NewCodecPutFrameCbFnRef ¶
func NewCodecPutFrameCbFnRef(ref unsafe.Pointer) *CodecPutFrameCbFn
func (CodecPutFrameCbFn) PassRef ¶
func (x CodecPutFrameCbFn) PassRef() (ref *C.vpx_codec_put_frame_cb_fn_t, allocs *cgoAllocMap)
func (CodecPutFrameCbFn) PassValue ¶
func (x CodecPutFrameCbFn) PassValue() (ref C.vpx_codec_put_frame_cb_fn_t, allocs *cgoAllocMap)
type CodecPutSliceCbFn ¶
type CodecPutSliceCbFn func(userPriv unsafe.Pointer, img *Image, valid *ImageRect, update *ImageRect)
CodecPutSliceCbFn type as declared in vpx-1.6.0/vpx_decoder.h:300
func NewCodecPutSliceCbFnRef ¶
func NewCodecPutSliceCbFnRef(ref unsafe.Pointer) *CodecPutSliceCbFn
func (CodecPutSliceCbFn) PassRef ¶
func (x CodecPutSliceCbFn) PassRef() (ref *C.vpx_codec_put_slice_cb_fn_t, allocs *cgoAllocMap)
func (CodecPutSliceCbFn) PassValue ¶
func (x CodecPutSliceCbFn) PassValue() (ref C.vpx_codec_put_slice_cb_fn_t, allocs *cgoAllocMap)
type CodecStreamInfo ¶
type CodecStreamInfo struct { Sz uint32 W uint32 H uint32 IsKf uint32 // contains filtered or unexported fields }
CodecStreamInfo as declared in vpx-1.6.0/vpx_decoder.h:93
func NewCodecStreamInfoRef ¶
func NewCodecStreamInfoRef(ref unsafe.Pointer) *CodecStreamInfo
NewCodecStreamInfoRef creates a new wrapper struct with underlying reference set to the original C object. Returns nil if the provided pointer to C object is nil too.
func (*CodecStreamInfo) Deref ¶
func (x *CodecStreamInfo) Deref()
Deref uses the underlying reference to C object and fills the wrapping struct with values. Do not forget to call this method whether you get a struct for C object and want to read its values.
func (*CodecStreamInfo) Free ¶
func (x *CodecStreamInfo) Free()
Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. Does nothing if struct is nil or has no allocation map.
func (*CodecStreamInfo) PassRef ¶
func (x *CodecStreamInfo) PassRef() (*C.vpx_codec_stream_info_t, *cgoAllocMap)
PassRef returns the underlying C object, otherwise it will allocate one and set its values from this wrapping struct, counting allocations into an allocation map.
func (CodecStreamInfo) PassValue ¶
func (x CodecStreamInfo) PassValue() (C.vpx_codec_stream_info_t, *cgoAllocMap)
PassValue does the same as PassRef except that it will try to dereference the returned pointer.
func (*CodecStreamInfo) Ref ¶
func (x *CodecStreamInfo) Ref() *C.vpx_codec_stream_info_t
Ref returns the underlying reference to C object or nil if struct is nil.
type ColorRange ¶
type ColorRange int32
ColorRange as declared in vpx-1.6.0/vpx_image.h:85
const ( CrStudioRange ColorRange = C.VPX_CR_STUDIO_RANGE CrFullRange ColorRange = C.VPX_CR_FULL_RANGE )
ColorRange enumeration from vpx-1.6.0/vpx_image.h:85
type ColorSpace ¶
type ColorSpace int32
ColorSpace as declared in vpx-1.6.0/vpx_image.h:79
const ( ColorSpaceUnknown ColorSpace = C.VPX_CS_UNKNOWN ColorSpaceBt601 ColorSpace = C.VPX_CS_BT_601 ColorSpaceBt709 ColorSpace = C.VPX_CS_BT_709 ColorSpaceSmpte170 ColorSpace = C.VPX_CS_SMPTE_170 ColorSpaceSmpte240 ColorSpace = C.VPX_CS_SMPTE_240 ColorSpaceBt2020 ColorSpace = C.VPX_CS_BT_2020 ColorSpaceReserved ColorSpace = C.VPX_CS_RESERVED ColorSpaceSrgb ColorSpace = C.VPX_CS_SRGB )
ColorSpace enumeration from vpx-1.6.0/vpx_image.h:79
type EncFrameFlags ¶
type EncFrameFlags int
EncFrameFlags type as declared in vpx-1.6.0/vpx_encoder.h:291
type FixedBuf ¶
FixedBuf as declared in vpx-1.6.0/vpx_encoder.h:110
func CodecGetGlobalHeaders ¶
CodecGetGlobalHeaders function as declared in vpx-1.6.0/vpx_encoder.h:895
func NewFixedBufRef ¶
NewFixedBufRef creates a new wrapper struct with underlying reference set to the original C object. Returns nil if the provided pointer to C object is nil too.
func (*FixedBuf) Deref ¶
func (x *FixedBuf) Deref()
Deref uses the underlying reference to C object and fills the wrapping struct with values. Do not forget to call this method whether you get a struct for C object and want to read its values.
func (*FixedBuf) Free ¶
func (x *FixedBuf) Free()
Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. Does nothing if struct is nil or has no allocation map.
func (*FixedBuf) PassRef ¶
func (x *FixedBuf) PassRef() (*C.vpx_fixed_buf_t, *cgoAllocMap)
PassRef returns the underlying C object, otherwise it will allocate one and set its values from this wrapping struct, counting allocations into an allocation map.
func (FixedBuf) PassValue ¶
func (x FixedBuf) PassValue() (C.vpx_fixed_buf_t, *cgoAllocMap)
PassValue does the same as PassRef except that it will try to dereference the returned pointer.
func (*FixedBuf) Ref ¶
func (x *FixedBuf) Ref() *C.vpx_fixed_buf_t
Ref returns the underlying reference to C object or nil if struct is nil.
type GetFrameBufferCbFn ¶
type GetFrameBufferCbFn func(priv unsafe.Pointer, minSize uint, fb *CodecFrameBuffer) int32
GetFrameBufferCbFn type as declared in vpx-1.6.0/vpx_frame_buffer.h:63
func NewGetFrameBufferCbFnRef ¶
func NewGetFrameBufferCbFnRef(ref unsafe.Pointer) *GetFrameBufferCbFn
func (GetFrameBufferCbFn) PassRef ¶
func (x GetFrameBufferCbFn) PassRef() (ref *C.vpx_get_frame_buffer_cb_fn_t, allocs *cgoAllocMap)
func (GetFrameBufferCbFn) PassValue ¶
func (x GetFrameBufferCbFn) PassValue() (ref C.vpx_get_frame_buffer_cb_fn_t, allocs *cgoAllocMap)
type Image ¶
type Image struct { Fmt ImageFormat Cs ColorSpace Range ColorRange W uint32 H uint32 BitDepth uint32 DW uint32 DH uint32 RW uint32 RH uint32 XChromaShift uint32 YChromaShift uint32 Planes [4]*byte Stride [4]int32 Bps int32 UserPriv unsafe.Pointer ImgData []byte ImgDataOwner int32 SelfAllocd int32 FbPriv unsafe.Pointer // contains filtered or unexported fields }
Image as declared in vpx-1.6.0/vpx_image.h:133
func CodecGetFrame ¶
CodecGetFrame function as declared in vpx-1.6.0/vpx_decoder.h:242
func CodecGetPreviewFrame ¶
CodecGetPreviewFrame function as declared in vpx-1.6.0/vpx_encoder.h:1035
func ImageAlloc ¶
ImageAlloc function as declared in vpx-1.6.0/vpx_image.h:161
func ImageWrap ¶
func ImageWrap(img *Image, fmt ImageFormat, dW uint32, dH uint32, align uint32, imgData *byte) *Image
ImageWrap function as declared in vpx-1.6.0/vpx_image.h:186
func NewImageRef ¶
NewImageRef creates a new wrapper struct with underlying reference set to the original C object. Returns nil if the provided pointer to C object is nil too.
func (*Image) Deref ¶
func (x *Image) Deref()
Deref uses the underlying reference to C object and fills the wrapping struct with values. Do not forget to call this method whether you get a struct for C object and want to read its values.
func (*Image) Free ¶
func (x *Image) Free()
Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. Does nothing if struct is nil or has no allocation map.
func (*Image) ImageYCbCr ¶
func (*Image) PassRef ¶
func (x *Image) PassRef() (*C.vpx_image_t, *cgoAllocMap)
PassRef returns the underlying C object, otherwise it will allocate one and set its values from this wrapping struct, counting allocations into an allocation map.
func (Image) PassValue ¶
func (x Image) PassValue() (C.vpx_image_t, *cgoAllocMap)
PassValue does the same as PassRef except that it will try to dereference the returned pointer.
func (*Image) Ref ¶
func (x *Image) Ref() *C.vpx_image_t
Ref returns the underlying reference to C object or nil if struct is nil.
type ImageFormat ¶
type ImageFormat int32
ImageFormat as declared in vpx-1.6.0/vpx_image.h:67
const ( ImageFormatNone ImageFormat = C.VPX_IMG_FMT_NONE ImageFormatYv12 ImageFormat = C.VPX_IMG_FMT_YV12 ImageFormatI420 ImageFormat = C.VPX_IMG_FMT_I420 ImageFormatI422 ImageFormat = C.VPX_IMG_FMT_I422 ImageFormatI444 ImageFormat = C.VPX_IMG_FMT_I444 ImageFormatI440 ImageFormat = C.VPX_IMG_FMT_I440 ImageFormatI42016 ImageFormat = C.VPX_IMG_FMT_I42016 ImageFormatI42216 ImageFormat = C.VPX_IMG_FMT_I42216 ImageFormatI44416 ImageFormat = C.VPX_IMG_FMT_I44416 ImageFormatI44016 ImageFormat = C.VPX_IMG_FMT_I44016 )
ImageFormat enumeration from vpx-1.6.0/vpx_image.h:67
func (ImageFormat) String ¶
func (fmt ImageFormat) String() string
type ImageRect ¶
type ImageRect struct { X uint32 Y uint32 W uint32 H uint32 // contains filtered or unexported fields }
ImageRect as declared in vpx-1.6.0/vpx_image.h:141
func NewImageRectRef ¶
NewImageRectRef creates a new wrapper struct with underlying reference set to the original C object. Returns nil if the provided pointer to C object is nil too.
func (*ImageRect) Deref ¶
func (x *ImageRect) Deref()
Deref uses the underlying reference to C object and fills the wrapping struct with values. Do not forget to call this method whether you get a struct for C object and want to read its values.
func (*ImageRect) Free ¶
func (x *ImageRect) Free()
Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. Does nothing if struct is nil or has no allocation map.
func (*ImageRect) PassRef ¶
func (x *ImageRect) PassRef() (*C.vpx_image_rect_t, *cgoAllocMap)
PassRef returns the underlying C object, otherwise it will allocate one and set its values from this wrapping struct, counting allocations into an allocation map.
func (ImageRect) PassValue ¶
func (x ImageRect) PassValue() (C.vpx_image_rect_t, *cgoAllocMap)
PassValue does the same as PassRef except that it will try to dereference the returned pointer.
func (*ImageRect) Ref ¶
func (x *ImageRect) Ref() *C.vpx_image_rect_t
Ref returns the underlying reference to C object or nil if struct is nil.
type Rational ¶
Rational as declared in vpx-1.6.0/vpx_encoder.h:249
func NewRationalRef ¶
NewRationalRef creates a new wrapper struct with underlying reference set to the original C object. Returns nil if the provided pointer to C object is nil too.
func (*Rational) Deref ¶
func (x *Rational) Deref()
Deref uses the underlying reference to C object and fills the wrapping struct with values. Do not forget to call this method whether you get a struct for C object and want to read its values.
func (*Rational) Free ¶
func (x *Rational) Free()
Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. Does nothing if struct is nil or has no allocation map.
func (*Rational) PassRef ¶
func (x *Rational) PassRef() (*C.vpx_rational_t, *cgoAllocMap)
PassRef returns the underlying C object, otherwise it will allocate one and set its values from this wrapping struct, counting allocations into an allocation map.
func (Rational) PassValue ¶
func (x Rational) PassValue() (C.vpx_rational_t, *cgoAllocMap)
PassValue does the same as PassRef except that it will try to dereference the returned pointer.
func (*Rational) Ref ¶
func (x *Rational) Ref() *C.vpx_rational_t
Ref returns the underlying reference to C object or nil if struct is nil.
type ReleaseFrameBufferCbFn ¶
type ReleaseFrameBufferCbFn func(priv unsafe.Pointer, fb *CodecFrameBuffer) int32
ReleaseFrameBufferCbFn type as declared in vpx-1.6.0/vpx_frame_buffer.h:76
func NewReleaseFrameBufferCbFnRef ¶
func NewReleaseFrameBufferCbFnRef(ref unsafe.Pointer) *ReleaseFrameBufferCbFn
func (ReleaseFrameBufferCbFn) PassRef ¶
func (x ReleaseFrameBufferCbFn) PassRef() (ref *C.vpx_release_frame_buffer_cb_fn_t, allocs *cgoAllocMap)
func (ReleaseFrameBufferCbFn) PassValue ¶
func (x ReleaseFrameBufferCbFn) PassValue() (ref C.vpx_release_frame_buffer_cb_fn_t, allocs *cgoAllocMap)
type SvcExtraCfg ¶
type SvcExtraCfg C.vpx_svc_extra_cfg_t
SvcExtraCfg as declared in vpx-1.6.0/vpx_encoder.h:764
func NewSvcExtraCfg ¶
func NewSvcExtraCfg() *SvcExtraCfg
NewSvcExtraCfg allocates a new C object of this type and converts the reference into a raw struct reference without wrapping.
func NewSvcExtraCfgRef ¶
func NewSvcExtraCfgRef(ref unsafe.Pointer) *SvcExtraCfg
NewSvcExtraCfgRef converts the C object reference into a raw struct reference without wrapping.
func (*SvcExtraCfg) Free ¶
func (x *SvcExtraCfg) Free()
Free cleanups the referenced memory using C free.
func (*SvcExtraCfg) PassRef ¶
func (x *SvcExtraCfg) PassRef() *C.vpx_svc_extra_cfg_t
PassRef returns a reference to C object as it is or allocates a new C object of this type.
func (*SvcExtraCfg) Ref ¶
func (x *SvcExtraCfg) Ref() *C.vpx_svc_extra_cfg_t
Ref returns a reference to C object as it is.