Crate xmf_sys

Source
Expand description

§Rust bindings to XMF: eXtreme Media Foundation, an efficiently dangerous cadeau to Rust

Low-level and unidiomatic bindings to the XMF library.

It’s possible to choose between dynamically loading the library and regular static / dynamic linking at build-time for a total of three options.

§Dynamic Linking

  • Feature flag: none
  • Env variable: XMF_DYNAMIC

The shared library is not required when building the binary, but is required when executing it.

§Static Linking

  • Feature flag: static
  • Env variable: XMF_STATIC

The static library is required when building the binary, and no additional dependency is required when executing the binary. You can specify a search path for the static library using XMF_SEARCH_PATH env variable.

§Dynamic Loading

  • Feature flag: dlopen
  • Env variable: none

The shared library is not required when building the binary, and is not required when executing the binary either. However, you need to programmatically load the file before using any FFI function by using the init function. The rest of the API is identical except for this init function. You can check dynamically if the library has been loaded using the is_init function. This function is annotated with #[inline] and compiles down to true when the dlopen feature is not enabled.

§Native Library Binaries

Available at the release page of the GitHub repository.

Modules§

raw

Structs§

VpxErrorDetail
XmfVpXDecoder
XmfVpxDecoderConfig
XmfVpxDecoderError
XmfVpxEncoderConfig
XmfVpxEncoderError

Enums§

VpxCodecError
XmfVpxCodecType
XmfVpxDecoderErrorCode
XmfVpxEncoderErrorCode
XmfVpxPacketKind

Constants§

VPX_EFLAG_FORCE_KF
XMF_MUXER_FILE_OPEN_ERROR
XMF_MUXER_MUXER_ERROR
XMF_MUXER_PARSER_ERROR

Functions§

XmfBipBuffer_BufferSize
Performs a FFI call to XmfBipBuffer_BufferSize from the globally loaded dynamic library xmf
XmfBipBuffer_Clear
Performs a FFI call to XmfBipBuffer_Clear from the globally loaded dynamic library xmf
XmfBipBuffer_Free
Performs a FFI call to XmfBipBuffer_Free from the globally loaded dynamic library xmf
XmfBipBuffer_Grow
Performs a FFI call to XmfBipBuffer_Grow from the globally loaded dynamic library xmf
XmfBipBuffer_New
Performs a FFI call to XmfBipBuffer_New from the globally loaded dynamic library xmf
XmfBipBuffer_Read
Performs a FFI call to XmfBipBuffer_Read from the globally loaded dynamic library xmf
XmfBipBuffer_UsedSize
Performs a FFI call to XmfBipBuffer_UsedSize from the globally loaded dynamic library xmf
XmfBipBuffer_Write
Performs a FFI call to XmfBipBuffer_Write from the globally loaded dynamic library xmf
XmfImage_FreeData
Performs a FFI call to XmfImage_FreeData from the globally loaded dynamic library xmf
XmfImage_LoadFile
Performs a FFI call to XmfImage_LoadFile from the globally loaded dynamic library xmf
XmfImage_SaveFile
Performs a FFI call to XmfImage_SaveFile from the globally loaded dynamic library xmf
XmfRecorder_Free
Performs a FFI call to XmfRecorder_Free from the globally loaded dynamic library xmf
XmfRecorder_GetCurrentTime
Performs a FFI call to XmfRecorder_GetCurrentTime from the globally loaded dynamic library xmf
XmfRecorder_GetFrameRate
Performs a FFI call to XmfRecorder_GetFrameRate from the globally loaded dynamic library xmf
XmfRecorder_GetTimeout
Performs a FFI call to XmfRecorder_GetTimeout from the globally loaded dynamic library xmf
XmfRecorder_Init
Performs a FFI call to XmfRecorder_Init from the globally loaded dynamic library xmf
XmfRecorder_New
Performs a FFI call to XmfRecorder_New from the globally loaded dynamic library xmf
XmfRecorder_SetBipBuffer
Performs a FFI call to XmfRecorder_SetBipBuffer from the globally loaded dynamic library xmf
XmfRecorder_SetCurrentTime
Performs a FFI call to XmfRecorder_SetCurrentTime from the globally loaded dynamic library xmf
XmfRecorder_SetFileName
Performs a FFI call to XmfRecorder_SetFileName from the globally loaded dynamic library xmf
XmfRecorder_SetFrameRate
Performs a FFI call to XmfRecorder_SetFrameRate from the globally loaded dynamic library xmf
XmfRecorder_SetFrameSize
Performs a FFI call to XmfRecorder_SetFrameSize from the globally loaded dynamic library xmf
XmfRecorder_SetMinimumFrameRate
Performs a FFI call to XmfRecorder_SetMinimumFrameRate from the globally loaded dynamic library xmf
XmfRecorder_SetVideoQuality
Performs a FFI call to XmfRecorder_SetVideoQuality from the globally loaded dynamic library xmf
XmfRecorder_Timeout
Performs a FFI call to XmfRecorder_Timeout from the globally loaded dynamic library xmf
XmfRecorder_Uninit
Performs a FFI call to XmfRecorder_Uninit from the globally loaded dynamic library xmf
XmfRecorder_UpdateFrame
Performs a FFI call to XmfRecorder_UpdateFrame from the globally loaded dynamic library xmf
XmfVpxDecoder_Create
Performs a FFI call to XmfVpxDecoder_Create from the globally loaded dynamic library xmf
XmfVpxDecoder_Decode
Performs a FFI call to XmfVpxDecoder_Decode from the globally loaded dynamic library xmf
XmfVpxDecoder_Destroy
Performs a FFI call to XmfVpxDecoder_Destroy from the globally loaded dynamic library xmf
XmfVpxDecoder_GetLastError
Performs a FFI call to XmfVpxDecoder_GetLastError from the globally loaded dynamic library xmf
XmfVpxDecoder_GetNextFrame
Performs a FFI call to XmfVpxDecoder_GetNextFrame from the globally loaded dynamic library xmf
XmfVpxEncoder_Create
Performs a FFI call to XmfVpxEncoder_Create from the globally loaded dynamic library xmf
XmfVpxEncoder_Destroy
Performs a FFI call to XmfVpxEncoder_Destroy from the globally loaded dynamic library xmf
XmfVpxEncoder_EncodeFrame
Performs a FFI call to XmfVpxEncoder_EncodeFrame from the globally loaded dynamic library xmf
XmfVpxEncoder_Flush
Performs a FFI call to XmfVpxEncoder_Flush from the globally loaded dynamic library xmf
XmfVpxEncoder_FreeEncodedFrame
Performs a FFI call to XmfVpxEncoder_FreeEncodedFrame from the globally loaded dynamic library xmf
XmfVpxEncoder_GetEncodedFrame
Performs a FFI call to XmfVpxEncoder_GetEncodedFrame from the globally loaded dynamic library xmf
XmfVpxEncoder_GetLastError
Performs a FFI call to XmfVpxEncoder_GetLastError from the globally loaded dynamic library xmf
XmfVpxEncoder_GetPacket
Performs a FFI call to XmfVpxEncoder_GetPacket from the globally loaded dynamic library xmf
XmfVpxFrame_Destroy
Performs a FFI call to XmfVpxFrame_Destroy from the globally loaded dynamic library xmf
XmfVpxFrame_GetBuffer
Performs a FFI call to XmfVpxFrame_GetBuffer from the globally loaded dynamic library xmf
XmfVpxFrame_GetDuration
Performs a FFI call to XmfVpxFrame_GetDuration from the globally loaded dynamic library xmf
XmfVpxFrame_GetFlags
Performs a FFI call to XmfVpxFrame_GetFlags from the globally loaded dynamic library xmf
XmfVpxFrame_GetHeight
Performs a FFI call to XmfVpxFrame_GetHeight from the globally loaded dynamic library xmf
XmfVpxFrame_GetPartitionId
Performs a FFI call to XmfVpxFrame_GetPartitionId from the globally loaded dynamic library xmf
XmfVpxFrame_GetPts
Performs a FFI call to XmfVpxFrame_GetPts from the globally loaded dynamic library xmf
XmfVpxFrame_GetSize
Performs a FFI call to XmfVpxFrame_GetSize from the globally loaded dynamic library xmf
XmfVpxFrame_GetSpatialLayerEncoded
Performs a FFI call to XmfVpxFrame_GetSpatialLayerEncoded from the globally loaded dynamic library xmf
XmfVpxFrame_GetWidth
Performs a FFI call to XmfVpxFrame_GetWidth from the globally loaded dynamic library xmf
XmfVpxImage_Destroy
Performs a FFI call to XmfVpxImage_Destroy from the globally loaded dynamic library xmf
XmfVpxPacket_Destroy
Performs a FFI call to XmfVpxPacket_Destroy from the globally loaded dynamic library xmf
XmfVpxPacket_GetFrame
Performs a FFI call to XmfVpxPacket_GetFrame from the globally loaded dynamic library xmf
XmfVpxPacket_GetKind
Performs a FFI call to XmfVpxPacket_GetKind from the globally loaded dynamic library xmf
XmfVpxPacket_IsEmpty
Performs a FFI call to XmfVpxPacket_IsEmpty from the globally loaded dynamic library xmf
XmfWebMMuxer_Free
Performs a FFI call to XmfWebMMuxer_Free from the globally loaded dynamic library xmf
XmfWebMMuxer_New
Performs a FFI call to XmfWebMMuxer_New from the globally loaded dynamic library xmf
XmfWebMMuxer_Remux
Performs a FFI call to XmfWebMMuxer_Remux from the globally loaded dynamic library xmf
initdlopen
Loads and installs the shared library globally.
is_init

Type Aliases§

VpxIterator
XmfBipBuffer
XmfRecorder
XmfVpxDecoder
XmfVpxEncoder
XmfVpxFrame
XmfVpxImage
XmfVpxPacket
XmfWebM
XmfWebMMuxer

Unions§

XmfVpxDecoderErrorDetail
XmfVpxEncoderErrorDetail