libavutil

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 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

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

func AvCalloc(nmemb, size 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(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

func AvDynarrayAdd(tabPtr unsafe.Pointer, nbPtr *int, elem unsafe.Pointer)

AvDynarrayAdd Add an element to a dynamic array.

func AvDynarrayAddNofree

func AvDynarrayAddNofree(tabPtr unsafe.Pointer, nbPtr *int, elem unsafe.Pointer) int

AvDynarrayAddNofree Add an element to a dynamic array.

func AvFastMalloc

func AvFastMalloc(ptr unsafe.Pointer, size *uint, minSize uintptr)

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

func AvFastRealloc

func AvFastRealloc(ptr unsafe.Pointer, size *uint, minSize uintptr) unsafe.Pointer

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

func AvFrameCopyProps

func AvFrameCopyProps(dst, src *AvFrame) int

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

func AvFrameGetBuffer(frame *AvFrame, align int) int

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

func AvFrameIsWritable

func AvFrameIsWritable(frame *AvFrame) int

AvFrameIsWritable Check if the frame data is writable.

func AvFrameMakeWritable

func AvFrameMakeWritable(frame *AvFrame) int

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

func AvFrameRef(dst, src *AvFrame) int

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

func AvFree(ptr unsafe.Pointer)

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

func AvFreep

func AvFreep(ptr 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(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

func AvIntListLengthForSize(elsize uint, list int, term 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(size 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(nmemb, size uintptr) unsafe.Pointer

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

func AvMallocz

func AvMallocz(size 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(nmemb, size uintptr) unsafe.Pointer

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

func AvMemcpyBackptr(dst *uintptr, back, cnt int)

AvMemcpyBackptr deliberately overlapping memcpy implementation

func AvMemdup

func AvMemdup(ptr *int, size uintptr) unsafe.Pointer

AvMemdup Duplicate the buffer ptr.

func AvRealloc

func AvRealloc(ptr *int, size uintptr) unsafe.Pointer

AvRealloc Allocate or reallocate a block of memory.

func AvReallocArray

func AvReallocArray(ptr int, nmemb, size uintptr) unsafe.Pointer

AvReallocArray Allocate, reallocate, or free an array.

func AvReallocF

func AvReallocF(ptr int, nelem, elsize uintptr) unsafe.Pointer

AvReallocF Allocate or reallocate a block of memory.

func AvReallocp

func AvReallocp(ptr int, size uintptr) int

AvReallocp Allocate or reallocate a block of memory.

func AvReallocpArray

func AvReallocpArray(ptr int, nmemb, size uintptr) int

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

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 size.

func AvStrndup

func AvStrndup(s string, length uintptr) string

AvStrndup Duplicate a substring of the string size.

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 ErrorFromCode

func ErrorFromCode(code int) error

ErrorFromCode Wrap erro code

func FrameData added in v1.1.2

func FrameData(frame *AvFrame) (data [8]*uint8)

FrameData return data

func FrameLinesize added in v1.1.2

func FrameLinesize(frame *AvFrame) (linesize [8]int32)

FrameLinesize Return linesize

func GetPicture

func GetPicture(frame *AvFrame) (img *image.YCbCr, err error)

GetPicture creates a YCbCr image from the frame

func GetPictureRGB

func GetPictureRGB(frame *AvFrame) (img *image.RGBA, err error)

GetPictureRGB ...

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

func AvFrameClone(src *AvFrame) *AvFrame

AvFrameClone Create a new frame that references the same data as src.

func (*AvFrame) BestEffortTimestamp added in v1.1.2

func (frame *AvFrame) BestEffortTimestamp() int64

BestEffortTimestamp Return best_effort_timestamp

func (*AvFrame) Data added in v1.1.2

func (frame *AvFrame) Data() **uint8

Data Return data

func (*AvFrame) GetInfo added in v1.1.2

func (frame *AvFrame) GetInfo() (width int, height int, linesize [8]int32, data [8]*uint8)

GetInfo Return frame info.

func (*AvFrame) Linesize added in v1.1.2

func (frame *AvFrame) Linesize() *int32

Linesize Return linesize

func (*AvFrame) Metadata added in v1.1.2

func (frame *AvFrame) Metadata() *AvDictionary

Metadata Return metadata

func (*AvFrame) Pts added in v1.1.2

func (frame *AvFrame) Pts() int64

Pts Return Pts

func (*AvFrame) SetInfo added in v1.1.2

func (frame *AvFrame) SetInfo(width int, height int, pixFmt int) (err error)

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

func (*AvFrame) SetPts added in v1.1.2

func (frame *AvFrame) SetPts(pts int64)

SetPts Set Pts

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

type File

type File C.FILE

func AvFopenUtf8

func AvFopenUtf8(path, mode string) *File

AvFopenUtf8 Open a file using a UTF-8 filename.

Jump to

Keyboard shortcuts

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