mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2025-01-09 08:45:27 +00:00
Revert "gstreamer/log: Allow any glib::Object as target for logging"
This reverts commit 67e6afc628
.
Unfortunately this breaks the API due to how subclassing is modeled in
the GObject bindings.
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/251
This commit is contained in:
parent
ef77a5ae92
commit
8077b7ac82
2 changed files with 4 additions and 4 deletions
|
@ -145,7 +145,7 @@ impl LoggableError {
|
||||||
|
|
||||||
pub fn log(&self) {
|
pub fn log(&self) {
|
||||||
self.category.log(
|
self.category.log(
|
||||||
None as Option<&glib::Object>,
|
None as Option<&::Object>,
|
||||||
::DebugLevel::Error,
|
::DebugLevel::Error,
|
||||||
self.bool_error.filename,
|
self.bool_error.filename,
|
||||||
self.bool_error.function,
|
self.bool_error.function,
|
||||||
|
@ -154,7 +154,7 @@ impl LoggableError {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn log_with_object<O: IsA<glib::Object>>(&self, obj: &O) {
|
pub fn log_with_object<O: IsA<::Object>>(&self, obj: &O) {
|
||||||
self.category.log(
|
self.category.log(
|
||||||
Some(obj),
|
Some(obj),
|
||||||
::DebugLevel::Error,
|
::DebugLevel::Error,
|
||||||
|
|
|
@ -122,7 +122,7 @@ impl DebugCategory {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn log<O: IsA<glib::Object>>(
|
pub fn log<O: IsA<::Object>>(
|
||||||
self,
|
self,
|
||||||
obj: Option<&O>,
|
obj: Option<&O>,
|
||||||
level: ::DebugLevel,
|
level: ::DebugLevel,
|
||||||
|
@ -304,7 +304,7 @@ macro_rules! gst_log_with_level(
|
||||||
module_path!(), line!(), format_args!($($args)*))
|
module_path!(), line!(), format_args!($($args)*))
|
||||||
}};
|
}};
|
||||||
($cat:expr, level: $level:expr, $($args:tt)*) => { {
|
($cat:expr, level: $level:expr, $($args:tt)*) => { {
|
||||||
$crate::DebugCategory::log($cat.clone(), None as Option<&$crate::glib::Object>, $level, file!(),
|
$crate::DebugCategory::log($cat.clone(), None as Option<&$crate::Object>, $level, file!(),
|
||||||
module_path!(), line!(), format_args!($($args)*))
|
module_path!(), line!(), format_args!($($args)*))
|
||||||
}};
|
}};
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue