mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-29 04:51:09 +00:00
gstreamer: Remove unnecessary cast in gst::element_imp_error!
and others
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1187>
This commit is contained in:
parent
608cae3703
commit
0fccb73eb6
1 changed files with 0 additions and 72 deletions
|
@ -1491,76 +1491,52 @@ macro_rules! element_info(
|
|||
#[macro_export]
|
||||
macro_rules! element_imp_error(
|
||||
($imp:expr, $err:expr, ($msg:expr), [$debug:expr]) => { {
|
||||
use $crate::glib::Cast;
|
||||
let obj = $imp.obj();
|
||||
let obj = obj.dynamic_cast_ref::<$crate::Element>().unwrap();
|
||||
$crate::element_error!(obj, $err, ($msg), [$debug]);
|
||||
}};
|
||||
($imp:expr, $err:expr, ($msg:expr)) => { {
|
||||
use $crate::glib::Cast;
|
||||
let obj = $imp.obj();
|
||||
let obj = obj.dynamic_cast_ref::<$crate::Element>().unwrap();
|
||||
$crate::element_error!(obj, $err, ($msg));
|
||||
}};
|
||||
($imp:expr, $err:expr, [$debug:expr]) => { {
|
||||
use $crate::glib::Cast;
|
||||
let obj = $imp.obj();
|
||||
let obj = obj.dynamic_cast_ref::<$crate::Element>().unwrap();
|
||||
$crate::element_error!(obj, $err, [$debug]);
|
||||
}};
|
||||
($imp:expr, $err:expr, ($($msg:tt)*), [$($debug:tt)*]) => { {
|
||||
use $crate::glib::Cast;
|
||||
let obj = $imp.obj();
|
||||
let obj = obj.dynamic_cast_ref::<$crate::Element>().unwrap();
|
||||
$crate::element_error!(obj, $err, ($($msg)*), [$($debug)*]);
|
||||
}};
|
||||
($imp:expr, $err:expr, ($($msg:tt)*)) => { {
|
||||
use $crate::glib::Cast;
|
||||
let obj = $imp.obj();
|
||||
let obj = obj.dynamic_cast_ref::<$crate::Element>().unwrap();
|
||||
$crate::element_error!(obj, $err, ($($msg)*));
|
||||
}};
|
||||
($imp:expr, $err:expr, [$($debug:tt)*]) => { {
|
||||
use $crate::glib::Cast;
|
||||
let obj = $imp.obj();
|
||||
let obj = obj.dynamic_cast_ref::<$crate::Element>().unwrap();
|
||||
$crate::element_error!(obj, $err, [$($debug)*]);
|
||||
}};
|
||||
|
||||
($imp:expr, $err:expr, ($msg:expr), [$debug:expr], details: $details:expr) => { {
|
||||
use $crate::glib::Cast;
|
||||
let obj = $imp.obj();
|
||||
let obj = obj.dynamic_cast_ref::<$crate::Element>().unwrap();
|
||||
$crate::element_error!(obj, $err, ($msg), [$debug], details: $details);
|
||||
}};
|
||||
($imp:expr, $err:expr, ($msg:expr), details: $details:expr) => { {
|
||||
use $crate::glib::Cast;
|
||||
let obj = $imp.obj();
|
||||
let obj = obj.dynamic_cast_ref::<$crate::Element>().unwrap();
|
||||
$crate::element_error!(obj, $err, ($msg), details: $details);
|
||||
}};
|
||||
($imp:expr, $err:expr, [$debug:expr], details: $details:expr) => { {
|
||||
use $crate::glib::Cast;
|
||||
let obj = $imp.obj();
|
||||
let obj = obj.dynamic_cast_ref::<$crate::Element>().unwrap();
|
||||
$crate::element_error!(obj, $err, [$debug], details: $details);
|
||||
}};
|
||||
($imp:expr, $err:expr, ($($msg:tt)*), [$($debug:tt)*], details: $details:expr) => { {
|
||||
use $crate::glib::Cast;
|
||||
let obj = $imp.obj();
|
||||
let obj = obj.dynamic_cast_ref::<$crate::Element>().unwrap();
|
||||
$crate::element_error!(obj, $err, ($($msg)*), [$($debug)*], details: $details);
|
||||
}};
|
||||
($imp:expr, $err:expr, ($($msg:tt)*), details: $details:expr) => { {
|
||||
use $crate::glib::Cast;
|
||||
let obj = $imp.obj();
|
||||
let obj = obj.dynamic_cast_ref::<$crate::Element>().unwrap();
|
||||
$crate::element_error!(obj, $err, ($($msg)*), details: $details);
|
||||
}};
|
||||
($imp:expr, $err:expr, [$($debug:tt)*], details: $details:expr) => { {
|
||||
use $crate::glib::Cast;
|
||||
let obj = $imp.obj();
|
||||
let obj = obj.dynamic_cast_ref::<$crate::Element>().unwrap();
|
||||
$crate::element_error!(obj, $err, [$($debug)*], details: $details);
|
||||
}};
|
||||
);
|
||||
|
@ -1570,76 +1546,52 @@ macro_rules! element_imp_error(
|
|||
#[macro_export]
|
||||
macro_rules! element_imp_warning(
|
||||
($imp:expr, $err:expr, ($msg:expr), [$debug:expr]) => { {
|
||||
use $crate::glib::Cast;
|
||||
let obj = $imp.obj();
|
||||
let obj = obj.dynamic_cast_ref::<$crate::Element>().unwrap();
|
||||
$crate::element_warning!(obj, $err, ($msg), [$debug]);
|
||||
}};
|
||||
($imp:expr, $err:expr, ($msg:expr)) => { {
|
||||
use $crate::glib::Cast;
|
||||
let obj = $imp.obj();
|
||||
let obj = obj.dynamic_cast_ref::<$crate::Element>().unwrap();
|
||||
$crate::element_warning!(obj, $err, ($msg));
|
||||
}};
|
||||
($imp:expr, $err:expr, [$debug:expr]) => { {
|
||||
use $crate::glib::Cast;
|
||||
let obj = $imp.obj();
|
||||
let obj = obj.dynamic_cast_ref::<$crate::Element>().unwrap();
|
||||
$crate::element_warning!(obj, $err, [$debug]);
|
||||
}};
|
||||
($imp:expr, $err:expr, ($($msg:tt)*), [$($debug:tt)*]) => { {
|
||||
use $crate::glib::Cast;
|
||||
let obj = $imp.obj();
|
||||
let obj = obj.dynamic_cast_ref::<$crate::Element>().unwrap();
|
||||
$crate::element_warning!(obj, $err, ($($msg)*), [$($debug)*]);
|
||||
}};
|
||||
($imp:expr, $err:expr, ($($msg:tt)*)) => { {
|
||||
use $crate::glib::Cast;
|
||||
let obj = $imp.obj();
|
||||
let obj = obj.dynamic_cast_ref::<$crate::Element>().unwrap();
|
||||
$crate::element_warning!(obj, $err, ($($msg)*));
|
||||
}};
|
||||
($imp:expr, $err:expr, [$($debug:tt)*]) => { {
|
||||
use $crate::glib::Cast;
|
||||
let obj = $imp.obj();
|
||||
let obj = obj.dynamic_cast_ref::<$crate::Element>().unwrap();
|
||||
$crate::element_warning!(obj, $err, [$($debug)*]);
|
||||
}};
|
||||
|
||||
($imp:expr, $err:expr, ($msg:expr), [$debug:expr], details: $details:expr) => { {
|
||||
use $crate::glib::Cast;
|
||||
let obj = $imp.obj();
|
||||
let obj = obj.dynamic_cast_ref::<$crate::Element>().unwrap();
|
||||
$crate::element_warning!(obj, $err, ($msg), [$debug], details: $details);
|
||||
}};
|
||||
($imp:expr, $err:expr, ($msg:expr), details: $details:expr) => { {
|
||||
use $crate::glib::Cast;
|
||||
let obj = $imp.obj();
|
||||
let obj = obj.dynamic_cast_ref::<$crate::Element>().unwrap();
|
||||
$crate::element_warning!(obj, $err, ($msg), details: $details);
|
||||
}};
|
||||
($imp:expr, $err:expr, [$debug:expr], details: $details:expr) => { {
|
||||
use $crate::glib::Cast;
|
||||
let obj = $imp.obj();
|
||||
let obj = obj.dynamic_cast_ref::<$crate::Element>().unwrap();
|
||||
$crate::element_warning!(obj, $err, [$debug], details: $details);
|
||||
}};
|
||||
($imp:expr, $err:expr, ($($msg:tt)*), [$($debug:tt)*], details: $details:expr) => { {
|
||||
use $crate::glib::Cast;
|
||||
let obj = $imp.obj();
|
||||
let obj = obj.dynamic_cast_ref::<$crate::Element>().unwrap();
|
||||
$crate::element_warning!(obj, $err, ($($msg)*), [$($debug)*], details: $details);
|
||||
}};
|
||||
($imp:expr, $err:expr, ($($msg:tt)*), details: $details:expr) => { {
|
||||
use $crate::glib::Cast;
|
||||
let obj = $imp.obj();
|
||||
let obj = obj.dynamic_cast_ref::<$crate::Element>().unwrap();
|
||||
$crate::element_warning!(obj, $err, ($($msg)*), details: $details);
|
||||
}};
|
||||
($imp:expr, $err:expr, [$($debug:tt)*], details: $details:expr) => { {
|
||||
use $crate::glib::Cast;
|
||||
let obj = $imp.obj();
|
||||
let obj = obj.dynamic_cast_ref::<$crate::Element>().unwrap();
|
||||
$crate::element_warning!(obj, $err, [$($debug)*], details: $details);
|
||||
}};
|
||||
);
|
||||
|
@ -1649,76 +1601,52 @@ macro_rules! element_imp_warning(
|
|||
#[macro_export]
|
||||
macro_rules! element_imp_info(
|
||||
($imp:expr, $err:expr, ($msg:expr), [$debug:expr]) => { {
|
||||
use $crate::glib::Cast;
|
||||
let obj = $imp.obj();
|
||||
let obj = obj.dynamic_cast_ref::<$crate::Element>().unwrap();
|
||||
$crate::element_info!(obj, $err, ($msg), [$debug]);
|
||||
}};
|
||||
($imp:expr, $err:expr, ($msg:expr)) => { {
|
||||
use $crate::glib::Cast;
|
||||
let obj = $imp.obj();
|
||||
let obj = obj.dynamic_cast_ref::<$crate::Element>().unwrap();
|
||||
$crate::element_info!(obj, $err, ($msg));
|
||||
}};
|
||||
($imp:expr, $err:expr, [$debug:expr]) => { {
|
||||
use $crate::glib::Cast;
|
||||
let obj = $imp.obj();
|
||||
let obj = obj.dynamic_cast_ref::<$crate::Element>().unwrap();
|
||||
$crate::element_info!(obj, $err, [$debug]);
|
||||
}};
|
||||
($imp:expr, $err:expr, ($($msg:tt)*), [$($debug:tt)*]) => { {
|
||||
use $crate::glib::Cast;
|
||||
let obj = $imp.obj();
|
||||
let obj = obj.dynamic_cast_ref::<$crate::Element>().unwrap();
|
||||
$crate::element_info!(obj, $err, ($($msg)*), [$($debug)*]);
|
||||
}};
|
||||
($imp:expr, $err:expr, ($($msg:tt)*)) => { {
|
||||
use $crate::glib::Cast;
|
||||
let obj = $imp.obj();
|
||||
let obj = obj.dynamic_cast_ref::<$crate::Element>().unwrap();
|
||||
$crate::element_info!(obj, $err, ($($msg)*));
|
||||
}};
|
||||
($imp:expr, $err:expr, [$($debug:tt)*]) => { {
|
||||
use $crate::glib::Cast;
|
||||
let obj = $imp.obj();
|
||||
let obj = obj.dynamic_cast_ref::<$crate::Element>().unwrap();
|
||||
$crate::element_info!(obj, $err, [$($debug)*]);
|
||||
}};
|
||||
|
||||
($imp:expr, $err:expr, ($msg:expr), [$debug:expr], details: $details:expr) => { {
|
||||
use $crate::glib::Cast;
|
||||
let obj = $imp.obj();
|
||||
let obj = obj.dynamic_cast_ref::<$crate::Element>().unwrap();
|
||||
$crate::element_info!(obj, $err, ($msg), [$debug], details: $details);
|
||||
}};
|
||||
($imp:expr, $err:expr, ($msg:expr), details: $details:expr) => { {
|
||||
use $crate::glib::Cast;
|
||||
let obj = $imp.obj();
|
||||
let obj = obj.dynamic_cast_ref::<$crate::Element>().unwrap();
|
||||
$crate::element_info!(obj, $err, ($msg), details: $details);
|
||||
}};
|
||||
($imp:expr, $err:expr, [$debug:expr], details: $details:expr) => { {
|
||||
use $crate::glib::Cast;
|
||||
let obj = $imp.obj();
|
||||
let obj = obj.dynamic_cast_ref::<$crate::Element>().unwrap();
|
||||
$crate::element_info!(obj, $err, [$debug], details: $details);
|
||||
}};
|
||||
($imp:expr, $err:expr, ($($msg:tt)*), [$($debug:tt)*], details: $details:expr) => { {
|
||||
use $crate::glib::Cast;
|
||||
let obj = $imp.obj();
|
||||
let obj = obj.dynamic_cast_ref::<$crate::Element>().unwrap();
|
||||
$crate::element_info!(obj, $err, ($($msg)*), [$($debug)*], details: $details);
|
||||
}};
|
||||
($imp:expr, $err:expr, ($($msg:tt)*), details: $details:expr) => { {
|
||||
use $crate::glib::Cast;
|
||||
let obj = $imp.obj();
|
||||
let obj = obj.dynamic_cast_ref::<$crate::Element>().unwrap();
|
||||
$crate::element_info!(obj, $err, ($($msg)*), details: $details);
|
||||
}};
|
||||
($imp:expr, $err:expr, [$($debug:tt)*], details: $details:expr) => { {
|
||||
use $crate::glib::Cast;
|
||||
let obj = $imp.obj();
|
||||
let obj = obj.dynamic_cast_ref::<$crate::Element>().unwrap();
|
||||
$crate::element_info!(obj, $err, [$($debug)*], details: $details);
|
||||
}};
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue