From 4ca473eb115ae640cf4bb5b6a46f3e62a392f742 Mon Sep 17 00:00:00 2001 From: Erica Z Date: Wed, 30 Oct 2024 08:44:25 +0100 Subject: [PATCH] mpv oopsie --- src/mpv.rs | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/mpv.rs b/src/mpv.rs index f722504..d7df571 100644 --- a/src/mpv.rs +++ b/src/mpv.rs @@ -4,7 +4,8 @@ #[allow(unreachable_code)] mod ffi; -#[link(name = "mpv")] extern "C" {} +#[link(name = "mpv")] +extern "C" {} pub struct Error(std::ffi::c_int); @@ -56,7 +57,7 @@ impl Handle { name: unsafe { std::ffi::CStr::from_ptr(data.name) } .to_str() .unwrap(), - value: unsafe { FormatData::new(data.format, data.data)}, + value: unsafe { FormatData::new(data.format, data.data) }, } }), )), @@ -73,7 +74,7 @@ impl Handle { 22 => todo!("Event::PropertyChange"), 24 => todo!("Event::QueueOverflow"), 25 => todo!("Event::Hook"), - _ => Event::Ignore(event.event_id), + _ => Some(Event::Ignore(event.event_id)), } } } @@ -132,15 +133,15 @@ impl<'a> FormatData<'a> { } pub struct EventProperty<'a> { - name: &'a str, - value: FormatData<'a>, + pub name: &'a str, + pub value: FormatData<'a>, } pub struct EventLogMessage<'a> { - prefix: &'a str, - level: &'a str, - text: &'a str, - log_level: i32, + pub prefix: &'a str, + pub level: &'a str, + pub text: &'a str, + pub log_level: i32, } pub enum EndFileReason {