Change from impl_() to imp()

This commit is contained in:
Sebastian Dröge 2021-12-28 17:50:06 +02:00
parent fc452036d2
commit bbcd221e8d
33 changed files with 276 additions and 276 deletions

View file

@ -542,7 +542,7 @@ unsafe extern "C" fn audio_decoder_open<T: AudioDecoderImpl>(
ptr: *mut ffi::GstAudioDecoder, ptr: *mut ffi::GstAudioDecoder,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr); let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -561,7 +561,7 @@ unsafe extern "C" fn audio_decoder_close<T: AudioDecoderImpl>(
ptr: *mut ffi::GstAudioDecoder, ptr: *mut ffi::GstAudioDecoder,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr); let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -580,7 +580,7 @@ unsafe extern "C" fn audio_decoder_start<T: AudioDecoderImpl>(
ptr: *mut ffi::GstAudioDecoder, ptr: *mut ffi::GstAudioDecoder,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr); let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -599,7 +599,7 @@ unsafe extern "C" fn audio_decoder_stop<T: AudioDecoderImpl>(
ptr: *mut ffi::GstAudioDecoder, ptr: *mut ffi::GstAudioDecoder,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr); let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -619,7 +619,7 @@ unsafe extern "C" fn audio_decoder_set_format<T: AudioDecoderImpl>(
caps: *mut gst::ffi::GstCaps, caps: *mut gst::ffi::GstCaps,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr); let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -641,7 +641,7 @@ unsafe extern "C" fn audio_decoder_parse<T: AudioDecoderImpl>(
len: *mut i32, len: *mut i32,
) -> gst::ffi::GstFlowReturn { ) -> gst::ffi::GstFlowReturn {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr); let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), gst::FlowReturn::Error, { gst::panic_to_error!(&wrap, imp.panicked(), gst::FlowReturn::Error, {
@ -667,7 +667,7 @@ unsafe extern "C" fn audio_decoder_handle_frame<T: AudioDecoderImpl>(
// FIXME: Misgenerated in gstreamer-audio-sys // FIXME: Misgenerated in gstreamer-audio-sys
let buffer = buffer as *mut gst::ffi::GstBuffer; let buffer = buffer as *mut gst::ffi::GstBuffer;
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr); let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), gst::FlowReturn::Error, { gst::panic_to_error!(&wrap, imp.panicked(), gst::FlowReturn::Error, {
@ -685,7 +685,7 @@ unsafe extern "C" fn audio_decoder_pre_push<T: AudioDecoderImpl>(
buffer: *mut *mut gst::ffi::GstBuffer, buffer: *mut *mut gst::ffi::GstBuffer,
) -> gst::ffi::GstFlowReturn { ) -> gst::ffi::GstFlowReturn {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr); let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), gst::FlowReturn::Error, { gst::panic_to_error!(&wrap, imp.panicked(), gst::FlowReturn::Error, {
@ -710,7 +710,7 @@ unsafe extern "C" fn audio_decoder_flush<T: AudioDecoderImpl>(
hard: glib::ffi::gboolean, hard: glib::ffi::gboolean,
) { ) {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr); let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), (), { gst::panic_to_error!(&wrap, imp.panicked(), (), {
@ -722,7 +722,7 @@ unsafe extern "C" fn audio_decoder_negotiate<T: AudioDecoderImpl>(
ptr: *mut ffi::GstAudioDecoder, ptr: *mut ffi::GstAudioDecoder,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr); let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -742,7 +742,7 @@ unsafe extern "C" fn audio_decoder_getcaps<T: AudioDecoderImpl>(
filter: *mut gst::ffi::GstCaps, filter: *mut gst::ffi::GstCaps,
) -> *mut gst::ffi::GstCaps { ) -> *mut gst::ffi::GstCaps {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr); let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), gst::Caps::new_empty(), { gst::panic_to_error!(&wrap, imp.panicked(), gst::Caps::new_empty(), {
@ -762,7 +762,7 @@ unsafe extern "C" fn audio_decoder_sink_event<T: AudioDecoderImpl>(
event: *mut gst::ffi::GstEvent, event: *mut gst::ffi::GstEvent,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr); let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -776,7 +776,7 @@ unsafe extern "C" fn audio_decoder_sink_query<T: AudioDecoderImpl>(
query: *mut gst::ffi::GstQuery, query: *mut gst::ffi::GstQuery,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr); let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -790,7 +790,7 @@ unsafe extern "C" fn audio_decoder_src_event<T: AudioDecoderImpl>(
event: *mut gst::ffi::GstEvent, event: *mut gst::ffi::GstEvent,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr); let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -804,7 +804,7 @@ unsafe extern "C" fn audio_decoder_src_query<T: AudioDecoderImpl>(
query: *mut gst::ffi::GstQuery, query: *mut gst::ffi::GstQuery,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr); let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -818,7 +818,7 @@ unsafe extern "C" fn audio_decoder_propose_allocation<T: AudioDecoderImpl>(
query: *mut gst::ffi::GstQuery, query: *mut gst::ffi::GstQuery,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr); let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr);
let query = match gst::QueryRef::from_mut_ptr(query).view_mut() { let query = match gst::QueryRef::from_mut_ptr(query).view_mut() {
gst::QueryView::Allocation(allocation) => allocation, gst::QueryView::Allocation(allocation) => allocation,
@ -842,7 +842,7 @@ unsafe extern "C" fn audio_decoder_decide_allocation<T: AudioDecoderImpl>(
query: *mut gst::ffi::GstQuery, query: *mut gst::ffi::GstQuery,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr); let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr);
let query = match gst::QueryRef::from_mut_ptr(query).view_mut() { let query = match gst::QueryRef::from_mut_ptr(query).view_mut() {
gst::QueryView::Allocation(allocation) => allocation, gst::QueryView::Allocation(allocation) => allocation,

View file

@ -491,7 +491,7 @@ unsafe extern "C" fn audio_encoder_open<T: AudioEncoderImpl>(
ptr: *mut ffi::GstAudioEncoder, ptr: *mut ffi::GstAudioEncoder,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<AudioEncoder> = from_glib_borrow(ptr); let wrap: Borrowed<AudioEncoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -510,7 +510,7 @@ unsafe extern "C" fn audio_encoder_close<T: AudioEncoderImpl>(
ptr: *mut ffi::GstAudioEncoder, ptr: *mut ffi::GstAudioEncoder,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<AudioEncoder> = from_glib_borrow(ptr); let wrap: Borrowed<AudioEncoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -529,7 +529,7 @@ unsafe extern "C" fn audio_encoder_start<T: AudioEncoderImpl>(
ptr: *mut ffi::GstAudioEncoder, ptr: *mut ffi::GstAudioEncoder,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<AudioEncoder> = from_glib_borrow(ptr); let wrap: Borrowed<AudioEncoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -548,7 +548,7 @@ unsafe extern "C" fn audio_encoder_stop<T: AudioEncoderImpl>(
ptr: *mut ffi::GstAudioEncoder, ptr: *mut ffi::GstAudioEncoder,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<AudioEncoder> = from_glib_borrow(ptr); let wrap: Borrowed<AudioEncoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -568,7 +568,7 @@ unsafe extern "C" fn audio_encoder_set_format<T: AudioEncoderImpl>(
info: *mut ffi::GstAudioInfo, info: *mut ffi::GstAudioInfo,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<AudioEncoder> = from_glib_borrow(ptr); let wrap: Borrowed<AudioEncoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -590,7 +590,7 @@ unsafe extern "C" fn audio_encoder_handle_frame<T: AudioEncoderImpl>(
// FIXME: Misgenerated in gstreamer-audio-sys // FIXME: Misgenerated in gstreamer-audio-sys
let buffer = buffer as *mut gst::ffi::GstBuffer; let buffer = buffer as *mut gst::ffi::GstBuffer;
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<AudioEncoder> = from_glib_borrow(ptr); let wrap: Borrowed<AudioEncoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), gst::FlowReturn::Error, { gst::panic_to_error!(&wrap, imp.panicked(), gst::FlowReturn::Error, {
@ -608,7 +608,7 @@ unsafe extern "C" fn audio_encoder_pre_push<T: AudioEncoderImpl>(
buffer: *mut *mut gst::ffi::GstBuffer, buffer: *mut *mut gst::ffi::GstBuffer,
) -> gst::ffi::GstFlowReturn { ) -> gst::ffi::GstFlowReturn {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<AudioEncoder> = from_glib_borrow(ptr); let wrap: Borrowed<AudioEncoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), gst::FlowReturn::Error, { gst::panic_to_error!(&wrap, imp.panicked(), gst::FlowReturn::Error, {
@ -630,7 +630,7 @@ unsafe extern "C" fn audio_encoder_pre_push<T: AudioEncoderImpl>(
unsafe extern "C" fn audio_encoder_flush<T: AudioEncoderImpl>(ptr: *mut ffi::GstAudioEncoder) { unsafe extern "C" fn audio_encoder_flush<T: AudioEncoderImpl>(ptr: *mut ffi::GstAudioEncoder) {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<AudioEncoder> = from_glib_borrow(ptr); let wrap: Borrowed<AudioEncoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), (), { gst::panic_to_error!(&wrap, imp.panicked(), (), {
@ -642,7 +642,7 @@ unsafe extern "C" fn audio_encoder_negotiate<T: AudioEncoderImpl>(
ptr: *mut ffi::GstAudioEncoder, ptr: *mut ffi::GstAudioEncoder,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<AudioEncoder> = from_glib_borrow(ptr); let wrap: Borrowed<AudioEncoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -662,7 +662,7 @@ unsafe extern "C" fn audio_encoder_getcaps<T: AudioEncoderImpl>(
filter: *mut gst::ffi::GstCaps, filter: *mut gst::ffi::GstCaps,
) -> *mut gst::ffi::GstCaps { ) -> *mut gst::ffi::GstCaps {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<AudioEncoder> = from_glib_borrow(ptr); let wrap: Borrowed<AudioEncoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), gst::Caps::new_empty(), { gst::panic_to_error!(&wrap, imp.panicked(), gst::Caps::new_empty(), {
@ -682,7 +682,7 @@ unsafe extern "C" fn audio_encoder_sink_event<T: AudioEncoderImpl>(
event: *mut gst::ffi::GstEvent, event: *mut gst::ffi::GstEvent,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<AudioEncoder> = from_glib_borrow(ptr); let wrap: Borrowed<AudioEncoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -696,7 +696,7 @@ unsafe extern "C" fn audio_encoder_sink_query<T: AudioEncoderImpl>(
query: *mut gst::ffi::GstQuery, query: *mut gst::ffi::GstQuery,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<AudioEncoder> = from_glib_borrow(ptr); let wrap: Borrowed<AudioEncoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -710,7 +710,7 @@ unsafe extern "C" fn audio_encoder_src_event<T: AudioEncoderImpl>(
event: *mut gst::ffi::GstEvent, event: *mut gst::ffi::GstEvent,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<AudioEncoder> = from_glib_borrow(ptr); let wrap: Borrowed<AudioEncoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -724,7 +724,7 @@ unsafe extern "C" fn audio_encoder_src_query<T: AudioEncoderImpl>(
query: *mut gst::ffi::GstQuery, query: *mut gst::ffi::GstQuery,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<AudioEncoder> = from_glib_borrow(ptr); let wrap: Borrowed<AudioEncoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -738,7 +738,7 @@ unsafe extern "C" fn audio_encoder_propose_allocation<T: AudioEncoderImpl>(
query: *mut gst::ffi::GstQuery, query: *mut gst::ffi::GstQuery,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<AudioEncoder> = from_glib_borrow(ptr); let wrap: Borrowed<AudioEncoder> = from_glib_borrow(ptr);
let query = match gst::QueryRef::from_mut_ptr(query).view_mut() { let query = match gst::QueryRef::from_mut_ptr(query).view_mut() {
gst::QueryView::Allocation(allocation) => allocation, gst::QueryView::Allocation(allocation) => allocation,
@ -762,7 +762,7 @@ unsafe extern "C" fn audio_encoder_decide_allocation<T: AudioEncoderImpl>(
query: *mut gst::ffi::GstQuery, query: *mut gst::ffi::GstQuery,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<AudioEncoder> = from_glib_borrow(ptr); let wrap: Borrowed<AudioEncoder> = from_glib_borrow(ptr);
let query = match gst::QueryRef::from_mut_ptr(query).view_mut() { let query = match gst::QueryRef::from_mut_ptr(query).view_mut() {
gst::QueryView::Allocation(allocation) => allocation, gst::QueryView::Allocation(allocation) => allocation,

View file

@ -201,7 +201,7 @@ unsafe extern "C" fn audiosink_close<T: AudioSinkImpl>(
ptr: *mut ffi::GstAudioSink, ptr: *mut ffi::GstAudioSink,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<AudioSink> = from_glib_borrow(ptr); let wrap: Borrowed<AudioSink> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -218,7 +218,7 @@ unsafe extern "C" fn audiosink_close<T: AudioSinkImpl>(
unsafe extern "C" fn audiosink_delay<T: AudioSinkImpl>(ptr: *mut ffi::GstAudioSink) -> u32 { unsafe extern "C" fn audiosink_delay<T: AudioSinkImpl>(ptr: *mut ffi::GstAudioSink) -> u32 {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<AudioSink> = from_glib_borrow(ptr); let wrap: Borrowed<AudioSink> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), 0, { gst::panic_to_error!(&wrap, imp.panicked(), 0, {
@ -230,7 +230,7 @@ unsafe extern "C" fn audiosink_open<T: AudioSinkImpl>(
ptr: *mut ffi::GstAudioSink, ptr: *mut ffi::GstAudioSink,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<AudioSink> = from_glib_borrow(ptr); let wrap: Borrowed<AudioSink> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -250,7 +250,7 @@ unsafe extern "C" fn audiosink_prepare<T: AudioSinkImpl>(
spec: *mut ffi::GstAudioRingBufferSpec, spec: *mut ffi::GstAudioRingBufferSpec,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<AudioSink> = from_glib_borrow(ptr); let wrap: Borrowed<AudioSink> = from_glib_borrow(ptr);
let spec = &mut *(spec as *mut AudioRingBufferSpec); let spec = &mut *(spec as *mut AudioRingBufferSpec);
@ -271,7 +271,7 @@ unsafe extern "C" fn audiosink_unprepare<T: AudioSinkImpl>(
ptr: *mut ffi::GstAudioSink, ptr: *mut ffi::GstAudioSink,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<AudioSink> = from_glib_borrow(ptr); let wrap: Borrowed<AudioSink> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -292,7 +292,7 @@ unsafe extern "C" fn audiosink_write<T: AudioSinkImpl>(
length: u32, length: u32,
) -> i32 { ) -> i32 {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<AudioSink> = from_glib_borrow(ptr); let wrap: Borrowed<AudioSink> = from_glib_borrow(ptr);
let data_slice = std::slice::from_raw_parts(data as *const u8, length as usize); let data_slice = std::slice::from_raw_parts(data as *const u8, length as usize);
@ -303,7 +303,7 @@ unsafe extern "C" fn audiosink_write<T: AudioSinkImpl>(
unsafe extern "C" fn audiosink_reset<T: AudioSinkImpl>(ptr: *mut ffi::GstAudioSink) { unsafe extern "C" fn audiosink_reset<T: AudioSinkImpl>(ptr: *mut ffi::GstAudioSink) {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<AudioSink> = from_glib_borrow(ptr); let wrap: Borrowed<AudioSink> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), (), { gst::panic_to_error!(&wrap, imp.panicked(), (), {

View file

@ -217,7 +217,7 @@ unsafe extern "C" fn audiosrc_close<T: AudioSrcImpl>(
ptr: *mut ffi::GstAudioSrc, ptr: *mut ffi::GstAudioSrc,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<AudioSrc> = from_glib_borrow(ptr); let wrap: Borrowed<AudioSrc> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -234,7 +234,7 @@ unsafe extern "C" fn audiosrc_close<T: AudioSrcImpl>(
unsafe extern "C" fn audiosrc_delay<T: AudioSrcImpl>(ptr: *mut ffi::GstAudioSrc) -> u32 { unsafe extern "C" fn audiosrc_delay<T: AudioSrcImpl>(ptr: *mut ffi::GstAudioSrc) -> u32 {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<AudioSrc> = from_glib_borrow(ptr); let wrap: Borrowed<AudioSrc> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), 0, { gst::panic_to_error!(&wrap, imp.panicked(), 0, {
@ -246,7 +246,7 @@ unsafe extern "C" fn audiosrc_open<T: AudioSrcImpl>(
ptr: *mut ffi::GstAudioSrc, ptr: *mut ffi::GstAudioSrc,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<AudioSrc> = from_glib_borrow(ptr); let wrap: Borrowed<AudioSrc> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -266,7 +266,7 @@ unsafe extern "C" fn audiosrc_prepare<T: AudioSrcImpl>(
spec: *mut ffi::GstAudioRingBufferSpec, spec: *mut ffi::GstAudioRingBufferSpec,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<AudioSrc> = from_glib_borrow(ptr); let wrap: Borrowed<AudioSrc> = from_glib_borrow(ptr);
let spec = &mut *(spec as *mut AudioRingBufferSpec); let spec = &mut *(spec as *mut AudioRingBufferSpec);
@ -287,7 +287,7 @@ unsafe extern "C" fn audiosrc_unprepare<T: AudioSrcImpl>(
ptr: *mut ffi::GstAudioSrc, ptr: *mut ffi::GstAudioSrc,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<AudioSrc> = from_glib_borrow(ptr); let wrap: Borrowed<AudioSrc> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -309,7 +309,7 @@ unsafe extern "C" fn audiosrc_read<T: AudioSrcImpl>(
timestamp: *mut gst::ffi::GstClockTime, timestamp: *mut gst::ffi::GstClockTime,
) -> u32 { ) -> u32 {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<AudioSrc> = from_glib_borrow(ptr); let wrap: Borrowed<AudioSrc> = from_glib_borrow(ptr);
let data_slice = std::slice::from_raw_parts_mut(data as *mut u8, length as usize); let data_slice = std::slice::from_raw_parts_mut(data as *mut u8, length as usize);
@ -325,7 +325,7 @@ unsafe extern "C" fn audiosrc_read<T: AudioSrcImpl>(
unsafe extern "C" fn audiosrc_reset<T: AudioSrcImpl>(ptr: *mut ffi::GstAudioSrc) { unsafe extern "C" fn audiosrc_reset<T: AudioSrcImpl>(ptr: *mut ffi::GstAudioSrc) {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<AudioSrc> = from_glib_borrow(ptr); let wrap: Borrowed<AudioSrc> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), (), { gst::panic_to_error!(&wrap, imp.panicked(), (), {

View file

@ -821,7 +821,7 @@ unsafe extern "C" fn aggregator_flush<T: AggregatorImpl>(
ptr: *mut ffi::GstAggregator, ptr: *mut ffi::GstAggregator,
) -> gst::ffi::GstFlowReturn { ) -> gst::ffi::GstFlowReturn {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<Aggregator> = from_glib_borrow(ptr); let wrap: Borrowed<Aggregator> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), gst::FlowReturn::Error, { gst::panic_to_error!(&wrap, imp.panicked(), gst::FlowReturn::Error, {
@ -836,7 +836,7 @@ unsafe extern "C" fn aggregator_clip<T: AggregatorImpl>(
buffer: *mut gst::ffi::GstBuffer, buffer: *mut gst::ffi::GstBuffer,
) -> *mut gst::ffi::GstBuffer { ) -> *mut gst::ffi::GstBuffer {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<Aggregator> = from_glib_borrow(ptr); let wrap: Borrowed<Aggregator> = from_glib_borrow(ptr);
let ret = gst::panic_to_error!(&wrap, imp.panicked(), None, { let ret = gst::panic_to_error!(&wrap, imp.panicked(), None, {
@ -855,7 +855,7 @@ unsafe extern "C" fn aggregator_finish_buffer<T: AggregatorImpl>(
buffer: *mut gst::ffi::GstBuffer, buffer: *mut gst::ffi::GstBuffer,
) -> gst::ffi::GstFlowReturn { ) -> gst::ffi::GstFlowReturn {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<Aggregator> = from_glib_borrow(ptr); let wrap: Borrowed<Aggregator> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), gst::FlowReturn::Error, { gst::panic_to_error!(&wrap, imp.panicked(), gst::FlowReturn::Error, {
@ -872,7 +872,7 @@ unsafe extern "C" fn aggregator_finish_buffer_list<T: AggregatorImpl>(
buffer_list: *mut gst::ffi::GstBufferList, buffer_list: *mut gst::ffi::GstBufferList,
) -> gst::ffi::GstFlowReturn { ) -> gst::ffi::GstFlowReturn {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<Aggregator> = from_glib_borrow(ptr); let wrap: Borrowed<Aggregator> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), gst::FlowReturn::Error, { gst::panic_to_error!(&wrap, imp.panicked(), gst::FlowReturn::Error, {
@ -888,7 +888,7 @@ unsafe extern "C" fn aggregator_sink_event<T: AggregatorImpl>(
event: *mut gst::ffi::GstEvent, event: *mut gst::ffi::GstEvent,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<Aggregator> = from_glib_borrow(ptr); let wrap: Borrowed<Aggregator> = from_glib_borrow(ptr);
gst::panic_to_error!(wrap, imp.panicked(), false, { gst::panic_to_error!(wrap, imp.panicked(), false, {
@ -909,7 +909,7 @@ unsafe extern "C" fn aggregator_sink_event_pre_queue<T: AggregatorImpl>(
event: *mut gst::ffi::GstEvent, event: *mut gst::ffi::GstEvent,
) -> gst::ffi::GstFlowReturn { ) -> gst::ffi::GstFlowReturn {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<Aggregator> = from_glib_borrow(ptr); let wrap: Borrowed<Aggregator> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), gst::FlowReturn::Error, { gst::panic_to_error!(&wrap, imp.panicked(), gst::FlowReturn::Error, {
@ -929,7 +929,7 @@ unsafe extern "C" fn aggregator_sink_query<T: AggregatorImpl>(
query: *mut gst::ffi::GstQuery, query: *mut gst::ffi::GstQuery,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<Aggregator> = from_glib_borrow(ptr); let wrap: Borrowed<Aggregator> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -950,7 +950,7 @@ unsafe extern "C" fn aggregator_sink_query_pre_queue<T: AggregatorImpl>(
query: *mut gst::ffi::GstQuery, query: *mut gst::ffi::GstQuery,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<Aggregator> = from_glib_borrow(ptr); let wrap: Borrowed<Aggregator> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -968,7 +968,7 @@ unsafe extern "C" fn aggregator_src_event<T: AggregatorImpl>(
event: *mut gst::ffi::GstEvent, event: *mut gst::ffi::GstEvent,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<Aggregator> = from_glib_borrow(ptr); let wrap: Borrowed<Aggregator> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -982,7 +982,7 @@ unsafe extern "C" fn aggregator_src_query<T: AggregatorImpl>(
query: *mut gst::ffi::GstQuery, query: *mut gst::ffi::GstQuery,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<Aggregator> = from_glib_borrow(ptr); let wrap: Borrowed<Aggregator> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -997,7 +997,7 @@ unsafe extern "C" fn aggregator_src_activate<T: AggregatorImpl>(
active: glib::ffi::gboolean, active: glib::ffi::gboolean,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<Aggregator> = from_glib_borrow(ptr); let wrap: Borrowed<Aggregator> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -1017,7 +1017,7 @@ unsafe extern "C" fn aggregator_aggregate<T: AggregatorImpl>(
timeout: glib::ffi::gboolean, timeout: glib::ffi::gboolean,
) -> gst::ffi::GstFlowReturn { ) -> gst::ffi::GstFlowReturn {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<Aggregator> = from_glib_borrow(ptr); let wrap: Borrowed<Aggregator> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), gst::FlowReturn::Error, { gst::panic_to_error!(&wrap, imp.panicked(), gst::FlowReturn::Error, {
@ -1031,7 +1031,7 @@ unsafe extern "C" fn aggregator_start<T: AggregatorImpl>(
ptr: *mut ffi::GstAggregator, ptr: *mut ffi::GstAggregator,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<Aggregator> = from_glib_borrow(ptr); let wrap: Borrowed<Aggregator> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -1050,7 +1050,7 @@ unsafe extern "C" fn aggregator_stop<T: AggregatorImpl>(
ptr: *mut ffi::GstAggregator, ptr: *mut ffi::GstAggregator,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<Aggregator> = from_glib_borrow(ptr); let wrap: Borrowed<Aggregator> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -1069,7 +1069,7 @@ unsafe extern "C" fn aggregator_get_next_time<T: AggregatorImpl>(
ptr: *mut ffi::GstAggregator, ptr: *mut ffi::GstAggregator,
) -> gst::ffi::GstClockTime { ) -> gst::ffi::GstClockTime {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<Aggregator> = from_glib_borrow(ptr); let wrap: Borrowed<Aggregator> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), gst::ClockTime::NONE, { gst::panic_to_error!(&wrap, imp.panicked(), gst::ClockTime::NONE, {
@ -1085,7 +1085,7 @@ unsafe extern "C" fn aggregator_create_new_pad<T: AggregatorImpl>(
caps: *const gst::ffi::GstCaps, caps: *const gst::ffi::GstCaps,
) -> *mut ffi::GstAggregatorPad { ) -> *mut ffi::GstAggregatorPad {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<Aggregator> = from_glib_borrow(ptr); let wrap: Borrowed<Aggregator> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), None, { gst::panic_to_error!(&wrap, imp.panicked(), None, {
@ -1109,7 +1109,7 @@ unsafe extern "C" fn aggregator_update_src_caps<T: AggregatorImpl>(
res: *mut *mut gst::ffi::GstCaps, res: *mut *mut gst::ffi::GstCaps,
) -> gst::ffi::GstFlowReturn { ) -> gst::ffi::GstFlowReturn {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<Aggregator> = from_glib_borrow(ptr); let wrap: Borrowed<Aggregator> = from_glib_borrow(ptr);
*res = ptr::null_mut(); *res = ptr::null_mut();
@ -1131,7 +1131,7 @@ unsafe extern "C" fn aggregator_fixate_src_caps<T: AggregatorImpl>(
caps: *mut gst::ffi::GstCaps, caps: *mut gst::ffi::GstCaps,
) -> *mut gst::ffi::GstCaps { ) -> *mut gst::ffi::GstCaps {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<Aggregator> = from_glib_borrow(ptr); let wrap: Borrowed<Aggregator> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), gst::Caps::new_empty(), { gst::panic_to_error!(&wrap, imp.panicked(), gst::Caps::new_empty(), {
@ -1145,7 +1145,7 @@ unsafe extern "C" fn aggregator_negotiated_src_caps<T: AggregatorImpl>(
caps: *mut gst::ffi::GstCaps, caps: *mut gst::ffi::GstCaps,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<Aggregator> = from_glib_borrow(ptr); let wrap: Borrowed<Aggregator> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -1167,7 +1167,7 @@ unsafe extern "C" fn aggregator_propose_allocation<T: AggregatorImpl>(
query: *mut gst::ffi::GstQuery, query: *mut gst::ffi::GstQuery,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<Aggregator> = from_glib_borrow(ptr); let wrap: Borrowed<Aggregator> = from_glib_borrow(ptr);
let decide_query = if decide_query.is_null() { let decide_query = if decide_query.is_null() {
None None
@ -1204,7 +1204,7 @@ unsafe extern "C" fn aggregator_decide_allocation<T: AggregatorImpl>(
query: *mut gst::ffi::GstQuery, query: *mut gst::ffi::GstQuery,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<Aggregator> = from_glib_borrow(ptr); let wrap: Borrowed<Aggregator> = from_glib_borrow(ptr);
let query = match gst::QueryRef::from_mut_ptr(query).view_mut() { let query = match gst::QueryRef::from_mut_ptr(query).view_mut() {
gst::QueryView::Allocation(allocation) => allocation, gst::QueryView::Allocation(allocation) => allocation,
@ -1229,7 +1229,7 @@ unsafe extern "C" fn aggregator_negotiate<T: AggregatorImpl>(
ptr: *mut ffi::GstAggregator, ptr: *mut ffi::GstAggregator,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<Aggregator> = from_glib_borrow(ptr); let wrap: Borrowed<Aggregator> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -1245,7 +1245,7 @@ unsafe extern "C" fn aggregator_peek_next_sample<T: AggregatorImpl>(
pad: *mut ffi::GstAggregatorPad, pad: *mut ffi::GstAggregatorPad,
) -> *mut gst::ffi::GstSample { ) -> *mut gst::ffi::GstSample {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<Aggregator> = from_glib_borrow(ptr); let wrap: Borrowed<Aggregator> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), None, { gst::panic_to_error!(&wrap, imp.panicked(), None, {

View file

@ -105,7 +105,7 @@ unsafe extern "C" fn aggregator_pad_flush<T: AggregatorPadImpl>(
aggregator: *mut ffi::GstAggregator, aggregator: *mut ffi::GstAggregator,
) -> gst::ffi::GstFlowReturn { ) -> gst::ffi::GstFlowReturn {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<AggregatorPad> = from_glib_borrow(ptr); let wrap: Borrowed<AggregatorPad> = from_glib_borrow(ptr);
let res: gst::FlowReturn = imp let res: gst::FlowReturn = imp
@ -120,7 +120,7 @@ unsafe extern "C" fn aggregator_pad_skip_buffer<T: AggregatorPadImpl>(
buffer: *mut gst::ffi::GstBuffer, buffer: *mut gst::ffi::GstBuffer,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<AggregatorPad> = from_glib_borrow(ptr); let wrap: Borrowed<AggregatorPad> = from_glib_borrow(ptr);
imp.skip_buffer( imp.skip_buffer(

View file

@ -209,7 +209,7 @@ unsafe extern "C" fn base_parse_start<T: BaseParseImpl>(
ptr: *mut ffi::GstBaseParse, ptr: *mut ffi::GstBaseParse,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<BaseParse> = from_glib_borrow(ptr); let wrap: Borrowed<BaseParse> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -228,7 +228,7 @@ unsafe extern "C" fn base_parse_stop<T: BaseParseImpl>(
ptr: *mut ffi::GstBaseParse, ptr: *mut ffi::GstBaseParse,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<BaseParse> = from_glib_borrow(ptr); let wrap: Borrowed<BaseParse> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -248,7 +248,7 @@ unsafe extern "C" fn base_parse_set_sink_caps<T: BaseParseImpl>(
caps: *mut gst::ffi::GstCaps, caps: *mut gst::ffi::GstCaps,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<BaseParse> = from_glib_borrow(ptr); let wrap: Borrowed<BaseParse> = from_glib_borrow(ptr);
let caps: Borrowed<gst::Caps> = from_glib_borrow(caps); let caps: Borrowed<gst::Caps> = from_glib_borrow(caps);
@ -270,7 +270,7 @@ unsafe extern "C" fn base_parse_handle_frame<T: BaseParseImpl>(
skipsize: *mut i32, skipsize: *mut i32,
) -> gst::ffi::GstFlowReturn { ) -> gst::ffi::GstFlowReturn {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<BaseParse> = from_glib_borrow(ptr); let wrap: Borrowed<BaseParse> = from_glib_borrow(ptr);
let wrap_frame = BaseParseFrame::new(frame, &wrap); let wrap_frame = BaseParseFrame::new(frame, &wrap);
@ -296,7 +296,7 @@ unsafe extern "C" fn base_parse_convert<T: BaseParseImpl>(
dest_value: *mut i64, dest_value: *mut i64,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<BaseParse> = from_glib_borrow(ptr); let wrap: Borrowed<BaseParse> = from_glib_borrow(ptr);
let source = gst::GenericFormattedValue::new(from_glib(source_format), source_value); let source = gst::GenericFormattedValue::new(from_glib(source_format), source_value);

View file

@ -450,7 +450,7 @@ unsafe extern "C" fn base_sink_start<T: BaseSinkImpl>(
ptr: *mut ffi::GstBaseSink, ptr: *mut ffi::GstBaseSink,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<BaseSink> = from_glib_borrow(ptr); let wrap: Borrowed<BaseSink> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -469,7 +469,7 @@ unsafe extern "C" fn base_sink_stop<T: BaseSinkImpl>(
ptr: *mut ffi::GstBaseSink, ptr: *mut ffi::GstBaseSink,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<BaseSink> = from_glib_borrow(ptr); let wrap: Borrowed<BaseSink> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -489,7 +489,7 @@ unsafe extern "C" fn base_sink_render<T: BaseSinkImpl>(
buffer: *mut gst::ffi::GstBuffer, buffer: *mut gst::ffi::GstBuffer,
) -> gst::ffi::GstFlowReturn { ) -> gst::ffi::GstFlowReturn {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<BaseSink> = from_glib_borrow(ptr); let wrap: Borrowed<BaseSink> = from_glib_borrow(ptr);
let buffer = from_glib_borrow(buffer); let buffer = from_glib_borrow(buffer);
@ -504,7 +504,7 @@ unsafe extern "C" fn base_sink_prepare<T: BaseSinkImpl>(
buffer: *mut gst::ffi::GstBuffer, buffer: *mut gst::ffi::GstBuffer,
) -> gst::ffi::GstFlowReturn { ) -> gst::ffi::GstFlowReturn {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<BaseSink> = from_glib_borrow(ptr); let wrap: Borrowed<BaseSink> = from_glib_borrow(ptr);
let buffer = from_glib_borrow(buffer); let buffer = from_glib_borrow(buffer);
@ -519,7 +519,7 @@ unsafe extern "C" fn base_sink_render_list<T: BaseSinkImpl>(
list: *mut gst::ffi::GstBufferList, list: *mut gst::ffi::GstBufferList,
) -> gst::ffi::GstFlowReturn { ) -> gst::ffi::GstFlowReturn {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<BaseSink> = from_glib_borrow(ptr); let wrap: Borrowed<BaseSink> = from_glib_borrow(ptr);
let list = from_glib_borrow(list); let list = from_glib_borrow(list);
@ -534,7 +534,7 @@ unsafe extern "C" fn base_sink_prepare_list<T: BaseSinkImpl>(
list: *mut gst::ffi::GstBufferList, list: *mut gst::ffi::GstBufferList,
) -> gst::ffi::GstFlowReturn { ) -> gst::ffi::GstFlowReturn {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<BaseSink> = from_glib_borrow(ptr); let wrap: Borrowed<BaseSink> = from_glib_borrow(ptr);
let list = from_glib_borrow(list); let list = from_glib_borrow(list);
@ -549,7 +549,7 @@ unsafe extern "C" fn base_sink_query<T: BaseSinkImpl>(
query_ptr: *mut gst::ffi::GstQuery, query_ptr: *mut gst::ffi::GstQuery,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<BaseSink> = from_glib_borrow(ptr); let wrap: Borrowed<BaseSink> = from_glib_borrow(ptr);
let query = gst::QueryRef::from_mut_ptr(query_ptr); let query = gst::QueryRef::from_mut_ptr(query_ptr);
@ -564,7 +564,7 @@ unsafe extern "C" fn base_sink_event<T: BaseSinkImpl>(
event_ptr: *mut gst::ffi::GstEvent, event_ptr: *mut gst::ffi::GstEvent,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<BaseSink> = from_glib_borrow(ptr); let wrap: Borrowed<BaseSink> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -578,7 +578,7 @@ unsafe extern "C" fn base_sink_get_caps<T: BaseSinkImpl>(
filter: *mut gst::ffi::GstCaps, filter: *mut gst::ffi::GstCaps,
) -> *mut gst::ffi::GstCaps { ) -> *mut gst::ffi::GstCaps {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<BaseSink> = from_glib_borrow(ptr); let wrap: Borrowed<BaseSink> = from_glib_borrow(ptr);
let filter = Option::<gst::Caps>::from_glib_borrow(filter); let filter = Option::<gst::Caps>::from_glib_borrow(filter);
@ -594,7 +594,7 @@ unsafe extern "C" fn base_sink_set_caps<T: BaseSinkImpl>(
caps: *mut gst::ffi::GstCaps, caps: *mut gst::ffi::GstCaps,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<BaseSink> = from_glib_borrow(ptr); let wrap: Borrowed<BaseSink> = from_glib_borrow(ptr);
let caps = from_glib_borrow(caps); let caps = from_glib_borrow(caps);
@ -615,7 +615,7 @@ unsafe extern "C" fn base_sink_fixate<T: BaseSinkImpl>(
caps: *mut gst::ffi::GstCaps, caps: *mut gst::ffi::GstCaps,
) -> *mut gst::ffi::GstCaps { ) -> *mut gst::ffi::GstCaps {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<BaseSink> = from_glib_borrow(ptr); let wrap: Borrowed<BaseSink> = from_glib_borrow(ptr);
let caps = from_glib_full(caps); let caps = from_glib_full(caps);
@ -629,7 +629,7 @@ unsafe extern "C" fn base_sink_unlock<T: BaseSinkImpl>(
ptr: *mut ffi::GstBaseSink, ptr: *mut ffi::GstBaseSink,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<BaseSink> = from_glib_borrow(ptr); let wrap: Borrowed<BaseSink> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -648,7 +648,7 @@ unsafe extern "C" fn base_sink_unlock_stop<T: BaseSinkImpl>(
ptr: *mut ffi::GstBaseSink, ptr: *mut ffi::GstBaseSink,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<BaseSink> = from_glib_borrow(ptr); let wrap: Borrowed<BaseSink> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -668,7 +668,7 @@ unsafe extern "C" fn base_sink_propose_allocation<T: BaseSinkImpl>(
query: *mut gst::ffi::GstQuery, query: *mut gst::ffi::GstQuery,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<BaseSink> = from_glib_borrow(ptr); let wrap: Borrowed<BaseSink> = from_glib_borrow(ptr);
let query = match gst::QueryRef::from_mut_ptr(query).view_mut() { let query = match gst::QueryRef::from_mut_ptr(query).view_mut() {
gst::QueryView::Allocation(allocation) => allocation, gst::QueryView::Allocation(allocation) => allocation,

View file

@ -638,7 +638,7 @@ unsafe extern "C" fn base_src_start<T: BaseSrcImpl>(
ptr: *mut ffi::GstBaseSrc, ptr: *mut ffi::GstBaseSrc,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<BaseSrc> = from_glib_borrow(ptr); let wrap: Borrowed<BaseSrc> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -657,7 +657,7 @@ unsafe extern "C" fn base_src_stop<T: BaseSrcImpl>(
ptr: *mut ffi::GstBaseSrc, ptr: *mut ffi::GstBaseSrc,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<BaseSrc> = from_glib_borrow(ptr); let wrap: Borrowed<BaseSrc> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -676,7 +676,7 @@ unsafe extern "C" fn base_src_is_seekable<T: BaseSrcImpl>(
ptr: *mut ffi::GstBaseSrc, ptr: *mut ffi::GstBaseSrc,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<BaseSrc> = from_glib_borrow(ptr); let wrap: Borrowed<BaseSrc> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -690,7 +690,7 @@ unsafe extern "C" fn base_src_get_size<T: BaseSrcImpl>(
size: *mut u64, size: *mut u64,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<BaseSrc> = from_glib_borrow(ptr); let wrap: Borrowed<BaseSrc> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -712,7 +712,7 @@ unsafe extern "C" fn base_src_get_times<T: BaseSrcImpl>(
stop: *mut gst::ffi::GstClockTime, stop: *mut gst::ffi::GstClockTime,
) { ) {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<BaseSrc> = from_glib_borrow(ptr); let wrap: Borrowed<BaseSrc> = from_glib_borrow(ptr);
let buffer = gst::BufferRef::from_ptr(buffer); let buffer = gst::BufferRef::from_ptr(buffer);
@ -733,7 +733,7 @@ unsafe extern "C" fn base_src_fill<T: BaseSrcImpl>(
buffer: *mut gst::ffi::GstBuffer, buffer: *mut gst::ffi::GstBuffer,
) -> gst::ffi::GstFlowReturn { ) -> gst::ffi::GstFlowReturn {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<BaseSrc> = from_glib_borrow(ptr); let wrap: Borrowed<BaseSrc> = from_glib_borrow(ptr);
let buffer = gst::BufferRef::from_mut_ptr(buffer); let buffer = gst::BufferRef::from_mut_ptr(buffer);
@ -751,7 +751,7 @@ unsafe extern "C" fn base_src_alloc<T: BaseSrcImpl>(
buffer_ptr: *mut gst::ffi::GstBuffer, buffer_ptr: *mut gst::ffi::GstBuffer,
) -> gst::ffi::GstFlowReturn { ) -> gst::ffi::GstFlowReturn {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<BaseSrc> = from_glib_borrow(ptr); let wrap: Borrowed<BaseSrc> = from_glib_borrow(ptr);
// FIXME: Wrong signature in -sys bindings // FIXME: Wrong signature in -sys bindings
// https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/issues/3 // https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/issues/3
@ -777,7 +777,7 @@ unsafe extern "C" fn base_src_create<T: BaseSrcImpl>(
buffer_ptr: *mut gst::ffi::GstBuffer, buffer_ptr: *mut gst::ffi::GstBuffer,
) -> gst::ffi::GstFlowReturn { ) -> gst::ffi::GstFlowReturn {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<BaseSrc> = from_glib_borrow(ptr); let wrap: Borrowed<BaseSrc> = from_glib_borrow(ptr);
// FIXME: Wrong signature in -sys bindings // FIXME: Wrong signature in -sys bindings
// https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/issues/3 // https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/issues/3
@ -861,7 +861,7 @@ unsafe extern "C" fn base_src_do_seek<T: BaseSrcImpl>(
segment: *mut gst::ffi::GstSegment, segment: *mut gst::ffi::GstSegment,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<BaseSrc> = from_glib_borrow(ptr); let wrap: Borrowed<BaseSrc> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -879,7 +879,7 @@ unsafe extern "C" fn base_src_query<T: BaseSrcImpl>(
query_ptr: *mut gst::ffi::GstQuery, query_ptr: *mut gst::ffi::GstQuery,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<BaseSrc> = from_glib_borrow(ptr); let wrap: Borrowed<BaseSrc> = from_glib_borrow(ptr);
let query = gst::QueryRef::from_mut_ptr(query_ptr); let query = gst::QueryRef::from_mut_ptr(query_ptr);
@ -894,7 +894,7 @@ unsafe extern "C" fn base_src_event<T: BaseSrcImpl>(
event_ptr: *mut gst::ffi::GstEvent, event_ptr: *mut gst::ffi::GstEvent,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<BaseSrc> = from_glib_borrow(ptr); let wrap: Borrowed<BaseSrc> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -908,7 +908,7 @@ unsafe extern "C" fn base_src_get_caps<T: BaseSrcImpl>(
filter: *mut gst::ffi::GstCaps, filter: *mut gst::ffi::GstCaps,
) -> *mut gst::ffi::GstCaps { ) -> *mut gst::ffi::GstCaps {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<BaseSrc> = from_glib_borrow(ptr); let wrap: Borrowed<BaseSrc> = from_glib_borrow(ptr);
let filter = Option::<gst::Caps>::from_glib_borrow(filter); let filter = Option::<gst::Caps>::from_glib_borrow(filter);
@ -923,7 +923,7 @@ unsafe extern "C" fn base_src_negotiate<T: BaseSrcImpl>(
ptr: *mut ffi::GstBaseSrc, ptr: *mut ffi::GstBaseSrc,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<BaseSrc> = from_glib_borrow(ptr); let wrap: Borrowed<BaseSrc> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -943,7 +943,7 @@ unsafe extern "C" fn base_src_set_caps<T: BaseSrcImpl>(
caps: *mut gst::ffi::GstCaps, caps: *mut gst::ffi::GstCaps,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<BaseSrc> = from_glib_borrow(ptr); let wrap: Borrowed<BaseSrc> = from_glib_borrow(ptr);
let caps = from_glib_borrow(caps); let caps = from_glib_borrow(caps);
@ -964,7 +964,7 @@ unsafe extern "C" fn base_src_fixate<T: BaseSrcImpl>(
caps: *mut gst::ffi::GstCaps, caps: *mut gst::ffi::GstCaps,
) -> *mut gst::ffi::GstCaps { ) -> *mut gst::ffi::GstCaps {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<BaseSrc> = from_glib_borrow(ptr); let wrap: Borrowed<BaseSrc> = from_glib_borrow(ptr);
let caps = from_glib_full(caps); let caps = from_glib_full(caps);
@ -978,7 +978,7 @@ unsafe extern "C" fn base_src_unlock<T: BaseSrcImpl>(
ptr: *mut ffi::GstBaseSrc, ptr: *mut ffi::GstBaseSrc,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<BaseSrc> = from_glib_borrow(ptr); let wrap: Borrowed<BaseSrc> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -997,7 +997,7 @@ unsafe extern "C" fn base_src_unlock_stop<T: BaseSrcImpl>(
ptr: *mut ffi::GstBaseSrc, ptr: *mut ffi::GstBaseSrc,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<BaseSrc> = from_glib_borrow(ptr); let wrap: Borrowed<BaseSrc> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -1017,7 +1017,7 @@ unsafe extern "C" fn base_src_decide_allocation<T: BaseSrcImpl>(
query: *mut gst::ffi::GstQuery, query: *mut gst::ffi::GstQuery,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<BaseSrc> = from_glib_borrow(ptr); let wrap: Borrowed<BaseSrc> = from_glib_borrow(ptr);
let query = match gst::QueryRef::from_mut_ptr(query).view_mut() { let query = match gst::QueryRef::from_mut_ptr(query).view_mut() {
gst::QueryView::Allocation(allocation) => allocation, gst::QueryView::Allocation(allocation) => allocation,

View file

@ -979,7 +979,7 @@ unsafe extern "C" fn base_transform_start<T: BaseTransformImpl>(
ptr: *mut ffi::GstBaseTransform, ptr: *mut ffi::GstBaseTransform,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<BaseTransform> = from_glib_borrow(ptr); let wrap: Borrowed<BaseTransform> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -998,7 +998,7 @@ unsafe extern "C" fn base_transform_stop<T: BaseTransformImpl>(
ptr: *mut ffi::GstBaseTransform, ptr: *mut ffi::GstBaseTransform,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<BaseTransform> = from_glib_borrow(ptr); let wrap: Borrowed<BaseTransform> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -1020,7 +1020,7 @@ unsafe extern "C" fn base_transform_transform_caps<T: BaseTransformImpl>(
filter: *mut gst::ffi::GstCaps, filter: *mut gst::ffi::GstCaps,
) -> *mut gst::ffi::GstCaps { ) -> *mut gst::ffi::GstCaps {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<BaseTransform> = from_glib_borrow(ptr); let wrap: Borrowed<BaseTransform> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), None, { gst::panic_to_error!(&wrap, imp.panicked(), None, {
@ -1044,7 +1044,7 @@ unsafe extern "C" fn base_transform_fixate_caps<T: BaseTransformImpl>(
othercaps: *mut gst::ffi::GstCaps, othercaps: *mut gst::ffi::GstCaps,
) -> *mut gst::ffi::GstCaps { ) -> *mut gst::ffi::GstCaps {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<BaseTransform> = from_glib_borrow(ptr); let wrap: Borrowed<BaseTransform> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), gst::Caps::new_empty(), { gst::panic_to_error!(&wrap, imp.panicked(), gst::Caps::new_empty(), {
@ -1064,7 +1064,7 @@ unsafe extern "C" fn base_transform_set_caps<T: BaseTransformImpl>(
outcaps: *mut gst::ffi::GstCaps, outcaps: *mut gst::ffi::GstCaps,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<BaseTransform> = from_glib_borrow(ptr); let wrap: Borrowed<BaseTransform> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -1089,7 +1089,7 @@ unsafe extern "C" fn base_transform_accept_caps<T: BaseTransformImpl>(
caps: *mut gst::ffi::GstCaps, caps: *mut gst::ffi::GstCaps,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<BaseTransform> = from_glib_borrow(ptr); let wrap: Borrowed<BaseTransform> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -1108,7 +1108,7 @@ unsafe extern "C" fn base_transform_query<T: BaseTransformImpl>(
query: *mut gst::ffi::GstQuery, query: *mut gst::ffi::GstQuery,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<BaseTransform> = from_glib_borrow(ptr); let wrap: Borrowed<BaseTransform> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -1131,7 +1131,7 @@ unsafe extern "C" fn base_transform_transform_size<T: BaseTransformImpl>(
othersize: *mut usize, othersize: *mut usize,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<BaseTransform> = from_glib_borrow(ptr); let wrap: Borrowed<BaseTransform> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -1158,7 +1158,7 @@ unsafe extern "C" fn base_transform_get_unit_size<T: BaseTransformImpl>(
size: *mut usize, size: *mut usize,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<BaseTransform> = from_glib_borrow(ptr); let wrap: Borrowed<BaseTransform> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -1179,7 +1179,7 @@ unsafe extern "C" fn base_transform_prepare_output_buffer<T: BaseTransformImpl>(
outbuf: *mut gst::ffi::GstBuffer, outbuf: *mut gst::ffi::GstBuffer,
) -> gst::ffi::GstFlowReturn { ) -> gst::ffi::GstFlowReturn {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<BaseTransform> = from_glib_borrow(ptr); let wrap: Borrowed<BaseTransform> = from_glib_borrow(ptr);
// FIXME: Wrong signature in FFI // FIXME: Wrong signature in FFI
@ -1223,7 +1223,7 @@ unsafe extern "C" fn base_transform_sink_event<T: BaseTransformImpl>(
event: *mut gst::ffi::GstEvent, event: *mut gst::ffi::GstEvent,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<BaseTransform> = from_glib_borrow(ptr); let wrap: Borrowed<BaseTransform> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -1237,7 +1237,7 @@ unsafe extern "C" fn base_transform_src_event<T: BaseTransformImpl>(
event: *mut gst::ffi::GstEvent, event: *mut gst::ffi::GstEvent,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<BaseTransform> = from_glib_borrow(ptr); let wrap: Borrowed<BaseTransform> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -1252,7 +1252,7 @@ unsafe extern "C" fn base_transform_transform<T: BaseTransformImpl>(
outbuf: *mut gst::ffi::GstBuffer, outbuf: *mut gst::ffi::GstBuffer,
) -> gst::ffi::GstFlowReturn { ) -> gst::ffi::GstFlowReturn {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<BaseTransform> = from_glib_borrow(ptr); let wrap: Borrowed<BaseTransform> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), gst::FlowReturn::Error, { gst::panic_to_error!(&wrap, imp.panicked(), gst::FlowReturn::Error, {
@ -1271,7 +1271,7 @@ unsafe extern "C" fn base_transform_transform_ip<T: BaseTransformImpl>(
buf: *mut *mut gst::ffi::GstBuffer, buf: *mut *mut gst::ffi::GstBuffer,
) -> gst::ffi::GstFlowReturn { ) -> gst::ffi::GstFlowReturn {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<BaseTransform> = from_glib_borrow(ptr); let wrap: Borrowed<BaseTransform> = from_glib_borrow(ptr);
// FIXME: Wrong signature in FFI // FIXME: Wrong signature in FFI
@ -1296,7 +1296,7 @@ unsafe extern "C" fn base_transform_transform_meta<T: BaseTransformImpl>(
inbuf: *mut gst::ffi::GstBuffer, inbuf: *mut gst::ffi::GstBuffer,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<BaseTransform> = from_glib_borrow(ptr); let wrap: Borrowed<BaseTransform> = from_glib_borrow(ptr);
let inbuf = gst::BufferRef::from_ptr(inbuf); let inbuf = gst::BufferRef::from_ptr(inbuf);
@ -1318,7 +1318,7 @@ unsafe extern "C" fn base_transform_propose_allocation<T: BaseTransformImpl>(
query: *mut gst::ffi::GstQuery, query: *mut gst::ffi::GstQuery,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<BaseTransform> = from_glib_borrow(ptr); let wrap: Borrowed<BaseTransform> = from_glib_borrow(ptr);
let decide_query = if decide_query.is_null() { let decide_query = if decide_query.is_null() {
None None
@ -1350,7 +1350,7 @@ unsafe extern "C" fn base_transform_decide_allocation<T: BaseTransformImpl>(
query: *mut gst::ffi::GstQuery, query: *mut gst::ffi::GstQuery,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<BaseTransform> = from_glib_borrow(ptr); let wrap: Borrowed<BaseTransform> = from_glib_borrow(ptr);
let query = match gst::QueryRef::from_mut_ptr(query).view_mut() { let query = match gst::QueryRef::from_mut_ptr(query).view_mut() {
gst::QueryView::Allocation(allocation) => allocation, gst::QueryView::Allocation(allocation) => allocation,
@ -1375,7 +1375,7 @@ unsafe extern "C" fn base_transform_copy_metadata<T: BaseTransformImpl>(
outbuf: *mut gst::ffi::GstBuffer, outbuf: *mut gst::ffi::GstBuffer,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<BaseTransform> = from_glib_borrow(ptr); let wrap: Borrowed<BaseTransform> = from_glib_borrow(ptr);
if gst::ffi::gst_mini_object_is_writable(outbuf as *mut _) == glib::ffi::GFALSE { if gst::ffi::gst_mini_object_is_writable(outbuf as *mut _) == glib::ffi::GFALSE {
@ -1409,7 +1409,7 @@ unsafe extern "C" fn base_transform_before_transform<T: BaseTransformImpl>(
inbuf: *mut gst::ffi::GstBuffer, inbuf: *mut gst::ffi::GstBuffer,
) { ) {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<BaseTransform> = from_glib_borrow(ptr); let wrap: Borrowed<BaseTransform> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), (), { gst::panic_to_error!(&wrap, imp.panicked(), (), {
@ -1423,7 +1423,7 @@ unsafe extern "C" fn base_transform_submit_input_buffer<T: BaseTransformImpl>(
buf: *mut gst::ffi::GstBuffer, buf: *mut gst::ffi::GstBuffer,
) -> gst::ffi::GstFlowReturn { ) -> gst::ffi::GstFlowReturn {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<BaseTransform> = from_glib_borrow(ptr); let wrap: Borrowed<BaseTransform> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), gst::FlowReturn::Error, { gst::panic_to_error!(&wrap, imp.panicked(), gst::FlowReturn::Error, {
@ -1442,7 +1442,7 @@ unsafe extern "C" fn base_transform_generate_output<T: BaseTransformImpl>(
buf: *mut *mut gst::ffi::GstBuffer, buf: *mut *mut gst::ffi::GstBuffer,
) -> gst::ffi::GstFlowReturn { ) -> gst::ffi::GstFlowReturn {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<BaseTransform> = from_glib_borrow(ptr); let wrap: Borrowed<BaseTransform> = from_glib_borrow(ptr);
*buf = ptr::null_mut(); *buf = ptr::null_mut();

View file

@ -189,7 +189,7 @@ unsafe extern "C" fn push_src_fill<T: PushSrcImpl>(
buffer: *mut gst::ffi::GstBuffer, buffer: *mut gst::ffi::GstBuffer,
) -> gst::ffi::GstFlowReturn { ) -> gst::ffi::GstFlowReturn {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<PushSrc> = from_glib_borrow(ptr); let wrap: Borrowed<PushSrc> = from_glib_borrow(ptr);
let buffer = gst::BufferRef::from_mut_ptr(buffer); let buffer = gst::BufferRef::from_mut_ptr(buffer);
@ -204,7 +204,7 @@ unsafe extern "C" fn push_src_alloc<T: PushSrcImpl>(
buffer_ptr: *mut gst::ffi::GstBuffer, buffer_ptr: *mut gst::ffi::GstBuffer,
) -> gst::ffi::GstFlowReturn { ) -> gst::ffi::GstFlowReturn {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<PushSrc> = from_glib_borrow(ptr); let wrap: Borrowed<PushSrc> = from_glib_borrow(ptr);
// FIXME: Wrong signature in -sys bindings // FIXME: Wrong signature in -sys bindings
// https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/issues/3 // https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/issues/3
@ -228,7 +228,7 @@ unsafe extern "C" fn push_src_create<T: PushSrcImpl>(
buffer_ptr: *mut gst::ffi::GstBuffer, buffer_ptr: *mut gst::ffi::GstBuffer,
) -> gst::ffi::GstFlowReturn { ) -> gst::ffi::GstFlowReturn {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<PushSrc> = from_glib_borrow(ptr); let wrap: Borrowed<PushSrc> = from_glib_borrow(ptr);
// FIXME: Wrong signature in -sys bindings // FIXME: Wrong signature in -sys bindings
// https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/issues/3 // https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/issues/3

View file

@ -116,7 +116,7 @@ unsafe extern "C" fn gl_set_caps<T: GLBaseFilterImpl>(
outcaps: *mut GstCaps, outcaps: *mut GstCaps,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<GLBaseFilter> = from_glib_borrow(ptr); let wrap: Borrowed<GLBaseFilter> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -139,7 +139,7 @@ unsafe extern "C" fn gl_start<T: GLBaseFilterImpl>(
ptr: *mut GstGLBaseFilter, ptr: *mut GstGLBaseFilter,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<GLBaseFilter> = from_glib_borrow(ptr); let wrap: Borrowed<GLBaseFilter> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -156,7 +156,7 @@ unsafe extern "C" fn gl_start<T: GLBaseFilterImpl>(
unsafe extern "C" fn gl_stop<T: GLBaseFilterImpl>(ptr: *mut GstGLBaseFilter) { unsafe extern "C" fn gl_stop<T: GLBaseFilterImpl>(ptr: *mut GstGLBaseFilter) {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<GLBaseFilter> = from_glib_borrow(ptr); let wrap: Borrowed<GLBaseFilter> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), (), { gst::panic_to_error!(&wrap, imp.panicked(), (), {

View file

@ -106,7 +106,7 @@ unsafe impl<T: GLBaseSrcImpl> IsSubclassable<T> for GLBaseSrc {
unsafe extern "C" fn gl_start<T: GLBaseSrcImpl>(ptr: *mut GstGLBaseSrc) -> glib::ffi::gboolean { unsafe extern "C" fn gl_start<T: GLBaseSrcImpl>(ptr: *mut GstGLBaseSrc) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<GLBaseSrc> = from_glib_borrow(ptr); let wrap: Borrowed<GLBaseSrc> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -123,7 +123,7 @@ unsafe extern "C" fn gl_start<T: GLBaseSrcImpl>(ptr: *mut GstGLBaseSrc) -> glib:
unsafe extern "C" fn gl_stop<T: GLBaseSrcImpl>(ptr: *mut GstGLBaseSrc) { unsafe extern "C" fn gl_stop<T: GLBaseSrcImpl>(ptr: *mut GstGLBaseSrc) {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<GLBaseSrc> = from_glib_borrow(ptr); let wrap: Borrowed<GLBaseSrc> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), (), { gst::panic_to_error!(&wrap, imp.panicked(), (), {
@ -136,7 +136,7 @@ unsafe extern "C" fn fill_gl_memory<T: GLBaseSrcImpl>(
memory: *mut GstGLMemory, memory: *mut GstGLMemory,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<GLBaseSrc> = from_glib_borrow(ptr); let wrap: Borrowed<GLBaseSrc> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {

View file

@ -254,7 +254,7 @@ unsafe extern "C" fn filter<T: GLFilterImpl>(
output: *mut GstBuffer, output: *mut GstBuffer,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<GLFilter> = from_glib_borrow(ptr); let wrap: Borrowed<GLFilter> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -279,7 +279,7 @@ unsafe extern "C" fn filter_texture<T: GLFilterImpl>(
output: *mut GstGLMemory, output: *mut GstGLMemory,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<GLFilter> = from_glib_borrow(ptr); let wrap: Borrowed<GLFilter> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -300,7 +300,7 @@ unsafe extern "C" fn filter_texture<T: GLFilterImpl>(
unsafe extern "C" fn init_fbo<T: GLFilterImpl>(ptr: *mut GstGLFilter) -> glib::ffi::gboolean { unsafe extern "C" fn init_fbo<T: GLFilterImpl>(ptr: *mut GstGLFilter) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<GLFilter> = from_glib_borrow(ptr); let wrap: Borrowed<GLFilter> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -321,7 +321,7 @@ unsafe extern "C" fn set_caps<T: GLFilterImpl>(
outcaps: *mut gst::ffi::GstCaps, outcaps: *mut gst::ffi::GstCaps,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<GLFilter> = from_glib_borrow(ptr); let wrap: Borrowed<GLFilter> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -348,7 +348,7 @@ unsafe extern "C" fn transform_internal_caps<T: GLFilterImpl>(
filter_caps: *mut gst::ffi::GstCaps, filter_caps: *mut gst::ffi::GstCaps,
) -> *mut gst::ffi::GstCaps { ) -> *mut gst::ffi::GstCaps {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<GLFilter> = from_glib_borrow(ptr); let wrap: Borrowed<GLFilter> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), None, { gst::panic_to_error!(&wrap, imp.panicked(), None, {

View file

@ -61,7 +61,7 @@ unsafe extern "C" fn video_renderer_create_video_sink<T: PlayerVideoRendererImpl
Lazy::new(|| glib::Quark::from_string("gstreamer-rs-player-video-sink")); Lazy::new(|| glib::Quark::from_string("gstreamer-rs-player-video-sink"));
let instance = &*(video_renderer as *mut T::Instance); let instance = &*(video_renderer as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let sink = imp.create_video_sink( let sink = imp.create_video_sink(
from_glib_borrow::<_, PlayerVideoRenderer>(video_renderer).unsafe_cast_ref(), from_glib_borrow::<_, PlayerVideoRenderer>(video_renderer).unsafe_cast_ref(),

View file

@ -895,7 +895,7 @@ unsafe extern "C" fn client_create_sdp<T: RTSPClientImpl>(
media: *mut ffi::GstRTSPMedia, media: *mut ffi::GstRTSPMedia,
) -> *mut gst_sdp::ffi::GstSDPMessage { ) -> *mut gst_sdp::ffi::GstSDPMessage {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr); let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr);
let sdp = let sdp =
@ -912,7 +912,7 @@ unsafe extern "C" fn client_configure_client_media<T: RTSPClientImpl>(
ctx: *mut ffi::GstRTSPContext, ctx: *mut ffi::GstRTSPContext,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr); let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr);
match imp.configure_client_media( match imp.configure_client_media(
@ -934,7 +934,7 @@ unsafe extern "C" fn client_params_set<T: RTSPClientImpl>(
ctx: *mut ffi::GstRTSPContext, ctx: *mut ffi::GstRTSPContext,
) -> gst_rtsp::ffi::GstRTSPResult { ) -> gst_rtsp::ffi::GstRTSPResult {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr); let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr);
imp.params_set(wrap.unsafe_cast_ref(), &from_glib_borrow(ctx)) imp.params_set(wrap.unsafe_cast_ref(), &from_glib_borrow(ctx))
@ -946,7 +946,7 @@ unsafe extern "C" fn client_params_get<T: RTSPClientImpl>(
ctx: *mut ffi::GstRTSPContext, ctx: *mut ffi::GstRTSPContext,
) -> gst_rtsp::ffi::GstRTSPResult { ) -> gst_rtsp::ffi::GstRTSPResult {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr); let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr);
imp.params_get(wrap.unsafe_cast_ref(), &from_glib_borrow(ctx)) imp.params_get(wrap.unsafe_cast_ref(), &from_glib_borrow(ctx))
@ -958,7 +958,7 @@ unsafe extern "C" fn client_make_path_from_uri<T: RTSPClientImpl>(
url: *const gst_rtsp::ffi::GstRTSPUrl, url: *const gst_rtsp::ffi::GstRTSPUrl,
) -> *mut std::os::raw::c_char { ) -> *mut std::os::raw::c_char {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr); let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr);
imp.make_path_from_uri(wrap.unsafe_cast_ref(), &from_glib_borrow(url)) imp.make_path_from_uri(wrap.unsafe_cast_ref(), &from_glib_borrow(url))
@ -967,7 +967,7 @@ unsafe extern "C" fn client_make_path_from_uri<T: RTSPClientImpl>(
unsafe extern "C" fn client_closed<T: RTSPClientImpl>(ptr: *mut ffi::GstRTSPClient) { unsafe extern "C" fn client_closed<T: RTSPClientImpl>(ptr: *mut ffi::GstRTSPClient) {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr); let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr);
imp.closed(wrap.unsafe_cast_ref()); imp.closed(wrap.unsafe_cast_ref());
@ -978,7 +978,7 @@ unsafe extern "C" fn client_new_session<T: RTSPClientImpl>(
session: *mut ffi::GstRTSPSession, session: *mut ffi::GstRTSPSession,
) { ) {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr); let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr);
imp.new_session(wrap.unsafe_cast_ref(), &from_glib_borrow(session)); imp.new_session(wrap.unsafe_cast_ref(), &from_glib_borrow(session));
@ -989,7 +989,7 @@ unsafe extern "C" fn client_options_request<T: RTSPClientImpl>(
ctx: *mut ffi::GstRTSPContext, ctx: *mut ffi::GstRTSPContext,
) { ) {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr); let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr);
imp.options_request(wrap.unsafe_cast_ref(), &from_glib_borrow(ctx)); imp.options_request(wrap.unsafe_cast_ref(), &from_glib_borrow(ctx));
@ -1000,7 +1000,7 @@ unsafe extern "C" fn client_describe_request<T: RTSPClientImpl>(
ctx: *mut ffi::GstRTSPContext, ctx: *mut ffi::GstRTSPContext,
) { ) {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr); let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr);
imp.describe_request(wrap.unsafe_cast_ref(), &from_glib_borrow(ctx)); imp.describe_request(wrap.unsafe_cast_ref(), &from_glib_borrow(ctx));
@ -1011,7 +1011,7 @@ unsafe extern "C" fn client_setup_request<T: RTSPClientImpl>(
ctx: *mut ffi::GstRTSPContext, ctx: *mut ffi::GstRTSPContext,
) { ) {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr); let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr);
imp.setup_request(wrap.unsafe_cast_ref(), &from_glib_borrow(ctx)); imp.setup_request(wrap.unsafe_cast_ref(), &from_glib_borrow(ctx));
@ -1022,7 +1022,7 @@ unsafe extern "C" fn client_play_request<T: RTSPClientImpl>(
ctx: *mut ffi::GstRTSPContext, ctx: *mut ffi::GstRTSPContext,
) { ) {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr); let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr);
imp.play_request(wrap.unsafe_cast_ref(), &from_glib_borrow(ctx)); imp.play_request(wrap.unsafe_cast_ref(), &from_glib_borrow(ctx));
@ -1033,7 +1033,7 @@ unsafe extern "C" fn client_pause_request<T: RTSPClientImpl>(
ctx: *mut ffi::GstRTSPContext, ctx: *mut ffi::GstRTSPContext,
) { ) {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr); let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr);
imp.pause_request(wrap.unsafe_cast_ref(), &from_glib_borrow(ctx)); imp.pause_request(wrap.unsafe_cast_ref(), &from_glib_borrow(ctx));
@ -1044,7 +1044,7 @@ unsafe extern "C" fn client_teardown_request<T: RTSPClientImpl>(
ctx: *mut ffi::GstRTSPContext, ctx: *mut ffi::GstRTSPContext,
) { ) {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr); let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr);
imp.teardown_request(wrap.unsafe_cast_ref(), &from_glib_borrow(ctx)); imp.teardown_request(wrap.unsafe_cast_ref(), &from_glib_borrow(ctx));
@ -1055,7 +1055,7 @@ unsafe extern "C" fn client_set_parameter_request<T: RTSPClientImpl>(
ctx: *mut ffi::GstRTSPContext, ctx: *mut ffi::GstRTSPContext,
) { ) {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr); let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr);
imp.set_parameter_request(wrap.unsafe_cast_ref(), &from_glib_borrow(ctx)); imp.set_parameter_request(wrap.unsafe_cast_ref(), &from_glib_borrow(ctx));
@ -1066,7 +1066,7 @@ unsafe extern "C" fn client_get_parameter_request<T: RTSPClientImpl>(
ctx: *mut ffi::GstRTSPContext, ctx: *mut ffi::GstRTSPContext,
) { ) {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr); let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr);
imp.parameter_request(wrap.unsafe_cast_ref(), &from_glib_borrow(ctx)); imp.parameter_request(wrap.unsafe_cast_ref(), &from_glib_borrow(ctx));
@ -1077,7 +1077,7 @@ unsafe extern "C" fn client_announce_request<T: RTSPClientImpl>(
ctx: *mut ffi::GstRTSPContext, ctx: *mut ffi::GstRTSPContext,
) { ) {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr); let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr);
imp.announce_request(wrap.unsafe_cast_ref(), &from_glib_borrow(ctx)); imp.announce_request(wrap.unsafe_cast_ref(), &from_glib_borrow(ctx));
@ -1088,7 +1088,7 @@ unsafe extern "C" fn client_record_request<T: RTSPClientImpl>(
ctx: *mut ffi::GstRTSPContext, ctx: *mut ffi::GstRTSPContext,
) { ) {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr); let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr);
imp.record_request(wrap.unsafe_cast_ref(), &from_glib_borrow(ctx)); imp.record_request(wrap.unsafe_cast_ref(), &from_glib_borrow(ctx));
@ -1099,7 +1099,7 @@ unsafe extern "C" fn client_handle_response<T: RTSPClientImpl>(
ctx: *mut ffi::GstRTSPContext, ctx: *mut ffi::GstRTSPContext,
) { ) {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr); let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr);
imp.handle_response(wrap.unsafe_cast_ref(), &from_glib_borrow(ctx)); imp.handle_response(wrap.unsafe_cast_ref(), &from_glib_borrow(ctx));
@ -1112,7 +1112,7 @@ unsafe extern "C" fn client_handle_sdp<T: RTSPClientImpl>(
sdp: *mut gst_sdp::ffi::GstSDPMessage, sdp: *mut gst_sdp::ffi::GstSDPMessage,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr); let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr);
match imp.handle_sdp( match imp.handle_sdp(
@ -1135,7 +1135,7 @@ unsafe extern "C" fn client_check_requirements<T: RTSPClientImpl>(
arr: *mut *mut std::os::raw::c_char, arr: *mut *mut std::os::raw::c_char,
) -> *mut std::os::raw::c_char { ) -> *mut std::os::raw::c_char {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr); let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr);
imp.check_requirements( imp.check_requirements(
@ -1151,7 +1151,7 @@ unsafe extern "C" fn client_pre_options_request<T: RTSPClientImpl>(
ctx: *mut ffi::GstRTSPContext, ctx: *mut ffi::GstRTSPContext,
) -> gst_rtsp::ffi::GstRTSPStatusCode { ) -> gst_rtsp::ffi::GstRTSPStatusCode {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr); let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr);
imp.pre_options_request(wrap.unsafe_cast_ref(), &from_glib_borrow(ctx)) imp.pre_options_request(wrap.unsafe_cast_ref(), &from_glib_borrow(ctx))
@ -1163,7 +1163,7 @@ unsafe extern "C" fn client_pre_describe_request<T: RTSPClientImpl>(
ctx: *mut ffi::GstRTSPContext, ctx: *mut ffi::GstRTSPContext,
) -> gst_rtsp::ffi::GstRTSPStatusCode { ) -> gst_rtsp::ffi::GstRTSPStatusCode {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr); let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr);
imp.pre_describe_request(wrap.unsafe_cast_ref(), &from_glib_borrow(ctx)) imp.pre_describe_request(wrap.unsafe_cast_ref(), &from_glib_borrow(ctx))
@ -1175,7 +1175,7 @@ unsafe extern "C" fn client_pre_setup_request<T: RTSPClientImpl>(
ctx: *mut ffi::GstRTSPContext, ctx: *mut ffi::GstRTSPContext,
) -> gst_rtsp::ffi::GstRTSPStatusCode { ) -> gst_rtsp::ffi::GstRTSPStatusCode {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr); let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr);
imp.pre_setup_request(wrap.unsafe_cast_ref(), &from_glib_borrow(ctx)) imp.pre_setup_request(wrap.unsafe_cast_ref(), &from_glib_borrow(ctx))
@ -1187,7 +1187,7 @@ unsafe extern "C" fn client_pre_play_request<T: RTSPClientImpl>(
ctx: *mut ffi::GstRTSPContext, ctx: *mut ffi::GstRTSPContext,
) -> gst_rtsp::ffi::GstRTSPStatusCode { ) -> gst_rtsp::ffi::GstRTSPStatusCode {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr); let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr);
imp.pre_play_request(wrap.unsafe_cast_ref(), &from_glib_borrow(ctx)) imp.pre_play_request(wrap.unsafe_cast_ref(), &from_glib_borrow(ctx))
@ -1199,7 +1199,7 @@ unsafe extern "C" fn client_pre_pause_request<T: RTSPClientImpl>(
ctx: *mut ffi::GstRTSPContext, ctx: *mut ffi::GstRTSPContext,
) -> gst_rtsp::ffi::GstRTSPStatusCode { ) -> gst_rtsp::ffi::GstRTSPStatusCode {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr); let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr);
imp.pre_pause_request(wrap.unsafe_cast_ref(), &from_glib_borrow(ctx)) imp.pre_pause_request(wrap.unsafe_cast_ref(), &from_glib_borrow(ctx))
@ -1211,7 +1211,7 @@ unsafe extern "C" fn client_pre_teardown_request<T: RTSPClientImpl>(
ctx: *mut ffi::GstRTSPContext, ctx: *mut ffi::GstRTSPContext,
) -> gst_rtsp::ffi::GstRTSPStatusCode { ) -> gst_rtsp::ffi::GstRTSPStatusCode {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr); let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr);
imp.pre_teardown_request(wrap.unsafe_cast_ref(), &from_glib_borrow(ctx)) imp.pre_teardown_request(wrap.unsafe_cast_ref(), &from_glib_borrow(ctx))
@ -1223,7 +1223,7 @@ unsafe extern "C" fn client_pre_set_parameter_request<T: RTSPClientImpl>(
ctx: *mut ffi::GstRTSPContext, ctx: *mut ffi::GstRTSPContext,
) -> gst_rtsp::ffi::GstRTSPStatusCode { ) -> gst_rtsp::ffi::GstRTSPStatusCode {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr); let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr);
imp.pre_set_parameter_request(wrap.unsafe_cast_ref(), &from_glib_borrow(ctx)) imp.pre_set_parameter_request(wrap.unsafe_cast_ref(), &from_glib_borrow(ctx))
@ -1235,7 +1235,7 @@ unsafe extern "C" fn client_pre_get_parameter_request<T: RTSPClientImpl>(
ctx: *mut ffi::GstRTSPContext, ctx: *mut ffi::GstRTSPContext,
) -> gst_rtsp::ffi::GstRTSPStatusCode { ) -> gst_rtsp::ffi::GstRTSPStatusCode {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr); let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr);
imp.pre_get_parameter_request(wrap.unsafe_cast_ref(), &from_glib_borrow(ctx)) imp.pre_get_parameter_request(wrap.unsafe_cast_ref(), &from_glib_borrow(ctx))
@ -1247,7 +1247,7 @@ unsafe extern "C" fn client_pre_announce_request<T: RTSPClientImpl>(
ctx: *mut ffi::GstRTSPContext, ctx: *mut ffi::GstRTSPContext,
) -> gst_rtsp::ffi::GstRTSPStatusCode { ) -> gst_rtsp::ffi::GstRTSPStatusCode {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr); let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr);
imp.pre_announce_request(wrap.unsafe_cast_ref(), &from_glib_borrow(ctx)) imp.pre_announce_request(wrap.unsafe_cast_ref(), &from_glib_borrow(ctx))
@ -1259,7 +1259,7 @@ unsafe extern "C" fn client_pre_record_request<T: RTSPClientImpl>(
ctx: *mut ffi::GstRTSPContext, ctx: *mut ffi::GstRTSPContext,
) -> gst_rtsp::ffi::GstRTSPStatusCode { ) -> gst_rtsp::ffi::GstRTSPStatusCode {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr); let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr);
imp.pre_record_request(wrap.unsafe_cast_ref(), &from_glib_borrow(ctx)) imp.pre_record_request(wrap.unsafe_cast_ref(), &from_glib_borrow(ctx))

View file

@ -479,7 +479,7 @@ unsafe extern "C" fn media_handle_message<T: RTSPMediaImpl>(
message: *mut gst::ffi::GstMessage, message: *mut gst::ffi::GstMessage,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<RTSPMedia> = from_glib_borrow(ptr); let wrap: Borrowed<RTSPMedia> = from_glib_borrow(ptr);
imp.handle_message(wrap.unsafe_cast_ref(), gst::MessageRef::from_ptr(message)) imp.handle_message(wrap.unsafe_cast_ref(), gst::MessageRef::from_ptr(message))
@ -491,7 +491,7 @@ unsafe extern "C" fn media_prepare<T: RTSPMediaImpl>(
thread: *mut ffi::GstRTSPThread, thread: *mut ffi::GstRTSPThread,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<RTSPMedia> = from_glib_borrow(ptr); let wrap: Borrowed<RTSPMedia> = from_glib_borrow(ptr);
match imp.prepare(wrap.unsafe_cast_ref(), &from_glib_borrow(thread)) { match imp.prepare(wrap.unsafe_cast_ref(), &from_glib_borrow(thread)) {
@ -507,7 +507,7 @@ unsafe extern "C" fn media_unprepare<T: RTSPMediaImpl>(
ptr: *mut ffi::GstRTSPMedia, ptr: *mut ffi::GstRTSPMedia,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<RTSPMedia> = from_glib_borrow(ptr); let wrap: Borrowed<RTSPMedia> = from_glib_borrow(ptr);
match imp.unprepare(wrap.unsafe_cast_ref()) { match imp.unprepare(wrap.unsafe_cast_ref()) {
@ -523,7 +523,7 @@ unsafe extern "C" fn media_suspend<T: RTSPMediaImpl>(
ptr: *mut ffi::GstRTSPMedia, ptr: *mut ffi::GstRTSPMedia,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<RTSPMedia> = from_glib_borrow(ptr); let wrap: Borrowed<RTSPMedia> = from_glib_borrow(ptr);
match imp.suspend(wrap.unsafe_cast_ref()) { match imp.suspend(wrap.unsafe_cast_ref()) {
@ -539,7 +539,7 @@ unsafe extern "C" fn media_unsuspend<T: RTSPMediaImpl>(
ptr: *mut ffi::GstRTSPMedia, ptr: *mut ffi::GstRTSPMedia,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<RTSPMedia> = from_glib_borrow(ptr); let wrap: Borrowed<RTSPMedia> = from_glib_borrow(ptr);
match imp.unsuspend(wrap.unsafe_cast_ref()) { match imp.unsuspend(wrap.unsafe_cast_ref()) {
@ -556,7 +556,7 @@ unsafe extern "C" fn media_query_position<T: RTSPMediaImpl>(
position: *mut i64, position: *mut i64,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<RTSPMedia> = from_glib_borrow(ptr); let wrap: Borrowed<RTSPMedia> = from_glib_borrow(ptr);
match imp.query_position(wrap.unsafe_cast_ref()) { match imp.query_position(wrap.unsafe_cast_ref()) {
@ -573,7 +573,7 @@ unsafe extern "C" fn media_query_stop<T: RTSPMediaImpl>(
stop: *mut i64, stop: *mut i64,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<RTSPMedia> = from_glib_borrow(ptr); let wrap: Borrowed<RTSPMedia> = from_glib_borrow(ptr);
match imp.query_stop(wrap.unsafe_cast_ref()) { match imp.query_stop(wrap.unsafe_cast_ref()) {
@ -589,7 +589,7 @@ unsafe extern "C" fn media_create_rtpbin<T: RTSPMediaImpl>(
ptr: *mut ffi::GstRTSPMedia, ptr: *mut ffi::GstRTSPMedia,
) -> *mut gst::ffi::GstElement { ) -> *mut gst::ffi::GstElement {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<RTSPMedia> = from_glib_borrow(ptr); let wrap: Borrowed<RTSPMedia> = from_glib_borrow(ptr);
let res: *mut gst::ffi::GstElement = imp.create_rtpbin(wrap.unsafe_cast_ref()).to_glib_full(); let res: *mut gst::ffi::GstElement = imp.create_rtpbin(wrap.unsafe_cast_ref()).to_glib_full();
@ -606,7 +606,7 @@ unsafe extern "C" fn media_setup_rtpbin<T: RTSPMediaImpl>(
rtpbin: *mut gst::ffi::GstElement, rtpbin: *mut gst::ffi::GstElement,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<RTSPMedia> = from_glib_borrow(ptr); let wrap: Borrowed<RTSPMedia> = from_glib_borrow(ptr);
// If the rtpbin was floating before make sure it is not anymore for now so // If the rtpbin was floating before make sure it is not anymore for now so
@ -635,7 +635,7 @@ unsafe extern "C" fn media_setup_sdp<T: RTSPMediaImpl>(
info: *mut ffi::GstSDPInfo, info: *mut ffi::GstSDPInfo,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<RTSPMedia> = from_glib_borrow(ptr); let wrap: Borrowed<RTSPMedia> = from_glib_borrow(ptr);
match imp.setup_sdp( match imp.setup_sdp(
@ -656,7 +656,7 @@ unsafe extern "C" fn media_new_stream<T: RTSPMediaImpl>(
stream: *mut ffi::GstRTSPStream, stream: *mut ffi::GstRTSPStream,
) { ) {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<RTSPMedia> = from_glib_borrow(ptr); let wrap: Borrowed<RTSPMedia> = from_glib_borrow(ptr);
imp.new_stream(wrap.unsafe_cast_ref(), &from_glib_borrow(stream)); imp.new_stream(wrap.unsafe_cast_ref(), &from_glib_borrow(stream));
@ -667,7 +667,7 @@ unsafe extern "C" fn media_removed_stream<T: RTSPMediaImpl>(
stream: *mut ffi::GstRTSPStream, stream: *mut ffi::GstRTSPStream,
) { ) {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<RTSPMedia> = from_glib_borrow(ptr); let wrap: Borrowed<RTSPMedia> = from_glib_borrow(ptr);
imp.removed_stream(wrap.unsafe_cast_ref(), &from_glib_borrow(stream)); imp.removed_stream(wrap.unsafe_cast_ref(), &from_glib_borrow(stream));
@ -675,7 +675,7 @@ unsafe extern "C" fn media_removed_stream<T: RTSPMediaImpl>(
unsafe extern "C" fn media_prepared<T: RTSPMediaImpl>(ptr: *mut ffi::GstRTSPMedia) { unsafe extern "C" fn media_prepared<T: RTSPMediaImpl>(ptr: *mut ffi::GstRTSPMedia) {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<RTSPMedia> = from_glib_borrow(ptr); let wrap: Borrowed<RTSPMedia> = from_glib_borrow(ptr);
imp.prepared(wrap.unsafe_cast_ref()); imp.prepared(wrap.unsafe_cast_ref());
@ -683,7 +683,7 @@ unsafe extern "C" fn media_prepared<T: RTSPMediaImpl>(ptr: *mut ffi::GstRTSPMedi
unsafe extern "C" fn media_unprepared<T: RTSPMediaImpl>(ptr: *mut ffi::GstRTSPMedia) { unsafe extern "C" fn media_unprepared<T: RTSPMediaImpl>(ptr: *mut ffi::GstRTSPMedia) {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<RTSPMedia> = from_glib_borrow(ptr); let wrap: Borrowed<RTSPMedia> = from_glib_borrow(ptr);
imp.unprepared(wrap.unsafe_cast_ref()); imp.unprepared(wrap.unsafe_cast_ref());
@ -694,7 +694,7 @@ unsafe extern "C" fn media_target_state<T: RTSPMediaImpl>(
state: gst::ffi::GstState, state: gst::ffi::GstState,
) { ) {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<RTSPMedia> = from_glib_borrow(ptr); let wrap: Borrowed<RTSPMedia> = from_glib_borrow(ptr);
imp.target_state(wrap.unsafe_cast_ref(), from_glib(state)); imp.target_state(wrap.unsafe_cast_ref(), from_glib(state));
@ -705,7 +705,7 @@ unsafe extern "C" fn media_new_state<T: RTSPMediaImpl>(
state: gst::ffi::GstState, state: gst::ffi::GstState,
) { ) {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<RTSPMedia> = from_glib_borrow(ptr); let wrap: Borrowed<RTSPMedia> = from_glib_borrow(ptr);
imp.new_state(wrap.unsafe_cast_ref(), from_glib(state)); imp.new_state(wrap.unsafe_cast_ref(), from_glib(state));
@ -716,7 +716,7 @@ unsafe extern "C" fn media_handle_sdp<T: RTSPMediaImpl>(
sdp: *mut gst_sdp::ffi::GstSDPMessage, sdp: *mut gst_sdp::ffi::GstSDPMessage,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<RTSPMedia> = from_glib_borrow(ptr); let wrap: Borrowed<RTSPMedia> = from_glib_borrow(ptr);
match imp.handle_sdp( match imp.handle_sdp(

View file

@ -243,7 +243,7 @@ unsafe extern "C" fn factory_gen_key<T: RTSPMediaFactoryImpl>(
url: *const gst_rtsp::ffi::GstRTSPUrl, url: *const gst_rtsp::ffi::GstRTSPUrl,
) -> *mut std::os::raw::c_char { ) -> *mut std::os::raw::c_char {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<RTSPMediaFactory> = from_glib_borrow(ptr); let wrap: Borrowed<RTSPMediaFactory> = from_glib_borrow(ptr);
imp.gen_key(wrap.unsafe_cast_ref(), &from_glib_borrow(url)) imp.gen_key(wrap.unsafe_cast_ref(), &from_glib_borrow(url))
@ -255,7 +255,7 @@ unsafe extern "C" fn factory_create_element<T: RTSPMediaFactoryImpl>(
url: *const gst_rtsp::ffi::GstRTSPUrl, url: *const gst_rtsp::ffi::GstRTSPUrl,
) -> *mut gst::ffi::GstElement { ) -> *mut gst::ffi::GstElement {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<RTSPMediaFactory> = from_glib_borrow(ptr); let wrap: Borrowed<RTSPMediaFactory> = from_glib_borrow(ptr);
let element = imp let element = imp
@ -270,7 +270,7 @@ unsafe extern "C" fn factory_construct<T: RTSPMediaFactoryImpl>(
url: *const gst_rtsp::ffi::GstRTSPUrl, url: *const gst_rtsp::ffi::GstRTSPUrl,
) -> *mut ffi::GstRTSPMedia { ) -> *mut ffi::GstRTSPMedia {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<RTSPMediaFactory> = from_glib_borrow(ptr); let wrap: Borrowed<RTSPMediaFactory> = from_glib_borrow(ptr);
imp.construct(wrap.unsafe_cast_ref(), &from_glib_borrow(url)) imp.construct(wrap.unsafe_cast_ref(), &from_glib_borrow(url))
@ -287,7 +287,7 @@ unsafe extern "C" fn factory_create_pipeline<T: RTSPMediaFactoryImpl>(
Lazy::new(|| glib::Quark::from_string("gstreamer-rs-rtsp-media-pipeline")); Lazy::new(|| glib::Quark::from_string("gstreamer-rs-rtsp-media-pipeline"));
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<RTSPMediaFactory> = from_glib_borrow(ptr); let wrap: Borrowed<RTSPMediaFactory> = from_glib_borrow(ptr);
let pipeline: *mut gst::ffi::GstPipeline = imp let pipeline: *mut gst::ffi::GstPipeline = imp
@ -312,7 +312,7 @@ unsafe extern "C" fn factory_configure<T: RTSPMediaFactoryImpl>(
media: *mut ffi::GstRTSPMedia, media: *mut ffi::GstRTSPMedia,
) { ) {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<RTSPMediaFactory> = from_glib_borrow(ptr); let wrap: Borrowed<RTSPMediaFactory> = from_glib_borrow(ptr);
imp.configure(wrap.unsafe_cast_ref(), &from_glib_borrow(media)); imp.configure(wrap.unsafe_cast_ref(), &from_glib_borrow(media));
@ -323,7 +323,7 @@ unsafe extern "C" fn factory_media_constructed<T: RTSPMediaFactoryImpl>(
media: *mut ffi::GstRTSPMedia, media: *mut ffi::GstRTSPMedia,
) { ) {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<RTSPMediaFactory> = from_glib_borrow(ptr); let wrap: Borrowed<RTSPMediaFactory> = from_glib_borrow(ptr);
imp.media_constructed(wrap.unsafe_cast_ref(), &from_glib_borrow(media)); imp.media_constructed(wrap.unsafe_cast_ref(), &from_glib_borrow(media));
@ -334,7 +334,7 @@ unsafe extern "C" fn factory_media_configure<T: RTSPMediaFactoryImpl>(
media: *mut ffi::GstRTSPMedia, media: *mut ffi::GstRTSPMedia,
) { ) {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<RTSPMediaFactory> = from_glib_borrow(ptr); let wrap: Borrowed<RTSPMediaFactory> = from_glib_borrow(ptr);
imp.media_configure(wrap.unsafe_cast_ref(), &from_glib_borrow(media)); imp.media_configure(wrap.unsafe_cast_ref(), &from_glib_borrow(media));

View file

@ -61,7 +61,7 @@ unsafe extern "C" fn mount_points_make_path<T: RTSPMountPointsImpl>(
url: *const GstRTSPUrl, url: *const GstRTSPUrl,
) -> *mut std::os::raw::c_char { ) -> *mut std::os::raw::c_char {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<RTSPMountPoints> = from_glib_borrow(ptr); let wrap: Borrowed<RTSPMountPoints> = from_glib_borrow(ptr);
imp.make_path(wrap.unsafe_cast_ref(), &from_glib_borrow(url)) imp.make_path(wrap.unsafe_cast_ref(), &from_glib_borrow(url))

View file

@ -60,7 +60,7 @@ unsafe extern "C" fn server_create_client<T: RTSPServerImpl>(
ptr: *mut ffi::GstRTSPServer, ptr: *mut ffi::GstRTSPServer,
) -> *mut ffi::GstRTSPClient { ) -> *mut ffi::GstRTSPClient {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<RTSPServer> = from_glib_borrow(ptr); let wrap: Borrowed<RTSPServer> = from_glib_borrow(ptr);
imp.create_client(wrap.unsafe_cast_ref()).to_glib_full() imp.create_client(wrap.unsafe_cast_ref()).to_glib_full()
@ -71,7 +71,7 @@ unsafe extern "C" fn server_client_connected<T: RTSPServerImpl>(
client: *mut ffi::GstRTSPClient, client: *mut ffi::GstRTSPClient,
) { ) {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<RTSPServer> = from_glib_borrow(ptr); let wrap: Borrowed<RTSPServer> = from_glib_borrow(ptr);
imp.client_connected(wrap.unsafe_cast_ref(), &from_glib_borrow(client)); imp.client_connected(wrap.unsafe_cast_ref(), &from_glib_borrow(client));

View file

@ -50,7 +50,7 @@ unsafe extern "C" fn navigation_send_event<T: NavigationImpl>(
structure: *mut GstStructure, structure: *mut GstStructure,
) { ) {
let instance = &*(nav as *mut T::Instance); let instance = &*(nav as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
imp.send_event( imp.send_event(
from_glib_borrow::<_, Navigation>(nav).unsafe_cast_ref(), from_glib_borrow::<_, Navigation>(nav).unsafe_cast_ref(),

View file

@ -597,7 +597,7 @@ unsafe extern "C" fn video_decoder_open<T: VideoDecoderImpl>(
ptr: *mut ffi::GstVideoDecoder, ptr: *mut ffi::GstVideoDecoder,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<VideoDecoder> = from_glib_borrow(ptr); let wrap: Borrowed<VideoDecoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -616,7 +616,7 @@ unsafe extern "C" fn video_decoder_close<T: VideoDecoderImpl>(
ptr: *mut ffi::GstVideoDecoder, ptr: *mut ffi::GstVideoDecoder,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<VideoDecoder> = from_glib_borrow(ptr); let wrap: Borrowed<VideoDecoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -635,7 +635,7 @@ unsafe extern "C" fn video_decoder_start<T: VideoDecoderImpl>(
ptr: *mut ffi::GstVideoDecoder, ptr: *mut ffi::GstVideoDecoder,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<VideoDecoder> = from_glib_borrow(ptr); let wrap: Borrowed<VideoDecoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -654,7 +654,7 @@ unsafe extern "C" fn video_decoder_stop<T: VideoDecoderImpl>(
ptr: *mut ffi::GstVideoDecoder, ptr: *mut ffi::GstVideoDecoder,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<VideoDecoder> = from_glib_borrow(ptr); let wrap: Borrowed<VideoDecoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -673,7 +673,7 @@ unsafe extern "C" fn video_decoder_finish<T: VideoDecoderImpl>(
ptr: *mut ffi::GstVideoDecoder, ptr: *mut ffi::GstVideoDecoder,
) -> gst::ffi::GstFlowReturn { ) -> gst::ffi::GstFlowReturn {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<VideoDecoder> = from_glib_borrow(ptr); let wrap: Borrowed<VideoDecoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), gst::FlowReturn::Error, { gst::panic_to_error!(&wrap, imp.panicked(), gst::FlowReturn::Error, {
@ -686,7 +686,7 @@ unsafe extern "C" fn video_decoder_drain<T: VideoDecoderImpl>(
ptr: *mut ffi::GstVideoDecoder, ptr: *mut ffi::GstVideoDecoder,
) -> gst::ffi::GstFlowReturn { ) -> gst::ffi::GstFlowReturn {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<VideoDecoder> = from_glib_borrow(ptr); let wrap: Borrowed<VideoDecoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), gst::FlowReturn::Error, { gst::panic_to_error!(&wrap, imp.panicked(), gst::FlowReturn::Error, {
@ -700,7 +700,7 @@ unsafe extern "C" fn video_decoder_set_format<T: VideoDecoderImpl>(
state: *mut ffi::GstVideoCodecState, state: *mut ffi::GstVideoCodecState,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<VideoDecoder> = from_glib_borrow(ptr); let wrap: Borrowed<VideoDecoder> = from_glib_borrow(ptr);
ffi::gst_video_codec_state_ref(state); ffi::gst_video_codec_state_ref(state);
let wrap_state = VideoCodecState::<Readable>::new(state); let wrap_state = VideoCodecState::<Readable>::new(state);
@ -724,7 +724,7 @@ unsafe extern "C" fn video_decoder_parse<T: VideoDecoderImpl>(
at_eos: glib::ffi::gboolean, at_eos: glib::ffi::gboolean,
) -> gst::ffi::GstFlowReturn { ) -> gst::ffi::GstFlowReturn {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<VideoDecoder> = from_glib_borrow(ptr); let wrap: Borrowed<VideoDecoder> = from_glib_borrow(ptr);
ffi::gst_video_codec_frame_ref(frame); ffi::gst_video_codec_frame_ref(frame);
let wrap_frame = VideoCodecFrame::new(frame, &*wrap); let wrap_frame = VideoCodecFrame::new(frame, &*wrap);
@ -743,7 +743,7 @@ unsafe extern "C" fn video_decoder_handle_frame<T: VideoDecoderImpl>(
frame: *mut ffi::GstVideoCodecFrame, frame: *mut ffi::GstVideoCodecFrame,
) -> gst::ffi::GstFlowReturn { ) -> gst::ffi::GstFlowReturn {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<VideoDecoder> = from_glib_borrow(ptr); let wrap: Borrowed<VideoDecoder> = from_glib_borrow(ptr);
let wrap_frame = VideoCodecFrame::new(frame, &*wrap); let wrap_frame = VideoCodecFrame::new(frame, &*wrap);
@ -757,7 +757,7 @@ unsafe extern "C" fn video_decoder_flush<T: VideoDecoderImpl>(
ptr: *mut ffi::GstVideoDecoder, ptr: *mut ffi::GstVideoDecoder,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<VideoDecoder> = from_glib_borrow(ptr); let wrap: Borrowed<VideoDecoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -770,7 +770,7 @@ unsafe extern "C" fn video_decoder_negotiate<T: VideoDecoderImpl>(
ptr: *mut ffi::GstVideoDecoder, ptr: *mut ffi::GstVideoDecoder,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<VideoDecoder> = from_glib_borrow(ptr); let wrap: Borrowed<VideoDecoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -790,7 +790,7 @@ unsafe extern "C" fn video_decoder_getcaps<T: VideoDecoderImpl>(
filter: *mut gst::ffi::GstCaps, filter: *mut gst::ffi::GstCaps,
) -> *mut gst::ffi::GstCaps { ) -> *mut gst::ffi::GstCaps {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<VideoDecoder> = from_glib_borrow(ptr); let wrap: Borrowed<VideoDecoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), gst::Caps::new_empty(), { gst::panic_to_error!(&wrap, imp.panicked(), gst::Caps::new_empty(), {
@ -810,7 +810,7 @@ unsafe extern "C" fn video_decoder_sink_event<T: VideoDecoderImpl>(
event: *mut gst::ffi::GstEvent, event: *mut gst::ffi::GstEvent,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<VideoDecoder> = from_glib_borrow(ptr); let wrap: Borrowed<VideoDecoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -824,7 +824,7 @@ unsafe extern "C" fn video_decoder_sink_query<T: VideoDecoderImpl>(
query: *mut gst::ffi::GstQuery, query: *mut gst::ffi::GstQuery,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<VideoDecoder> = from_glib_borrow(ptr); let wrap: Borrowed<VideoDecoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -838,7 +838,7 @@ unsafe extern "C" fn video_decoder_src_event<T: VideoDecoderImpl>(
event: *mut gst::ffi::GstEvent, event: *mut gst::ffi::GstEvent,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<VideoDecoder> = from_glib_borrow(ptr); let wrap: Borrowed<VideoDecoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -852,7 +852,7 @@ unsafe extern "C" fn video_decoder_src_query<T: VideoDecoderImpl>(
query: *mut gst::ffi::GstQuery, query: *mut gst::ffi::GstQuery,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<VideoDecoder> = from_glib_borrow(ptr); let wrap: Borrowed<VideoDecoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -866,7 +866,7 @@ unsafe extern "C" fn video_decoder_propose_allocation<T: VideoDecoderImpl>(
query: *mut gst::ffi::GstQuery, query: *mut gst::ffi::GstQuery,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<VideoDecoder> = from_glib_borrow(ptr); let wrap: Borrowed<VideoDecoder> = from_glib_borrow(ptr);
let query = match gst::QueryRef::from_mut_ptr(query).view_mut() { let query = match gst::QueryRef::from_mut_ptr(query).view_mut() {
gst::QueryView::Allocation(allocation) => allocation, gst::QueryView::Allocation(allocation) => allocation,
@ -890,7 +890,7 @@ unsafe extern "C" fn video_decoder_decide_allocation<T: VideoDecoderImpl>(
query: *mut gst::ffi::GstQuery, query: *mut gst::ffi::GstQuery,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<VideoDecoder> = from_glib_borrow(ptr); let wrap: Borrowed<VideoDecoder> = from_glib_borrow(ptr);
let query = match gst::QueryRef::from_mut_ptr(query).view_mut() { let query = match gst::QueryRef::from_mut_ptr(query).view_mut() {
gst::QueryView::Allocation(allocation) => allocation, gst::QueryView::Allocation(allocation) => allocation,
@ -916,7 +916,7 @@ unsafe extern "C" fn video_decoder_handle_missing_data<T: VideoDecoderImpl>(
duration: gst::ffi::GstClockTime, duration: gst::ffi::GstClockTime,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<VideoDecoder> = from_glib_borrow(ptr); let wrap: Borrowed<VideoDecoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), true, { gst::panic_to_error!(&wrap, imp.panicked(), true, {

View file

@ -483,7 +483,7 @@ unsafe extern "C" fn video_encoder_open<T: VideoEncoderImpl>(
ptr: *mut ffi::GstVideoEncoder, ptr: *mut ffi::GstVideoEncoder,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<VideoEncoder> = from_glib_borrow(ptr); let wrap: Borrowed<VideoEncoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -502,7 +502,7 @@ unsafe extern "C" fn video_encoder_close<T: VideoEncoderImpl>(
ptr: *mut ffi::GstVideoEncoder, ptr: *mut ffi::GstVideoEncoder,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<VideoEncoder> = from_glib_borrow(ptr); let wrap: Borrowed<VideoEncoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -521,7 +521,7 @@ unsafe extern "C" fn video_encoder_start<T: VideoEncoderImpl>(
ptr: *mut ffi::GstVideoEncoder, ptr: *mut ffi::GstVideoEncoder,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<VideoEncoder> = from_glib_borrow(ptr); let wrap: Borrowed<VideoEncoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -540,7 +540,7 @@ unsafe extern "C" fn video_encoder_stop<T: VideoEncoderImpl>(
ptr: *mut ffi::GstVideoEncoder, ptr: *mut ffi::GstVideoEncoder,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<VideoEncoder> = from_glib_borrow(ptr); let wrap: Borrowed<VideoEncoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -559,7 +559,7 @@ unsafe extern "C" fn video_encoder_finish<T: VideoEncoderImpl>(
ptr: *mut ffi::GstVideoEncoder, ptr: *mut ffi::GstVideoEncoder,
) -> gst::ffi::GstFlowReturn { ) -> gst::ffi::GstFlowReturn {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<VideoEncoder> = from_glib_borrow(ptr); let wrap: Borrowed<VideoEncoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), gst::FlowReturn::Error, { gst::panic_to_error!(&wrap, imp.panicked(), gst::FlowReturn::Error, {
@ -573,7 +573,7 @@ unsafe extern "C" fn video_encoder_set_format<T: VideoEncoderImpl>(
state: *mut ffi::GstVideoCodecState, state: *mut ffi::GstVideoCodecState,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<VideoEncoder> = from_glib_borrow(ptr); let wrap: Borrowed<VideoEncoder> = from_glib_borrow(ptr);
ffi::gst_video_codec_state_ref(state); ffi::gst_video_codec_state_ref(state);
let wrap_state = VideoCodecState::<Readable>::new(state); let wrap_state = VideoCodecState::<Readable>::new(state);
@ -595,7 +595,7 @@ unsafe extern "C" fn video_encoder_handle_frame<T: VideoEncoderImpl>(
frame: *mut ffi::GstVideoCodecFrame, frame: *mut ffi::GstVideoCodecFrame,
) -> gst::ffi::GstFlowReturn { ) -> gst::ffi::GstFlowReturn {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<VideoEncoder> = from_glib_borrow(ptr); let wrap: Borrowed<VideoEncoder> = from_glib_borrow(ptr);
let wrap_frame = VideoCodecFrame::new(frame, &*wrap); let wrap_frame = VideoCodecFrame::new(frame, &*wrap);
@ -609,7 +609,7 @@ unsafe extern "C" fn video_encoder_flush<T: VideoEncoderImpl>(
ptr: *mut ffi::GstVideoEncoder, ptr: *mut ffi::GstVideoEncoder,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<VideoEncoder> = from_glib_borrow(ptr); let wrap: Borrowed<VideoEncoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -622,7 +622,7 @@ unsafe extern "C" fn video_encoder_negotiate<T: VideoEncoderImpl>(
ptr: *mut ffi::GstVideoEncoder, ptr: *mut ffi::GstVideoEncoder,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<VideoEncoder> = from_glib_borrow(ptr); let wrap: Borrowed<VideoEncoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -642,7 +642,7 @@ unsafe extern "C" fn video_encoder_getcaps<T: VideoEncoderImpl>(
filter: *mut gst::ffi::GstCaps, filter: *mut gst::ffi::GstCaps,
) -> *mut gst::ffi::GstCaps { ) -> *mut gst::ffi::GstCaps {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<VideoEncoder> = from_glib_borrow(ptr); let wrap: Borrowed<VideoEncoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), gst::Caps::new_empty(), { gst::panic_to_error!(&wrap, imp.panicked(), gst::Caps::new_empty(), {
@ -662,7 +662,7 @@ unsafe extern "C" fn video_encoder_sink_event<T: VideoEncoderImpl>(
event: *mut gst::ffi::GstEvent, event: *mut gst::ffi::GstEvent,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<VideoEncoder> = from_glib_borrow(ptr); let wrap: Borrowed<VideoEncoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -676,7 +676,7 @@ unsafe extern "C" fn video_encoder_sink_query<T: VideoEncoderImpl>(
query: *mut gst::ffi::GstQuery, query: *mut gst::ffi::GstQuery,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<VideoEncoder> = from_glib_borrow(ptr); let wrap: Borrowed<VideoEncoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -690,7 +690,7 @@ unsafe extern "C" fn video_encoder_src_event<T: VideoEncoderImpl>(
event: *mut gst::ffi::GstEvent, event: *mut gst::ffi::GstEvent,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<VideoEncoder> = from_glib_borrow(ptr); let wrap: Borrowed<VideoEncoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -704,7 +704,7 @@ unsafe extern "C" fn video_encoder_src_query<T: VideoEncoderImpl>(
query: *mut gst::ffi::GstQuery, query: *mut gst::ffi::GstQuery,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<VideoEncoder> = from_glib_borrow(ptr); let wrap: Borrowed<VideoEncoder> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -718,7 +718,7 @@ unsafe extern "C" fn video_encoder_propose_allocation<T: VideoEncoderImpl>(
query: *mut gst::ffi::GstQuery, query: *mut gst::ffi::GstQuery,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<VideoEncoder> = from_glib_borrow(ptr); let wrap: Borrowed<VideoEncoder> = from_glib_borrow(ptr);
let query = match gst::QueryRef::from_mut_ptr(query).view_mut() { let query = match gst::QueryRef::from_mut_ptr(query).view_mut() {
gst::QueryView::Allocation(allocation) => allocation, gst::QueryView::Allocation(allocation) => allocation,
@ -742,7 +742,7 @@ unsafe extern "C" fn video_encoder_decide_allocation<T: VideoEncoderImpl>(
query: *mut gst::ffi::GstQuery, query: *mut gst::ffi::GstQuery,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<VideoEncoder> = from_glib_borrow(ptr); let wrap: Borrowed<VideoEncoder> = from_glib_borrow(ptr);
let query = match gst::QueryRef::from_mut_ptr(query).view_mut() { let query = match gst::QueryRef::from_mut_ptr(query).view_mut() {
gst::QueryView::Allocation(allocation) => allocation, gst::QueryView::Allocation(allocation) => allocation,

View file

@ -241,7 +241,7 @@ unsafe extern "C" fn video_filter_set_info<T: VideoFilterImpl>(
out_info: *mut ffi::GstVideoInfo, out_info: *mut ffi::GstVideoInfo,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<VideoFilter> = from_glib_borrow(ptr); let wrap: Borrowed<VideoFilter> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), false, { gst::panic_to_error!(&wrap, imp.panicked(), false, {
@ -268,7 +268,7 @@ unsafe extern "C" fn video_filter_transform_frame<T: VideoFilterImpl>(
outframe: *mut ffi::GstVideoFrame, outframe: *mut ffi::GstVideoFrame,
) -> gst::ffi::GstFlowReturn { ) -> gst::ffi::GstFlowReturn {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<VideoFilter> = from_glib_borrow(ptr); let wrap: Borrowed<VideoFilter> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), gst::FlowReturn::Error, { gst::panic_to_error!(&wrap, imp.panicked(), gst::FlowReturn::Error, {
@ -287,7 +287,7 @@ unsafe extern "C" fn video_filter_transform_frame_ip<T: VideoFilterImpl>(
frame: *mut ffi::GstVideoFrame, frame: *mut ffi::GstVideoFrame,
) -> gst::ffi::GstFlowReturn { ) -> gst::ffi::GstFlowReturn {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<VideoFilter> = from_glib_borrow(ptr); let wrap: Borrowed<VideoFilter> = from_glib_borrow(ptr);
gst::panic_to_error!(&wrap, imp.panicked(), gst::FlowReturn::Error, { gst::panic_to_error!(&wrap, imp.panicked(), gst::FlowReturn::Error, {

View file

@ -60,7 +60,7 @@ unsafe extern "C" fn video_sink_show_frame<T: VideoSinkImpl>(
buffer: *mut gst::ffi::GstBuffer, buffer: *mut gst::ffi::GstBuffer,
) -> gst::ffi::GstFlowReturn { ) -> gst::ffi::GstFlowReturn {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<VideoSink> = from_glib_borrow(ptr); let wrap: Borrowed<VideoSink> = from_glib_borrow(ptr);
let buffer = from_glib_borrow(buffer); let buffer = from_glib_borrow(buffer);

View file

@ -113,7 +113,7 @@ unsafe extern "C" fn bin_add_element<T: BinImpl>(
element: *mut ffi::GstElement, element: *mut ffi::GstElement,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<Bin> = from_glib_borrow(ptr); let wrap: Borrowed<Bin> = from_glib_borrow(ptr);
panic_to_error!(&wrap, imp.panicked(), false, { panic_to_error!(&wrap, imp.panicked(), false, {
@ -133,7 +133,7 @@ unsafe extern "C" fn bin_remove_element<T: BinImpl>(
element: *mut ffi::GstElement, element: *mut ffi::GstElement,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<Bin> = from_glib_borrow(ptr); let wrap: Borrowed<Bin> = from_glib_borrow(ptr);
// If we get a floating reference passed simply return FALSE here. It can't be // If we get a floating reference passed simply return FALSE here. It can't be
@ -162,7 +162,7 @@ unsafe extern "C" fn bin_handle_message<T: BinImpl>(
message: *mut ffi::GstMessage, message: *mut ffi::GstMessage,
) { ) {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<Bin> = from_glib_borrow(ptr); let wrap: Borrowed<Bin> = from_glib_borrow(ptr);
panic_to_error!(&wrap, imp.panicked(), (), { panic_to_error!(&wrap, imp.panicked(), (), {

View file

@ -131,7 +131,7 @@ unsafe extern "C" fn child_proxy_get_child_by_name<T: ChildProxyImpl>(
name: *const libc::c_char, name: *const libc::c_char,
) -> *mut glib::gobject_ffi::GObject { ) -> *mut glib::gobject_ffi::GObject {
let instance = &*(child_proxy as *mut T::Instance); let instance = &*(child_proxy as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
imp.child_by_name( imp.child_by_name(
from_glib_borrow::<_, ChildProxy>(child_proxy).unsafe_cast_ref(), from_glib_borrow::<_, ChildProxy>(child_proxy).unsafe_cast_ref(),
@ -145,7 +145,7 @@ unsafe extern "C" fn child_proxy_get_child_by_index<T: ChildProxyImpl>(
index: u32, index: u32,
) -> *mut glib::gobject_ffi::GObject { ) -> *mut glib::gobject_ffi::GObject {
let instance = &*(child_proxy as *mut T::Instance); let instance = &*(child_proxy as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
imp.child_by_index( imp.child_by_index(
from_glib_borrow::<_, ChildProxy>(child_proxy).unsafe_cast_ref(), from_glib_borrow::<_, ChildProxy>(child_proxy).unsafe_cast_ref(),
@ -158,7 +158,7 @@ unsafe extern "C" fn child_proxy_get_children_count<T: ChildProxyImpl>(
child_proxy: *mut ffi::GstChildProxy, child_proxy: *mut ffi::GstChildProxy,
) -> u32 { ) -> u32 {
let instance = &*(child_proxy as *mut T::Instance); let instance = &*(child_proxy as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
imp.children_count(from_glib_borrow::<_, ChildProxy>(child_proxy).unsafe_cast_ref()) imp.children_count(from_glib_borrow::<_, ChildProxy>(child_proxy).unsafe_cast_ref())
} }
@ -169,7 +169,7 @@ unsafe extern "C" fn child_proxy_child_added<T: ChildProxyImpl>(
name: *const libc::c_char, name: *const libc::c_char,
) { ) {
let instance = &*(child_proxy as *mut T::Instance); let instance = &*(child_proxy as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
imp.child_added( imp.child_added(
from_glib_borrow::<_, ChildProxy>(child_proxy).unsafe_cast_ref(), from_glib_borrow::<_, ChildProxy>(child_proxy).unsafe_cast_ref(),
@ -184,7 +184,7 @@ unsafe extern "C" fn child_proxy_child_removed<T: ChildProxyImpl>(
name: *const libc::c_char, name: *const libc::c_char,
) { ) {
let instance = &*(child_proxy as *mut T::Instance); let instance = &*(child_proxy as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
imp.child_removed( imp.child_removed(
from_glib_borrow::<_, ChildProxy>(child_proxy).unsafe_cast_ref(), from_glib_borrow::<_, ChildProxy>(child_proxy).unsafe_cast_ref(),

View file

@ -251,7 +251,7 @@ unsafe extern "C" fn clock_change_resolution<T: ClockImpl>(
new_resolution: ffi::GstClockTime, new_resolution: ffi::GstClockTime,
) -> ffi::GstClockTime { ) -> ffi::GstClockTime {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<Clock> = from_glib_borrow(ptr); let wrap: Borrowed<Clock> = from_glib_borrow(ptr);
let old_resolution = match from_glib(old_resolution) { let old_resolution = match from_glib(old_resolution) {
@ -271,7 +271,7 @@ unsafe extern "C" fn clock_get_resolution<T: ClockImpl>(
ptr: *mut ffi::GstClock, ptr: *mut ffi::GstClock,
) -> ffi::GstClockTime { ) -> ffi::GstClockTime {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<Clock> = from_glib_borrow(ptr); let wrap: Borrowed<Clock> = from_glib_borrow(ptr);
imp.resolution(wrap.unsafe_cast_ref()).into_glib() imp.resolution(wrap.unsafe_cast_ref()).into_glib()
@ -281,7 +281,7 @@ unsafe extern "C" fn clock_get_internal_time<T: ClockImpl>(
ptr: *mut ffi::GstClock, ptr: *mut ffi::GstClock,
) -> ffi::GstClockTime { ) -> ffi::GstClockTime {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<Clock> = from_glib_borrow(ptr); let wrap: Borrowed<Clock> = from_glib_borrow(ptr);
imp.internal_time(wrap.unsafe_cast_ref()).into_glib() imp.internal_time(wrap.unsafe_cast_ref()).into_glib()
@ -293,7 +293,7 @@ unsafe extern "C" fn clock_wait<T: ClockImpl>(
jitter: *mut ffi::GstClockTimeDiff, jitter: *mut ffi::GstClockTimeDiff,
) -> ffi::GstClockReturn { ) -> ffi::GstClockReturn {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<Clock> = from_glib_borrow(ptr); let wrap: Borrowed<Clock> = from_glib_borrow(ptr);
let (res, j) = imp.wait( let (res, j) = imp.wait(
@ -312,7 +312,7 @@ unsafe extern "C" fn clock_wait_async<T: ClockImpl>(
id: *mut ffi::GstClockEntry, id: *mut ffi::GstClockEntry,
) -> ffi::GstClockReturn { ) -> ffi::GstClockReturn {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<Clock> = from_glib_borrow(ptr); let wrap: Borrowed<Clock> = from_glib_borrow(ptr);
ClockReturn::from(imp.wait_async( ClockReturn::from(imp.wait_async(
@ -327,7 +327,7 @@ unsafe extern "C" fn clock_unschedule<T: ClockImpl>(
id: *mut ffi::GstClockEntry, id: *mut ffi::GstClockEntry,
) { ) {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<Clock> = from_glib_borrow(ptr); let wrap: Borrowed<Clock> = from_glib_borrow(ptr);
imp.unschedule( imp.unschedule(

View file

@ -114,7 +114,7 @@ unsafe extern "C" fn device_create_element<T: DeviceImpl>(
name: *const libc::c_char, name: *const libc::c_char,
) -> *mut ffi::GstElement { ) -> *mut ffi::GstElement {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<Device> = from_glib_borrow(ptr); let wrap: Borrowed<Device> = from_glib_borrow(ptr);
match imp.create_element( match imp.create_element(
@ -147,7 +147,7 @@ unsafe extern "C" fn device_reconfigure_element<T: DeviceImpl>(
element: *mut ffi::GstElement, element: *mut ffi::GstElement,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<Device> = from_glib_borrow(ptr); let wrap: Borrowed<Device> = from_glib_borrow(ptr);
match imp.reconfigure_element(wrap.unsafe_cast_ref(), &from_glib_borrow(element)) { match imp.reconfigure_element(wrap.unsafe_cast_ref(), &from_glib_borrow(element)) {

View file

@ -176,7 +176,7 @@ unsafe extern "C" fn device_provider_probe<T: DeviceProviderImpl>(
ptr: *mut ffi::GstDeviceProvider, ptr: *mut ffi::GstDeviceProvider,
) -> *mut glib::ffi::GList { ) -> *mut glib::ffi::GList {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<DeviceProvider> = from_glib_borrow(ptr); let wrap: Borrowed<DeviceProvider> = from_glib_borrow(ptr);
imp.probe(wrap.unsafe_cast_ref()).to_glib_full() imp.probe(wrap.unsafe_cast_ref()).to_glib_full()
@ -186,7 +186,7 @@ unsafe extern "C" fn device_provider_start<T: DeviceProviderImpl>(
ptr: *mut ffi::GstDeviceProvider, ptr: *mut ffi::GstDeviceProvider,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<DeviceProvider> = from_glib_borrow(ptr); let wrap: Borrowed<DeviceProvider> = from_glib_borrow(ptr);
match imp.start(wrap.unsafe_cast_ref()) { match imp.start(wrap.unsafe_cast_ref()) {
@ -201,7 +201,7 @@ unsafe extern "C" fn device_provider_start<T: DeviceProviderImpl>(
unsafe extern "C" fn device_provider_stop<T: DeviceProviderImpl>(ptr: *mut ffi::GstDeviceProvider) { unsafe extern "C" fn device_provider_stop<T: DeviceProviderImpl>(ptr: *mut ffi::GstDeviceProvider) {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<DeviceProvider> = from_glib_borrow(ptr); let wrap: Borrowed<DeviceProvider> = from_glib_borrow(ptr);
imp.stop(wrap.unsafe_cast_ref()); imp.stop(wrap.unsafe_cast_ref());

View file

@ -348,7 +348,7 @@ impl<T: ElementImpl> ElementImplExt for T {
assert!(element.type_().is_a(T::type_())); assert!(element.type_().is_a(T::type_()));
let ptr: *mut ffi::GstElement = element.as_ptr() as *mut _; let ptr: *mut ffi::GstElement = element.as_ptr() as *mut _;
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
panic_to_error!(element, imp.panicked(), fallback(), { f(imp) }) panic_to_error!(element, imp.panicked(), fallback(), { f(imp) })
} }
@ -364,7 +364,7 @@ impl<T: ElementImpl> ElementImplExt for T {
assert!(wrap.type_().is_a(Self::type_())); assert!(wrap.type_().is_a(Self::type_()));
let ptr: *mut ffi::GstElement = wrap.to_glib_none().0; let ptr: *mut ffi::GstElement = wrap.to_glib_none().0;
let instance = &*(ptr as *mut Self::Instance); let instance = &*(ptr as *mut Self::Instance);
let imp = instance.impl_(); let imp = instance.imp();
panic_to_error!(wrap, imp.panicked(), fallback(), { panic_to_error!(wrap, imp.panicked(), fallback(), {
f(imp, wrap.unsafe_cast_ref()) f(imp, wrap.unsafe_cast_ref())
@ -424,7 +424,7 @@ unsafe extern "C" fn element_change_state<T: ElementImpl>(
transition: ffi::GstStateChange, transition: ffi::GstStateChange,
) -> ffi::GstStateChangeReturn { ) -> ffi::GstStateChangeReturn {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<Element> = from_glib_borrow(ptr); let wrap: Borrowed<Element> = from_glib_borrow(ptr);
// *Never* fail downwards state changes, this causes bugs in GStreamer // *Never* fail downwards state changes, this causes bugs in GStreamer
@ -450,7 +450,7 @@ unsafe extern "C" fn element_request_new_pad<T: ElementImpl>(
caps: *const ffi::GstCaps, caps: *const ffi::GstCaps,
) -> *mut ffi::GstPad { ) -> *mut ffi::GstPad {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<Element> = from_glib_borrow(ptr); let wrap: Borrowed<Element> = from_glib_borrow(ptr);
let caps = Option::<crate::Caps>::from_glib_borrow(caps); let caps = Option::<crate::Caps>::from_glib_borrow(caps);
@ -484,7 +484,7 @@ unsafe extern "C" fn element_release_pad<T: ElementImpl>(
pad: *mut ffi::GstPad, pad: *mut ffi::GstPad,
) { ) {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<Element> = from_glib_borrow(ptr); let wrap: Borrowed<Element> = from_glib_borrow(ptr);
// If we get a floating reference passed simply return here. It can't be stored inside this // If we get a floating reference passed simply return here. It can't be stored inside this
@ -505,7 +505,7 @@ unsafe extern "C" fn element_send_event<T: ElementImpl>(
event: *mut ffi::GstEvent, event: *mut ffi::GstEvent,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<Element> = from_glib_borrow(ptr); let wrap: Borrowed<Element> = from_glib_borrow(ptr);
panic_to_error!(&wrap, imp.panicked(), false, { panic_to_error!(&wrap, imp.panicked(), false, {
@ -519,7 +519,7 @@ unsafe extern "C" fn element_query<T: ElementImpl>(
query: *mut ffi::GstQuery, query: *mut ffi::GstQuery,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<Element> = from_glib_borrow(ptr); let wrap: Borrowed<Element> = from_glib_borrow(ptr);
let query = QueryRef::from_mut_ptr(query); let query = QueryRef::from_mut_ptr(query);
@ -534,7 +534,7 @@ unsafe extern "C" fn element_set_context<T: ElementImpl>(
context: *mut ffi::GstContext, context: *mut ffi::GstContext,
) { ) {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<Element> = from_glib_borrow(ptr); let wrap: Borrowed<Element> = from_glib_borrow(ptr);
panic_to_error!(&wrap, imp.panicked(), (), { panic_to_error!(&wrap, imp.panicked(), (), {
@ -547,7 +547,7 @@ unsafe extern "C" fn element_set_clock<T: ElementImpl>(
clock: *mut ffi::GstClock, clock: *mut ffi::GstClock,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<Element> = from_glib_borrow(ptr); let wrap: Borrowed<Element> = from_glib_borrow(ptr);
let clock = Option::<crate::Clock>::from_glib_borrow(clock); let clock = Option::<crate::Clock>::from_glib_borrow(clock);
@ -562,7 +562,7 @@ unsafe extern "C" fn element_provide_clock<T: ElementImpl>(
ptr: *mut ffi::GstElement, ptr: *mut ffi::GstElement,
) -> *mut ffi::GstClock { ) -> *mut ffi::GstClock {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<Element> = from_glib_borrow(ptr); let wrap: Borrowed<Element> = from_glib_borrow(ptr);
panic_to_error!(&wrap, imp.panicked(), None, { panic_to_error!(&wrap, imp.panicked(), None, {
@ -576,7 +576,7 @@ unsafe extern "C" fn element_post_message<T: ElementImpl>(
msg: *mut ffi::GstMessage, msg: *mut ffi::GstMessage,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<Element> = from_glib_borrow(ptr); let wrap: Borrowed<Element> = from_glib_borrow(ptr);
// Can't catch panics here as posting the error message would cause // Can't catch panics here as posting the error message would cause

View file

@ -70,7 +70,7 @@ unsafe impl<T: PadImpl> IsSubclassable<T> for Pad {
unsafe extern "C" fn pad_linked<T: PadImpl>(ptr: *mut ffi::GstPad, peer: *mut ffi::GstPad) { unsafe extern "C" fn pad_linked<T: PadImpl>(ptr: *mut ffi::GstPad, peer: *mut ffi::GstPad) {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<Pad> = from_glib_borrow(ptr); let wrap: Borrowed<Pad> = from_glib_borrow(ptr);
imp.linked(wrap.unsafe_cast_ref(), &from_glib_borrow(peer)) imp.linked(wrap.unsafe_cast_ref(), &from_glib_borrow(peer))
@ -78,7 +78,7 @@ unsafe extern "C" fn pad_linked<T: PadImpl>(ptr: *mut ffi::GstPad, peer: *mut ff
unsafe extern "C" fn pad_unlinked<T: PadImpl>(ptr: *mut ffi::GstPad, peer: *mut ffi::GstPad) { unsafe extern "C" fn pad_unlinked<T: PadImpl>(ptr: *mut ffi::GstPad, peer: *mut ffi::GstPad) {
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
let wrap: Borrowed<Pad> = from_glib_borrow(ptr); let wrap: Borrowed<Pad> = from_glib_borrow(ptr);
imp.unlinked(wrap.unsafe_cast_ref(), &from_glib_borrow(peer)) imp.unlinked(wrap.unsafe_cast_ref(), &from_glib_borrow(peer))

View file

@ -124,7 +124,7 @@ unsafe extern "C" fn uri_handler_get_uri<T: URIHandlerImpl>(
uri_handler: *mut ffi::GstURIHandler, uri_handler: *mut ffi::GstURIHandler,
) -> *mut libc::c_char { ) -> *mut libc::c_char {
let instance = &*(uri_handler as *mut T::Instance); let instance = &*(uri_handler as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
imp.uri(from_glib_borrow::<_, URIHandler>(uri_handler).unsafe_cast_ref()) imp.uri(from_glib_borrow::<_, URIHandler>(uri_handler).unsafe_cast_ref())
.to_glib_full() .to_glib_full()
@ -136,7 +136,7 @@ unsafe extern "C" fn uri_handler_set_uri<T: URIHandlerImpl>(
err: *mut *mut glib::ffi::GError, err: *mut *mut glib::ffi::GError,
) -> glib::ffi::gboolean { ) -> glib::ffi::gboolean {
let instance = &*(uri_handler as *mut T::Instance); let instance = &*(uri_handler as *mut T::Instance);
let imp = instance.impl_(); let imp = instance.imp();
match imp.set_uri( match imp.set_uri(
from_glib_borrow::<_, URIHandler>(uri_handler).unsafe_cast_ref(), from_glib_borrow::<_, URIHandler>(uri_handler).unsafe_cast_ref(),