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§
Structs§
- VpxError
Detail - XmfVpX
Decoder - XmfVpx
Decoder Config - XmfVpx
Decoder Error - XmfVpx
Encoder Config - XmfVpx
Encoder Error
Enums§
Constants§
Functions§
- XmfBip
Buffer_ ⚠Buffer Size - Performs a FFI call to XmfBipBuffer_BufferSize from the globally loaded dynamic library xmf
- XmfBip
Buffer_ ⚠Clear - Performs a FFI call to XmfBipBuffer_Clear from the globally loaded dynamic library xmf
- XmfBip
Buffer_ ⚠Free - Performs a FFI call to XmfBipBuffer_Free from the globally loaded dynamic library xmf
- XmfBip
Buffer_ ⚠Grow - Performs a FFI call to XmfBipBuffer_Grow from the globally loaded dynamic library xmf
- XmfBip
Buffer_ ⚠New - Performs a FFI call to XmfBipBuffer_New from the globally loaded dynamic library xmf
- XmfBip
Buffer_ ⚠Read - Performs a FFI call to XmfBipBuffer_Read from the globally loaded dynamic library xmf
- XmfBip
Buffer_ ⚠Used Size - Performs a FFI call to XmfBipBuffer_UsedSize from the globally loaded dynamic library xmf
- XmfBip
Buffer_ ⚠Write - Performs a FFI call to XmfBipBuffer_Write from the globally loaded dynamic library xmf
- XmfImage_
Free ⚠Data - Performs a FFI call to XmfImage_FreeData from the globally loaded dynamic library xmf
- XmfImage_
Load ⚠File - Performs a FFI call to XmfImage_LoadFile from the globally loaded dynamic library xmf
- XmfImage_
Save ⚠File - 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_
GetCurrent ⚠Time - Performs a FFI call to XmfRecorder_GetCurrentTime from the globally loaded dynamic library xmf
- XmfRecorder_
GetFrame ⚠Rate - 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_
SetBip ⚠Buffer - Performs a FFI call to XmfRecorder_SetBipBuffer from the globally loaded dynamic library xmf
- XmfRecorder_
SetCurrent ⚠Time - Performs a FFI call to XmfRecorder_SetCurrentTime from the globally loaded dynamic library xmf
- XmfRecorder_
SetFile ⚠Name - Performs a FFI call to XmfRecorder_SetFileName from the globally loaded dynamic library xmf
- XmfRecorder_
SetFrame ⚠Rate - Performs a FFI call to XmfRecorder_SetFrameRate from the globally loaded dynamic library xmf
- XmfRecorder_
SetFrame ⚠Size - Performs a FFI call to XmfRecorder_SetFrameSize from the globally loaded dynamic library xmf
- XmfRecorder_
SetMinimum ⚠Frame Rate - Performs a FFI call to XmfRecorder_SetMinimumFrameRate from the globally loaded dynamic library xmf
- XmfRecorder_
SetVideo ⚠Quality - 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_
Update ⚠Frame - Performs a FFI call to XmfRecorder_UpdateFrame from the globally loaded dynamic library xmf
- XmfVpx
Decoder_ ⚠Create - Performs a FFI call to XmfVpxDecoder_Create from the globally loaded dynamic library xmf
- XmfVpx
Decoder_ ⚠Decode - Performs a FFI call to XmfVpxDecoder_Decode from the globally loaded dynamic library xmf
- XmfVpx
Decoder_ ⚠Destroy - Performs a FFI call to XmfVpxDecoder_Destroy from the globally loaded dynamic library xmf
- XmfVpx
Decoder_ ⚠GetLast Error - Performs a FFI call to XmfVpxDecoder_GetLastError from the globally loaded dynamic library xmf
- XmfVpx
Decoder_ ⚠GetNext Frame - Performs a FFI call to XmfVpxDecoder_GetNextFrame from the globally loaded dynamic library xmf
- XmfVpx
Encoder_ ⚠Create - Performs a FFI call to XmfVpxEncoder_Create from the globally loaded dynamic library xmf
- XmfVpx
Encoder_ ⚠Destroy - Performs a FFI call to XmfVpxEncoder_Destroy from the globally loaded dynamic library xmf
- XmfVpx
Encoder_ ⚠Encode Frame - Performs a FFI call to XmfVpxEncoder_EncodeFrame from the globally loaded dynamic library xmf
- XmfVpx
Encoder_ ⚠Flush - Performs a FFI call to XmfVpxEncoder_Flush from the globally loaded dynamic library xmf
- XmfVpx
Encoder_ ⚠Free Encoded Frame - Performs a FFI call to XmfVpxEncoder_FreeEncodedFrame from the globally loaded dynamic library xmf
- XmfVpx
Encoder_ ⚠GetEncoded Frame - Performs a FFI call to XmfVpxEncoder_GetEncodedFrame from the globally loaded dynamic library xmf
- XmfVpx
Encoder_ ⚠GetLast Error - Performs a FFI call to XmfVpxEncoder_GetLastError from the globally loaded dynamic library xmf
- XmfVpx
Encoder_ ⚠GetPacket - Performs a FFI call to XmfVpxEncoder_GetPacket from the globally loaded dynamic library xmf
- XmfVpx
Frame_ ⚠Destroy - Performs a FFI call to XmfVpxFrame_Destroy from the globally loaded dynamic library xmf
- XmfVpx
Frame_ ⚠GetBuffer - Performs a FFI call to XmfVpxFrame_GetBuffer from the globally loaded dynamic library xmf
- XmfVpx
Frame_ ⚠GetDuration - Performs a FFI call to XmfVpxFrame_GetDuration from the globally loaded dynamic library xmf
- XmfVpx
Frame_ ⚠GetFlags - Performs a FFI call to XmfVpxFrame_GetFlags from the globally loaded dynamic library xmf
- XmfVpx
Frame_ ⚠GetHeight - Performs a FFI call to XmfVpxFrame_GetHeight from the globally loaded dynamic library xmf
- XmfVpx
Frame_ ⚠GetPartition Id - Performs a FFI call to XmfVpxFrame_GetPartitionId from the globally loaded dynamic library xmf
- XmfVpx
Frame_ ⚠GetPts - Performs a FFI call to XmfVpxFrame_GetPts from the globally loaded dynamic library xmf
- XmfVpx
Frame_ ⚠GetSize - Performs a FFI call to XmfVpxFrame_GetSize from the globally loaded dynamic library xmf
- XmfVpx
Frame_ ⚠GetSpatial Layer Encoded - Performs a FFI call to XmfVpxFrame_GetSpatialLayerEncoded from the globally loaded dynamic library xmf
- XmfVpx
Frame_ ⚠GetWidth - Performs a FFI call to XmfVpxFrame_GetWidth from the globally loaded dynamic library xmf
- XmfVpx
Image_ ⚠Destroy - Performs a FFI call to XmfVpxImage_Destroy from the globally loaded dynamic library xmf
- XmfVpx
Packet_ ⚠Destroy - Performs a FFI call to XmfVpxPacket_Destroy from the globally loaded dynamic library xmf
- XmfVpx
Packet_ ⚠GetFrame - Performs a FFI call to XmfVpxPacket_GetFrame from the globally loaded dynamic library xmf
- XmfVpx
Packet_ ⚠GetKind - Performs a FFI call to XmfVpxPacket_GetKind from the globally loaded dynamic library xmf
- XmfVpx
Packet_ ⚠IsEmpty - Performs a FFI call to XmfVpxPacket_IsEmpty from the globally loaded dynamic library xmf
- XmfWebM
Muxer_ ⚠Free - Performs a FFI call to XmfWebMMuxer_Free from the globally loaded dynamic library xmf
- XmfWebM
Muxer_ ⚠New - Performs a FFI call to XmfWebMMuxer_New from the globally loaded dynamic library xmf
- XmfWebM
Muxer_ ⚠Remux - Performs a FFI call to XmfWebMMuxer_Remux from the globally loaded dynamic library xmf
- init⚠
dlopen
- Loads and installs the shared library globally.
- is_init
Type Aliases§
- VpxIterator
- XmfBip
Buffer - XmfRecorder
- XmfVpx
Decoder - XmfVpx
Encoder - XmfVpx
Frame - XmfVpx
Image - XmfVpx
Packet - XmfWebM
- XmfWebM
Muxer