Commit 53aae7dd authored by Sebastian Dröge's avatar Sebastian Dröge 🍵

Remove gst_ prefix from all macros except for the logging macros

The latter stay e.g. gst_debug! to be more clear and not conflict with
e.g. the debug! macro from the log crate.
parent 08c54145
......@@ -10,7 +10,7 @@
// This is the format we request:
// Audio / Signed 16bit / 1 channel / arbitrary sample rate
use gst::gst_element_error;
use gst::element_error;
use gst::prelude::*;
use byte_slice_cast::*;
......@@ -75,7 +75,7 @@ fn create_pipeline() -> Result<gst::Pipeline, Error> {
// Pull the sample in question out of the appsink's buffer.
let sample = appsink.pull_sample().map_err(|_| gst::FlowError::Eos)?;
let buffer = sample.get_buffer().ok_or_else(|| {
gst_element_error!(
element_error!(
appsink,
gst::ResourceError::Failed,
("Failed to get buffer from appsink")
......@@ -92,7 +92,7 @@ fn create_pipeline() -> Result<gst::Pipeline, Error> {
// So mapping the buffer makes the underlying memory region accessible to us.
// See: https://gstreamer.freedesktop.org/documentation/plugin-development/advanced/allocation.html
let map = buffer.map_readable().map_err(|_| {
gst_element_error!(
element_error!(
appsink,
gst::ResourceError::Failed,
("Failed to map buffer readable")
......@@ -105,7 +105,7 @@ fn create_pipeline() -> Result<gst::Pipeline, Error> {
// it by setting the appsink's caps. So what we do here is interpret the
// memory region we mapped as an array of signed 16 bit integers.
let samples = map.as_slice_of::<i16>().map_err(|_| {
gst_element_error!(
element_error!(
appsink,
gst::ResourceError::Failed,
("Failed to interprete buffer as S16 PCM")
......
......@@ -3,7 +3,7 @@
// It simply attaches a GstMeta with a Rust String to buffers that are passed into
// an appsrc and retrieves them again from an appsink.
use gst::gst_element_error;
use gst::element_error;
use gst::prelude::*;
#[path = "../examples-common.rs"]
......@@ -227,7 +227,7 @@ fn example_main() {
// Pull the sample in question out of the appsink's buffer.
let sample = appsink.pull_sample().map_err(|_| gst::FlowError::Eos)?;
let buffer = sample.get_buffer().ok_or_else(|| {
gst_element_error!(
element_error!(
appsink,
gst::ResourceError::Failed,
("Failed to get buffer from appsink")
......
......@@ -5,6 +5,7 @@
//
// It's possible to dump the logs at any time in an application,
// not just on exit like is done here.
use gst::gst_error;
use gst::prelude::*;
use std::process;
......@@ -70,7 +71,7 @@ fn example_main() {
.expect("Unable to set the pipeline to the `Null` state");
/* Insert a message into the debug log */
gst::gst_error!(gst::CAT_DEFAULT, "Hi from the debug log ringbuffer example");
gst_error!(gst::CAT_DEFAULT, "Hi from the debug log ringbuffer example");
println!("Dumping debug logs\n");
for s in gst::debug_ring_buffer_logger_get_logs().iter() {
......
......@@ -29,8 +29,8 @@
// Especially Windows APIs tend to be quite picky about samplerate and sample-format.
// The same applies to videostreams.
use gst::gst_element_error;
use gst::gst_element_warning;
use gst::element_error;
use gst::element_warning;
use gst::prelude::*;
#[cfg(feature = "v1_10")]
......@@ -122,7 +122,7 @@ fn example_main() -> Result<(), Error> {
match media_type {
None => {
gst_element_warning!(
element_warning!(
dbin,
gst::CoreError::Negotiation,
("Failed to get media type from pad {}", src_pad.get_name())
......@@ -208,7 +208,7 @@ fn example_main() -> Result<(), Error> {
// The following sends a message of type Error on the bus, containing our detailed
// error information.
#[cfg(feature = "v1_10")]
gst_element_error!(
element_error!(
dbin,
gst::LibraryError::Failed,
("Failed to insert sink"),
......@@ -219,7 +219,7 @@ fn example_main() -> Result<(), Error> {
);
#[cfg(not(feature = "v1_10"))]
gst_element_error!(
element_error!(
dbin,
gst::LibraryError::Failed,
("Failed to insert sink"),
......
......@@ -12,8 +12,8 @@
// {uridecodebin} -| {encodebin}-{filesink}
// \-{queue}-{videoconvert}-{videoscale}----/
use gst::gst_element_error;
use gst::gst_element_warning;
use gst::element_error;
use gst::element_warning;
use gst::prelude::*;
use gst_pbutils::prelude::*;
......@@ -156,7 +156,7 @@ fn example_main() -> Result<(), Error> {
match media_type {
None => {
gst_element_warning!(
element_warning!(
dbin,
gst::CoreError::Negotiation,
(
......@@ -245,7 +245,7 @@ fn example_main() -> Result<(), Error> {
if let Err(err) = link_to_encodebin(is_audio, is_video) {
#[cfg(feature = "v1_10")]
gst_element_error!(
element_error!(
dbin,
gst::LibraryError::Failed,
("Failed to insert sink"),
......@@ -256,7 +256,7 @@ fn example_main() -> Result<(), Error> {
);
#[cfg(not(feature = "v1_10"))]
gst_element_error!(
element_error!(
dbin,
gst::LibraryError::Failed,
("Failed to insert sink"),
......
......@@ -4,7 +4,7 @@
// {videotestsrc} - { glsinkbin }
use gst::gst_element_error;
use gst::element_error;
use gst::prelude::*;
use gst_gl::prelude::*;
......@@ -474,7 +474,7 @@ impl App {
{
let _buffer = sample.get_buffer().ok_or_else(|| {
gst_element_error!(
element_error!(
appsink,
gst::ResourceError::Failed,
("Failed to get buffer from appsink")
......@@ -487,7 +487,7 @@ impl App {
.get_caps()
.and_then(|caps| gst_video::VideoInfo::from_caps(caps).ok())
.ok_or_else(|| {
gst_element_error!(
element_error!(
appsink,
gst::ResourceError::Failed,
("Failed to get video info from sample")
......
use gst::gst_element_error;
use gst::element_error;
use gst::prelude::*;
use std::env;
......@@ -195,7 +195,7 @@ fn example_main() -> Result<(), Error> {
match make_fec_decoder(&rtpbin, sess_id) {
Ok(elem) => Some(elem.to_value()),
Err(err) => {
gst_element_error!(
element_error!(
rtpbin,
gst::LibraryError::Failed,
("Failed to make FEC decoder"),
......@@ -220,7 +220,7 @@ fn example_main() -> Result<(), Error> {
match connect_rtpbin_srcpad(&src_pad, &depay) {
Ok(_) => (),
Err(err) => {
gst_element_error!(
element_error!(
rtpbin,
gst::LibraryError::Failed,
("Failed to link srcpad"),
......
use gst::gst_element_error;
use gst::element_error;
use gst::prelude::*;
#[path = "../examples-common.rs"]
......@@ -115,7 +115,7 @@ fn example_main() -> Result<(), Error> {
match make_fec_encoder(fec_percentage) {
Ok(elem) => Some(elem.to_value()),
Err(err) => {
gst_element_error!(
element_error!(
rtpbin,
gst::LibraryError::Failed,
("Failed to make FEC encoder"),
......@@ -138,7 +138,7 @@ fn example_main() -> Result<(), Error> {
move |decodebin, src_pad| match connect_decodebin_pad(&src_pad, &conv) {
Ok(_) => (),
Err(err) => {
gst_element_error!(
element_error!(
decodebin,
gst::LibraryError::Failed,
("Failed to link decodebin srcpad"),
......
......@@ -6,10 +6,8 @@
// Our filter can only handle F32 mono and acts as a FIR filter. The filter impulse response /
// coefficients are provided via Rust API on the filter as a Vec<f32>.
use gst::gst_element_error;
use gst::gst_info;
use gst::gst_trace;
use gst::prelude::*;
use gst::{element_error, gst_info, gst_trace};
use anyhow::Error;
use derive_more::{Display, Error};
......@@ -192,7 +190,7 @@ mod fir_filter {
// Try mapping the input buffer as writable
let mut data = buf.map_writable().map_err(|_| {
gst_element_error!(
element_error!(
element,
gst::CoreError::Failed,
["Failed to map input buffer readable"]
......@@ -202,7 +200,7 @@ mod fir_filter {
// And reinterprete it as a slice of f32
let samples = data.as_mut_slice_of::<f32>().map_err(|err| {
gst_element_error!(
element_error!(
element,
gst::CoreError::Failed,
["Failed to cast input buffer as f32 slice: {}", err]
......
......@@ -6,7 +6,7 @@
// The appsink enforces RGBA so that the image crate can use it. The image crate also requires
// tightly packed pixels, which is the case for RGBA by default in GStreamer.
use gst::gst_element_error;
use gst::element_error;
use gst::prelude::*;
use anyhow::Error;
......@@ -69,7 +69,7 @@ fn create_pipeline(uri: String, out_path: std::path::PathBuf) -> Result<gst::Pip
// Pull the sample in question out of the appsink's buffer.
let sample = appsink.pull_sample().map_err(|_| gst::FlowError::Eos)?;
let buffer = sample.get_buffer().ok_or_else(|| {
gst_element_error!(
element_error!(
appsink,
gst::ResourceError::Failed,
("Failed to get buffer from appsink")
......@@ -95,7 +95,7 @@ fn create_pipeline(uri: String, out_path: std::path::PathBuf) -> Result<gst::Pip
// So mapping the buffer makes the underlying memory region accessible to us.
// See: https://gstreamer.freedesktop.org/documentation/plugin-development/advanced/allocation.html
let map = buffer.map_readable().map_err(|_| {
gst_element_error!(
element_error!(
appsink,
gst::ResourceError::Failed,
("Failed to map buffer readable")
......@@ -129,7 +129,7 @@ fn create_pipeline(uri: String, out_path: std::path::PathBuf) -> Result<gst::Pip
// Save it at the specific location. This automatically detects the file type
// based on the filename.
scaled_img.save(&out_path).map_err(|err| {
gst_element_error!(
element_error!(
appsink,
gst::ResourceError::Write,
(
......
......@@ -17,7 +17,7 @@
// {src} - {typefind} - {demuxer} -| {multiqueue} - {matroskamux} - {filesink}
// \-[video]-/
use gst::gst_element_error;
use gst::element_error;
use gst::prelude::*;
use std::env;
......@@ -221,7 +221,7 @@ fn handle_demux_pad_added(
};
if let Err(err) = link_to_muxer() {
gst_element_error!(
element_error!(
demuxer,
gst::LibraryError::Failed,
("Failed to insert sink"),
......
......@@ -138,11 +138,11 @@ impl AppSinkCallbacksBuilder {
fn post_panic_error_message(element: &AppSink, err: &dyn std::any::Any) {
skip_assert_initialized!();
if let Some(cause) = err.downcast_ref::<&str>() {
gst::gst_element_error!(&element, gst::LibraryError::Failed, ["Panicked: {}", cause]);
gst::element_error!(&element, gst::LibraryError::Failed, ["Panicked: {}", cause]);
} else if let Some(cause) = err.downcast_ref::<String>() {
gst::gst_element_error!(&element, gst::LibraryError::Failed, ["Panicked: {}", cause]);
gst::element_error!(&element, gst::LibraryError::Failed, ["Panicked: {}", cause]);
} else {
gst::gst_element_error!(&element, gst::LibraryError::Failed, ["Panicked"]);
gst::element_error!(&element, gst::LibraryError::Failed, ["Panicked"]);
}
}
......@@ -152,7 +152,7 @@ unsafe extern "C" fn trampoline_eos(appsink: *mut ffi::GstAppSink, callbacks: gp
if callbacks.panicked.load(Ordering::Relaxed) {
let element: Borrowed<AppSink> = from_glib_borrow(appsink);
gst::gst_element_error!(&element, gst::LibraryError::Failed, ["Panicked"]);
gst::element_error!(&element, gst::LibraryError::Failed, ["Panicked"]);
return;
}
......@@ -179,7 +179,7 @@ unsafe extern "C" fn trampoline_new_preroll(
if callbacks.panicked.load(Ordering::Relaxed) {
let element: Borrowed<AppSink> = from_glib_borrow(appsink);
gst::gst_element_error!(&element, gst::LibraryError::Failed, ["Panicked"]);
gst::element_error!(&element, gst::LibraryError::Failed, ["Panicked"]);
return gst::FlowReturn::Error.to_glib();
}
......@@ -212,7 +212,7 @@ unsafe extern "C" fn trampoline_new_sample(
if callbacks.panicked.load(Ordering::Relaxed) {
let element: Borrowed<AppSink> = from_glib_borrow(appsink);
gst::gst_element_error!(&element, gst::LibraryError::Failed, ["Panicked"]);
gst::element_error!(&element, gst::LibraryError::Failed, ["Panicked"]);
return gst::FlowReturn::Error.to_glib();
}
......
......@@ -111,11 +111,11 @@ impl AppSrcCallbacksBuilder {
fn post_panic_error_message(element: &AppSrc, err: &dyn std::any::Any) {
skip_assert_initialized!();
if let Some(cause) = err.downcast_ref::<&str>() {
gst::gst_element_error!(&element, gst::LibraryError::Failed, ["Panicked: {}", cause]);
gst::element_error!(&element, gst::LibraryError::Failed, ["Panicked: {}", cause]);
} else if let Some(cause) = err.downcast_ref::<String>() {
gst::gst_element_error!(&element, gst::LibraryError::Failed, ["Panicked: {}", cause]);
gst::element_error!(&element, gst::LibraryError::Failed, ["Panicked: {}", cause]);
} else {
gst::gst_element_error!(&element, gst::LibraryError::Failed, ["Panicked"]);
gst::element_error!(&element, gst::LibraryError::Failed, ["Panicked"]);
}
}
......@@ -129,7 +129,7 @@ unsafe extern "C" fn trampoline_need_data(
if callbacks.panicked.load(Ordering::Relaxed) {
let element: Borrowed<AppSrc> = from_glib_borrow(appsrc);
gst::gst_element_error!(&element, gst::LibraryError::Failed, ["Panicked"]);
gst::element_error!(&element, gst::LibraryError::Failed, ["Panicked"]);
return;
}
......@@ -153,7 +153,7 @@ unsafe extern "C" fn trampoline_enough_data(appsrc: *mut ffi::GstAppSrc, callbac
if callbacks.panicked.load(Ordering::Relaxed) {
let element: Borrowed<AppSrc> = from_glib_borrow(appsrc);
gst::gst_element_error!(&element, gst::LibraryError::Failed, ["Panicked"]);
gst::element_error!(&element, gst::LibraryError::Failed, ["Panicked"]);
return;
}
......@@ -179,7 +179,7 @@ unsafe extern "C" fn trampoline_seek_data(
if callbacks.panicked.load(Ordering::Relaxed) {
let element: Borrowed<AppSrc> = from_glib_borrow(appsrc);
gst::gst_element_error!(&element, gst::LibraryError::Failed, ["Panicked"]);
gst::element_error!(&element, gst::LibraryError::Failed, ["Panicked"]);
return false.to_glib();
}
......
......@@ -173,7 +173,7 @@ impl<O: IsA<AudioDecoder>> AudioDecoderExtManual for O {
}
#[macro_export]
macro_rules! gst_audio_decoder_error(
macro_rules! audio_decoder_error(
($obj:expr, $weight:expr, $err:expr, ($msg:expr), [$debug:expr]) => { {
use $crate::AudioDecoderExtManual;
$obj.error(
......
......@@ -177,7 +177,7 @@ impl<T: AudioDecoderImpl> AudioDecoderImplExt for T {
{
Ok(())
} else {
Err(gst::gst_error_msg!(
Err(gst::error_msg!(
gst::CoreError::StateChange,
["Parent function `open` failed"]
))
......@@ -201,7 +201,7 @@ impl<T: AudioDecoderImpl> AudioDecoderImplExt for T {
{
Ok(())
} else {
Err(gst::gst_error_msg!(
Err(gst::error_msg!(
gst::CoreError::StateChange,
["Parent function `close` failed"]
))
......@@ -225,7 +225,7 @@ impl<T: AudioDecoderImpl> AudioDecoderImplExt for T {
{
Ok(())
} else {
Err(gst::gst_error_msg!(
Err(gst::error_msg!(
gst::CoreError::StateChange,
["Parent function `start` failed"]
))
......@@ -249,7 +249,7 @@ impl<T: AudioDecoderImpl> AudioDecoderImplExt for T {
{
Ok(())
} else {
Err(gst::gst_error_msg!(
Err(gst::error_msg!(
gst::CoreError::StateChange,
["Parent function `stop` failed"]
))
......@@ -270,7 +270,7 @@ impl<T: AudioDecoderImpl> AudioDecoderImplExt for T {
(*parent_class)
.set_format
.map(|f| {
gst::gst_result_from_gboolean!(
gst::result_from_gboolean!(
f(
element.unsafe_cast_ref::<AudioDecoder>().to_glib_none().0,
caps.to_glib_none().0
......@@ -389,7 +389,7 @@ impl<T: AudioDecoderImpl> AudioDecoderImplExt for T {
(*parent_class)
.negotiate
.map(|f| {
gst::gst_result_from_gboolean!(
gst::result_from_gboolean!(
f(element.unsafe_cast_ref::<AudioDecoder>().to_glib_none().0),
gst::CAT_RUST,
"Parent function `negotiate` failed"
......@@ -492,7 +492,7 @@ impl<T: AudioDecoderImpl> AudioDecoderImplExt for T {
)) {
Ok(())
} else {
Err(gst::gst_error_msg!(
Err(gst::error_msg!(
gst::CoreError::StateChange,
["Parent function `propose_allocation` failed"]
))
......@@ -519,7 +519,7 @@ impl<T: AudioDecoderImpl> AudioDecoderImplExt for T {
)) {
Ok(())
} else {
Err(gst::gst_error_msg!(
Err(gst::error_msg!(
gst::CoreError::StateChange,
["Parent function `decide_allocation` failed"]
))
......@@ -567,7 +567,7 @@ where
let imp = instance.get_impl();
let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr);
gst::gst_panic_to_error!(&wrap, &instance.panicked(), false, {
gst::panic_to_error!(&wrap, &instance.panicked(), false, {
match imp.open(wrap.unsafe_cast_ref()) {
Ok(()) => true,
Err(err) => {
......@@ -589,7 +589,7 @@ where
let imp = instance.get_impl();
let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr);
gst::gst_panic_to_error!(&wrap, &instance.panicked(), false, {
gst::panic_to_error!(&wrap, &instance.panicked(), false, {
match imp.close(wrap.unsafe_cast_ref()) {
Ok(()) => true,
Err(err) => {
......@@ -611,7 +611,7 @@ where
let imp = instance.get_impl();
let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr);
gst::gst_panic_to_error!(&wrap, &instance.panicked(), false, {
gst::panic_to_error!(&wrap, &instance.panicked(), false, {
match imp.start(wrap.unsafe_cast_ref()) {
Ok(()) => true,
Err(err) => {
......@@ -633,7 +633,7 @@ where
let imp = instance.get_impl();
let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr);
gst::gst_panic_to_error!(&wrap, &instance.panicked(), false, {
gst::panic_to_error!(&wrap, &instance.panicked(), false, {
match imp.stop(wrap.unsafe_cast_ref()) {
Ok(()) => true,
Err(err) => {
......@@ -656,7 +656,7 @@ where
let imp = instance.get_impl();
let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr);
gst::gst_panic_to_error!(&wrap, &instance.panicked(), false, {
gst::panic_to_error!(&wrap, &instance.panicked(), false, {
match imp.set_format(wrap.unsafe_cast_ref(), &from_glib_borrow(caps)) {
Ok(()) => true,
Err(err) => {
......@@ -681,7 +681,7 @@ where
let imp = instance.get_impl();
let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr);
gst::gst_panic_to_error!(&wrap, &instance.panicked(), gst::FlowReturn::Error, {
gst::panic_to_error!(&wrap, &instance.panicked(), gst::FlowReturn::Error, {
match imp.parse(wrap.unsafe_cast_ref(), &from_glib_borrow(adapter)) {
Ok((new_offset, new_len)) => {
assert!(new_offset <= std::i32::MAX as u32);
......@@ -710,7 +710,7 @@ where
let imp = instance.get_impl();
let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr);
gst::gst_panic_to_error!(&wrap, &instance.panicked(), gst::FlowReturn::Error, {
gst::panic_to_error!(&wrap, &instance.panicked(), gst::FlowReturn::Error, {
imp.handle_frame(
wrap.unsafe_cast_ref(),
Option::<gst::Buffer>::from_glib_none(buffer).as_ref(),
......@@ -731,7 +731,7 @@ where
let imp = instance.get_impl();
let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr);
gst::gst_panic_to_error!(&wrap, &instance.panicked(), gst::FlowReturn::Error, {
gst::panic_to_error!(&wrap, &instance.panicked(), gst::FlowReturn::Error, {
match imp.pre_push(wrap.unsafe_cast_ref(), from_glib_full(*buffer)) {
Ok(Some(new_buffer)) => {
*buffer = new_buffer.into_ptr();
......@@ -758,7 +758,7 @@ unsafe extern "C" fn audio_decoder_flush<T: AudioDecoderImpl>(
let imp = instance.get_impl();
let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr);
gst::gst_panic_to_error!(&wrap, &instance.panicked(), (), {
gst::panic_to_error!(&wrap, &instance.panicked(), (), {
AudioDecoderImpl::flush(imp, wrap.unsafe_cast_ref(), from_glib(hard))
})
}
......@@ -773,7 +773,7 @@ where
let imp = instance.get_impl();
let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr);
gst::gst_panic_to_error!(&wrap, &instance.panicked(), false, {
gst::panic_to_error!(&wrap, &instance.panicked(), false, {
match imp.negotiate(wrap.unsafe_cast_ref()) {
Ok(()) => true,
Err(err) => {
......@@ -796,7 +796,7 @@ where
let imp = instance.get_impl();
let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr);
gst::gst_panic_to_error!(&wrap, &instance.panicked(), gst::Caps::new_empty(), {
gst::panic_to_error!(&wrap, &instance.panicked(), gst::Caps::new_empty(), {
AudioDecoderImpl::get_caps(
imp,
wrap.unsafe_cast_ref(),
......@@ -819,7 +819,7 @@ where
let imp = instance.get_impl();
let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr);
gst::gst_panic_to_error!(&wrap, &instance.panicked(), false, {
gst::panic_to_error!(&wrap, &instance.panicked(), false, {
imp.sink_event(wrap.unsafe_cast_ref(), from_glib_full(event))
})
.to_glib()
......@@ -836,7 +836,7 @@ where
let imp = instance.get_impl();
let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr);
gst::gst_panic_to_error!(&wrap, &instance.panicked(), false, {
gst::panic_to_error!(&wrap, &instance.panicked(), false, {
imp.sink_query(wrap.unsafe_cast_ref(), gst::QueryRef::from_mut_ptr(query))
})
.to_glib()
......@@ -853,7 +853,7 @@ where
let imp = instance.get_impl();
let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr);
gst::gst_panic_to_error!(&wrap, &instance.panicked(), false, {
gst::panic_to_error!(&wrap, &instance.panicked(), false, {
imp.src_event(wrap.unsafe_cast_ref(), from_glib_full(event))
})
.to_glib()
......@@ -870,7 +870,7 @@ where
let imp = instance.get_impl();
let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr);
gst::gst_panic_to_error!(&wrap, &instance.panicked(), false, {
gst::panic_to_error!(&wrap, &instance.panicked(), false, {
imp.src_query(wrap.unsafe_cast_ref(), gst::QueryRef::from_mut_ptr(query))
})
.to_glib()
......@@ -888,7 +888,7 @@ where
let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr);
let query = gst::QueryRef