mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2025-01-22 23:18:26 +00:00
Regenerate with gir filename/utf8 fixes
This commit is contained in:
parent
7c75d3d8e2
commit
6015e74f0e
3 changed files with 12 additions and 9 deletions
|
@ -13,6 +13,7 @@ use ffi;
|
||||||
use glib;
|
use glib;
|
||||||
use glib::object::IsA;
|
use glib::object::IsA;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
|
use std;
|
||||||
use std::mem;
|
use std::mem;
|
||||||
use std::ptr;
|
use std::ptr;
|
||||||
|
|
||||||
|
@ -24,17 +25,17 @@ pub fn debug_bin_to_dot_data<P: IsA<Bin>>(bin: &P, details: DebugGraphDetails) -
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn debug_bin_to_dot_file<P: IsA<Bin>>(bin: &P, details: DebugGraphDetails, file_name: &str) {
|
pub fn debug_bin_to_dot_file<P: IsA<Bin>, Q: AsRef<std::path::Path>>(bin: &P, details: DebugGraphDetails, file_name: Q) {
|
||||||
skip_assert_initialized!();
|
skip_assert_initialized!();
|
||||||
unsafe {
|
unsafe {
|
||||||
ffi::gst_debug_bin_to_dot_file(bin.to_glib_none().0, details.to_glib(), file_name.to_glib_none().0);
|
ffi::gst_debug_bin_to_dot_file(bin.to_glib_none().0, details.to_glib(), file_name.as_ref().to_glib_none().0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn debug_bin_to_dot_file_with_ts<P: IsA<Bin>>(bin: &P, details: DebugGraphDetails, file_name: &str) {
|
pub fn debug_bin_to_dot_file_with_ts<P: IsA<Bin>, Q: AsRef<std::path::Path>>(bin: &P, details: DebugGraphDetails, file_name: Q) {
|
||||||
skip_assert_initialized!();
|
skip_assert_initialized!();
|
||||||
unsafe {
|
unsafe {
|
||||||
ffi::gst_debug_bin_to_dot_file_with_ts(bin.to_glib_none().0, details.to_glib(), file_name.to_glib_none().0);
|
ffi::gst_debug_bin_to_dot_file_with_ts(bin.to_glib_none().0, details.to_glib(), file_name.as_ref().to_glib_none().0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,7 @@ use ffi;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib_ffi;
|
use glib_ffi;
|
||||||
use gobject_ffi;
|
use gobject_ffi;
|
||||||
|
use std;
|
||||||
use std::mem;
|
use std::mem;
|
||||||
use std::ptr;
|
use std::ptr;
|
||||||
|
|
||||||
|
@ -40,7 +41,7 @@ impl Plugin {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_filename(&self) -> Option<String> {
|
pub fn get_filename(&self) -> Option<std::path::PathBuf> {
|
||||||
unsafe {
|
unsafe {
|
||||||
from_glib_none(ffi::gst_plugin_get_filename(self.to_glib_none().0))
|
from_glib_none(ffi::gst_plugin_get_filename(self.to_glib_none().0))
|
||||||
}
|
}
|
||||||
|
@ -114,11 +115,11 @@ impl Plugin {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn load_file(filename: &str) -> Result<Plugin, Error> {
|
pub fn load_file<P: AsRef<std::path::Path>>(filename: P) -> Result<Plugin, Error> {
|
||||||
assert_initialized_main_thread!();
|
assert_initialized_main_thread!();
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = ptr::null_mut();
|
||||||
let ret = ffi::gst_plugin_load_file(filename.to_glib_none().0, &mut error);
|
let ret = ffi::gst_plugin_load_file(filename.as_ref().to_glib_none().0, &mut error);
|
||||||
if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,6 +12,7 @@ use glib::signal::connect;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib_ffi;
|
use glib_ffi;
|
||||||
use gobject_ffi;
|
use gobject_ffi;
|
||||||
|
use std;
|
||||||
use std::boxed::Box as Box_;
|
use std::boxed::Box as Box_;
|
||||||
use std::mem;
|
use std::mem;
|
||||||
use std::mem::transmute;
|
use std::mem::transmute;
|
||||||
|
@ -112,9 +113,9 @@ impl Registry {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn scan_path(&self, path: &str) -> Result<(), glib::error::BoolError> {
|
pub fn scan_path<P: AsRef<std::path::Path>>(&self, path: P) -> Result<(), glib::error::BoolError> {
|
||||||
unsafe {
|
unsafe {
|
||||||
glib::error::BoolError::from_glib(ffi::gst_registry_scan_path(self.to_glib_none().0, path.to_glib_none().0), "Failed to scan path")
|
glib::error::BoolError::from_glib(ffi::gst_registry_scan_path(self.to_glib_none().0, path.as_ref().to_glib_none().0), "Failed to scan path")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue