unsafe extern "C" fn logging_cb(
    data: *mut c_void, level: c_int, ctx: *const sys::libvlc_log_t, fmt: *const c_char, args: sys::va_list) {

    let f: &Box<dyn Fn(LogLevel, Log, Cow<str>) + Send + 'static> = ::std::mem::transmute(data);
    let mut buf: [c_char; BUF_SIZE] = [0; BUF_SIZE];

    vsnprintf(buf.as_mut_ptr(), BUF_SIZE, fmt, args);

    f(::std::mem::transmute(level), Log{ptr: ctx}, from_cstr_ref(buf.as_ptr()).unwrap());
}
// Write log message to the buffer by vsnprintf.
Write log message to the buffer by vsnprintf.
Write log message to the buffer by vsnprintf .
unsafe extern "C" fn logging_cb(
    data: *mut c_void, level: c_int, ctx: *const sys::libvlc_log_t, fmt: *const c_char, args: sys::va_list) {
    let f: &Box<dyn Fn(LogLevel, Log, Cow<str>) + Send + 'static> = ::std::mem::transmute(data);
    let mut buf: [c_char; BUF_SIZE] = [0; BUF_SIZE];
    vsnprintf(buf.as_mut_ptr(), BUF_SIZE, fmt, args);
    f(::std::mem::transmute(level), Log{ptr: ctx}, from_cstr_ref(buf.as_ptr()).unwrap());
}
unsafe extern " " fn logging_cb ( data : * mut c_void , level : c_int , ctx : * const sys :: libvlc_log_t , fmt : * const c_char , args : sys :: va_list ) { let f : & Box < dyn Fn ( LogLevel , Log , Cow < str > ) + Send + ' static > = :: std :: mem :: transmute ( data ) ; let mut buf : [ c_char ; BUF_SIZE ] = [ 0 ; BUF_SIZE ] ; vsnprintf ( buf . as_mut_ptr ( ) , BUF_SIZE , fmt , args ) ; f ( :: std :: mem :: transmute ( level ) , Log { ptr : ctx } , from_cstr_ref ( buf . as_ptr ( ) ) . unwrap ( ) ) ; }
Write log message to the buffer by vsnprintf.
Write log message to the buffer by vsnprintf .
data
*mut c_void
level
c_int
ctx
*const sys::libvlc_log_t
fmt
*const c_char
args
sys::va_list
data
*mut c_void
level
c_int
ctx
*const sys::libvlc_log_t
fmt
*const c_char
args
sys::va_list