libavutil

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2020 License: MIT Imports: 6 Imported by: 7

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

View Source
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

View Source
const (
	AvErrorEOF    = -('E' | ('O' << 8) | ('F' << 16) | (' ' << 24))
	AvErrorEAGAIN = -11
)

error code

View Source
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

func AvCalloc(n, s uintptr) unsafe.Pointer

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(t *unsafe.Pointer, n *int, e uintptr, d uint8) unsafe.Pointer

AvDynarray2Add Add an element of size elem_size to a dynamic array.

func AvDynarrayAdd

func AvDynarrayAdd(t unsafe.Pointer, n *int, e unsafe.Pointer)

AvDynarrayAdd Add an element to a dynamic array.

func AvDynarrayAddNofree

func AvDynarrayAddNofree(p unsafe.Pointer, n *int, e unsafe.Pointer) int

AvDynarrayAddNofree Add an element to a dynamic array.

func AvFastMalloc

func AvFastMalloc(p unsafe.Pointer, s *uint, m uintptr)

AvFastMalloc Allocate a buffer, reusing the given one if large enough.

func AvFastRealloc

func AvFastRealloc(p unsafe.Pointer, s *uint, m uintptr) unsafe.Pointer

AvFastRealloc Reallocate the given block if it is not large enough, otherwise do nothing.

func AvFrameCopyProps

func AvFrameCopyProps(d, s *Frame) int

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

func AvFrameGetBuffer(f *Frame, a int) int

AvFrameGetBuffer Allocate new buffer(s) for audio or video data.

func AvFrameGetInfo

func AvFrameGetInfo(f *Frame) (width int, height int, linesize [8]int32, data [8]*uint8)

AvFrameGetInfo Return frame info.

func AvFrameIsWritable

func AvFrameIsWritable(f *Frame) int

AvFrameIsWritable Check if the frame data is writable.

func AvFrameMakeWritable

func AvFrameMakeWritable(f *Frame) int

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

func AvFrameRef(d, s *Frame) int

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

func AvFree(p unsafe.Pointer)

AvFree Free a memory block which has been allocated with av_malloc(z)() or av_realloc().

func AvFreep

func AvFreep(p unsafe.Pointer)

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(mt MediaType) string

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

func AvIntListLengthForSize(e uint, l int, t uint64) uint

AvIntListLengthForSize Compute the length of an integer list.

func AvLogGetLevel

func AvLogGetLevel() int

AvLogGetLevel Get the current log level

func AvLogSetLevel

func AvLogSetLevel(level int)

AvLogSetLevel Set the log level

func AvMalloc

func AvMalloc(s uintptr) unsafe.Pointer

AvMalloc Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if available on the CPU).

func AvMallocArray

func AvMallocArray(n, s uintptr) unsafe.Pointer

AvMallocArray Allocate a memory block for an array with av_malloc().

func AvMallocz

func AvMallocz(s uintptr) unsafe.Pointer

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 AvMalloczArray(n, s uintptr) unsafe.Pointer

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

func AvMemcpyBackptr(d *uintptr, b, c int)

AvMemcpyBackptr deliberately overlapping memcpy implementation

func AvMemdup

func AvMemdup(p *int, s uintptr) unsafe.Pointer

AvMemdup Duplicate the buffer p.

func AvRealloc

func AvRealloc(p *int, s uintptr) unsafe.Pointer

AvRealloc Allocate or reallocate a block of memory.

func AvReallocArray

func AvReallocArray(p int, n, s uintptr) unsafe.Pointer

AvReallocArray Allocate, reallocate, or free an array.

func AvReallocF

func AvReallocF(p int, n, e uintptr) unsafe.Pointer

AvReallocF Allocate or reallocate a block of memory.

func AvReallocp

func AvReallocp(p int, s uintptr) int

AvReallocp Allocate or reallocate a block of memory.

func AvReallocpArray

func AvReallocpArray(p int, n, s uintptr) int

AvReallocpArray Allocate, reallocate, or free an array through a pointer to a pointer.

func AvSetFrame

func AvSetFrame(f *Frame, w int, h int, pixFmt int) (err error)

AvSetFrame Allocate new buffer(s) for audio or video data.

func AvSizeMult

func AvSizeMult(a, b uintptr, r *uintptr) int

AvSizeMult Multiply two size_t values checking for overflow.

func AvStrdup

func AvStrdup(s string) string

AvStrdup Duplicate the string s.

func AvStrndup

func AvStrndup(s string, l uintptr) string

AvStrndup Duplicate a substring of the string s.

func AvXIfNull

func AvXIfNull(p, x int)

AvXIfNull Return x default pointer in case p is NULL.

func AvutilConfiguration

func AvutilConfiguration() string

AvutilConfiguration Return the libavutil build-time configuration.

func AvutilLicense

func AvutilLicense() string

AvutilLicense Return the libavutil license.

func AvutilVersion

func AvutilVersion() uint

AvutilVersion Return the LIBAvUTIL_VERSION_INT constant.

func Data

func Data(f *Frame) (data [8]*uint8)

Data return data

func ErrorFromCode

func ErrorFromCode(code int) error

ErrorFromCode Wrap erro code

func GetBestEffortTimestamp

func GetBestEffortTimestamp(f *Frame) int64

GetBestEffortTimestamp Return best_effort_timestamp

func GetPicture

func GetPicture(f *Frame) (img *image.YCbCr, err error)

GetPicture creates a YCbCr image from the frame

func GetPictureRGB

func GetPictureRGB(f *Frame) (img *image.RGBA, err error)

GetPictureRGB ...

func Linesize

func Linesize(f *Frame) (linesize [8]int32)

Linesize Return linesize

func SetPicture

func SetPicture(f *Frame, img *image.YCbCr)

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

func (*DictionaryEntry) Key

func (d *DictionaryEntry) Key() string

Key Return key

func (*DictionaryEntry) Value

func (d *DictionaryEntry) Value() string

Value Return value

type File

type File C.FILE

func AvFopenUtf8

func AvFopenUtf8(p, m string) *File

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

func AvFrameClone(f *Frame) *Frame

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.

Jump to

Keyboard shortcuts

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