avutil

package
v1.0.4-0...-72f9e0d Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2021 License: MIT Imports: 3 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

Index

Constants

View Source
const (
	AV_TIME_BASE   = C.AV_TIME_BASE
	AV_NOPTS_VALUE = C.AV_NOPTS_VALUE
)
View Source
const (
	AVMEDIA_TYPE_UNKNOWN    = C.AVMEDIA_TYPE_UNKNOWN
	AVMEDIA_TYPE_VIDEO      = C.AVMEDIA_TYPE_VIDEO
	AVMEDIA_TYPE_AUDIO      = C.AVMEDIA_TYPE_AUDIO
	AVMEDIA_TYPE_DATA       = C.AVMEDIA_TYPE_DATA
	AVMEDIA_TYPE_SUBTITLE   = C.AVMEDIA_TYPE_SUBTITLE
	AVMEDIA_TYPE_ATTACHMENT = C.AVMEDIA_TYPE_ATTACHMENT
	AVMEDIA_TYPE_NB         = C.AVMEDIA_TYPE_NB
)
View Source
const (
	AVERROR_EAGAIN = -(C.EAGAIN)
	AVERROR_EIO    = -(C.EIO)
	AVERROR_EOF    = C.AVERROR_EOF
	AVERROR_EPIPE  = -(C.EPIPE)
	AVERROR_EXIT   = C.AVERROR_EXIT
	AVERROR_ENOMEM = -(C.ENOMEM)
)
View Source
const (
	MAX_AVERROR_STR_LEN        = 255
	MAX_CHANNEL_LAYOUT_STR_LEN = 64
)
View Source
const (
	AV_PICTURE_TYPE_NONE = C.AV_PICTURE_TYPE_NONE
	AV_PICTURE_TYPE_I    = C.AV_PICTURE_TYPE_I
	AV_PICTURE_TYPE_B    = C.AV_PICTURE_TYPE_B
	AV_PICTURE_TYPE_P    = C.AV_PICTURE_TYPE_P
)
View Source
const (
	AV_CH_FRONT_LEFT                   = 0x00000001
	AV_CH_FRONT_RIGHT                  = 0x00000002
	AV_CH_FRONT_CENTER                 = 0x00000004
	AV_CH_LOW_FREQUENCY                = 0x00000008
	AV_CH_BACK_LEFT                    = 0x00000010
	AV_CH_BACK_RIGHT                   = 0x00000020
	AV_CH_FRONT_LEFT_OF_CENTER         = 0x00000040
	AV_CH_FRONT_RIGHT_OF_CENTER        = 0x00000080
	AV_CH_BACK_CENTER                  = 0x00000100
	AV_CH_SIDE_LEFT                    = 0x00000200
	AV_CH_SIDE_RIGHT                   = 0x00000400
	AV_CH_TOP_CENTER                   = 0x00000800
	AV_CH_TOP_FRONT_LEFT               = 0x00001000
	AV_CH_TOP_FRONT_CENTER             = 0x00002000
	AV_CH_TOP_FRONT_RIGHT              = 0x00004000
	AV_CH_TOP_BACK_LEFT                = 0x00008000
	AV_CH_TOP_BACK_CENTER              = 0x00010000
	AV_CH_TOP_BACK_RIGHT               = 0x00020000
	AV_CH_STEREO_LEFT                  = 0x20000000 ///< Stereo downmix.
	AV_CH_STEREO_RIGHT                 = 0x40000000 ///< See AV_CH_STEREO_LEFT.
	AV_CH_WIDE_LEFT             uint64 = 0x0000000080000000
	AV_CH_WIDE_RIGHT            uint64 = 0x0000000100000000
	AV_CH_SURROUND_DIRECT_LEFT  uint64 = 0x0000000200000000
	AV_CH_SURROUND_DIRECT_RIGHT uint64 = 0x0000000400000000
	AV_CH_LOW_FREQUENCY_2       uint64 = 0x0000000800000000
	AV_CH_LAYOUT_NATIVE         uint64 = 0x8000000000000000

	AV_CH_LAYOUT_MONO              = (AV_CH_FRONT_CENTER)
	AV_CH_LAYOUT_STEREO            = (AV_CH_FRONT_LEFT | AV_CH_FRONT_RIGHT)
	AV_CH_LAYOUT_2POINT1           = (AV_CH_LAYOUT_STEREO | AV_CH_LOW_FREQUENCY)
	AV_CH_LAYOUT_2_1               = (AV_CH_LAYOUT_STEREO | AV_CH_BACK_CENTER)
	AV_CH_LAYOUT_SURROUND          = (AV_CH_LAYOUT_STEREO | AV_CH_FRONT_CENTER)
	AV_CH_LAYOUT_3POINT1           = (AV_CH_LAYOUT_SURROUND | AV_CH_LOW_FREQUENCY)
	AV_CH_LAYOUT_4POINT0           = (AV_CH_LAYOUT_SURROUND | AV_CH_BACK_CENTER)
	AV_CH_LAYOUT_4POINT1           = (AV_CH_LAYOUT_4POINT0 | AV_CH_LOW_FREQUENCY)
	AV_CH_LAYOUT_2_2               = (AV_CH_LAYOUT_STEREO | AV_CH_SIDE_LEFT | AV_CH_SIDE_RIGHT)
	AV_CH_LAYOUT_QUAD              = (AV_CH_LAYOUT_STEREO | AV_CH_BACK_LEFT | AV_CH_BACK_RIGHT)
	AV_CH_LAYOUT_5POINT0           = (AV_CH_LAYOUT_SURROUND | AV_CH_SIDE_LEFT | AV_CH_SIDE_RIGHT)
	AV_CH_LAYOUT_5POINT1           = (AV_CH_LAYOUT_5POINT0 | AV_CH_LOW_FREQUENCY)
	AV_CH_LAYOUT_5POINT0_BACK      = (AV_CH_LAYOUT_SURROUND | AV_CH_BACK_LEFT | AV_CH_BACK_RIGHT)
	AV_CH_LAYOUT_5POINT1_BACK      = (AV_CH_LAYOUT_5POINT0_BACK | AV_CH_LOW_FREQUENCY)
	AV_CH_LAYOUT_6POINT0           = (AV_CH_LAYOUT_5POINT0 | AV_CH_BACK_CENTER)
	AV_CH_LAYOUT_6POINT0_FRONT     = (AV_CH_LAYOUT_2_2 | AV_CH_FRONT_LEFT_OF_CENTER | AV_CH_FRONT_RIGHT_OF_CENTER)
	AV_CH_LAYOUT_HEXAGONAL         = (AV_CH_LAYOUT_5POINT0_BACK | AV_CH_BACK_CENTER)
	AV_CH_LAYOUT_6POINT1           = (AV_CH_LAYOUT_5POINT1 | AV_CH_BACK_CENTER)
	AV_CH_LAYOUT_6POINT1_BACK      = (AV_CH_LAYOUT_5POINT1_BACK | AV_CH_BACK_CENTER)
	AV_CH_LAYOUT_6POINT1_FRONT     = (AV_CH_LAYOUT_6POINT0_FRONT | AV_CH_LOW_FREQUENCY)
	AV_CH_LAYOUT_7POINT0           = (AV_CH_LAYOUT_5POINT0 | AV_CH_BACK_LEFT | AV_CH_BACK_RIGHT)
	AV_CH_LAYOUT_7POINT0_FRONT     = (AV_CH_LAYOUT_5POINT0 | AV_CH_FRONT_LEFT_OF_CENTER | AV_CH_FRONT_RIGHT_OF_CENTER)
	AV_CH_LAYOUT_7POINT1           = (AV_CH_LAYOUT_5POINT1 | AV_CH_BACK_LEFT | AV_CH_BACK_RIGHT)
	AV_CH_LAYOUT_7POINT1_WIDE      = (AV_CH_LAYOUT_5POINT1 | AV_CH_FRONT_LEFT_OF_CENTER | AV_CH_FRONT_RIGHT_OF_CENTER)
	AV_CH_LAYOUT_7POINT1_WIDE_BACK = (AV_CH_LAYOUT_5POINT1_BACK | AV_CH_FRONT_LEFT_OF_CENTER | AV_CH_FRONT_RIGHT_OF_CENTER)
	AV_CH_LAYOUT_OCTAGONAL         = (AV_CH_LAYOUT_5POINT0 | AV_CH_BACK_LEFT | AV_CH_BACK_CENTER | AV_CH_BACK_RIGHT)
	AV_CH_LAYOUT_HEXADECAGONAL     = (AV_CH_LAYOUT_OCTAGONAL | AV_CH_WIDE_LEFT | AV_CH_WIDE_RIGHT | AV_CH_TOP_BACK_LEFT | AV_CH_TOP_BACK_RIGHT | AV_CH_TOP_BACK_CENTER | AV_CH_TOP_FRONT_CENTER | AV_CH_TOP_FRONT_LEFT | AV_CH_TOP_FRONT_RIGHT)
	AV_CH_LAYOUT_STEREO_DOWNMIX    = (AV_CH_STEREO_LEFT | AV_CH_STEREO_RIGHT)
)
View Source
const (
	AV_LOG_QUIET   = C.AV_LOG_QUIET
	AV_LOG_PANIC   = C.AV_LOG_PANIC
	AV_LOG_FATAL   = C.AV_LOG_FATAL
	AV_LOG_ERROR   = C.AV_LOG_ERROR
	AV_LOG_WARNING = C.AV_LOG_WARNING
	AV_LOG_INFO    = C.AV_LOG_INFO
	AV_LOG_VERBOSE = C.AV_LOG_VERBOSE
	AV_LOG_DEBUG   = C.AV_LOG_DEBUG
)

Logging constants

View Source
const (
	AV_ROUND_NEAR_INF    = C.AV_ROUND_NEAR_INF
	AV_ROUND_PASS_MINMAX = C.AV_ROUND_PASS_MINMAX
)
View Source
const (
	AV_PIX_FMT_BGR24    = C.AV_PIX_FMT_BGR24
	AV_PIX_FMT_NONE     = C.AV_PIX_FMT_NONE
	AV_PIX_FMT_RGB24    = C.AV_PIX_FMT_RGB24
	AV_PIX_FMT_RGBA     = C.AV_PIX_FMT_RGBA
	AV_PIX_FMT_YUV420P  = C.AV_PIX_FMT_YUV420P
	AV_PIX_FMT_YUVJ420P = C.AV_PIX_FMT_YUVJ420P
)
View Source
const (
	AV_SAMPLE_FMT_NONE = int(C.AV_SAMPLE_FMT_NONE)
	AV_SAMPLE_FMT_U8   = int(C.AV_SAMPLE_FMT_U8)
	AV_SAMPLE_FMT_S16  = int(C.AV_SAMPLE_FMT_S16)
	AV_SAMPLE_FMT_S32  = int(C.AV_SAMPLE_FMT_S32)
	AV_SAMPLE_FMT_FLT  = int(C.AV_SAMPLE_FMT_FLT)
	AV_SAMPLE_FMT_DBL  = int(C.AV_SAMPLE_FMT_DBL)

	AV_SAMPLE_FMT_U8P  = int(C.AV_SAMPLE_FMT_U8P)
	AV_SAMPLE_FMT_S16P = int(C.AV_SAMPLE_FMT_S16P)
	AV_SAMPLE_FMT_S32P = int(C.AV_SAMPLE_FMT_S32P)
	AV_SAMPLE_FMT_FLTP = int(C.AV_SAMPLE_FMT_FLTP)
	AV_SAMPLE_FMT_DBLP = int(C.AV_SAMPLE_FMT_DBLP)
	AV_SAMPLE_FMT_S64  = int(C.AV_SAMPLE_FMT_S64)
	AV_SAMPLE_FMT_S64P = int(C.AV_SAMPLE_FMT_S64P)

	AV_SAMPLE_FMT_NB = int(C.AV_SAMPLE_FMT_NB)
)

Variables

This section is empty.

Functions

func AV_RL32

func AV_RL32(i *uint8, offset uint) uint32

func AvAllocateImageBuffer

func AvAllocateImageBuffer(size int) []uint8

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 AvDictFree

func AvDictFree(d **Dictionary)

func AvDictParseString

func AvDictParseString(d **Dictionary, i, keyValSep, pairsSep string, flags int) int

func AvDictSet

func AvDictSet(d **Dictionary, key, value string, flags int) int

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 AvFrameGetBestEffortTimestamp

func AvFrameGetBestEffortTimestamp(f *Frame) int64

func AvFrameGetBuffer

func AvFrameGetBuffer(f *Frame, a int) int

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

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 AvFreeImageBuffer

func AvFreeImageBuffer(buffer []uint8)

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 AvGetChannelLayoutNbChannels

func AvGetChannelLayoutNbChannels(channelLayout uint64) int

func AvGetChannelLayoutString

func AvGetChannelLayoutString(channelLayout uint64) string

func AvGetDefaultChannelLayout

func AvGetDefaultChannelLayout(nb_channels int) uint64

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 AvGetSampleFmtName

func AvGetSampleFmtName(sampleFmt int) string

func AvGetTimeRelative

func AvGetTimeRelative() int64

func AvImageAlloc

func AvImageAlloc(pointers [8]*uint8, linesizes [8]int32, w, h int, pix_fmt PixelFormat, align int) int

Allocate an image with size w and h and pixel format pix_fmt, and fill pointers and linesizes accordingly.

The allocated image buffer has to be freed by using AvFreeP(&pointers[0]).

func AvImageFillArrays

func AvImageFillArrays(dstData [8]*uint8, dstLinesize [8]int32, src []uint8,
	pixFmt PixelFormat, width, height, align int) int

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

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

Compute the length of an integer list.

func AvLogGetLevel

func AvLogGetLevel() int

AvLogGetLevel returns the current log level.

func AvLogSetLevel

func AvLogSetLevel(level int)

AvLogSetLevel sets the log level.

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 AvRescaleQ

func AvRescaleQ(a int64, bq Rational, cq Rational) int64

func AvRescaleQRnd

func AvRescaleQRnd(a int64, bq Rational, cq Rational, flags uint32) int64

func AvSamplesAllocArrayAndSamples

func AvSamplesAllocArrayAndSamples(nbChannels, nbSamples int, sampleFmt int, align int) (ret int, audioData **uint8, linesize int)

func AvSamplesFreeArrayAndSamples

func AvSamplesFreeArrayAndSamples(audioData **uint8)

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 AvStrerr

func AvStrerr(errcode int) string

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 PointerToUint16Slice

func PointerToUint16Slice(p unsafe.Pointer, size int) []uint16

func PointerToUint32Slice

func PointerToUint32Slice(p unsafe.Pointer, size int) []uint32

func PointerToUint8Slice

func PointerToUint8Slice(p unsafe.Pointer, size int) []uint8

Types

type AvAudioFifo

type AvAudioFifo C.struct_AVAudioFifo

func AvAudioFifoAlloc

func AvAudioFifoAlloc(sampleFmt AvSampleFormat, channels, nbSamples int) *AvAudioFifo

func (*AvAudioFifo) AvAudioFifoFree

func (af *AvAudioFifo) AvAudioFifoFree()

func (*AvAudioFifo) AvAudioFifoRead

func (af *AvAudioFifo) AvAudioFifoRead(data **uint8, nbSamples int) int

func (*AvAudioFifo) AvAudioFifoRealloc

func (af *AvAudioFifo) AvAudioFifoRealloc(nbSamples int) int

func (*AvAudioFifo) AvAudioFifoSize

func (af *AvAudioFifo) AvAudioFifoSize() int

func (*AvAudioFifo) AvAudioFifoWrite

func (af *AvAudioFifo) AvAudioFifoWrite(data **uint8, nbSamples int) int

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 AvSampleFormat

type AvSampleFormat C.enum_AVSampleFormat

type AvTree

type AvTree C.struct_AVTree

type Dictionary

type Dictionary C.struct_AVDictionary

type DictionaryEntry

type DictionaryEntry C.struct_AVDictionaryEntry

func AvDictGet

func AvDictGet(d *Dictionary, key string, prev *DictionaryEntry, flags int) *DictionaryEntry

func (*DictionaryEntry) Key

func (e *DictionaryEntry) Key() string

func (*DictionaryEntry) Value

func (e *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.

func (*Frame) Data

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

func (*Frame) ExtendedData

func (f *Frame) ExtendedData() **uint8

func (*Frame) Format

func (f *Frame) Format() int

func (*Frame) GetDataP

func (f *Frame) GetDataP() **uint8

func (*Frame) Height

func (f *Frame) Height() int

func (*Frame) Linesize

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

func (*Frame) NbSamples

func (f *Frame) NbSamples() int

func (*Frame) PktDts

func (f *Frame) PktDts() int64

func (*Frame) PktPts

func (f *Frame) PktPts() int64

func (*Frame) Pts

func (f *Frame) Pts() int64

func (*Frame) SampleRate

func (f *Frame) SampleRate() int

func (*Frame) SetChannelLayout

func (f *Frame) SetChannelLayout(l uint64)

func (*Frame) SetFormat

func (f *Frame) SetFormat(fmt int)

func (*Frame) SetHeight

func (f *Frame) SetHeight(h int)

func (*Frame) SetKeyFrame

func (f *Frame) SetKeyFrame(k int)

func (*Frame) SetNbSamples

func (f *Frame) SetNbSamples(n int)

func (*Frame) SetPictType

func (f *Frame) SetPictType(t AvPictureType)

func (*Frame) SetPts

func (f *Frame) SetPts(i int64)

func (*Frame) SetSampleRate

func (f *Frame) SetSampleRate(r int)

func (*Frame) SetWidth

func (f *Frame) SetWidth(w int)

func (*Frame) Width

func (f *Frame) Width() int

type MediaType

type MediaType C.enum_AVMediaType

func MediaTypeFromString

func MediaTypeFromString(i string) MediaType

MediaTypeFromString returns a media type from a string

type Options

type Options C.struct_AVOptions

type PixelFormat

type PixelFormat C.enum_AVPixelFormat

func PixelFormatFromString

func PixelFormatFromString(i string) PixelFormat

PixelFormatFromString returns a pixel format from a string

type Rational

type Rational C.struct_AVRational
var AV_TIME_BASE_Q Rational = NewRational(1, AV_TIME_BASE)

func AvGetTimeBaseQ

func AvGetTimeBaseQ() Rational

Return the fractional representation of the internal time base.

func NewRational

func NewRational(num, den int) Rational

func (Rational) Den

func (r Rational) Den() int

func (Rational) Num

func (r Rational) Num() int

func (*Rational) SetDen

func (r *Rational) SetDen(den int)

func (*Rational) SetNum

func (r *Rational) SetNum(num int)

func (Rational) ToDouble

func (r Rational) ToDouble() float64

Jump to

Keyboard shortcuts

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