Skip to main content

Crate ff_sys

Crate ff_sys 

Source
Expand description

§ff-sys

Low-level FFmpeg FFI bindings for Rust.

This crate provides raw FFI bindings to FFmpeg libraries, generated by bindgen. It is intended as a building block for higher-level safe wrappers.

§Safety

All functions in this crate are unsafe. Higher-level safe wrappers are provided by other ff-* crates:

  • ff-probe - Media metadata extraction
  • ff-decode - Decoding and seeking
  • ff-encode - Encoding and export
  • ff-filter - Filters and effects

Modules§

avcodec
Stub avcodec wrapper module.
avformat
Stub avformat wrapper module.
error_codes
Common FFmpeg error codes for convenience.
swresample
Stub swresample wrapper module.
swscale
Stub swscale wrapper module.

Macros§

check_av_error
Macro to check FFmpeg return values and convert to Result.

Structs§

AVAudioFifo
AVBSFContext
AVBufferRef
AVChannelLayout
AVChapter
AVCodec
AVCodecContext
AVCodecParameters
AVDictionary
AVDictionaryEntry
AVFilter
AVFilterContext
AVFilterGraph
AVFilterInOut
An unconnected pad of a parsed filter graph, as returned by avfilter_graph_parse2.
AVFormatContext
AVFrame
AVIOContext
AVInputFormat
AVOutputFormat
AVPacket
AVRational
AVStream
AvError
A typed FFmpeg return code.
BsfContext
Stub mirror of crate::bsf::BsfContext.
ChapterRef
ChapterSpec
Codec
CodecContext
CodecParameters
Frame
HwDeviceContext
InputFormatContext
OutputFormatContext
Packet
ResampleContext
ScaleContext
StreamRef
SwrContext
SwsContext

Enums§

BufferSinkOutcome
Stub mirror of crate::buffersink::BufferSinkOutcome.
ReceiveOutcome
Stub mirror of crate::codec_context::ReceiveOutcome.

Constants§

AVChannelOrder_AV_CHANNEL_ORDER_NATIVE
AVChannelOrder_AV_CHANNEL_ORDER_UNSPEC
AVCodecID_AV_CODEC_ID_AAC
AVCodecID_AV_CODEC_ID_AC3
AVCodecID_AV_CODEC_ID_ALAC
AVCodecID_AV_CODEC_ID_ASS
AVCodecID_AV_CODEC_ID_AV1
AVCodecID_AV_CODEC_ID_BIN_DATA
AVCodecID_AV_CODEC_ID_BMP
AVCodecID_AV_CODEC_ID_DNXHD
AVCodecID_AV_CODEC_ID_DTS
AVCodecID_AV_CODEC_ID_DVB_SUBTITLE
AVCodecID_AV_CODEC_ID_EAC3
AVCodecID_AV_CODEC_ID_EXR
AVCodecID_AV_CODEC_ID_FFV1
AVCodecID_AV_CODEC_ID_FLAC
AVCodecID_AV_CODEC_ID_GIF
AVCodecID_AV_CODEC_ID_H264
AVCodecID_AV_CODEC_ID_HDMV_PGS_SUBTITLE
AVCodecID_AV_CODEC_ID_HEVC
AVCodecID_AV_CODEC_ID_MJPEG
AVCodecID_AV_CODEC_ID_MP3
AVCodecID_AV_CODEC_ID_MPEG4
AVCodecID_AV_CODEC_ID_MPEG2VIDEO
AVCodecID_AV_CODEC_ID_NONE
AVCodecID_AV_CODEC_ID_OPUS
AVCodecID_AV_CODEC_ID_PCM_F32BE
AVCodecID_AV_CODEC_ID_PCM_F32LE
AVCodecID_AV_CODEC_ID_PCM_F64BE
AVCodecID_AV_CODEC_ID_PCM_F64LE
AVCodecID_AV_CODEC_ID_PCM_S16BE
AVCodecID_AV_CODEC_ID_PCM_S16LE
AVCodecID_AV_CODEC_ID_PCM_S24BE
AVCodecID_AV_CODEC_ID_PCM_S24LE
AVCodecID_AV_CODEC_ID_PCM_S32BE
AVCodecID_AV_CODEC_ID_PCM_S32LE
AVCodecID_AV_CODEC_ID_PCM_U8
AVCodecID_AV_CODEC_ID_PNG
AVCodecID_AV_CODEC_ID_PRORES
AVCodecID_AV_CODEC_ID_SRT
AVCodecID_AV_CODEC_ID_SSA
AVCodecID_AV_CODEC_ID_SUBRIP
AVCodecID_AV_CODEC_ID_THEORA
AVCodecID_AV_CODEC_ID_TIFF
AVCodecID_AV_CODEC_ID_VORBIS
AVCodecID_AV_CODEC_ID_VP8
AVCodecID_AV_CODEC_ID_VP9
AVCodecID_AV_CODEC_ID_WEBP
AVCodecID_AV_CODEC_ID_WEBVTT
AVCodecID_AV_CODEC_ID_WMAV2
AVColorPrimaries_AVCOL_PRI_BT709
AVColorPrimaries_AVCOL_PRI_BT470BG
AVColorPrimaries_AVCOL_PRI_BT2020
AVColorPrimaries_AVCOL_PRI_FILM
AVColorPrimaries_AVCOL_PRI_SMPTE431
AVColorPrimaries_AVCOL_PRI_SMPTE432
AVColorPrimaries_AVCOL_PRI_SMPTE170M
AVColorPrimaries_AVCOL_PRI_SMPTE240M
AVColorPrimaries_AVCOL_PRI_UNSPECIFIED
AVColorRange_AVCOL_RANGE_JPEG
AVColorRange_AVCOL_RANGE_MPEG
AVColorRange_AVCOL_RANGE_UNSPECIFIED
AVColorSpace_AVCOL_SPC_BT709
AVColorSpace_AVCOL_SPC_BT470BG
AVColorSpace_AVCOL_SPC_BT2020_CL
AVColorSpace_AVCOL_SPC_BT2020_NCL
AVColorSpace_AVCOL_SPC_FCC
AVColorSpace_AVCOL_SPC_RGB
AVColorSpace_AVCOL_SPC_SMPTE170M
AVColorSpace_AVCOL_SPC_SMPTE240M
AVColorSpace_AVCOL_SPC_UNSPECIFIED
AVColorSpace_AVCOL_SPC_YCGCO
AVColorTransferCharacteristic_AVCOL_TRC_ARIB_STD_B67
AVColorTransferCharacteristic_AVCOL_TRC_BT709
AVColorTransferCharacteristic_AVCOL_TRC_BT2020_10
AVColorTransferCharacteristic_AVCOL_TRC_BT2020_12
AVColorTransferCharacteristic_AVCOL_TRC_GAMMA22
AVColorTransferCharacteristic_AVCOL_TRC_GAMMA28
AVColorTransferCharacteristic_AVCOL_TRC_IEC61966_2_1
AVColorTransferCharacteristic_AVCOL_TRC_LINEAR
AVColorTransferCharacteristic_AVCOL_TRC_SMPTE170M
AVColorTransferCharacteristic_AVCOL_TRC_SMPTE240M
AVColorTransferCharacteristic_AVCOL_TRC_SMPTEST2084
AVColorTransferCharacteristic_AVCOL_TRC_UNSPECIFIED
AVFMT_FLAG_CUSTOM_IO
AVFMT_FLAG_CUSTOM_IO: the caller supplied the context’s pb, so libavformat must not avio_close() it.
AVFMT_NOFILE
AVFMT_NOFILEAVOutputFormat flag indicating the muxer manages its own I/O and has no AVIOContext (pb) opened by the caller.
AVFMT_TS_DISCONT
AVFMT_TS_DISCONTAVInputFormat flag indicating discontinuous timestamps.
AVHWDeviceType_AV_HWDEVICE_TYPE_CUDA
AVHWDeviceType_AV_HWDEVICE_TYPE_D3D11VA
AVHWDeviceType_AV_HWDEVICE_TYPE_QSV
AVHWDeviceType_AV_HWDEVICE_TYPE_VAAPI
AVHWDeviceType_AV_HWDEVICE_TYPE_VIDEOTOOLBOX
AVMediaType_AVMEDIA_TYPE_ATTACHMENT
AVMediaType_AVMEDIA_TYPE_AUDIO
AVMediaType_AVMEDIA_TYPE_SUBTITLE
AVMediaType_AVMEDIA_TYPE_VIDEO
AVPacketSideDataType_AV_PKT_DATA_CONTENT_LIGHT_LEVEL
AVPacketSideDataType_AV_PKT_DATA_MASTERING_DISPLAY_METADATA
AVPictureType_AV_PICTURE_TYPE_I
AVPictureType_AV_PICTURE_TYPE_NONE
AVPixelFormat_AV_PIX_FMT_BGR24
AVPixelFormat_AV_PIX_FMT_BGRA
AVPixelFormat_AV_PIX_FMT_CUDA
AVPixelFormat_AV_PIX_FMT_D3D11
AVPixelFormat_AV_PIX_FMT_DXVA2_VLD
AVPixelFormat_AV_PIX_FMT_GBRPF32LE
AVPixelFormat_AV_PIX_FMT_GRAY8
AVPixelFormat_AV_PIX_FMT_MEDIACODEC
AVPixelFormat_AV_PIX_FMT_NONE
AVPixelFormat_AV_PIX_FMT_NV12
AVPixelFormat_AV_PIX_FMT_NV21
AVPixelFormat_AV_PIX_FMT_OPENCL
AVPixelFormat_AV_PIX_FMT_P010LE
AVPixelFormat_AV_PIX_FMT_PAL8
AVPixelFormat_AV_PIX_FMT_QSV
AVPixelFormat_AV_PIX_FMT_RGB24
AVPixelFormat_AV_PIX_FMT_RGBA
AVPixelFormat_AV_PIX_FMT_VAAPI
AVPixelFormat_AV_PIX_FMT_VDPAU
AVPixelFormat_AV_PIX_FMT_VIDEOTOOLBOX
AVPixelFormat_AV_PIX_FMT_VULKAN
AVPixelFormat_AV_PIX_FMT_YUV420P
AVPixelFormat_AV_PIX_FMT_YUV420P10LE
AVPixelFormat_AV_PIX_FMT_YUV422P
AVPixelFormat_AV_PIX_FMT_YUV422P10LE
AVPixelFormat_AV_PIX_FMT_YUV444P
AVPixelFormat_AV_PIX_FMT_YUV444P10LE
AVPixelFormat_AV_PIX_FMT_YUVA444P10LE
AVPixelFormat_AV_PIX_FMT_YUVJ420P
AVPixelFormat_AV_PIX_FMT_YUVJ422P
AVPixelFormat_AV_PIX_FMT_YUVJ444P
AVSampleFormat_AV_SAMPLE_FMT_DBL
AVSampleFormat_AV_SAMPLE_FMT_DBLP
AVSampleFormat_AV_SAMPLE_FMT_FLT
AVSampleFormat_AV_SAMPLE_FMT_FLTP
AVSampleFormat_AV_SAMPLE_FMT_NONE
AVSampleFormat_AV_SAMPLE_FMT_S16
AVSampleFormat_AV_SAMPLE_FMT_S32
AVSampleFormat_AV_SAMPLE_FMT_S64
AVSampleFormat_AV_SAMPLE_FMT_S16P
AVSampleFormat_AV_SAMPLE_FMT_S32P
AVSampleFormat_AV_SAMPLE_FMT_S64P
AVSampleFormat_AV_SAMPLE_FMT_U8
AVSampleFormat_AV_SAMPLE_FMT_U8P
AV_BUFFERSRC_FLAG_KEEP_REF
Flag for av_buffersrc_add_frame_flags: keep a reference to the frame.
AV_DICT_IGNORE_SUFFIX
AV_DISPOSITION_ATTACHED_PIC
AV_DISPOSITION_FORCED
AV_INPUT_BUFFER_PADDING_SIZE
AV_LOG_DEBUG
AV_LOG_ERROR
AV_LOG_FATAL
AV_LOG_INFO
AV_LOG_PANIC
AV_LOG_QUIET
AV_LOG_TRACE
AV_LOG_VERBOSE
AV_LOG_WARNING
AV_NOPTS_VALUE
Invalid PTS value (no presentation timestamp).
AV_NUM_DATA_POINTERS
AV_OPT_SEARCH_CHILDREN
AV_TIME_BASE
BUFFERSRC_FLAG_KEEP_REF

Traits§

IoSink
A byte sink FFmpeg can mux into.
IoSource
A byte source FFmpeg can demux from.

Functions§

av_buffer_ref
av_buffer_unref
av_buffersink_get_frame
av_buffersink_get_time_base
av_buffersrc_add_frame_flags
av_buffersrc_close
av_channel_layout_default
av_channel_layout_uninit
av_dict_free
av_dict_get
av_dict_set
av_error_string
Convert an FFmpeg error code to a human-readable string.
av_find_input_format
av_frame_alloc
av_frame_free
av_frame_get_buffer
av_frame_move_ref
av_frame_unref
av_free
av_hwdevice_ctx_create
av_hwframe_transfer_data
av_image_get_linesize
av_interleaved_write_frame
av_log_format_line2
av_log_get_level
av_log_set_callback
av_log_set_level
av_malloc
av_mallocz
av_new_packet
av_opt_set
av_packet_alloc
av_packet_free
av_packet_new_side_data
av_packet_rescale_ts
av_packet_unref
av_read_frame
av_rescale_q
av_strerror
av_write_trailer
avcodec_get_name
avcodec_parameters_copy
avcodec_receive_frame
avcodec_send_packet
avfilter_get_by_name
avfilter_graph_alloc
avfilter_graph_config
avfilter_graph_create_filter
avfilter_graph_free
avfilter_graph_parse2
avfilter_graph_send_command
avfilter_graph_set_auto_convert
avfilter_inout_free
avfilter_link
avformat_alloc_output_context2
avformat_free_context
avformat_new_stream
avformat_write_header
buffersink_get_frame
Safety
ensure_initialized
Ensure FFmpeg is initialized.
install_log_bridge
Route FFmpeg’s internal diagnostics into the log facade under the ffmpeg target, instead of letting them go to stderr.
log_level
The level FFmpeg is currently logging at, as the log filter that matches it.
set_log_level
Set the threshold below which FFmpeg’s messages are discarded.
swr_alloc_set_opts2
swr_convert
swr_free
swr_get_out_samples
swr_init

Type Aliases§

AVChannelOrder
AVCodecID
AVColorPrimaries
AVColorRange
AVColorSpace
AVColorTransferCharacteristic
AVHWDeviceType
AVMediaType
AVPacketSideDataType
AVPictureType
AVPixelFormat
AVSampleFormat
va_list

Unions§

AVChannelLayout__bindgen_ty_1