Documentation ¶
Overview ¶
Package avutil is a utility library to aid portable multimedia programming. It contains safe portable string functions, random number generators, data structures, additional mathematics functions, cryptography and multimedia related functionality. Some generic features and utilities provided by the libavutil library
Package avutil is a utility library to aid portable multimedia programming. It contains safe portable string functions, random number generators, data structures, additional mathematics functions, cryptography and multimedia related functionality. Some generic features and utilities provided by the libavutil library
Package avutil is a utility library to aid portable multimedia programming. It contains safe portable string functions, random number generators, data structures, additional mathematics functions, cryptography and multimedia related functionality. Some generic features and utilities provided by the libavutil library
Index ¶
- Constants
- func AvCalloc(n, s uintptr) unsafe.Pointer
- func AvDynarray2Add(t *unsafe.Pointer, n *int, e uintptr, d uint8) unsafe.Pointer
- func AvDynarrayAdd(t unsafe.Pointer, n *int, e unsafe.Pointer)
- func AvDynarrayAddNofree(p unsafe.Pointer, n *int, e unsafe.Pointer) int
- func AvFastMalloc(p unsafe.Pointer, s *uint, m uintptr)
- func AvFastRealloc(p unsafe.Pointer, s *uint, m uintptr) unsafe.Pointer
- func AvFrameCopyProps(d, s *Frame) int
- func AvFrameFree(f *Frame)
- func AvFrameGetBuffer(f *Frame, a int) int
- func AvFrameGetInfo(f *Frame) (width int, height int, linesize [8]int32, data [8]*uint8)
- func AvFrameGetQpTable(f *Frame, s, t *int) int8
- func AvFrameIsWritable(f *Frame) int
- func AvFrameMakeWritable(f *Frame) int
- func AvFrameMoveRef(d, s *Frame)
- func AvFrameRef(d, s *Frame) int
- func AvFrameSetQpTable(f *Frame, b *AvBufferRef, s, q int) int
- func AvFrameUnref(f *Frame)
- func AvFree(p unsafe.Pointer)
- func AvFreep(p unsafe.Pointer)
- func AvGetMediaTypeString(mt MediaType) string
- func AvGetPictureTypeChar(pt AvPictureType) string
- func AvIntListLengthForSize(e uint, l int, t uint64) uint
- func AvLogGetLevel() int
- func AvLogSetLevel(level int)
- func AvMalloc(s uintptr) unsafe.Pointer
- func AvMallocArray(n, s uintptr) unsafe.Pointer
- func AvMallocz(s uintptr) unsafe.Pointer
- func AvMalloczArray(n, s uintptr) unsafe.Pointer
- func AvMaxAlloc(m uintptr)
- func AvMemcpyBackptr(d *uintptr, b, c int)
- func AvMemdup(p *int, s uintptr) unsafe.Pointer
- func AvRealloc(p *int, s uintptr) unsafe.Pointer
- func AvReallocArray(p int, n, s uintptr) unsafe.Pointer
- func AvReallocF(p int, n, e uintptr) unsafe.Pointer
- func AvReallocp(p int, s uintptr) int
- func AvReallocpArray(p int, n, s uintptr) int
- func AvSetFrame(f *Frame, w int, h int, pixFmt int) (err error)
- func AvSizeMult(a, b uintptr, r *uintptr) int
- func AvStrdup(s string) string
- func AvStrndup(s string, l uintptr) string
- func AvXIfNull(p, x int)
- func AvutilConfiguration() string
- func AvutilLicense() string
- func AvutilVersion() uint
- func Data(f *Frame) (data [8]*uint8)
- func ErrorFromCode(code int) error
- func GetBestEffortTimestamp(f *Frame) int64
- func GetPicture(f *Frame) (img *image.YCbCr, err error)
- func GetPictureRGB(f *Frame) (img *image.RGBA, err error)
- func GetPictureRGBA(f *Frame, width, height int) (img *image.RGBA)
- func GetPictureWithSizes(f *Frame, w, h int) (img *image.YCbCr, err error)
- func Linesize(f *Frame) (linesize [8]int32)
- func SetPicture(f *Frame, img *image.YCbCr)
- type AvBuffer
- type AvBufferPool
- type AvBufferRef
- type AvFrameSideData
- type AvFrameSideDataType
- type AvPictureType
- type AvTree
- type Dictionary
- func (d *Dictionary) AvDictCopy(src *Dictionary, flags int) int
- func (d *Dictionary) AvDictCount() int
- func (d *Dictionary) AvDictFree()
- func (d *Dictionary) AvDictGet(key string, prev *DictionaryEntry, flags int) *DictionaryEntry
- func (d *Dictionary) AvDictGetString(key_val_sep, pairs_sep byte) (int, string)
- func (d *Dictionary) AvDictParseString(str, key_val_sep, pairs_sep string, flags int) int
- func (d *Dictionary) AvDictSet(key, value string, flags int) int
- func (d *Dictionary) AvDictSetInt(key string, value int64, flags int) int
- type DictionaryEntry
- type File
- type Frame
- type MediaType
- type Options
- type PixelFormat
- type Rational
Constants ¶
const ( AV_DICT_MATCH_CASE = int(C.AV_DICT_MATCH_CASE) AV_DICT_IGNORE_SUFFIX = int(C.AV_DICT_IGNORE_SUFFIX) AV_DICT_DONT_STRDUP_KEY = int(C.AV_DICT_DONT_STRDUP_KEY) AV_DICT_DONT_STRDUP_VAL = int(C.AV_DICT_DONT_STRDUP_VAL) AV_DICT_DONT_OVERWRITE = int(C.AV_DICT_DONT_OVERWRITE) AV_DICT_APPEND = int(C.AV_DICT_APPEND) AV_DICT_MULTIKEY = int(C.AV_DICT_MULTIKEY) )
const ( AvErrorEOF = -('E' | ('O' << 8) | ('F' << 16) | (' ' << 24)) AvErrorEAGAIN = -35 )
const ( AV_LOG_QUIET = -8 AV_LOG_PANIC = 0 AV_LOG_FATAL = 8 AV_LOG_ERROR = 16 AV_LOG_WARNING = 24 AV_LOG_INFO = 32 AV_LOG_VERBOSE = 40 AV_LOG_DEBUG = 48 AV_LOG_TRACE = 56 )
Variables ¶
This section is empty.
Functions ¶
func AvCalloc ¶
Allocate a block of nmemb * size bytes with alignment suitable for all memory accesses (including vectors if available on the CPU) and zero all the bytes of the block.
func AvDynarray2Add ¶
Add an element of size elem_size to a dynamic array.
func AvDynarrayAdd ¶
Add an element to a dynamic array.
func AvDynarrayAddNofree ¶
Add an element to a dynamic array.
func AvFastMalloc ¶
Allocate a buffer, reusing the given one if large enough.
func AvFastRealloc ¶
Reallocate the given block if it is not large enough, otherwise do nothing.
func AvFrameCopyProps ¶
Copy only "metadata" fields from src to dst.
func AvFrameFree ¶
func AvFrameFree(f *Frame)
Free the frame and any dynamically allocated objects in it, e.g.
func AvFrameGetBuffer ¶
Allocate new buffer(s) for audio or video data.
func AvFrameGetInfo ¶
func AvFrameGetQpTable ¶
func AvFrameMakeWritable ¶
Ensure that the frame data is writable, avoiding data copy if possible.
func AvFrameMoveRef ¶
func AvFrameMoveRef(d, s *Frame)
Move everythnig contained in src to dst and reset src.
func AvFrameRef ¶
Setup a new reference to the data described by an given frame.
func AvFrameSetQpTable ¶
func AvFrameSetQpTable(f *Frame, b *AvBufferRef, s, q int) int
func AvFrameUnref ¶
func AvFrameUnref(f *Frame)
Unreference all the buffers referenced by frame and reset the frame fields.
func AvFreep ¶
Free a memory block which has been allocated with av_malloc(z)() or av_realloc() and set the pointer pointing to it to NULL.
func AvGetMediaTypeString ¶
Return a string describing the media_type enum, NULL if media_type is unknown.
func AvGetPictureTypeChar ¶
func AvGetPictureTypeChar(pt AvPictureType) string
Return a single letter to describe the given picture type pict_type.
func AvIntListLengthForSize ¶
Compute the length of an integer list.
func AvLogGetLevel ¶
func AvLogGetLevel() int
func AvLogSetLevel ¶
func AvLogSetLevel(level int)
func AvMalloc ¶
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if available on the CPU).
func AvMallocArray ¶
func AvMallocz ¶
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if available on the CPU) and zero all the bytes of the block.
func AvMalloczArray ¶
func AvMaxAlloc ¶
func AvMaxAlloc(m uintptr)
Set the maximum size that may me allocated in one block.
func AvMemcpyBackptr ¶
deliberately overlapping memcpy implementation
func AvReallocF ¶
Allocate or reallocate a block of memory.
func AvReallocpArray ¶
func AvSizeMult ¶
Multiply two size_t values checking for overflow.
func AvStrndup ¶
char * av_strndup (const char *s, size_t len) av_malloc_attrib Duplicate a substring of the string s.
func AvutilConfiguration ¶
func AvutilConfiguration() string
Return the libavutil build-time configuration.
func ErrorFromCode ¶
func GetBestEffortTimestamp ¶
func GetPicture ¶
GetPicture creates a YCbCr image from the frame
func GetPictureWithSizes ¶
func SetPicture ¶
SetPicture sets the image pointer of |f| to the image pointers of |img|
Types ¶
type AvBuffer ¶
type AvBuffer C.struct_AVBuffer
type AvBufferPool ¶
type AvBufferPool C.struct_AVBufferPool
type AvBufferRef ¶
type AvBufferRef C.struct_AVBufferRef
func AvFrameGetPlaneBuffer ¶
func AvFrameGetPlaneBuffer(f *Frame, p int) *AvBufferRef
Get the buffer reference a given data plane is stored in.
type AvFrameSideData ¶
type AvFrameSideData C.struct_AVFrameSideData
func AvFrameGetSideData ¶
func AvFrameGetSideData(f *Frame, t AvFrameSideDataType) *AvFrameSideData
func AvFrameNewSideData ¶
func AvFrameNewSideData(f *Frame, d AvFrameSideDataType, s int) *AvFrameSideData
Add a new side data to a frame.
type AvFrameSideDataType ¶
type AvFrameSideDataType C.enum_AVFrameSideDataType
type AvPictureType ¶
type AvPictureType C.enum_AVPictureType
type AvTree ¶
type AvTree C.struct_AVTree
type Dictionary ¶
type Dictionary C.struct_AVDictionary
func AvprivFrameGetMetadatap ¶
func AvprivFrameGetMetadatap(f *Frame) *Dictionary
func (*Dictionary) AvDictCopy ¶
func (d *Dictionary) AvDictCopy(src *Dictionary, flags int) int
func (*Dictionary) AvDictCount ¶
func (d *Dictionary) AvDictCount() int
func (*Dictionary) AvDictFree ¶
func (d *Dictionary) AvDictFree()
func (*Dictionary) AvDictGet ¶
func (d *Dictionary) AvDictGet(key string, prev *DictionaryEntry, flags int) *DictionaryEntry
func (*Dictionary) AvDictGetString ¶
func (d *Dictionary) AvDictGetString(key_val_sep, pairs_sep byte) (int, string)
func (*Dictionary) AvDictParseString ¶
func (d *Dictionary) AvDictParseString(str, key_val_sep, pairs_sep string, flags int) int
func (*Dictionary) AvDictSetInt ¶
func (d *Dictionary) AvDictSetInt(key string, value int64, flags int) int
type DictionaryEntry ¶
type DictionaryEntry C.struct_AVDictionaryEntry
func (*DictionaryEntry) Key ¶
func (d *DictionaryEntry) Key() string
func (*DictionaryEntry) Value ¶
func (d *DictionaryEntry) Value() string
type Frame ¶
type Frame C.struct_AVFrame
func AvFrameAlloc ¶
func AvFrameAlloc() *Frame
Allocate an Frame and set its fields to default values.
func AvFrameClone ¶
Create a new frame that references the same data as src.
type MediaType ¶
type MediaType C.enum_AVMediaType
type Options ¶
type Options C.struct_AVOptions
type PixelFormat ¶
type PixelFormat C.enum_AVPixelFormat
type Rational ¶
type Rational C.struct_AVRational
func AvGetTimeBaseQ ¶
func AvGetTimeBaseQ() Rational
Return the fractional representation of the internal time base.