#bindings #decoder #multimedia #codec #image #linker

sys xmf-sys

Bindings to XMF native library: eXtreme Media Foundation

4 releases (2 breaking)

0.3.0 Dec 3, 2024
0.2.0 Jul 28, 2024
0.1.1 Jul 26, 2024
0.1.0 Jul 26, 2024

#886 in Images

Download history 156/week @ 2024-08-20 163/week @ 2024-08-27 115/week @ 2024-09-03 75/week @ 2024-09-10 40/week @ 2024-09-17 107/week @ 2024-09-24 259/week @ 2024-10-01 88/week @ 2024-10-08 94/week @ 2024-10-15 219/week @ 2024-10-22 176/week @ 2024-10-29 287/week @ 2024-11-05 215/week @ 2024-11-12 179/week @ 2024-11-19 221/week @ 2024-11-26 472/week @ 2024-12-03

1,144 downloads per month
Used in cadeau

MIT/Apache

23KB
352 lines

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.

Dependencies

~0.1–4.5MB