mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-26 11:31:06 +00:00
Fully qualify inner macros for exported macros...
... otherwise they can't be resolved in dependent crates compiled for edition 2018.
This commit is contained in:
parent
d3d503cea6
commit
8af1da1a4e
4 changed files with 28 additions and 28 deletions
|
@ -118,13 +118,13 @@ macro_rules! gst_loggable_error(
|
|||
macro_rules! gst_result_from_gboolean(
|
||||
// Plain strings
|
||||
($gst_sys_bool:expr, $cat:expr, $msg:expr) => {
|
||||
glib_result_from_gboolean!($gst_sys_bool, $msg)
|
||||
$crate::glib::glib_result_from_gboolean!($gst_sys_bool, $msg)
|
||||
.map_err(|bool_err| $crate::LoggableError::new($cat.clone(), bool_err))
|
||||
};
|
||||
|
||||
// Format strings
|
||||
($gst_sys_bool:expr, $cat:expr, $($msg:tt)*) => { {
|
||||
glib_result_from_gboolean!($gst_sys_bool, $($msg)*)
|
||||
$crate::glib::glib_result_from_gboolean!($gst_sys_bool, $($msg)*)
|
||||
.map_err(|bool_err| $crate::LoggableError::new($cat.clone(), bool_err))
|
||||
}};
|
||||
);
|
||||
|
|
|
@ -219,80 +219,80 @@ declare_debug_category_from_name!(CAT_CONTEXT, "GST_CONTEXT");
|
|||
#[macro_export]
|
||||
macro_rules! gst_error(
|
||||
($cat:expr, obj: $obj:expr, $($args:tt)*) => { {
|
||||
gst_log_with_level!($cat.clone(), level: $crate::DebugLevel::Error, obj: $obj, $($args)*)
|
||||
$crate::gst_log_with_level!($cat.clone(), level: $crate::DebugLevel::Error, obj: $obj, $($args)*)
|
||||
}};
|
||||
($cat:expr, $($args:tt)*) => { {
|
||||
gst_log_with_level!($cat.clone(), level: $crate::DebugLevel::Error, $($args)*)
|
||||
$crate::gst_log_with_level!($cat.clone(), level: $crate::DebugLevel::Error, $($args)*)
|
||||
}};
|
||||
);
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! gst_warning(
|
||||
($cat:expr, obj: $obj:expr, $($args:tt)*) => { {
|
||||
gst_log_with_level!($cat.clone(), level: $crate::DebugLevel::Warning, obj: $obj, $($args)*)
|
||||
$crate::gst_log_with_level!($cat.clone(), level: $crate::DebugLevel::Warning, obj: $obj, $($args)*)
|
||||
}};
|
||||
($cat:expr, $($args:tt)*) => { {
|
||||
gst_log_with_level!($cat.clone(), level: $crate::DebugLevel::Warning, $($args)*)
|
||||
$crate::gst_log_with_level!($cat.clone(), level: $crate::DebugLevel::Warning, $($args)*)
|
||||
}};
|
||||
);
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! gst_fixme(
|
||||
($cat:expr, obj: $obj:expr, $($args:tt)*) => { {
|
||||
gst_log_with_level!($cat.clone(), level: $crate::DebugLevel::Fixme, obj: $obj, $($args)*)
|
||||
$crate::gst_log_with_level!($cat.clone(), level: $crate::DebugLevel::Fixme, obj: $obj, $($args)*)
|
||||
}};
|
||||
($cat:expr, $($args:tt)*) => { {
|
||||
gst_log_with_level!($cat.clone(), level: $crate::DebugLevel::Fixme, $($args)*)
|
||||
$crate::gst_log_with_level!($cat.clone(), level: $crate::DebugLevel::Fixme, $($args)*)
|
||||
}};
|
||||
);
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! gst_info(
|
||||
($cat:expr, obj: $obj:expr, $($args:tt)*) => { {
|
||||
gst_log_with_level!($cat.clone(), level: $crate::DebugLevel::Info, obj: $obj, $($args)*)
|
||||
$crate::gst_log_with_level!($cat.clone(), level: $crate::DebugLevel::Info, obj: $obj, $($args)*)
|
||||
}};
|
||||
($cat:expr, $($args:tt)*) => { {
|
||||
gst_log_with_level!($cat.clone(), level: $crate::DebugLevel::Info, $($args)*)
|
||||
$crate::gst_log_with_level!($cat.clone(), level: $crate::DebugLevel::Info, $($args)*)
|
||||
}};
|
||||
);
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! gst_debug(
|
||||
($cat:expr, obj: $obj:expr, $($args:tt)*) => { {
|
||||
gst_log_with_level!($cat.clone(), level: $crate::DebugLevel::Debug, obj: $obj, $($args)*)
|
||||
$crate::gst_log_with_level!($cat.clone(), level: $crate::DebugLevel::Debug, obj: $obj, $($args)*)
|
||||
}};
|
||||
($cat:expr, $($args:tt)*) => { {
|
||||
gst_log_with_level!($cat.clone(), level: $crate::DebugLevel::Debug, $($args)*)
|
||||
$crate::gst_log_with_level!($cat.clone(), level: $crate::DebugLevel::Debug, $($args)*)
|
||||
}};
|
||||
);
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! gst_log(
|
||||
($cat:expr, obj: $obj:expr, $($args:tt)*) => { {
|
||||
gst_log_with_level!($cat.clone(), level: $crate::DebugLevel::Log, obj: $obj, $($args)*)
|
||||
$crate::gst_log_with_level!($cat.clone(), level: $crate::DebugLevel::Log, obj: $obj, $($args)*)
|
||||
}};
|
||||
($cat:expr, $($args:tt)*) => { {
|
||||
gst_log_with_level!($cat.clone(), level: $crate::DebugLevel::Log, $($args)*)
|
||||
$crate::gst_log_with_level!($cat.clone(), level: $crate::DebugLevel::Log, $($args)*)
|
||||
}};
|
||||
);
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! gst_trace(
|
||||
($cat:expr, obj: $obj:expr, $($args:tt)*) => { {
|
||||
gst_log_with_level!($cat.clone(), level: $crate::DebugLevel::Trace, obj: $obj, $($args)*)
|
||||
$crate::gst_log_with_level!($cat.clone(), level: $crate::DebugLevel::Trace, obj: $obj, $($args)*)
|
||||
}};
|
||||
($cat:expr, $($args:tt)*) => { {
|
||||
gst_log_with_level!($cat.clone(), level: $crate::DebugLevel::Trace, $($args)*)
|
||||
$crate::gst_log_with_level!($cat.clone(), level: $crate::DebugLevel::Trace, $($args)*)
|
||||
}};
|
||||
);
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! gst_memdump(
|
||||
($cat:expr, obj: $obj:expr, $($args:tt)*) => { {
|
||||
gst_log_with_level!($cat.clone(), level: $crate::DebugLevel::Memdump, obj: $obj, $($args)*)
|
||||
$crate::gst_log_with_level!($cat.clone(), level: $crate::DebugLevel::Memdump, obj: $obj, $($args)*)
|
||||
}};
|
||||
($cat:expr, $($args:tt)*) => { {
|
||||
gst_log_with_level!($cat.clone(), level: $crate::DebugLevel::Memdump, $($args)*)
|
||||
$crate::gst_log_with_level!($cat.clone(), level: $crate::DebugLevel::Memdump, $($args)*)
|
||||
}};
|
||||
);
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ macro_rules! gst_plugin_define(
|
|||
|
||||
pub fn plugin_register_static() -> Result<(), glib::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(
|
||||
$crate::glib::glib_result_from_gboolean!(
|
||||
$crate::gst_sys::gst_plugin_register_static(
|
||||
$crate::subclass::plugin::MAJOR_VERSION,
|
||||
$crate::subclass::plugin::MINOR_VERSION,
|
||||
|
@ -73,18 +73,18 @@ macro_rules! gst_plugin_define(
|
|||
Ok(_) => $crate::glib_sys::GTRUE,
|
||||
Err(err) => {
|
||||
let cat = $crate::DebugCategory::get("GST_PLUGIN_LOADING").unwrap();
|
||||
gst_error!(cat, "Failed to register plugin: {}", err);
|
||||
$crate::gst_error!(cat, "Failed to register plugin: {}", err);
|
||||
$crate::glib_sys::GFALSE
|
||||
}
|
||||
}
|
||||
Err(err) => {
|
||||
let cat = $crate::DebugCategory::get("GST_PLUGIN_LOADING").unwrap();
|
||||
if let Some(cause) = err.downcast_ref::<&str>() {
|
||||
gst_error!(cat, "Failed to initialize plugin due to panic: {}", cause);
|
||||
$crate::gst_error!(cat, "Failed to initialize plugin due to panic: {}", cause);
|
||||
} else if let Some(cause) = err.downcast_ref::<String>() {
|
||||
gst_error!(cat, "Failed to initialize plugin due to panic: {}", cause);
|
||||
$crate::gst_error!(cat, "Failed to initialize plugin due to panic: {}", cause);
|
||||
} else {
|
||||
gst_error!(cat, "Failed to initialize plugin due to panic");
|
||||
$crate::gst_error!(cat, "Failed to initialize plugin due to panic");
|
||||
}
|
||||
|
||||
$crate::glib_sys::GFALSE
|
||||
|
|
|
@ -42,7 +42,7 @@ macro_rules! gst_plugin_define(
|
|||
|
||||
pub fn plugin_register_static() -> Result<(), glib::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(
|
||||
$crate::glib::glib_result_from_gboolean!(
|
||||
$crate::gst_sys::gst_plugin_register_static(
|
||||
$crate::subclass::plugin::MAJOR_VERSION,
|
||||
$crate::subclass::plugin::MINOR_VERSION,
|
||||
|
@ -81,18 +81,18 @@ macro_rules! gst_plugin_define(
|
|||
Ok(_) => $crate::glib_sys::GTRUE,
|
||||
Err(err) => {
|
||||
let cat = $crate::DebugCategory::get("GST_PLUGIN_LOADING").unwrap();
|
||||
gst_error!(cat, "Failed to register plugin: {}", err);
|
||||
$crate::gst_error!(cat, "Failed to register plugin: {}", err);
|
||||
$crate::glib_sys::GFALSE
|
||||
}
|
||||
}
|
||||
Err(err) => {
|
||||
let cat = $crate::DebugCategory::get("GST_PLUGIN_LOADING").unwrap();
|
||||
if let Some(cause) = err.downcast_ref::<&str>() {
|
||||
gst_error!(cat, "Failed to initialize plugin due to panic: {}", cause);
|
||||
$crate::gst_error!(cat, "Failed to initialize plugin due to panic: {}", cause);
|
||||
} else if let Some(cause) = err.downcast_ref::<String>() {
|
||||
gst_error!(cat, "Failed to initialize plugin due to panic: {}", cause);
|
||||
$crate::gst_error!(cat, "Failed to initialize plugin due to panic: {}", cause);
|
||||
} else {
|
||||
gst_error!(cat, "Failed to initialize plugin due to panic");
|
||||
$crate::gst_error!(cat, "Failed to initialize plugin due to panic");
|
||||
}
|
||||
|
||||
$crate::glib_sys::GFALSE
|
||||
|
|
Loading…
Reference in a new issue