libmpv2_sys/
lib.rs

1#![allow(non_upper_case_globals)]
2#![allow(non_camel_case_types)]
3#![allow(non_snake_case)]
4
5include!(concat!(env!("OUT_DIR"), "/bindings.rs"));
6
7#[inline]
8/// Returns the associated error string.
9pub fn mpv_error_str(e: mpv_error) -> &'static str {
10    let raw = unsafe { mpv_error_string(e) };
11    unsafe { ::std::ffi::CStr::from_ptr(raw) }.to_str().unwrap()
12}