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(nmemb, size uintptr) unsafe.Pointer
- func AvDynarray2Add(tabPtr *unsafe.Pointer, nbPtr *int, elemSize uintptr, elemData uint8) unsafe.Pointer
- func AvDynarrayAdd(tabPtr unsafe.Pointer, nbPtr *int, elem unsafe.Pointer)
- func AvDynarrayAddNofree(tabPtr unsafe.Pointer, nbPtr *int, elem unsafe.Pointer) int
- func AvFastMalloc(ptr unsafe.Pointer, size *uint, minSize uintptr)
- func AvFastRealloc(ptr unsafe.Pointer, size *uint, minSize uintptr) unsafe.Pointer
- func AvFrameCopyProps(dst, src *AvFrame) int
- func AvFrameFree(frame *AvFrame)
- func AvFrameGetBuffer(frame *AvFrame, align int) int
- func AvFrameIsWritable(frame *AvFrame) int
- func AvFrameMakeWritable(frame *AvFrame) int
- func AvFrameMoveRef(dst, src *AvFrame)
- func AvFrameRef(dst, src *AvFrame) int
- func AvFrameUnref(frame *AvFrame)
- func AvFree(ptr unsafe.Pointer)
- func AvFreep(ptr unsafe.Pointer)
- func AvGetMediaTypeString(typ AvMediaType) string
- func AvGetPictureTypeChar(typ AvPictureType) string
- func AvImageFillArrays(dstData **uint8, dstLine *int32, src *uint8, pixFmt AvPixelFormat, ...) int
- func AvImageGetBufferSize(pixFmt AvPixelFormat, width, height, align int) int
- func AvIntListLengthForSize(elsize uint, list int, term uint64) uint
- func AvLogGetLevel() int
- func AvLogSetLevel(level int)
- func AvMalloc(size uintptr) unsafe.Pointer
- func AvMallocArray(nmemb, size uintptr) unsafe.Pointer
- func AvMallocz(size uintptr) unsafe.Pointer
- func AvMalloczArray(nmemb, size uintptr) unsafe.Pointer
- func AvMaxAlloc(max uintptr)
- func AvMemcpyBackptr(dst *uintptr, back, cnt int)
- func AvMemdup(ptr *int, size uintptr) unsafe.Pointer
- func AvRealloc(ptr *int, size uintptr) unsafe.Pointer
- func AvReallocArray(ptr int, nmemb, size uintptr) unsafe.Pointer
- func AvReallocF(ptr int, nelem, elsize uintptr) unsafe.Pointer
- func AvReallocp(ptr int, size uintptr) int
- func AvReallocpArray(ptr int, nmemb, size uintptr) int
- func AvSizeMult(a, b uintptr, r *uintptr) int
- func AvStrdup(s string) string
- func AvStrndup(s string, length uintptr) string
- func AvXIfNull(p, x int)
- func AvutilConfiguration() string
- func AvutilLicense() string
- func AvutilVersion() uint
- func ErrorFromCode(code int) error
- func FrameData(frame *AvFrame) (data [8]*uint8)
- func FrameLinesize(frame *AvFrame) (linesize [8]int32)
- func GetPicture(frame *AvFrame) (img *image.YCbCr, err error)
- func GetPictureRGB(frame *AvFrame) (img *image.RGBA, err error)
- type AvBuffer
- type AvBufferPool
- type AvBufferRef
- type AvDictionary
- func (d *AvDictionary) AvDictCopy(src *AvDictionary, flags int) int
- func (d *AvDictionary) AvDictCount() int
- func (d *AvDictionary) AvDictFree()
- func (d *AvDictionary) AvDictGet(key string, prev *AvDictionaryEntry, flags int) *AvDictionaryEntry
- func (d *AvDictionary) AvDictGetString(keyValSep, pairsSep byte) (ret int, buf string)
- func (d *AvDictionary) AvDictParseString(str, keyValSep, pairsSep string, flags int) int
- func (d *AvDictionary) AvDictSet(key, value string, flags int) int
- func (d *AvDictionary) AvDictSetInt(key string, value int64, flags int) int
- type AvDictionaryEntry
- type AvFrame
- func (frame *AvFrame) BestEffortTimestamp() int64
- func (frame *AvFrame) Data() **uint8
- func (frame *AvFrame) GetInfo() (width int, height int, linesize [8]int32, data [8]*uint8)
- func (frame *AvFrame) Linesize() *int32
- func (frame *AvFrame) Metadata() *AvDictionary
- func (frame *AvFrame) Pts() int64
- func (frame *AvFrame) SetInfo(width int, height int, pixFmt int) (err error)
- func (frame *AvFrame) SetPts(pts int64)
- type AvFrameSideData
- type AvFrameSideDataType
- type AvMediaType
- type AvOptions
- type AvPictureType
- type AvPixelFormat
- type AvRational
- type AvRounding
- type AvTree
- type File
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
const ( AvmediaTypeUnknown = C.AVMEDIA_TYPE_UNKNOWN AvmediaTypeVideo = C.AVMEDIA_TYPE_VIDEO AvmediaTypeAudio = C.AVMEDIA_TYPE_AUDIO AvmediaTypeData = C.AVMEDIA_TYPE_DATA AvmediaTypeSubtitle = C.AVMEDIA_TYPE_SUBTITLE AvmediaTypeAttachment = C.AVMEDIA_TYPE_ATTACHMENT AvmediaTypeNb = C.AVMEDIA_TYPE_NB )
AVMEDIA_TYPE_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 ¶
func AvDynarray2Add(tabPtr *unsafe.Pointer, nbPtr *int, elemSize uintptr, elemData uint8) unsafe.Pointer
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(frame *AvFrame)
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 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(dst, src *AvFrame)
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(frame *AvFrame)
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 ¶
func AvGetMediaTypeString(typ AvMediaType) string
AvGetMediaTypeString Return a string describing the media_type enum, NULL if media_type is unknown.
func AvGetPictureTypeChar ¶
func AvGetPictureTypeChar(typ AvPictureType) string
AvGetPictureTypeChar Return a single letter to describe the given picture type pict_type.
func AvImageFillArrays ¶
func AvImageFillArrays(dstData **uint8, dstLine *int32, src *uint8, pixFmt AvPixelFormat, 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 AvPixelFormat, 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(max 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 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 FrameLinesize ¶ added in v1.1.2
FrameLinesize Return linesize
func GetPicture ¶
GetPicture creates a YCbCr image from the frame
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(frame *AvFrame, plane int) *AvBufferRef
AvFrameGetPlaneBuffer Get the buffer reference a given data plane is stored in.
type AvDictionary ¶ added in v1.1.2
type AvDictionary C.struct_AVDictionary
func (*AvDictionary) AvDictCopy ¶ added in v1.1.2
func (d *AvDictionary) AvDictCopy(src *AvDictionary, flags int) int
AvDictCopy Copy entries from one AvDictionary struct into another.
func (*AvDictionary) AvDictCount ¶ added in v1.1.2
func (d *AvDictionary) AvDictCount() int
AvDictCount Get number of entries in dictionary.
func (*AvDictionary) AvDictFree ¶ added in v1.1.2
func (d *AvDictionary) AvDictFree()
AvDictFree Free all the memory allocated for an AvDictionary struct and all keys and values.
func (*AvDictionary) AvDictGet ¶ added in v1.1.2
func (d *AvDictionary) AvDictGet(key string, prev *AvDictionaryEntry, flags int) *AvDictionaryEntry
AvDictGet Get a dictionary entry with matching key.
func (*AvDictionary) AvDictGetString ¶ added in v1.1.2
func (d *AvDictionary) AvDictGetString(keyValSep, pairsSep byte) (ret int, buf string)
AvDictGetString Get dictionary entries as a string.
func (*AvDictionary) AvDictParseString ¶ added in v1.1.2
func (d *AvDictionary) AvDictParseString(str, keyValSep, pairsSep string, flags int) int
AvDictParseString Parse the key/value pairs list and add the parsed entries to a dictionary.
func (*AvDictionary) AvDictSet ¶ added in v1.1.2
func (d *AvDictionary) AvDictSet(key, value string, flags int) int
AvDictSet Set the given entry in *pm, overwriting an existing entry.
func (*AvDictionary) AvDictSetInt ¶ added in v1.1.2
func (d *AvDictionary) 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 AvDictionaryEntry ¶ added in v1.1.2
type AvDictionaryEntry C.struct_AVDictionaryEntry
func (*AvDictionaryEntry) Key ¶ added in v1.1.2
func (d *AvDictionaryEntry) Key() string
Key Return key
func (*AvDictionaryEntry) Value ¶ added in v1.1.2
func (d *AvDictionaryEntry) Value() string
Value Return value
type AvFrame ¶ added in v1.1.2
type AvFrame C.struct_AVFrame
func AvFrameAlloc ¶
func AvFrameAlloc() *AvFrame
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.
func (*AvFrame) BestEffortTimestamp ¶ added in v1.1.2
BestEffortTimestamp Return best_effort_timestamp
func (*AvFrame) Metadata ¶ added in v1.1.2
func (frame *AvFrame) Metadata() *AvDictionary
Metadata Return metadata
type AvFrameSideData ¶
type AvFrameSideData C.struct_AVFrameSideData
func AvFrameGetSideData ¶
func AvFrameGetSideData(frame *AvFrame, typ 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(frame *AvFrame, typ AvFrameSideDataType, size int) *AvFrameSideData
AvFrameNewSideData Add a new side data to a frame.
type AvFrameSideDataType ¶
type AvFrameSideDataType C.enum_AVFrameSideDataType
type AvMediaType ¶ added in v1.1.2
type AvMediaType C.enum_AVMediaType
type AvOptions ¶ added in v1.1.2
type AvOptions C.struct_AVOptions
type AvPictureType ¶
type AvPictureType C.enum_AVPictureType
type AvPixelFormat ¶ added in v1.1.2
type AvPixelFormat C.enum_AVPixelFormat
type AvRational ¶ added in v1.1.2
type AvRational C.struct_AVRational
func AvGetTimeBaseQ ¶
func AvGetTimeBaseQ() AvRational
AvGetTimeBaseQ Return the fractional representation of the internal time base.
type AvRounding ¶ added in v1.1.2
type AvRounding C.enum_AVRounding
type AvTree ¶
type AvTree C.struct_AVTree