Documentation ¶
Overview ¶
Package avutil is a wrapper around FFmpeg/release6.1. See: https://github.com/FFmpeg/FFmpeg/tree/release/6.1
Index ¶
Constants ¶
const ( // EAGAIN Resource temporarily unavailable EAGAIN = -11 // EOF End of file EOF = int(C.AVERROR_EOF) // Success no errors Success = 0 )
Variables ¶
This section is empty.
Functions ¶
func ErrorFromCode ¶
ErrorFromCode returns an error from the given code
func FrameMakeWritable ¶
FrameMakeWritable Ensure that the frame data is writable, avoiding data copy if possible.
Do nothing if the frame is writable, allocate new buffers and copy the data if it is not. Non-refcounted frames behave as non-writable, i.e. a copy is always made.
@return 0 on success, a negative AVERROR on error.
@see av_frame_is_writable(), av_buffer_is_writable(), av_buffer_make_writable()
func FrameUnref ¶
func FrameUnref(f *Frame)
FrameUnref Unreference all the buffers referenced by frame and reset the frame fields.
Types ¶
type Frame ¶
type Frame C.struct_AVFrame
Frame an AVFrame
func FrameAlloc ¶
func FrameAlloc() *Frame
FrameAlloc Allocate an AVFrame and set its fields to default values. The resulting struct must be freed using av_frame_free().
@return An AVFrame filled with default values or NULL on failure.
@note this only allocates the AVFrame itself, not the data buffers. Those must be allocated through other means, e.g. with av_frame_get_buffer() or manually.
func (*Frame) SetFrameFromImg ¶
SetFrameFromImg sets the frame from the given image.YCbCr
func (*Frame) SetFrameFromImgMacroAlign ¶ added in v0.20.0
SetFrameFromImgMacroAlign sets the frame from the given image.YCbCr adding line padding to the image to ensure that the data is aligned to the given boundary. For example see alignment requirements for the Raspberry Pi GPU codec: https://github.com/raspberrypi/linux/blob/rpi-6.1.y/drivers/staging/vc04_services/bcm2835-codec/bcm2835-v4l2-codec.c#L174
func (*Frame) SetFramePTS ¶
SetFramePTS sets the presentation time stamp (PTS)