Documentation
¶
Overview ¶
Package libavutil 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 libavutil 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 libavutil 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 AvFrameIsWritable(f *Frame) int
- func AvFrameMakeWritable(f *Frame) int
- func AvFrameMoveRef(d, s *Frame)
- func AvFrameRef(d, s *Frame) 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 AvImageFillArrays(dstData [8]*uint8, dstLine [8]int32, src *uint8, pixFmt PixelFormat, ...) int
- func AvImageGetBufferSize(pixFmt PixelFormat, width, height, align int) int
- 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 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(keyValSep, pairsSep byte) (int, string)
- func (d *Dictionary) AvDictParseString(str, keyValSep, pairsSep 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 ( AvDictMatchCase = int(C.AV_DICT_MATCH_CASE) AvDictIgnoreSuffix = int(C.AV_DICT_IGNORE_SUFFIX) AvDictDontStrdupKey = int(C.AV_DICT_DONT_STRDUP_KEY) AvDictDontStrdupVal = int(C.AV_DICT_DONT_STRDUP_VAL) AvDictDontOverwrite = int(C.AV_DICT_DONT_OVERWRITE) AvDictAppend = int(C.AV_DICT_APPEND) AvDictMultikey = int(C.AV_DICT_MULTIKEY) )
AV_DICT_xxx
const ( AvErrorEOF = -('E' | ('O' << 8) | ('F' << 16) | (' ' << 24)) AvErrorEAGAIN = -11 )
error code
const ( AvLogQuiet = -8 AvLogPanic = 0 AvLogFatal = 8 AvLogError = 16 AvLogWarning = 24 AvLogInfo = 32 AvLogVerbose = 40 AvLogDebug = 48 AvLogTrace = 56 )
AV_LOG_xxx
Variables ¶
This section is empty.
Functions ¶
func AvCalloc ¶
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 ¶
AvDynarray2Add Add an element of size elem_size to a dynamic array.
func AvDynarrayAdd ¶
AvDynarrayAdd Add an element to a dynamic array.
func AvDynarrayAddNofree ¶
AvDynarrayAddNofree Add an element to a dynamic array.
func AvFastMalloc ¶
AvFastMalloc Allocate a buffer, reusing the given one if large enough.
func AvFastRealloc ¶
AvFastRealloc Reallocate the given block if it is not large enough, otherwise do nothing.
func AvFrameCopyProps ¶
AvFrameCopyProps Copy only "metadata" fields from src to dst.
func AvFrameFree ¶
func AvFrameFree(f *Frame)
AvFrameFree Free the frame and any dynamically allocated objects in it, e.g.
func AvFrameGetBuffer ¶
AvFrameGetBuffer Allocate new buffer(s) for audio or video data.
func AvFrameGetInfo ¶
AvFrameGetInfo Return frame info.
func AvFrameIsWritable ¶
AvFrameIsWritable Check if the frame data is writable.
func AvFrameMakeWritable ¶
AvFrameMakeWritable Ensure that the frame data is writable, avoiding data copy if possible.
func AvFrameMoveRef ¶
func AvFrameMoveRef(d, s *Frame)
AvFrameMoveRef Move everythnig contained in src to dst and reset src.
func AvFrameRef ¶
AvFrameRef Setup a new reference to the data described by an given frame.
func AvFrameUnref ¶
func AvFrameUnref(f *Frame)
AvFrameUnref Unreference all the buffers referenced by frame and reset the frame fields.
func AvFree ¶
AvFree Free a memory block which has been allocated with av_malloc(z)() or av_realloc().
func AvFreep ¶
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 ¶
AvGetMediaTypeString Return a string describing the media_type enum, NULL if media_type is unknown.
func AvGetPictureTypeChar ¶
func AvGetPictureTypeChar(pt AvPictureType) string
AvGetPictureTypeChar Return a single letter to describe the given picture type pict_type.
func AvImageFillArrays ¶
func AvImageFillArrays(dstData [8]*uint8, dstLine [8]int32, src *uint8, pixFmt PixelFormat, width, height, align int) int
AvImageFillArrays Setup the data pointers and linesizes based on the specified image parameters and the provided array.
func AvImageGetBufferSize ¶
func AvImageGetBufferSize(pixFmt PixelFormat, width, height, align int) int
AvImageGetBufferSize Return the size in bytes of the amount of data required to store an image with the given parameters.
func AvIntListLengthForSize ¶
AvIntListLengthForSize Compute the length of an integer list.
func AvMalloc ¶
AvMalloc Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if available on the CPU).
func AvMallocArray ¶
AvMallocArray Allocate a memory block for an array with av_malloc().
func AvMallocz ¶
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 ¶
AvMalloczArray Allocate a memory block for an array with av_mallocz().
func AvMaxAlloc ¶
func AvMaxAlloc(m uintptr)
AvMaxAlloc Set the maximum size that may me allocated in one block.
func AvMemcpyBackptr ¶
AvMemcpyBackptr deliberately overlapping memcpy implementation
func AvReallocArray ¶
AvReallocArray Allocate, reallocate, or free an array.
func AvReallocF ¶
AvReallocF Allocate or reallocate a block of memory.
func AvReallocp ¶
AvReallocp Allocate or reallocate a block of memory.
func AvReallocpArray ¶
AvReallocpArray Allocate, reallocate, or free an array through a pointer to a pointer.
func AvSetFrame ¶
AvSetFrame Allocate new buffer(s) for audio or video data.
func AvSizeMult ¶
AvSizeMult Multiply two size_t values checking for overflow.
func AvutilConfiguration ¶
func AvutilConfiguration() string
AvutilConfiguration Return the libavutil build-time configuration.
func AvutilVersion ¶
func AvutilVersion() uint
AvutilVersion Return the LIBAvUTIL_VERSION_INT constant.
func GetBestEffortTimestamp ¶
GetBestEffortTimestamp Return best_effort_timestamp
func GetPicture ¶
GetPicture creates a YCbCr image from the frame
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
AvFrameGetPlaneBuffer 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
AvFrameGetSideData Return a pointer to the side data of a given type on success, NULL if there is no side data with such type in this frame.
func AvFrameNewSideData ¶
func AvFrameNewSideData(f *Frame, d AvFrameSideDataType, s int) *AvFrameSideData
AvFrameNewSideData 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
AvprivFrameGetMetadatap Return metadata
func (*Dictionary) AvDictCopy ¶
func (d *Dictionary) AvDictCopy(src *Dictionary, flags int) int
AvDictCopy Copy entries from one AVDictionary struct into another.
func (*Dictionary) AvDictCount ¶
func (d *Dictionary) AvDictCount() int
AvDictCount Get number of entries in dictionary.
func (*Dictionary) AvDictFree ¶
func (d *Dictionary) AvDictFree()
AvDictFree Free all the memory allocated for an AVDictionary struct and all keys and values.
func (*Dictionary) AvDictGet ¶
func (d *Dictionary) AvDictGet(key string, prev *DictionaryEntry, flags int) *DictionaryEntry
AvDictGet Get a dictionary entry with matching key.
func (*Dictionary) AvDictGetString ¶
func (d *Dictionary) AvDictGetString(keyValSep, pairsSep byte) (int, string)
AvDictGetString Get dictionary entries as a string.
func (*Dictionary) AvDictParseString ¶
func (d *Dictionary) AvDictParseString(str, keyValSep, pairsSep string, flags int) int
AvDictParseString Parse the key/value pairs list and add the parsed entries to a dictionary.
func (*Dictionary) AvDictSet ¶
func (d *Dictionary) AvDictSet(key, value string, flags int) int
AvDictSet Set the given entry in *pm, overwriting an existing entry.
func (*Dictionary) AvDictSetInt ¶
func (d *Dictionary) AvDictSetInt(key string, value int64, flags int) int
AvDictSetInt Convenience wrapper for av_dict_set that converts the value to a string and stores it.
type DictionaryEntry ¶
type DictionaryEntry C.struct_AVDictionaryEntry
type File ¶
func AvFopenUtf8 ¶
AvFopenUtf8 Open a file using a UTF-8 filename.
type Frame ¶
type Frame C.struct_AVFrame
func AvFrameAlloc ¶
func AvFrameAlloc() *Frame
AvFrameAlloc Allocate an Frame and set its fields to default values.
func AvFrameClone ¶
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
AvGetTimeBaseQ Return the fractional representation of the internal time base.