avutil

package
v0.1.1-0...-89bbb74 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2020 License: MIT Imports: 7 Imported by: 0

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

View Source
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)
)
View Source
const (
	AvErrorEOF    = -('E' | ('O' << 8) | ('F' << 16) | (' ' << 24))
	AvErrorEAGAIN = -35
)
View Source
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

func AvCalloc(n, s uintptr) unsafe.Pointer

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

Add an element of size elem_size to a dynamic array.

func AvDynarrayAdd

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

Add an element to a dynamic array.

func AvDynarrayAddNofree

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

Add an element to a dynamic array.

func AvFastMalloc

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

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

func AvFastRealloc

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

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

func AvFrameCopyProps

func AvFrameCopyProps(d, s *Frame) int

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

func AvFrameGetBuffer(f *Frame, a int) int

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)

func AvFrameGetQpTable

func AvFrameGetQpTable(f *Frame, s, t *int) int8

func AvFrameIsWritable

func AvFrameIsWritable(f *Frame) int

Check if the frame data is writable.

func AvFrameMakeWritable

func AvFrameMakeWritable(f *Frame) int

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

func AvFrameRef(d, s *Frame) int

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 AvFree

func AvFree(p unsafe.Pointer)

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

func AvFreep

func AvFreep(p unsafe.Pointer)

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

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

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

Compute the length of an integer list.

func AvLogGetLevel

func AvLogGetLevel() int

func AvLogSetLevel

func AvLogSetLevel(level int)

func AvMalloc

func AvMalloc(s uintptr) unsafe.Pointer

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

func AvMallocz

func AvMallocz(s uintptr) unsafe.Pointer

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

func AvMaxAlloc

func AvMaxAlloc(m uintptr)

Set the maximum size that may me allocated in one block.

func AvMemcpyBackptr

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

deliberately overlapping memcpy implementation

func AvMemdup

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

Duplicate the buffer p.

func AvRealloc

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

Allocate or reallocate a block of memory.

func AvReallocArray

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

func AvReallocF

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

Allocate or reallocate a block of memory.

func AvReallocp

func AvReallocp(p int, s uintptr) int

Allocate or reallocate a block of memory.

func AvReallocpArray

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

func AvSetFrame

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

func AvSizeMult

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

Multiply two size_t values checking for overflow.

func AvStrdup

func AvStrdup(s string) string

Duplicate the string s.

func AvStrndup

func AvStrndup(s string, l uintptr) string

char * av_strndup (const char *s, size_t len) av_malloc_attrib Duplicate a substring of the string s.

func AvXIfNull

func AvXIfNull(p, x int)

Return x default pointer in case p is NULL.

func AvutilConfiguration

func AvutilConfiguration() string

Return the libavutil build-time configuration.

func AvutilLicense

func AvutilLicense() string

Return the libavutil license.

func AvutilVersion

func AvutilVersion() uint

Return the LIBAvUTIL_VERSION_INT constant.

func Data

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

func ErrorFromCode

func ErrorFromCode(code int) error

func GetBestEffortTimestamp

func GetBestEffortTimestamp(f *Frame) int64

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)

func GetPictureRGBA

func GetPictureRGBA(f *Frame, width, height int) (img *image.RGBA)

func GetPictureWithSizes

func GetPictureWithSizes(f *Frame, w, h int) (img *image.YCbCr, err error)

func Linesize

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

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

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) AvDictSet

func (d *Dictionary) AvDictSet(key, value 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 File

type File C.FILE

func AvFopenUtf8

func AvFopenUtf8(p, m string) *File

Open a file using a UTF-8 filename.

type Frame

type Frame C.struct_AVFrame

func AvFrameAlloc

func AvFrameAlloc() *Frame

Allocate an Frame and set its fields to default values.

func AvFrameClone

func AvFrameClone(f *Frame) *Frame

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.

Jump to

Keyboard shortcuts

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