ffmpeg

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrEOF         = avError(averrorEOF)
	ErrEAGAIN      = avError(averrorEAGAIN)
	ErrInvalidData = avError(averrorInvalidData)
)

Sentinel errors for common AVERROR codes.

Functions

func AvioClosep

func AvioClosep(s unsafe.Pointer) int32

AvioClosep Close the resource accessed by the AVIOContext *s, free it and set the pointer pointing to it to NULL. This function can only be used if s was opened by avio_open(). The internal buffer is automatically flushed before closing the resource. /

func AvioOpen

func AvioOpen(s unsafe.Pointer, uRL string, flags int32) int32

AvioOpen Create and initialize a AVIOContext for accessing the resource indicated by url. read+write mode, the AVIOContext can be used only for writing. In case of failure the pointed to value is set to NULL. is to be opened AVERROR code in case of failure /

func AvutilVersion

func AvutilVersion() uint32

AvutilVersion Return the LIBAVUTIL_VERSION_INT constant. /

func CodecAllocContext3

func CodecAllocContext3(codec unsafe.Pointer) unsafe.Pointer

CodecAllocContext3 Allocate an AVCodecContext and set its fields to default values. The resulting struct should be freed with avcodec_free_context(). for the given codec. It is illegal to then call avcodec_open2() with a different codec. If NULL, then the codec-specific defaults won't be initialized, which may result in suboptimal default settings (this is important mainly for encoders, e.g. libx264). /

func CodecFindDecoder

func CodecFindDecoder(iD int32) unsafe.Pointer

CodecFindDecoder Find a registered decoder with a matching codec ID. /

func CodecFindDecoderByName

func CodecFindDecoderByName(name string) unsafe.Pointer

CodecFindDecoderByName Find a registered decoder with the specified name. /

func CodecFindEncoder

func CodecFindEncoder(iD int32) unsafe.Pointer

CodecFindEncoder Find a registered encoder with a matching codec ID. /

func CodecFindEncoderByName

func CodecFindEncoderByName(name string) unsafe.Pointer

CodecFindEncoderByName Find a registered encoder with the specified name. /

func CodecFlushBuffers

func CodecFlushBuffers(avctx unsafe.Pointer)

func CodecFreeContext

func CodecFreeContext(avctx unsafe.Pointer)

func CodecIsOpen

func CodecIsOpen(s unsafe.Pointer) int32

CodecIsOpen 0 otherwise. /

func CodecOpen2

func CodecOpen2(avctx unsafe.Pointer, codec unsafe.Pointer, options unsafe.Pointer) int32

func CodecParametersFromContext

func CodecParametersFromContext(par unsafe.Pointer, codec unsafe.Pointer) int32

CodecParametersFromContext Fill the parameters struct based on the values from the supplied codec context. Any allocated fields in par are freed and replaced with duplicates of the corresponding fields in codec. /

func CodecParametersToContext

func CodecParametersToContext(codec unsafe.Pointer, par unsafe.Pointer) int32

CodecParametersToContext Fill the codec context based on the values from the supplied codec parameters. Any allocated fields in codec that have a corresponding field in par are freed and replaced with duplicates of the corresponding field in par. Fields in codec that do not have a counterpart in par are not touched. /

func CodecReceiveFrame

func CodecReceiveFrame(avctx unsafe.Pointer, frame unsafe.Pointer) int32

func CodecReceivePacket

func CodecReceivePacket(avctx unsafe.Pointer, avpkt unsafe.Pointer) int32

func CodecSendFrame

func CodecSendFrame(avctx unsafe.Pointer, frame unsafe.Pointer) int32

func CodecSendPacket

func CodecSendPacket(avctx unsafe.Pointer, avpkt unsafe.Pointer) int32

func DictCount

func DictCount(m unsafe.Pointer) int32

DictCount Get number of entries in dictionary. /

func DictFree

func DictFree(m unsafe.Pointer)

func DictGet

func DictGet(m unsafe.Pointer, key string, prev unsafe.Pointer, flags int32) unsafe.Pointer

func DictSet

func DictSet(pm unsafe.Pointer, key string, value string, flags int32) int32

func FindBestStream

func FindBestStream(ic unsafe.Pointer, type_ int32, wantedStreamNb int32, relatedStream int32, decoderRet unsafe.Pointer, flags int32) int32

FindBestStream Find the "best" stream in the file. The best stream is determined according to various heuristics as the most likely to be what the user expects. If the decoder parameter is non-NULL, av_find_best_stream will find the default decoder for the stream's codec; streams for which no decoder can be found are ignored. or -1 for automatic selection program) to this one, or -1 if none selected stream AVERROR_STREAM_NOT_FOUND if no stream with the requested type could be found, AVERROR_DECODER_NOT_FOUND if streams were found but no decoder NULL, then *decoder_ret is guaranteed to be set to a valid AVCodec. /

func FormatAllocContext

func FormatAllocContext() unsafe.Pointer

func FormatAllocOutputContext2

func FormatAllocOutputContext2(ctx unsafe.Pointer, oformat unsafe.Pointer, formatName string, filename string) int32

FormatAllocOutputContext2 Allocate an AVFormatContext for an output format. avformat_free_context() can be used to free the context and everything allocated by the framework within it. or to NULL in case of failure format_name and filename are used instead context, if NULL filename is used instead context, may be NULL failure /

func FormatCloseInput

func FormatCloseInput(s unsafe.Pointer)

func FormatFindStreamInfo

func FormatFindStreamInfo(ic unsafe.Pointer, options unsafe.Pointer) int32

func FormatFreeContext

func FormatFreeContext(s unsafe.Pointer)

func FormatNewStream

func FormatNewStream(s unsafe.Pointer, c unsafe.Pointer) unsafe.Pointer

func FormatOpenInput

func FormatOpenInput(ps unsafe.Pointer, uRL string, fmt unsafe.Pointer, options unsafe.Pointer) int32

func FormatVersion

func FormatVersion() uint32

FormatVersion Return the LIBAVFORMAT_VERSION_INT constant. /

func FormatWriteHeader

func FormatWriteHeader(s unsafe.Pointer, options unsafe.Pointer) int32

func FrameAlloc

func FrameAlloc() unsafe.Pointer

func FrameClone

func FrameClone(src unsafe.Pointer) unsafe.Pointer

FrameClone Create a new frame that references the same data as src. This is a shortcut for av_frame_alloc()+av_frame_ref(). /

func FrameFree

func FrameFree(frame unsafe.Pointer)

func FrameGetBuffer

func FrameGetBuffer(frame unsafe.Pointer, align int32) int32

func FrameIsWritable

func FrameIsWritable(frame unsafe.Pointer) int32

FrameIsWritable Check if the frame data is writable. only if each of the underlying buffers has only one reference, namely the one stored in this frame). Return 0 otherwise. If 1 is returned the answer is valid until av_buffer_ref() is called on any of the underlying AVBufferRefs (e.g. through av_frame_ref() or directly). /

func FrameMakeWritable

func FrameMakeWritable(frame unsafe.Pointer) int32

func FrameRef

func FrameRef(dst unsafe.Pointer, src unsafe.Pointer) int32

func FrameUnref

func FrameUnref(frame unsafe.Pointer)

func GetBytesPerSample

func GetBytesPerSample(sampleFmt int32) int32

GetBytesPerSample Return number of bytes per sample. sample format /

func GetSampleFmtName

func GetSampleFmtName(sampleFmt int32) string

GetSampleFmtName Return the name of sample_fmt, or NULL if sample_fmt is not recognized. /

func ImageGetBufferSize

func ImageGetBufferSize(pixFmt int32, width int32, height int32, align int32) int32

ImageGetBufferSize Return the size in bytes of the amount of data required to store an image with the given parameters. /

func Init

func Init(opts ...Option) error

Init loads all FFmpeg shared libraries and registers symbols. Must be called before using any FFmpeg functions. If loading fails, the error is cached and returned on every subsequent call.

func InterleavedWriteFrame

func InterleavedWriteFrame(s unsafe.Pointer, pkt unsafe.Pointer) int32

func LogGetLevel

func LogGetLevel() int32

LogGetLevel Get the current log level /

func LogSetLevel

func LogSetLevel(level int32)

LogSetLevel Set the log level /

func PacketAlloc

func PacketAlloc() unsafe.Pointer

func PacketFree

func PacketFree(pkt unsafe.Pointer)

func PacketRef

func PacketRef(dst unsafe.Pointer, src unsafe.Pointer) int32

func PacketRescaleTs

func PacketRescaleTs(pkt unsafe.Pointer, tbSrc AVRational, tbDst AVRational)

PacketRescaleTs Convert valid timing fields (timestamps / durations) in a packet from one timebase to another. Timestamps with unknown values (AV_NOPTS_VALUE) will be ignored. expressed converted /

func PacketUnref

func PacketUnref(pkt unsafe.Pointer)

func ReadFrame

func ReadFrame(s unsafe.Pointer, pkt unsafe.Pointer) int32

func RescaleQ

func RescaleQ(a int64, bq AVRational, cq AVRational) int64

func RescaleQRnd

func RescaleQRnd(a int64, bq AVRational, cq AVRational, rnd int32) int64

func SampleFmtIsPlanar

func SampleFmtIsPlanar(sampleFmt int32) int32

SampleFmtIsPlanar Check if the sample format is planar. /

func Shutdown

func Shutdown()

Shutdown performs any global cleanup. Currently a no-op but reserved for future use (e.g., avformat_network_deinit).

func SwrAlloc

func SwrAlloc() unsafe.Pointer

func SwrConvert

func SwrConvert(s unsafe.Pointer, out unsafe.Pointer, outCount int32, in unsafe.Pointer, inCount int32) int32

func SwrFree

func SwrFree(s unsafe.Pointer)

func SwrInit

func SwrInit(s unsafe.Pointer) int32

func SwresampleVersion

func SwresampleVersion() uint32

SwresampleVersion Return the @ref LIBSWRESAMPLE_VERSION_INT constant. This is useful to check if the build-time libswresample has the same version as the run-time one. /

func SwsFreeContext

func SwsFreeContext(swscontext unsafe.Pointer)

SwsFreeContext Free the swscaler context swsContext. If swsContext is NULL, then does nothing. /

func SwsGetContext

func SwsGetContext(srcw int32, srch int32, srcformat int32, dstw int32, dsth int32, dstformat int32, flags int32, srcfilter unsafe.Pointer, dstfilter unsafe.Pointer, param unsafe.Pointer) unsafe.Pointer

SwsGetContext Allocate and return an SwsContext. You need it to perform scaling/conversion operations using sws_scale(). For SWS_BICUBIC param[0] and [1] tune the shape of the basis function, param[0] tunes f(1) and param[1] f´(1) For SWS_GAUSS param[0] tunes the exponent and thus cutoff frequency For SWS_LANCZOS param[0] tunes the width of the window function written /

func SwsScale

func SwsScale(c unsafe.Pointer, srcslice unsafe.Pointer, srcstride int32, srcslicey int32, srcsliceh int32, dst unsafe.Pointer, dststride int32) int32

func SwscaleVersion

func SwscaleVersion() uint32

SwscaleVersion Color conversion and scaling library. Return the LIBSWSCALE_VERSION_INT constant. /

func WriteTrailer

func WriteTrailer(s unsafe.Pointer) int32

Types

type AVRational

type AVRational = raw.AVRational

AVRational represents a rational number (num/den), re-exported from raw. This is a value type used throughout FFmpeg for time bases, frame rates, etc.

type DictionaryEntry

type DictionaryEntry struct {
	// contains filtered or unexported fields
}

DictionaryEntry /

func (*DictionaryEntry) Key

func (w *DictionaryEntry) Key() *byte

func (*DictionaryEntry) Raw

func (w *DictionaryEntry) Raw() unsafe.Pointer

func (*DictionaryEntry) Value

func (w *DictionaryEntry) Value() *byte

type FrameSideDataType

type FrameSideDataType int32

FrameSideDataType AVFrame is an abstraction for reference-counted raw multimedia data. /

const (
	FrameSideDataTypeFrameDataPanscan                   FrameSideDataType = 0
	FrameSideDataTypeFrameDataA53Cc                     FrameSideDataType = 1
	FrameSideDataTypeFrameDataStereo3d                  FrameSideDataType = 2
	FrameSideDataTypeFrameDataMatrixencoding            FrameSideDataType = 3
	FrameSideDataTypeFrameDataDownmixInfo               FrameSideDataType = 4
	FrameSideDataTypeFrameDataReplaygain                FrameSideDataType = 5
	FrameSideDataTypeFrameDataDisplaymatrix             FrameSideDataType = 6
	FrameSideDataTypeFrameDataAfd                       FrameSideDataType = 7
	FrameSideDataTypeFrameDataMotionVectors             FrameSideDataType = 8
	FrameSideDataTypeFrameDataSkipSamples               FrameSideDataType = 9
	FrameSideDataTypeFrameDataAudioServiceType          FrameSideDataType = 10
	FrameSideDataTypeFrameDataMasteringDisplayMetadata  FrameSideDataType = 11
	FrameSideDataTypeFrameDataGopTimecode               FrameSideDataType = 12
	FrameSideDataTypeFrameDataSpherical                 FrameSideDataType = 13
	FrameSideDataTypeFrameDataContentLightLevel         FrameSideDataType = 14
	FrameSideDataTypeFrameDataIccProfile                FrameSideDataType = 15
	FrameSideDataTypeFrameDataS12mTimecode              FrameSideDataType = 16
	FrameSideDataTypeFrameDataDynamicHdrPlus            FrameSideDataType = 17
	FrameSideDataTypeFrameDataRegionsOfInterest         FrameSideDataType = 18
	FrameSideDataTypeFrameDataVideoEncParams            FrameSideDataType = 19
	FrameSideDataTypeFrameDataSeiUnregistered           FrameSideDataType = 20
	FrameSideDataTypeFrameDataFilmGrainParams           FrameSideDataType = 21
	FrameSideDataTypeFrameDataDetectionBboxes           FrameSideDataType = 22
	FrameSideDataTypeFrameDataDoviRpuBuffer             FrameSideDataType = 23
	FrameSideDataTypeFrameDataDoviMetadata              FrameSideDataType = 24
	FrameSideDataTypeFrameDataDynamicHdrVivid           FrameSideDataType = 25
	FrameSideDataTypeFrameDataAmbientViewingEnvironment FrameSideDataType = 26
	FrameSideDataTypeFrameDataVideoHint                 FrameSideDataType = 27
	FrameSideDataTypeFrameDataLcevc                     FrameSideDataType = 28
	FrameSideDataTypeFrameDataViewID                    FrameSideDataType = 29
	FrameSideDataTypeFrameData3dReferenceDisplays       FrameSideDataType = 30
	FrameSideDataTypeFrameDataExif                      FrameSideDataType = 31
)

type InputFormat

type InputFormat struct {
	// contains filtered or unexported fields
}

InputFormat /

func (*InputFormat) CodecTag

func (w *InputFormat) CodecTag() unsafe.Pointer

func (*InputFormat) Extensions

func (w *InputFormat) Extensions() *byte

func (*InputFormat) Flags

func (w *InputFormat) Flags() int32

func (*InputFormat) LongName

func (w *InputFormat) LongName() *byte

func (*InputFormat) MimeType

func (w *InputFormat) MimeType() *byte

func (*InputFormat) Name

func (w *InputFormat) Name() *byte

func (*InputFormat) PrivClass

func (w *InputFormat) PrivClass() unsafe.Pointer

func (*InputFormat) Raw

func (w *InputFormat) Raw() unsafe.Pointer

type MediaType

type MediaType int32

MediaType /

const (
	MediaTypeAvmediaTypeUnknown    MediaType = -1
	MediaTypeAvmediaTypeVideo      MediaType = 0
	MediaTypeAvmediaTypeAudio      MediaType = 1
	MediaTypeAvmediaTypeData       MediaType = 2
	MediaTypeAvmediaTypeSubtitle   MediaType = 3
	MediaTypeAvmediaTypeAttachment MediaType = 4
	MediaTypeAvmediaTypeNb         MediaType = 5
)

type Option

type Option func(*initConfig)

Option configures the Init call.

func WithDir

func WithDir(dir string) Option

WithDir sets the directory to search for FFmpeg shared libraries.

func WithSOVersions

func WithSOVersions(v SOVersions) Option

WithSOVersions overrides the default SO version numbers.

type OutputFormat

type OutputFormat struct {
	// contains filtered or unexported fields
}

OutputFormat /

func (*OutputFormat) AudioCodec

func (w *OutputFormat) AudioCodec() int32

func (*OutputFormat) CodecTag

func (w *OutputFormat) CodecTag() unsafe.Pointer

func (*OutputFormat) Extensions

func (w *OutputFormat) Extensions() *byte

func (*OutputFormat) Flags

func (w *OutputFormat) Flags() int32

func (*OutputFormat) LongName

func (w *OutputFormat) LongName() *byte

func (*OutputFormat) MimeType

func (w *OutputFormat) MimeType() *byte

func (*OutputFormat) Name

func (w *OutputFormat) Name() *byte

func (*OutputFormat) PrivClass

func (w *OutputFormat) PrivClass() unsafe.Pointer

func (*OutputFormat) Raw

func (w *OutputFormat) Raw() unsafe.Pointer

func (*OutputFormat) SubtitleCodec

func (w *OutputFormat) SubtitleCodec() int32

func (*OutputFormat) VideoCodec

func (w *OutputFormat) VideoCodec() int32

type PixelFormat

type PixelFormat int32

PixelFormat Pixel format. AV_PIX_FMT_RGB32 is handled in an endian-specific manner. An RGBA color is put together as: (A << 24) | (R << 16) | (G << 8) | B This is stored as BGRA on little-endian CPU architectures and ARGB on big-endian CPUs. If the resolution is not a multiple of the chroma subsampling factor then the chroma plane resolution must be rounded up. When the pixel format is palettized RGB32 (AV_PIX_FMT_PAL8), the palettized image data is stored in AVFrame.data[0]. The palette is transported in AVFrame.data[1], is 1024 bytes long (256 4-byte entries) and is formatted the same as in AV_PIX_FMT_RGB32 described above (i.e., it is also endian-specific). Note also that the individual RGB32 palette components stored in AVFrame.data[1] should be in the range 0..255. This is important as many custom PAL8 video codecs that were designed to run on the IBM VGA graphics adapter use 6-bit palette components. For all the 8 bits per pixel formats, an RGB32 palette is in data[1] like for pal8. This palette is filled in automatically by the function allocating the picture. /

const (
	PixelFormatPixFmtNone           PixelFormat = -1
	PixelFormatPixFmtYuv420p        PixelFormat = 0
	PixelFormatPixFmtYuyv422        PixelFormat = 1
	PixelFormatPixFmtRgb24          PixelFormat = 2
	PixelFormatPixFmtBgr24          PixelFormat = 3
	PixelFormatPixFmtYuv422p        PixelFormat = 4
	PixelFormatPixFmtYuv444p        PixelFormat = 5
	PixelFormatPixFmtYuv410p        PixelFormat = 6
	PixelFormatPixFmtYuv411p        PixelFormat = 7
	PixelFormatPixFmtGray8          PixelFormat = 8
	PixelFormatPixFmtMonowhite      PixelFormat = 9
	PixelFormatPixFmtMonoblack      PixelFormat = 10
	PixelFormatPixFmtPal8           PixelFormat = 11
	PixelFormatPixFmtYuvj420p       PixelFormat = 12
	PixelFormatPixFmtYuvj422p       PixelFormat = 13
	PixelFormatPixFmtYuvj444p       PixelFormat = 14
	PixelFormatPixFmtUyvy422        PixelFormat = 15
	PixelFormatPixFmtUyyvyy411      PixelFormat = 16
	PixelFormatPixFmtBgr8           PixelFormat = 17
	PixelFormatPixFmtBgr4           PixelFormat = 18
	PixelFormatPixFmtBgr4Byte       PixelFormat = 19
	PixelFormatPixFmtRgb8           PixelFormat = 20
	PixelFormatPixFmtRgb4           PixelFormat = 21
	PixelFormatPixFmtRgb4Byte       PixelFormat = 22
	PixelFormatPixFmtNv12           PixelFormat = 23
	PixelFormatPixFmtNv21           PixelFormat = 24
	PixelFormatPixFmtArgb           PixelFormat = 25
	PixelFormatPixFmtRgba           PixelFormat = 26
	PixelFormatPixFmtAbgr           PixelFormat = 27
	PixelFormatPixFmtBgra           PixelFormat = 28
	PixelFormatPixFmtGray16be       PixelFormat = 29
	PixelFormatPixFmtGray16le       PixelFormat = 30
	PixelFormatPixFmtYuv440p        PixelFormat = 31
	PixelFormatPixFmtYuvj440p       PixelFormat = 32
	PixelFormatPixFmtYuva420p       PixelFormat = 33
	PixelFormatPixFmtRgb48be        PixelFormat = 34
	PixelFormatPixFmtRgb48le        PixelFormat = 35
	PixelFormatPixFmtRgb565be       PixelFormat = 36
	PixelFormatPixFmtRgb565le       PixelFormat = 37
	PixelFormatPixFmtRgb555be       PixelFormat = 38
	PixelFormatPixFmtRgb555le       PixelFormat = 39
	PixelFormatPixFmtBgr565be       PixelFormat = 40
	PixelFormatPixFmtBgr565le       PixelFormat = 41
	PixelFormatPixFmtBgr555be       PixelFormat = 42
	PixelFormatPixFmtBgr555le       PixelFormat = 43
	PixelFormatPixFmtVaapi          PixelFormat = 44
	PixelFormatPixFmtYuv420p16le    PixelFormat = 45
	PixelFormatPixFmtYuv420p16be    PixelFormat = 46
	PixelFormatPixFmtYuv422p16le    PixelFormat = 47
	PixelFormatPixFmtYuv422p16be    PixelFormat = 48
	PixelFormatPixFmtYuv444p16le    PixelFormat = 49
	PixelFormatPixFmtYuv444p16be    PixelFormat = 50
	PixelFormatPixFmtDxva2Vld       PixelFormat = 51
	PixelFormatPixFmtRgb444le       PixelFormat = 52
	PixelFormatPixFmtRgb444be       PixelFormat = 53
	PixelFormatPixFmtBgr444le       PixelFormat = 54
	PixelFormatPixFmtBgr444be       PixelFormat = 55
	PixelFormatPixFmtYa8            PixelFormat = 56
	PixelFormatPixFmtY400a          PixelFormat = 56
	PixelFormatPixFmtGray8a         PixelFormat = 56
	PixelFormatPixFmtBgr48be        PixelFormat = 57
	PixelFormatPixFmtBgr48le        PixelFormat = 58
	PixelFormatPixFmtYuv420p9be     PixelFormat = 59
	PixelFormatPixFmtYuv420p9le     PixelFormat = 60
	PixelFormatPixFmtYuv420p10be    PixelFormat = 61
	PixelFormatPixFmtYuv420p10le    PixelFormat = 62
	PixelFormatPixFmtYuv422p10be    PixelFormat = 63
	PixelFormatPixFmtYuv422p10le    PixelFormat = 64
	PixelFormatPixFmtYuv444p9be     PixelFormat = 65
	PixelFormatPixFmtYuv444p9le     PixelFormat = 66
	PixelFormatPixFmtYuv444p10be    PixelFormat = 67
	PixelFormatPixFmtYuv444p10le    PixelFormat = 68
	PixelFormatPixFmtYuv422p9be     PixelFormat = 69
	PixelFormatPixFmtYuv422p9le     PixelFormat = 70
	PixelFormatPixFmtGbrp           PixelFormat = 71
	PixelFormatPixFmtGbr24p         PixelFormat = 71
	PixelFormatPixFmtGbrp9be        PixelFormat = 72
	PixelFormatPixFmtGbrp9le        PixelFormat = 73
	PixelFormatPixFmtGbrp10be       PixelFormat = 74
	PixelFormatPixFmtGbrp10le       PixelFormat = 75
	PixelFormatPixFmtGbrp16be       PixelFormat = 76
	PixelFormatPixFmtGbrp16le       PixelFormat = 77
	PixelFormatPixFmtYuva422p       PixelFormat = 78
	PixelFormatPixFmtYuva444p       PixelFormat = 79
	PixelFormatPixFmtYuva420p9be    PixelFormat = 80
	PixelFormatPixFmtYuva420p9le    PixelFormat = 81
	PixelFormatPixFmtYuva422p9be    PixelFormat = 82
	PixelFormatPixFmtYuva422p9le    PixelFormat = 83
	PixelFormatPixFmtYuva444p9be    PixelFormat = 84
	PixelFormatPixFmtYuva444p9le    PixelFormat = 85
	PixelFormatPixFmtYuva420p10be   PixelFormat = 86
	PixelFormatPixFmtYuva420p10le   PixelFormat = 87
	PixelFormatPixFmtYuva422p10be   PixelFormat = 88
	PixelFormatPixFmtYuva422p10le   PixelFormat = 89
	PixelFormatPixFmtYuva444p10be   PixelFormat = 90
	PixelFormatPixFmtYuva444p10le   PixelFormat = 91
	PixelFormatPixFmtYuva420p16be   PixelFormat = 92
	PixelFormatPixFmtYuva420p16le   PixelFormat = 93
	PixelFormatPixFmtYuva422p16be   PixelFormat = 94
	PixelFormatPixFmtYuva422p16le   PixelFormat = 95
	PixelFormatPixFmtYuva444p16be   PixelFormat = 96
	PixelFormatPixFmtYuva444p16le   PixelFormat = 97
	PixelFormatPixFmtVdpau          PixelFormat = 98
	PixelFormatPixFmtXyz12le        PixelFormat = 99
	PixelFormatPixFmtXyz12be        PixelFormat = 100
	PixelFormatPixFmtNv16           PixelFormat = 101
	PixelFormatPixFmtNv20le         PixelFormat = 102
	PixelFormatPixFmtNv20be         PixelFormat = 103
	PixelFormatPixFmtRgba64be       PixelFormat = 104
	PixelFormatPixFmtRgba64le       PixelFormat = 105
	PixelFormatPixFmtBgra64be       PixelFormat = 106
	PixelFormatPixFmtBgra64le       PixelFormat = 107
	PixelFormatPixFmtYvyu422        PixelFormat = 108
	PixelFormatPixFmtYa16be         PixelFormat = 109
	PixelFormatPixFmtYa16le         PixelFormat = 110
	PixelFormatPixFmtGbrap          PixelFormat = 111
	PixelFormatPixFmtGbrap16be      PixelFormat = 112
	PixelFormatPixFmtGbrap16le      PixelFormat = 113
	PixelFormatPixFmtQsv            PixelFormat = 114
	PixelFormatPixFmtMmal           PixelFormat = 115
	PixelFormatPixFmtD3d11vaVld     PixelFormat = 116
	PixelFormatPixFmtCuda           PixelFormat = 117
	PixelFormatPixFmt0rgb           PixelFormat = 118
	PixelFormatPixFmtRgb0           PixelFormat = 119
	PixelFormatPixFmt0bgr           PixelFormat = 120
	PixelFormatPixFmtBgr0           PixelFormat = 121
	PixelFormatPixFmtYuv420p12be    PixelFormat = 122
	PixelFormatPixFmtYuv420p12le    PixelFormat = 123
	PixelFormatPixFmtYuv420p14be    PixelFormat = 124
	PixelFormatPixFmtYuv420p14le    PixelFormat = 125
	PixelFormatPixFmtYuv422p12be    PixelFormat = 126
	PixelFormatPixFmtYuv422p12le    PixelFormat = 127
	PixelFormatPixFmtYuv422p14be    PixelFormat = 128
	PixelFormatPixFmtYuv422p14le    PixelFormat = 129
	PixelFormatPixFmtYuv444p12be    PixelFormat = 130
	PixelFormatPixFmtYuv444p12le    PixelFormat = 131
	PixelFormatPixFmtYuv444p14be    PixelFormat = 132
	PixelFormatPixFmtYuv444p14le    PixelFormat = 133
	PixelFormatPixFmtGbrp12be       PixelFormat = 134
	PixelFormatPixFmtGbrp12le       PixelFormat = 135
	PixelFormatPixFmtGbrp14be       PixelFormat = 136
	PixelFormatPixFmtGbrp14le       PixelFormat = 137
	PixelFormatPixFmtYuvj411p       PixelFormat = 138
	PixelFormatPixFmtBayerBggr8     PixelFormat = 139
	PixelFormatPixFmtBayerRggb8     PixelFormat = 140
	PixelFormatPixFmtBayerGbrg8     PixelFormat = 141
	PixelFormatPixFmtBayerGrbg8     PixelFormat = 142
	PixelFormatPixFmtBayerBggr16le  PixelFormat = 143
	PixelFormatPixFmtBayerBggr16be  PixelFormat = 144
	PixelFormatPixFmtBayerRggb16le  PixelFormat = 145
	PixelFormatPixFmtBayerRggb16be  PixelFormat = 146
	PixelFormatPixFmtBayerGbrg16le  PixelFormat = 147
	PixelFormatPixFmtBayerGbrg16be  PixelFormat = 148
	PixelFormatPixFmtBayerGrbg16le  PixelFormat = 149
	PixelFormatPixFmtBayerGrbg16be  PixelFormat = 150
	PixelFormatPixFmtYuv440p10le    PixelFormat = 151
	PixelFormatPixFmtYuv440p10be    PixelFormat = 152
	PixelFormatPixFmtYuv440p12le    PixelFormat = 153
	PixelFormatPixFmtYuv440p12be    PixelFormat = 154
	PixelFormatPixFmtAyuv64le       PixelFormat = 155
	PixelFormatPixFmtAyuv64be       PixelFormat = 156
	PixelFormatPixFmtVideotoolbox   PixelFormat = 157
	PixelFormatPixFmtP010le         PixelFormat = 158
	PixelFormatPixFmtP010be         PixelFormat = 159
	PixelFormatPixFmtGbrap12be      PixelFormat = 160
	PixelFormatPixFmtGbrap12le      PixelFormat = 161
	PixelFormatPixFmtGbrap10be      PixelFormat = 162
	PixelFormatPixFmtGbrap10le      PixelFormat = 163
	PixelFormatPixFmtMediacodec     PixelFormat = 164
	PixelFormatPixFmtGray12be       PixelFormat = 165
	PixelFormatPixFmtGray12le       PixelFormat = 166
	PixelFormatPixFmtGray10be       PixelFormat = 167
	PixelFormatPixFmtGray10le       PixelFormat = 168
	PixelFormatPixFmtP016le         PixelFormat = 169
	PixelFormatPixFmtP016be         PixelFormat = 170
	PixelFormatPixFmtD3d11          PixelFormat = 171
	PixelFormatPixFmtGray9be        PixelFormat = 172
	PixelFormatPixFmtGray9le        PixelFormat = 173
	PixelFormatPixFmtGbrpf32be      PixelFormat = 174
	PixelFormatPixFmtGbrpf32le      PixelFormat = 175
	PixelFormatPixFmtGbrapf32be     PixelFormat = 176
	PixelFormatPixFmtGbrapf32le     PixelFormat = 177
	PixelFormatPixFmtDrmPrime       PixelFormat = 178
	PixelFormatPixFmtOpencl         PixelFormat = 179
	PixelFormatPixFmtGray14be       PixelFormat = 180
	PixelFormatPixFmtGray14le       PixelFormat = 181
	PixelFormatPixFmtGrayf32be      PixelFormat = 182
	PixelFormatPixFmtGrayf32le      PixelFormat = 183
	PixelFormatPixFmtYuva422p12be   PixelFormat = 184
	PixelFormatPixFmtYuva422p12le   PixelFormat = 185
	PixelFormatPixFmtYuva444p12be   PixelFormat = 186
	PixelFormatPixFmtYuva444p12le   PixelFormat = 187
	PixelFormatPixFmtNv24           PixelFormat = 188
	PixelFormatPixFmtNv42           PixelFormat = 189
	PixelFormatPixFmtVulkan         PixelFormat = 190
	PixelFormatPixFmtY210be         PixelFormat = 191
	PixelFormatPixFmtY210le         PixelFormat = 192
	PixelFormatPixFmtX2rgb10le      PixelFormat = 193
	PixelFormatPixFmtX2rgb10be      PixelFormat = 194
	PixelFormatPixFmtX2bgr10le      PixelFormat = 195
	PixelFormatPixFmtX2bgr10be      PixelFormat = 196
	PixelFormatPixFmtP210be         PixelFormat = 197
	PixelFormatPixFmtP210le         PixelFormat = 198
	PixelFormatPixFmtP410be         PixelFormat = 199
	PixelFormatPixFmtP410le         PixelFormat = 200
	PixelFormatPixFmtP216be         PixelFormat = 201
	PixelFormatPixFmtP216le         PixelFormat = 202
	PixelFormatPixFmtP416be         PixelFormat = 203
	PixelFormatPixFmtP416le         PixelFormat = 204
	PixelFormatPixFmtVuya           PixelFormat = 205
	PixelFormatPixFmtRgbaf16be      PixelFormat = 206
	PixelFormatPixFmtRgbaf16le      PixelFormat = 207
	PixelFormatPixFmtVuyx           PixelFormat = 208
	PixelFormatPixFmtP012le         PixelFormat = 209
	PixelFormatPixFmtP012be         PixelFormat = 210
	PixelFormatPixFmtY212be         PixelFormat = 211
	PixelFormatPixFmtY212le         PixelFormat = 212
	PixelFormatPixFmtXv30be         PixelFormat = 213
	PixelFormatPixFmtXv30le         PixelFormat = 214
	PixelFormatPixFmtXv36be         PixelFormat = 215
	PixelFormatPixFmtXv36le         PixelFormat = 216
	PixelFormatPixFmtRgbf32be       PixelFormat = 217
	PixelFormatPixFmtRgbf32le       PixelFormat = 218
	PixelFormatPixFmtRgbaf32be      PixelFormat = 219
	PixelFormatPixFmtRgbaf32le      PixelFormat = 220
	PixelFormatPixFmtP212be         PixelFormat = 221
	PixelFormatPixFmtP212le         PixelFormat = 222
	PixelFormatPixFmtP412be         PixelFormat = 223
	PixelFormatPixFmtP412le         PixelFormat = 224
	PixelFormatPixFmtGbrap14be      PixelFormat = 225
	PixelFormatPixFmtGbrap14le      PixelFormat = 226
	PixelFormatPixFmtD3d12          PixelFormat = 227
	PixelFormatPixFmtAyuv           PixelFormat = 228
	PixelFormatPixFmtUyva           PixelFormat = 229
	PixelFormatPixFmtVyu444         PixelFormat = 230
	PixelFormatPixFmtV30xbe         PixelFormat = 231
	PixelFormatPixFmtV30xle         PixelFormat = 232
	PixelFormatPixFmtRgbf16be       PixelFormat = 233
	PixelFormatPixFmtRgbf16le       PixelFormat = 234
	PixelFormatPixFmtRgba128be      PixelFormat = 235
	PixelFormatPixFmtRgba128le      PixelFormat = 236
	PixelFormatPixFmtRgb96be        PixelFormat = 237
	PixelFormatPixFmtRgb96le        PixelFormat = 238
	PixelFormatPixFmtY216be         PixelFormat = 239
	PixelFormatPixFmtY216le         PixelFormat = 240
	PixelFormatPixFmtXv48be         PixelFormat = 241
	PixelFormatPixFmtXv48le         PixelFormat = 242
	PixelFormatPixFmtGbrpf16be      PixelFormat = 243
	PixelFormatPixFmtGbrpf16le      PixelFormat = 244
	PixelFormatPixFmtGbrapf16be     PixelFormat = 245
	PixelFormatPixFmtGbrapf16le     PixelFormat = 246
	PixelFormatPixFmtGrayf16be      PixelFormat = 247
	PixelFormatPixFmtGrayf16le      PixelFormat = 248
	PixelFormatPixFmtAmfSurface     PixelFormat = 249
	PixelFormatPixFmtGray32be       PixelFormat = 250
	PixelFormatPixFmtGray32le       PixelFormat = 251
	PixelFormatPixFmtYaf32be        PixelFormat = 252
	PixelFormatPixFmtYaf32le        PixelFormat = 253
	PixelFormatPixFmtYaf16be        PixelFormat = 254
	PixelFormatPixFmtYaf16le        PixelFormat = 255
	PixelFormatPixFmtGbrap32be      PixelFormat = 256
	PixelFormatPixFmtGbrap32le      PixelFormat = 257
	PixelFormatPixFmtYuv444p10msbbe PixelFormat = 258
	PixelFormatPixFmtYuv444p10msble PixelFormat = 259
	PixelFormatPixFmtYuv444p12msbbe PixelFormat = 260
	PixelFormatPixFmtYuv444p12msble PixelFormat = 261
	PixelFormatPixFmtGbrp10msbbe    PixelFormat = 262
	PixelFormatPixFmtGbrp10msble    PixelFormat = 263
	PixelFormatPixFmtGbrp12msbbe    PixelFormat = 264
	PixelFormatPixFmtGbrp12msble    PixelFormat = 265
	PixelFormatPixFmtOhcodec        PixelFormat = 266
	PixelFormatPixFmtNb             PixelFormat = 267
)

type Rational

type Rational struct {
	// contains filtered or unexported fields
}

Rational Rational number (pair of numerator and denominator). /

func (*Rational) Den

func (w *Rational) Den() int32

func (*Rational) Num

func (w *Rational) Num() int32

func (*Rational) Raw

func (w *Rational) Raw() unsafe.Pointer

type SOVersions

type SOVersions struct {
	Avutil     string
	Avcodec    string
	Avformat   string
	Swscale    string
	Swresample string
}

SOVersions specifies the SO major version numbers for each library.

type SampleFormat

type SampleFormat int32

SampleFormat Audio sample formats - The data described by the sample format is always in native-endian order. Sample values can be expressed by native C types, hence the lack of a signed 24-bit sample format even though it is a common raw audio data format. - The floating-point formats are based on full volume being in the range [-1.0, 1.0]. Any values outside this range are beyond full volume level. - The data layout as used in av_samples_fill_arrays() and elsewhere in FFmpeg (such as AVFrame in libavcodec) is as follows: For planar sample formats, each audio channel is in a separate data plane, and linesize is the buffer size, in bytes, for a single plane. All data planes must be the same size. For packed sample formats, only the first data plane is used, and samples for each channel are interleaved. In this case, linesize is the buffer size, in bytes, for the 1 plane. /

const (
	SampleFormatSampleFmtNone SampleFormat = -1
	SampleFormatSampleFmtU8   SampleFormat = 0
	SampleFormatSampleFmtS16  SampleFormat = 1
	SampleFormatSampleFmtS32  SampleFormat = 2
	SampleFormatSampleFmtFlt  SampleFormat = 3
	SampleFormatSampleFmtDbl  SampleFormat = 4
	SampleFormatSampleFmtU8p  SampleFormat = 5
	SampleFormatSampleFmtS16p SampleFormat = 6
	SampleFormatSampleFmtS32p SampleFormat = 7
	SampleFormatSampleFmtFltp SampleFormat = 8
	SampleFormatSampleFmtDblp SampleFormat = 9
	SampleFormatSampleFmtS64  SampleFormat = 10
	SampleFormatSampleFmtS64p SampleFormat = 11
	SampleFormatSampleFmtNb   SampleFormat = 12
)

type Stream

type Stream struct {
	// contains filtered or unexported fields
}

Stream Stream structure. New fields can be added to the end with minor version bumps. Removal, reordering and changes to existing fields require a major version bump. sizeof(AVStream) must not be used outside libav*. /

func (*Stream) AttachedPic

func (w *Stream) AttachedPic() [104]byte

func (*Stream) AvClass

func (w *Stream) AvClass() unsafe.Pointer

func (*Stream) AvgFrameRate

func (w *Stream) AvgFrameRate() AVRational

func (*Stream) Codecpar

func (w *Stream) Codecpar() unsafe.Pointer

func (*Stream) Discard

func (w *Stream) Discard() int32

func (*Stream) Disposition

func (w *Stream) Disposition() int32

func (*Stream) Duration

func (w *Stream) Duration() int64

func (*Stream) EventFlags

func (w *Stream) EventFlags() int32

func (*Stream) ID

func (w *Stream) ID() int32

func (*Stream) Index

func (w *Stream) Index() int32

func (*Stream) Metadata

func (w *Stream) Metadata() unsafe.Pointer

func (*Stream) NbFrames

func (w *Stream) NbFrames() int64

func (*Stream) PTSWrapBits

func (w *Stream) PTSWrapBits() int32

func (*Stream) PrivData

func (w *Stream) PrivData() unsafe.Pointer

func (*Stream) RFrameRate

func (w *Stream) RFrameRate() AVRational

func (*Stream) Raw

func (w *Stream) Raw() unsafe.Pointer

func (*Stream) SampleAspectRatio

func (w *Stream) SampleAspectRatio() AVRational

func (*Stream) StartTime

func (w *Stream) StartTime() int64

func (*Stream) TimeBase

func (w *Stream) TimeBase() AVRational

Directories

Path Synopsis
internal
raw

Jump to

Keyboard shortcuts

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