Commit f2729fb7 authored by Sebastian Dröge's avatar Sebastian Dröge 🍵

Preset::set_app_dir() returning false is an error, make it a Result

parent d182584c
......@@ -50,7 +50,6 @@ generate = [
"Gst.PadMode",
"Gst.SchedulingFlags",
"Gst.ChildProxy",
"Gst.Preset",
"Gst.TagSetter",
"Gst.QOSType",
"Gst.EventType",
......@@ -768,6 +767,15 @@ trait = false
[object.function.return]
bool_return_is_error = "Failed to add plugin"
[[object]]
name = "Gst.Preset"
status = "generate"
[[object.function]]
name = "set_app_dir"
[object.function.return]
bool_return_is_error = "Failed to set app preset directory"
[[object]]
name = "Gst.*"
status = "generate"
......
......@@ -2,6 +2,7 @@
// DO NOT EDIT
use ffi;
use glib;
use glib::object::IsA;
use glib::translate::*;
use glib_ffi;
......@@ -25,10 +26,10 @@ impl Preset {
}
}
pub fn set_app_dir(app_dir: &str) -> bool {
pub fn set_app_dir(app_dir: &str) -> Result<(), glib::error::BoolError> {
assert_initialized_main_thread!();
unsafe {
from_glib(ffi::gst_preset_set_app_dir(app_dir.to_glib_none().0))
glib::error::BoolError::from_glib(ffi::gst_preset_set_app_dir(app_dir.to_glib_none().0), "Failed to set app preset directory")
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment