Update for new from_glib_borrow signature

See https://github.com/gtk-rs/glib/pull/605
This commit is contained in:
Sebastian Dröge 2020-04-05 17:52:56 +03:00
parent 64368f0e75
commit 019afd54f9
112 changed files with 751 additions and 714 deletions

View file

@ -157,10 +157,10 @@ fn post_panic_error_message(element: &AppSink, err: &dyn std::any::Any) {
unsafe extern "C" fn trampoline_eos(appsink: *mut gst_app_sys::GstAppSink, callbacks: gpointer) {
let callbacks = &*(callbacks as *const AppSinkCallbacks);
let element: AppSink = from_glib_borrow(appsink);
let element: Borrowed<AppSink> = from_glib_borrow(appsink);
if callbacks.panicked.load(Ordering::Relaxed) {
let element: AppSink = from_glib_borrow(appsink);
let element: Borrowed<AppSink> = from_glib_borrow(appsink);
gst_element_error!(&element, gst::LibraryError::Failed, ["Panicked"]);
return;
}
@ -184,10 +184,10 @@ unsafe extern "C" fn trampoline_new_preroll(
callbacks: gpointer,
) -> gst_sys::GstFlowReturn {
let callbacks = &*(callbacks as *const AppSinkCallbacks);
let element: AppSink = from_glib_borrow(appsink);
let element: Borrowed<AppSink> = from_glib_borrow(appsink);
if callbacks.panicked.load(Ordering::Relaxed) {
let element: AppSink = from_glib_borrow(appsink);
let element: Borrowed<AppSink> = from_glib_borrow(appsink);
gst_element_error!(&element, gst::LibraryError::Failed, ["Panicked"]);
return gst::FlowReturn::Error.to_glib();
}
@ -217,10 +217,10 @@ unsafe extern "C" fn trampoline_new_sample(
callbacks: gpointer,
) -> gst_sys::GstFlowReturn {
let callbacks = &*(callbacks as *const AppSinkCallbacks);
let element: AppSink = from_glib_borrow(appsink);
let element: Borrowed<AppSink> = from_glib_borrow(appsink);
if callbacks.panicked.load(Ordering::Relaxed) {
let element: AppSink = from_glib_borrow(appsink);
let element: Borrowed<AppSink> = from_glib_borrow(appsink);
gst_element_error!(&element, gst::LibraryError::Failed, ["Panicked"]);
return gst::FlowReturn::Error.to_glib();
}

View file

@ -133,10 +133,10 @@ unsafe extern "C" fn trampoline_need_data(
callbacks: gpointer,
) {
let callbacks = &*(callbacks as *const AppSrcCallbacks);
let element: AppSrc = from_glib_borrow(appsrc);
let element: Borrowed<AppSrc> = from_glib_borrow(appsrc);
if callbacks.panicked.load(Ordering::Relaxed) {
let element: AppSrc = from_glib_borrow(appsrc);
let element: Borrowed<AppSrc> = from_glib_borrow(appsrc);
gst_element_error!(&element, gst::LibraryError::Failed, ["Panicked"]);
return;
}
@ -160,10 +160,10 @@ unsafe extern "C" fn trampoline_enough_data(
callbacks: gpointer,
) {
let callbacks = &*(callbacks as *const AppSrcCallbacks);
let element: AppSrc = from_glib_borrow(appsrc);
let element: Borrowed<AppSrc> = from_glib_borrow(appsrc);
if callbacks.panicked.load(Ordering::Relaxed) {
let element: AppSrc = from_glib_borrow(appsrc);
let element: Borrowed<AppSrc> = from_glib_borrow(appsrc);
gst_element_error!(&element, gst::LibraryError::Failed, ["Panicked"]);
return;
}
@ -186,10 +186,10 @@ unsafe extern "C" fn trampoline_seek_data(
callbacks: gpointer,
) -> gboolean {
let callbacks = &*(callbacks as *const AppSrcCallbacks);
let element: AppSrc = from_glib_borrow(appsrc);
let element: Borrowed<AppSrc> = from_glib_borrow(appsrc);
if callbacks.panicked.load(Ordering::Relaxed) {
let element: AppSrc = from_glib_borrow(appsrc);
let element: Borrowed<AppSrc> = from_glib_borrow(appsrc);
gst_element_error!(&element, gst::LibraryError::Failed, ["Panicked"]);
return false.to_glib();
}

View file

@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 0a4cfc4)
from gir-files (https://github.com/gtk-rs/gir-files @ 4607c4a0)
Generated by gir (https://github.com/gtk-rs/gir @ 997cbcb)
from gir-files (https://github.com/gtk-rs/gir-files @ a57b90d4)

View file

@ -291,7 +291,7 @@ impl<O: IsA<AudioBaseSink>> AudioBaseSinkExt for O {
P: IsA<AudioBaseSink>,
{
let f: &F = &*(f as *const F);
f(&AudioBaseSink::from_glib_borrow(this).unsafe_cast())
f(&AudioBaseSink::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -318,7 +318,7 @@ impl<O: IsA<AudioBaseSink>> AudioBaseSinkExt for O {
P: IsA<AudioBaseSink>,
{
let f: &F = &*(f as *const F);
f(&AudioBaseSink::from_glib_borrow(this).unsafe_cast())
f(&AudioBaseSink::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -346,7 +346,7 @@ impl<O: IsA<AudioBaseSink>> AudioBaseSinkExt for O {
P: IsA<AudioBaseSink>,
{
let f: &F = &*(f as *const F);
f(&AudioBaseSink::from_glib_borrow(this).unsafe_cast())
f(&AudioBaseSink::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -373,7 +373,7 @@ impl<O: IsA<AudioBaseSink>> AudioBaseSinkExt for O {
P: IsA<AudioBaseSink>,
{
let f: &F = &*(f as *const F);
f(&AudioBaseSink::from_glib_borrow(this).unsafe_cast())
f(&AudioBaseSink::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -403,7 +403,7 @@ impl<O: IsA<AudioBaseSink>> AudioBaseSinkExt for O {
P: IsA<AudioBaseSink>,
{
let f: &F = &*(f as *const F);
f(&AudioBaseSink::from_glib_borrow(this).unsafe_cast())
f(&AudioBaseSink::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -430,7 +430,7 @@ impl<O: IsA<AudioBaseSink>> AudioBaseSinkExt for O {
P: IsA<AudioBaseSink>,
{
let f: &F = &*(f as *const F);
f(&AudioBaseSink::from_glib_borrow(this).unsafe_cast())
f(&AudioBaseSink::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -457,7 +457,7 @@ impl<O: IsA<AudioBaseSink>> AudioBaseSinkExt for O {
P: IsA<AudioBaseSink>,
{
let f: &F = &*(f as *const F);
f(&AudioBaseSink::from_glib_borrow(this).unsafe_cast())
f(&AudioBaseSink::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -484,7 +484,7 @@ impl<O: IsA<AudioBaseSink>> AudioBaseSinkExt for O {
P: IsA<AudioBaseSink>,
{
let f: &F = &*(f as *const F);
f(&AudioBaseSink::from_glib_borrow(this).unsafe_cast())
f(&AudioBaseSink::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);

View file

@ -209,7 +209,7 @@ impl<O: IsA<AudioBaseSrc>> AudioBaseSrcExt for O {
P: IsA<AudioBaseSrc>,
{
let f: &F = &*(f as *const F);
f(&AudioBaseSrc::from_glib_borrow(this).unsafe_cast())
f(&AudioBaseSrc::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -239,7 +239,7 @@ impl<O: IsA<AudioBaseSrc>> AudioBaseSrcExt for O {
P: IsA<AudioBaseSrc>,
{
let f: &F = &*(f as *const F);
f(&AudioBaseSrc::from_glib_borrow(this).unsafe_cast())
f(&AudioBaseSrc::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -266,7 +266,7 @@ impl<O: IsA<AudioBaseSrc>> AudioBaseSrcExt for O {
P: IsA<AudioBaseSrc>,
{
let f: &F = &*(f as *const F);
f(&AudioBaseSrc::from_glib_borrow(this).unsafe_cast())
f(&AudioBaseSrc::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -291,7 +291,7 @@ impl<O: IsA<AudioBaseSrc>> AudioBaseSrcExt for O {
P: IsA<AudioBaseSrc>,
{
let f: &F = &*(f as *const F);
f(&AudioBaseSrc::from_glib_borrow(this).unsafe_cast())
f(&AudioBaseSrc::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -318,7 +318,7 @@ impl<O: IsA<AudioBaseSrc>> AudioBaseSrcExt for O {
P: IsA<AudioBaseSrc>,
{
let f: &F = &*(f as *const F);
f(&AudioBaseSrc::from_glib_borrow(this).unsafe_cast())
f(&AudioBaseSrc::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -345,7 +345,7 @@ impl<O: IsA<AudioBaseSrc>> AudioBaseSrcExt for O {
P: IsA<AudioBaseSrc>,
{
let f: &F = &*(f as *const F);
f(&AudioBaseSrc::from_glib_borrow(this).unsafe_cast())
f(&AudioBaseSrc::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);

View file

@ -336,7 +336,7 @@ impl<O: IsA<AudioDecoder>> AudioDecoderExt for O {
P: IsA<AudioDecoder>,
{
let f: &F = &*(f as *const F);
f(&AudioDecoder::from_glib_borrow(this).unsafe_cast())
f(&AudioDecoder::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -361,7 +361,7 @@ impl<O: IsA<AudioDecoder>> AudioDecoderExt for O {
P: IsA<AudioDecoder>,
{
let f: &F = &*(f as *const F);
f(&AudioDecoder::from_glib_borrow(this).unsafe_cast())
f(&AudioDecoder::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -386,7 +386,7 @@ impl<O: IsA<AudioDecoder>> AudioDecoderExt for O {
P: IsA<AudioDecoder>,
{
let f: &F = &*(f as *const F);
f(&AudioDecoder::from_glib_borrow(this).unsafe_cast())
f(&AudioDecoder::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);

View file

@ -337,7 +337,7 @@ impl<O: IsA<AudioEncoder>> AudioEncoderExt for O {
P: IsA<AudioEncoder>,
{
let f: &F = &*(f as *const F);
f(&AudioEncoder::from_glib_borrow(this).unsafe_cast())
f(&AudioEncoder::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -362,7 +362,7 @@ impl<O: IsA<AudioEncoder>> AudioEncoderExt for O {
P: IsA<AudioEncoder>,
{
let f: &F = &*(f as *const F);
f(&AudioEncoder::from_glib_borrow(this).unsafe_cast())
f(&AudioEncoder::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -392,7 +392,7 @@ impl<O: IsA<AudioEncoder>> AudioEncoderExt for O {
P: IsA<AudioEncoder>,
{
let f: &F = &*(f as *const F);
f(&AudioEncoder::from_glib_borrow(this).unsafe_cast())
f(&AudioEncoder::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -419,7 +419,7 @@ impl<O: IsA<AudioEncoder>> AudioEncoderExt for O {
P: IsA<AudioEncoder>,
{
let f: &F = &*(f as *const F);
f(&AudioEncoder::from_glib_borrow(this).unsafe_cast())
f(&AudioEncoder::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);

View file

@ -104,7 +104,7 @@ impl<O: IsA<StreamVolume>> StreamVolumeExt for O {
P: IsA<StreamVolume>,
{
let f: &F = &*(f as *const F);
f(&StreamVolume::from_glib_borrow(this).unsafe_cast())
f(&StreamVolume::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -129,7 +129,7 @@ impl<O: IsA<StreamVolume>> StreamVolumeExt for O {
P: IsA<StreamVolume>,
{
let f: &F = &*(f as *const F);
f(&StreamVolume::from_glib_borrow(this).unsafe_cast())
f(&StreamVolume::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);

View file

@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 0a4cfc4)
from gir-files (https://github.com/gtk-rs/gir-files @ 4607c4a0)
Generated by gir (https://github.com/gtk-rs/gir @ 997cbcb)
from gir-files (https://github.com/gtk-rs/gir-files @ a57b90d4)

View file

@ -549,7 +549,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: AudioDecoder = from_glib_borrow(ptr);
let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
match imp.open(&wrap) {
@ -572,7 +572,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: AudioDecoder = from_glib_borrow(ptr);
let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
match imp.close(&wrap) {
@ -595,7 +595,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: AudioDecoder = from_glib_borrow(ptr);
let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
match imp.start(&wrap) {
@ -618,7 +618,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: AudioDecoder = from_glib_borrow(ptr);
let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
match imp.stop(&wrap) {
@ -642,13 +642,13 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: AudioDecoder = from_glib_borrow(ptr);
let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
match imp.set_format(&wrap, &from_glib_borrow(caps)) {
Ok(()) => true,
Err(err) => {
err.log_with_object(&wrap);
err.log_with_object(&*wrap);
false
}
}
@ -668,7 +668,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: AudioDecoder = from_glib_borrow(ptr);
let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), gst::FlowReturn::Error, {
match imp.parse(&wrap, &from_glib_borrow(adapter)) {
@ -698,7 +698,7 @@ where
let buffer = buffer as *mut gst_sys::GstBuffer;
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: AudioDecoder = from_glib_borrow(ptr);
let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), gst::FlowReturn::Error, {
imp.handle_frame(
@ -720,7 +720,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: AudioDecoder = from_glib_borrow(ptr);
let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), gst::FlowReturn::Error, {
match imp.pre_push(&wrap, from_glib_full(*buffer)) {
@ -748,7 +748,7 @@ unsafe extern "C" fn audio_decoder_flush<T: ObjectSubclass>(
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: AudioDecoder = from_glib_borrow(ptr);
let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), (), {
AudioDecoderImpl::flush(imp, &wrap, from_glib(hard))
@ -764,13 +764,13 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: AudioDecoder = from_glib_borrow(ptr);
let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
match imp.negotiate(&wrap) {
Ok(()) => true,
Err(err) => {
err.log_with_object(&wrap);
err.log_with_object(&*wrap);
false
}
}
@ -788,13 +788,15 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: AudioDecoder = from_glib_borrow(ptr);
let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), gst::Caps::new_empty(), {
AudioDecoderImpl::get_caps(
imp,
&wrap,
Option::<gst::Caps>::from_glib_borrow(filter).as_ref(),
Option::<gst::Caps>::from_glib_borrow(filter)
.as_ref()
.as_ref(),
)
})
.to_glib_full()
@ -810,7 +812,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: AudioDecoder = from_glib_borrow(ptr);
let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
imp.sink_event(&wrap, from_glib_full(event))
@ -828,7 +830,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: AudioDecoder = from_glib_borrow(ptr);
let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
imp.sink_query(&wrap, gst::QueryRef::from_mut_ptr(query))
@ -846,7 +848,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: AudioDecoder = from_glib_borrow(ptr);
let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
imp.src_event(&wrap, from_glib_full(event))
@ -864,7 +866,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: AudioDecoder = from_glib_borrow(ptr);
let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
imp.src_query(&wrap, gst::QueryRef::from_mut_ptr(query))
@ -882,7 +884,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: AudioDecoder = from_glib_borrow(ptr);
let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr);
let query = gst::QueryRef::from_mut_ptr(query);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
@ -907,7 +909,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: AudioDecoder = from_glib_borrow(ptr);
let wrap: Borrowed<AudioDecoder> = from_glib_borrow(ptr);
let query = gst::QueryRef::from_mut_ptr(query);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {

View file

@ -497,7 +497,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: AudioEncoder = from_glib_borrow(ptr);
let wrap: Borrowed<AudioEncoder> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
match imp.open(&wrap) {
@ -520,7 +520,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: AudioEncoder = from_glib_borrow(ptr);
let wrap: Borrowed<AudioEncoder> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
match imp.close(&wrap) {
@ -543,7 +543,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: AudioEncoder = from_glib_borrow(ptr);
let wrap: Borrowed<AudioEncoder> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
match imp.start(&wrap) {
@ -566,7 +566,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: AudioEncoder = from_glib_borrow(ptr);
let wrap: Borrowed<AudioEncoder> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
match imp.stop(&wrap) {
@ -590,13 +590,13 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: AudioEncoder = from_glib_borrow(ptr);
let wrap: Borrowed<AudioEncoder> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
match imp.set_format(&wrap, &from_glib_none(info)) {
Ok(()) => true,
Err(err) => {
err.log_with_object(&wrap);
err.log_with_object(&*wrap);
false
}
}
@ -616,7 +616,7 @@ where
let buffer = buffer as *mut gst_sys::GstBuffer;
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: AudioEncoder = from_glib_borrow(ptr);
let wrap: Borrowed<AudioEncoder> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), gst::FlowReturn::Error, {
imp.handle_frame(
@ -638,7 +638,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: AudioEncoder = from_glib_borrow(ptr);
let wrap: Borrowed<AudioEncoder> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), gst::FlowReturn::Error, {
match imp.pre_push(&wrap, from_glib_full(*buffer)) {
@ -665,7 +665,7 @@ unsafe extern "C" fn audio_encoder_flush<T: ObjectSubclass>(
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: AudioEncoder = from_glib_borrow(ptr);
let wrap: Borrowed<AudioEncoder> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), (), {
AudioEncoderImpl::flush(imp, &wrap)
@ -681,13 +681,13 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: AudioEncoder = from_glib_borrow(ptr);
let wrap: Borrowed<AudioEncoder> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
match imp.negotiate(&wrap) {
Ok(()) => true,
Err(err) => {
err.log_with_object(&wrap);
err.log_with_object(&*wrap);
false
}
}
@ -705,13 +705,15 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: AudioEncoder = from_glib_borrow(ptr);
let wrap: Borrowed<AudioEncoder> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), gst::Caps::new_empty(), {
AudioEncoderImpl::get_caps(
imp,
&wrap,
Option::<gst::Caps>::from_glib_borrow(filter).as_ref(),
Option::<gst::Caps>::from_glib_borrow(filter)
.as_ref()
.as_ref(),
)
})
.to_glib_full()
@ -727,7 +729,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: AudioEncoder = from_glib_borrow(ptr);
let wrap: Borrowed<AudioEncoder> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
imp.sink_event(&wrap, from_glib_full(event))
@ -745,7 +747,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: AudioEncoder = from_glib_borrow(ptr);
let wrap: Borrowed<AudioEncoder> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
imp.sink_query(&wrap, gst::QueryRef::from_mut_ptr(query))
@ -763,7 +765,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: AudioEncoder = from_glib_borrow(ptr);
let wrap: Borrowed<AudioEncoder> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
imp.src_event(&wrap, from_glib_full(event))
@ -781,7 +783,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: AudioEncoder = from_glib_borrow(ptr);
let wrap: Borrowed<AudioEncoder> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
imp.src_query(&wrap, gst::QueryRef::from_mut_ptr(query))
@ -799,7 +801,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: AudioEncoder = from_glib_borrow(ptr);
let wrap: Borrowed<AudioEncoder> = from_glib_borrow(ptr);
let query = gst::QueryRef::from_mut_ptr(query);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
@ -824,7 +826,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: AudioEncoder = from_glib_borrow(ptr);
let wrap: Borrowed<AudioEncoder> = from_glib_borrow(ptr);
let query = gst::QueryRef::from_mut_ptr(query);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {

View file

@ -13,7 +13,7 @@ use AudioSink;
use AudioSinkClass;
pub trait AudioSinkImpl: AudioSinkImplExt + BaseSinkImpl + Send + Sync + 'static {
fn close(&self, sink: &mut AudioSink) -> Result<(), LoggableError> {
fn close(&self, sink: &AudioSink) -> Result<(), LoggableError> {
self.parent_close(sink)
}
@ -41,7 +41,7 @@ pub trait AudioSinkImpl: AudioSinkImplExt + BaseSinkImpl + Send + Sync + 'static
}
pub trait AudioSinkImplExt {
fn parent_close(&self, sink: &mut AudioSink) -> Result<(), LoggableError>;
fn parent_close(&self, sink: &AudioSink) -> Result<(), LoggableError>;
fn parent_delay(&self, sink: &AudioSink) -> u32;
fn parent_open(&self, sink: &AudioSink) -> Result<(), LoggableError>;
fn parent_prepare(
@ -54,7 +54,7 @@ pub trait AudioSinkImplExt {
}
impl<T: AudioSinkImpl + ObjectImpl> AudioSinkImplExt for T {
fn parent_close(&self, sink: &mut AudioSink) -> Result<(), LoggableError> {
fn parent_close(&self, sink: &AudioSink) -> Result<(), LoggableError> {
unsafe {
let data = self.get_type_data();
let parent_class =
@ -194,13 +194,13 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let mut wrap: AudioSink = from_glib_borrow(ptr);
let wrap: Borrowed<AudioSink> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
match imp.close(&mut wrap) {
match imp.close(&wrap) {
Ok(()) => true,
Err(err) => {
err.log_with_object(&wrap);
err.log_with_object(&*wrap);
false
}
}
@ -217,7 +217,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: AudioSink = from_glib_borrow(ptr);
let wrap: Borrowed<AudioSink> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), 0, { imp.delay(&wrap) })
}
@ -231,13 +231,13 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: AudioSink = from_glib_borrow(ptr);
let wrap: Borrowed<AudioSink> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
match imp.open(&wrap) {
Ok(()) => true,
Err(err) => {
err.log_with_object(&wrap);
err.log_with_object(&*wrap);
false
}
}
@ -255,7 +255,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: AudioSink = from_glib_borrow(ptr);
let wrap: Borrowed<AudioSink> = from_glib_borrow(ptr);
let spec = &mut *(spec as *mut AudioRingBufferSpec);
@ -263,7 +263,7 @@ where
match AudioSinkImpl::prepare(imp, &wrap, spec) {
Ok(()) => true,
Err(err) => {
err.log_with_object(&wrap);
err.log_with_object(&*wrap);
false
}
}
@ -280,13 +280,13 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: AudioSink = from_glib_borrow(ptr);
let wrap: Borrowed<AudioSink> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
match imp.unprepare(&wrap) {
Ok(()) => true,
Err(err) => {
err.log_with_object(&wrap);
err.log_with_object(&*wrap);
false
}
}
@ -305,7 +305,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: 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);
gst_panic_to_error!(&wrap, &instance.panicked(), -1, {

View file

@ -15,7 +15,7 @@ use AudioSrc;
use AudioSrcClass;
pub trait AudioSrcImpl: AudioSrcImplExt + BaseSrcImpl + Send + Sync + 'static {
fn close(&self, src: &mut AudioSrc) -> Result<(), LoggableError> {
fn close(&self, src: &AudioSrc) -> Result<(), LoggableError> {
self.parent_close(src)
}
@ -43,7 +43,7 @@ pub trait AudioSrcImpl: AudioSrcImplExt + BaseSrcImpl + Send + Sync + 'static {
}
pub trait AudioSrcImplExt {
fn parent_close(&self, src: &mut AudioSrc) -> Result<(), LoggableError>;
fn parent_close(&self, src: &AudioSrc) -> Result<(), LoggableError>;
fn parent_delay(&self, src: &AudioSrc) -> u32;
fn parent_open(&self, src: &AudioSrc) -> Result<(), LoggableError>;
fn parent_prepare(
@ -60,7 +60,7 @@ pub trait AudioSrcImplExt {
}
impl<T: AudioSrcImpl + ObjectImpl> AudioSrcImplExt for T {
fn parent_close(&self, src: &mut AudioSrc) -> Result<(), LoggableError> {
fn parent_close(&self, src: &AudioSrc) -> Result<(), LoggableError> {
unsafe {
let data = self.get_type_data();
let parent_class =
@ -210,13 +210,13 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let mut wrap: AudioSrc = from_glib_borrow(ptr);
let wrap: Borrowed<AudioSrc> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
match imp.close(&mut wrap) {
match imp.close(&wrap) {
Ok(()) => true,
Err(err) => {
err.log_with_object(&wrap);
err.log_with_object(&*wrap);
false
}
}
@ -231,7 +231,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: AudioSrc = from_glib_borrow(ptr);
let wrap: Borrowed<AudioSrc> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), 0, { imp.delay(&wrap) })
}
@ -245,13 +245,13 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: AudioSrc = from_glib_borrow(ptr);
let wrap: Borrowed<AudioSrc> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
match imp.open(&wrap) {
Ok(()) => true,
Err(err) => {
err.log_with_object(&wrap);
err.log_with_object(&*wrap);
false
}
}
@ -269,7 +269,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: AudioSrc = from_glib_borrow(ptr);
let wrap: Borrowed<AudioSrc> = from_glib_borrow(ptr);
let spec = &mut *(spec as *mut AudioRingBufferSpec);
@ -277,7 +277,7 @@ where
match AudioSrcImpl::prepare(imp, &wrap, spec) {
Ok(()) => true,
Err(err) => {
err.log_with_object(&wrap);
err.log_with_object(&*wrap);
false
}
}
@ -294,13 +294,13 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: AudioSrc = from_glib_borrow(ptr);
let wrap: Borrowed<AudioSrc> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
match imp.unprepare(&wrap) {
Ok(()) => true,
Err(err) => {
err.log_with_object(&wrap);
err.log_with_object(&*wrap);
false
}
}
@ -320,7 +320,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: 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);
gst_panic_to_error!(&wrap, &instance.panicked(), 0, {

View file

@ -118,5 +118,5 @@ unsafe extern "C" fn notify_min_upstream_latency_trampoline<P, F: Fn(&P) + Send
P: IsA<Aggregator>,
{
let f: &F = &*(f as *const F);
f(&Aggregator::from_glib_borrow(this).unsafe_cast())
f(&Aggregator::from_glib_borrow(this).unsafe_cast_ref())
}

View file

@ -156,7 +156,7 @@ impl<O: IsA<Aggregator>> AggregatorExt for O {
P: IsA<Aggregator>,
{
let f: &F = &*(f as *const F);
f(&Aggregator::from_glib_borrow(this).unsafe_cast())
f(&Aggregator::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -181,7 +181,7 @@ impl<O: IsA<Aggregator>> AggregatorExt for O {
P: IsA<Aggregator>,
{
let f: &F = &*(f as *const F);
f(&Aggregator::from_glib_borrow(this).unsafe_cast())
f(&Aggregator::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);

View file

@ -156,7 +156,7 @@ impl<O: IsA<AggregatorPad>> AggregatorPadExt for O {
{
let f: &F = &*(f as *const F);
f(
&AggregatorPad::from_glib_borrow(this).unsafe_cast(),
&AggregatorPad::from_glib_borrow(this).unsafe_cast_ref(),
&from_glib_borrow(object),
)
}
@ -184,7 +184,7 @@ impl<O: IsA<AggregatorPad>> AggregatorPadExt for O {
P: IsA<AggregatorPad>,
{
let f: &F = &*(f as *const F);
f(&AggregatorPad::from_glib_borrow(this).unsafe_cast())
f(&AggregatorPad::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);

View file

@ -214,7 +214,7 @@ impl<O: IsA<BaseParse>> BaseParseExt for O {
P: IsA<BaseParse>,
{
let f: &F = &*(f as *const F);
f(&BaseParse::from_glib_borrow(this).unsafe_cast())
f(&BaseParse::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);

View file

@ -446,7 +446,7 @@ impl<O: IsA<BaseSink>> BaseSinkExt for O {
P: IsA<BaseSink>,
{
let f: &F = &*(f as *const F);
f(&BaseSink::from_glib_borrow(this).unsafe_cast())
f(&BaseSink::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -471,7 +471,7 @@ impl<O: IsA<BaseSink>> BaseSinkExt for O {
P: IsA<BaseSink>,
{
let f: &F = &*(f as *const F);
f(&BaseSink::from_glib_borrow(this).unsafe_cast())
f(&BaseSink::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -499,7 +499,7 @@ impl<O: IsA<BaseSink>> BaseSinkExt for O {
P: IsA<BaseSink>,
{
let f: &F = &*(f as *const F);
f(&BaseSink::from_glib_borrow(this).unsafe_cast())
f(&BaseSink::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -526,7 +526,7 @@ impl<O: IsA<BaseSink>> BaseSinkExt for O {
P: IsA<BaseSink>,
{
let f: &F = &*(f as *const F);
f(&BaseSink::from_glib_borrow(this).unsafe_cast())
f(&BaseSink::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -551,7 +551,7 @@ impl<O: IsA<BaseSink>> BaseSinkExt for O {
P: IsA<BaseSink>,
{
let f: &F = &*(f as *const F);
f(&BaseSink::from_glib_borrow(this).unsafe_cast())
f(&BaseSink::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -576,7 +576,7 @@ impl<O: IsA<BaseSink>> BaseSinkExt for O {
P: IsA<BaseSink>,
{
let f: &F = &*(f as *const F);
f(&BaseSink::from_glib_borrow(this).unsafe_cast())
f(&BaseSink::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -607,7 +607,7 @@ impl<O: IsA<BaseSink>> BaseSinkExt for O {
P: IsA<BaseSink>,
{
let f: &F = &*(f as *const F);
f(&BaseSink::from_glib_borrow(this).unsafe_cast())
f(&BaseSink::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -634,7 +634,7 @@ impl<O: IsA<BaseSink>> BaseSinkExt for O {
P: IsA<BaseSink>,
{
let f: &F = &*(f as *const F);
f(&BaseSink::from_glib_borrow(this).unsafe_cast())
f(&BaseSink::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -659,7 +659,7 @@ impl<O: IsA<BaseSink>> BaseSinkExt for O {
P: IsA<BaseSink>,
{
let f: &F = &*(f as *const F);
f(&BaseSink::from_glib_borrow(this).unsafe_cast())
f(&BaseSink::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -686,7 +686,7 @@ impl<O: IsA<BaseSink>> BaseSinkExt for O {
P: IsA<BaseSink>,
{
let f: &F = &*(f as *const F);
f(&BaseSink::from_glib_borrow(this).unsafe_cast())
f(&BaseSink::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -711,7 +711,7 @@ impl<O: IsA<BaseSink>> BaseSinkExt for O {
P: IsA<BaseSink>,
{
let f: &F = &*(f as *const F);
f(&BaseSink::from_glib_borrow(this).unsafe_cast())
f(&BaseSink::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -738,7 +738,7 @@ impl<O: IsA<BaseSink>> BaseSinkExt for O {
P: IsA<BaseSink>,
{
let f: &F = &*(f as *const F);
f(&BaseSink::from_glib_borrow(this).unsafe_cast())
f(&BaseSink::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);

View file

@ -267,7 +267,7 @@ impl<O: IsA<BaseSrc>> BaseSrcExt for O {
P: IsA<BaseSrc>,
{
let f: &F = &*(f as *const F);
f(&BaseSrc::from_glib_borrow(this).unsafe_cast())
f(&BaseSrc::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -292,7 +292,7 @@ impl<O: IsA<BaseSrc>> BaseSrcExt for O {
P: IsA<BaseSrc>,
{
let f: &F = &*(f as *const F);
f(&BaseSrc::from_glib_borrow(this).unsafe_cast())
f(&BaseSrc::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -319,7 +319,7 @@ impl<O: IsA<BaseSrc>> BaseSrcExt for O {
P: IsA<BaseSrc>,
{
let f: &F = &*(f as *const F);
f(&BaseSrc::from_glib_borrow(this).unsafe_cast())
f(&BaseSrc::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -344,7 +344,7 @@ impl<O: IsA<BaseSrc>> BaseSrcExt for O {
P: IsA<BaseSrc>,
{
let f: &F = &*(f as *const F);
f(&BaseSrc::from_glib_borrow(this).unsafe_cast())
f(&BaseSrc::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);

View file

@ -223,7 +223,7 @@ impl<O: IsA<BaseTransform>> BaseTransformExt for O {
P: IsA<BaseTransform>,
{
let f: &F = &*(f as *const F);
f(&BaseTransform::from_glib_borrow(this).unsafe_cast())
f(&BaseTransform::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);

View file

@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 0a4cfc4)
from gir-files (https://github.com/gtk-rs/gir-files @ 4607c4a0)
Generated by gir (https://github.com/gtk-rs/gir @ 997cbcb)
from gir-files (https://github.com/gtk-rs/gir-files @ a57b90d4)

View file

@ -540,7 +540,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: Aggregator = from_glib_borrow(ptr);
let wrap: Borrowed<Aggregator> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), gst::FlowReturn::Error, {
imp.flush(&wrap).into()
@ -559,7 +559,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: Aggregator = from_glib_borrow(ptr);
let wrap: Borrowed<Aggregator> = from_glib_borrow(ptr);
let ret = gst_panic_to_error!(&wrap, &instance.panicked(), None, {
imp.clip(
@ -582,7 +582,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: Aggregator = from_glib_borrow(ptr);
let wrap: Borrowed<Aggregator> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), gst::FlowReturn::Error, {
imp.finish_buffer(&wrap, from_glib_full(buffer)).into()
@ -601,7 +601,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: Aggregator = from_glib_borrow(ptr);
let wrap: Borrowed<Aggregator> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
imp.sink_event(
@ -624,7 +624,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: Aggregator = from_glib_borrow(ptr);
let wrap: Borrowed<Aggregator> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
imp.sink_query(
@ -646,7 +646,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: Aggregator = from_glib_borrow(ptr);
let wrap: Borrowed<Aggregator> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
imp.src_event(&wrap, from_glib_full(event))
@ -664,7 +664,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: Aggregator = from_glib_borrow(ptr);
let wrap: Borrowed<Aggregator> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
imp.src_query(&wrap, gst::QueryRef::from_mut_ptr(query))
@ -683,13 +683,13 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: Aggregator = from_glib_borrow(ptr);
let wrap: Borrowed<Aggregator> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
match imp.src_activate(&wrap, from_glib(mode), from_glib(active)) {
Ok(()) => true,
Err(err) => {
err.log_with_object(&wrap);
err.log_with_object(&*wrap);
false
}
}
@ -707,7 +707,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: Aggregator = from_glib_borrow(ptr);
let wrap: Borrowed<Aggregator> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), gst::FlowReturn::Error, {
imp.aggregate(&wrap, from_glib(timeout)).into()
@ -724,7 +724,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: Aggregator = from_glib_borrow(ptr);
let wrap: Borrowed<Aggregator> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
match imp.start(&wrap) {
@ -747,7 +747,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: Aggregator = from_glib_borrow(ptr);
let wrap: Borrowed<Aggregator> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
match imp.stop(&wrap) {
@ -770,7 +770,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: Aggregator = from_glib_borrow(ptr);
let wrap: Borrowed<Aggregator> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), gst::CLOCK_TIME_NONE, {
imp.get_next_time(&wrap)
@ -790,26 +790,18 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: Aggregator = from_glib_borrow(ptr);
let wrap: Borrowed<Aggregator> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), None, {
let req_name: Option<String> = from_glib_none(req_name);
// FIXME: Easier way to convert Option<String> to Option<&str>?
let mut _tmp = String::new();
let req_name = match req_name {
Some(n) => {
_tmp = n;
Some(_tmp.as_str())
}
None => None,
};
let req_name: Borrowed<Option<glib::GString>> = from_glib_borrow(req_name);
imp.create_new_pad(
&wrap,
&from_glib_borrow(templ),
req_name,
Option::<gst::Caps>::from_glib_borrow(caps).as_ref(),
req_name.as_ref().as_ref().map(|s| s.as_str()),
Option::<gst::Caps>::from_glib_borrow(caps)
.as_ref()
.as_ref(),
)
})
.to_glib_full()
@ -826,7 +818,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: Aggregator = from_glib_borrow(ptr);
let wrap: Borrowed<Aggregator> = from_glib_borrow(ptr);
*res = ptr::null_mut();
@ -852,7 +844,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: Aggregator = from_glib_borrow(ptr);
let wrap: Borrowed<Aggregator> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), gst::Caps::new_empty(), {
imp.fixate_src_caps(&wrap, from_glib_full(caps))
@ -870,13 +862,13 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: Aggregator = from_glib_borrow(ptr);
let wrap: Borrowed<Aggregator> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
match imp.negotiated_src_caps(&wrap, &from_glib_borrow(caps)) {
Ok(()) => true,
Err(err) => {
err.log_with_object(&wrap);
err.log_with_object(&*wrap);
false
}
}

View file

@ -120,7 +120,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: AggregatorPad = from_glib_borrow(ptr);
let wrap: Borrowed<AggregatorPad> = from_glib_borrow(ptr);
let res: gst::FlowReturn = imp.flush(&wrap, &from_glib_borrow(aggregator)).into();
res.to_glib()
@ -136,7 +136,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: AggregatorPad = from_glib_borrow(ptr);
let wrap: Borrowed<AggregatorPad> = from_glib_borrow(ptr);
imp.skip_buffer(
&wrap,

View file

@ -211,7 +211,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: BaseParse = from_glib_borrow(ptr);
let wrap: Borrowed<BaseParse> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
match imp.start(&wrap) {
@ -235,8 +235,8 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: BaseParse = from_glib_borrow(ptr);
let caps: gst::Caps = from_glib_none(caps);
let wrap: Borrowed<BaseParse> = from_glib_borrow(ptr);
let caps: Borrowed<gst::Caps> = from_glib_borrow(caps);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
match imp.set_sink_caps(&wrap, &caps) {
@ -261,7 +261,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: BaseParse = from_glib_borrow(ptr);
let wrap: Borrowed<BaseParse> = from_glib_borrow(ptr);
let wrap_frame = BaseParseFrame::new(frame, &wrap);
let res = gst_panic_to_error!(&wrap, &instance.panicked(), Err(gst::FlowError::Error), {
@ -291,7 +291,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: 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 res = gst_panic_to_error!(&wrap, &instance.panicked(), None, {

View file

@ -416,7 +416,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: BaseSink = from_glib_borrow(ptr);
let wrap: Borrowed<BaseSink> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
match imp.start(&wrap) {
@ -439,7 +439,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: BaseSink = from_glib_borrow(ptr);
let wrap: Borrowed<BaseSink> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
match imp.stop(&wrap) {
@ -463,7 +463,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: BaseSink = from_glib_borrow(ptr);
let wrap: Borrowed<BaseSink> = from_glib_borrow(ptr);
let buffer = from_glib_borrow(buffer);
gst_panic_to_error!(&wrap, &instance.panicked(), gst::FlowReturn::Error, {
@ -482,7 +482,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: BaseSink = from_glib_borrow(ptr);
let wrap: Borrowed<BaseSink> = from_glib_borrow(ptr);
let buffer = from_glib_borrow(buffer);
gst_panic_to_error!(&wrap, &instance.panicked(), gst::FlowReturn::Error, {
@ -501,7 +501,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: BaseSink = from_glib_borrow(ptr);
let wrap: Borrowed<BaseSink> = from_glib_borrow(ptr);
let list = from_glib_borrow(list);
gst_panic_to_error!(&wrap, &instance.panicked(), gst::FlowReturn::Error, {
@ -520,7 +520,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: BaseSink = from_glib_borrow(ptr);
let wrap: Borrowed<BaseSink> = from_glib_borrow(ptr);
let list = from_glib_borrow(list);
gst_panic_to_error!(&wrap, &instance.panicked(), gst::FlowReturn::Error, {
@ -539,7 +539,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: BaseSink = from_glib_borrow(ptr);
let wrap: Borrowed<BaseSink> = from_glib_borrow(ptr);
let query = gst::QueryRef::from_mut_ptr(query_ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
@ -558,7 +558,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: BaseSink = from_glib_borrow(ptr);
let wrap: Borrowed<BaseSink> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
imp.event(&wrap, from_glib_full(event_ptr))
@ -576,11 +576,11 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: BaseSink = from_glib_borrow(ptr);
let wrap: Borrowed<BaseSink> = from_glib_borrow(ptr);
let filter = Option::<gst::Caps>::from_glib_borrow(filter);
gst_panic_to_error!(&wrap, &instance.panicked(), None, {
imp.get_caps(&wrap, filter.as_ref())
imp.get_caps(&wrap, filter.as_ref().as_ref())
})
.map(|caps| caps.into_ptr())
.unwrap_or(ptr::null_mut())
@ -596,14 +596,14 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: BaseSink = from_glib_borrow(ptr);
let wrap: Borrowed<BaseSink> = from_glib_borrow(ptr);
let caps = from_glib_borrow(caps);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
match imp.set_caps(&wrap, &caps) {
Ok(()) => true,
Err(err) => {
err.log_with_object(&wrap);
err.log_with_object(&*wrap);
false
}
}
@ -621,7 +621,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: BaseSink = from_glib_borrow(ptr);
let wrap: Borrowed<BaseSink> = from_glib_borrow(ptr);
let caps = from_glib_full(caps);
gst_panic_to_error!(&wrap, &instance.panicked(), gst::Caps::new_empty(), {
@ -639,7 +639,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: BaseSink = from_glib_borrow(ptr);
let wrap: Borrowed<BaseSink> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
match imp.unlock(&wrap) {
@ -662,7 +662,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: BaseSink = from_glib_borrow(ptr);
let wrap: Borrowed<BaseSink> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
match imp.unlock_stop(&wrap) {

View file

@ -609,7 +609,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: BaseSrc = from_glib_borrow(ptr);
let wrap: Borrowed<BaseSrc> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
match imp.start(&wrap) {
@ -632,7 +632,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: BaseSrc = from_glib_borrow(ptr);
let wrap: Borrowed<BaseSrc> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
match imp.stop(&wrap) {
@ -655,7 +655,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: BaseSrc = from_glib_borrow(ptr);
let wrap: Borrowed<BaseSrc> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
imp.is_seekable(&wrap)
@ -673,7 +673,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: BaseSrc = from_glib_borrow(ptr);
let wrap: Borrowed<BaseSrc> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
match imp.get_size(&wrap) {
@ -698,7 +698,7 @@ unsafe extern "C" fn base_src_get_times<T: ObjectSubclass>(
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: BaseSrc = from_glib_borrow(ptr);
let wrap: Borrowed<BaseSrc> = from_glib_borrow(ptr);
let buffer = gst::BufferRef::from_ptr(buffer);
*start = gst_sys::GST_CLOCK_TIME_NONE;
@ -723,7 +723,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: BaseSrc = from_glib_borrow(ptr);
let wrap: Borrowed<BaseSrc> = from_glib_borrow(ptr);
let buffer = gst::BufferRef::from_mut_ptr(buffer);
gst_panic_to_error!(&wrap, &instance.panicked(), gst::FlowReturn::Error, {
@ -744,7 +744,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: BaseSrc = from_glib_borrow(ptr);
let wrap: Borrowed<BaseSrc> = from_glib_borrow(ptr);
// FIXME: Wrong signature in -sys bindings
// https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/issues/3
let buffer_ptr = buffer_ptr as *mut *mut gst_sys::GstBuffer;
@ -775,7 +775,7 @@ where
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: BaseSrc = from_glib_borrow(ptr);
let wrap: Borrowed<BaseSrc> = from_glib_borrow(ptr);
// FIXME: Wrong signature in -sys bindings
// https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/issues/3
let buffer_ptr = buffer_ptr as *mut *mut gst_sys::GstBuffer;
@ -798,7 +798,7 @@ where
if passed_buffer.as_ptr() != new_buffer.as_ptr() {
gst_debug!(
gst::CAT_PERFORMANCE,
obj: &wrap,
obj: &*wrap,
"Returned new buffer from create function, copying into passed buffer"
);
@ -807,7 +807,7 @@ where
Err(_) => {
gst_error!(
gst::CAT_RUST,
obj: &wrap,
obj: &*wrap,
"Failed to map passed buffer writable"
);
return gst::FlowReturn::Error;
@ -831,7 +831,7 @@ where
Err(_) => {
gst_error!(
gst::CAT_RUST,
obj: &wrap,
obj: &*wrap,
"Failed to copy buffer metadata"
);
@ -863,10 +863,14 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: BaseSrc = from_glib_borrow(ptr);
let wrap: Borrowed<BaseSrc> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
imp.do_seek(&wrap, &mut from_glib_borrow(segment))
let mut s = from_glib_none(segment);
let res = imp.do_seek(&wrap, &mut s);
ptr::write(segment, *(s.to_glib_none().0));
res
})
.to_glib()
}
@ -881,7 +885,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: BaseSrc = from_glib_borrow(ptr);
let wrap: Borrowed<BaseSrc> = from_glib_borrow(ptr);
let query = gst::QueryRef::from_mut_ptr(query_ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
@ -900,7 +904,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: BaseSrc = from_glib_borrow(ptr);
let wrap: Borrowed<BaseSrc> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
imp.event(&wrap, &from_glib_borrow(event_ptr))
@ -918,11 +922,11 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: BaseSrc = from_glib_borrow(ptr);
let wrap: Borrowed<BaseSrc> = from_glib_borrow(ptr);
let filter = Option::<gst::Caps>::from_glib_borrow(filter);
gst_panic_to_error!(&wrap, &instance.panicked(), None, {
imp.get_caps(&wrap, filter.as_ref())
imp.get_caps(&wrap, filter.as_ref().as_ref())
})
.map(|caps| caps.into_ptr())
.unwrap_or(ptr::null_mut())
@ -937,13 +941,13 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: BaseSrc = from_glib_borrow(ptr);
let wrap: Borrowed<BaseSrc> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
match imp.negotiate(&wrap) {
Ok(()) => true,
Err(err) => {
err.log_with_object(&wrap);
err.log_with_object(&*wrap);
false
}
}
@ -961,14 +965,14 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: BaseSrc = from_glib_borrow(ptr);
let wrap: Borrowed<BaseSrc> = from_glib_borrow(ptr);
let caps = from_glib_borrow(caps);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
match imp.set_caps(&wrap, &caps) {
Ok(()) => true,
Err(err) => {
err.log_with_object(&wrap);
err.log_with_object(&*wrap);
false
}
}
@ -986,7 +990,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: BaseSrc = from_glib_borrow(ptr);
let wrap: Borrowed<BaseSrc> = from_glib_borrow(ptr);
let caps = from_glib_full(caps);
gst_panic_to_error!(&wrap, &instance.panicked(), gst::Caps::new_empty(), {
@ -1004,7 +1008,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: BaseSrc = from_glib_borrow(ptr);
let wrap: Borrowed<BaseSrc> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
match imp.unlock(&wrap) {
@ -1027,7 +1031,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: BaseSrc = from_glib_borrow(ptr);
let wrap: Borrowed<BaseSrc> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
match imp.unlock_stop(&wrap) {

View file

@ -796,7 +796,7 @@ impl<T: BaseTransformImpl + ObjectImpl> BaseTransformImplExt for T {
unsafe {
let element = self.get_instance();
let ptr: *mut gst_base_sys::GstBaseTransform = element.to_glib_none().0 as *mut _;
let sinkpad: gst::Pad = from_glib_borrow((*ptr).sinkpad);
let sinkpad: Borrowed<gst::Pad> = from_glib_borrow((*ptr).sinkpad);
let _stream_lock = sinkpad.stream_lock();
let buffer = (*ptr).queued_buf;
(*ptr).queued_buf = ptr::null_mut();
@ -812,7 +812,7 @@ impl<T: BaseTransformImpl + ObjectImpl> BaseTransformImplExt for T {
unsafe {
let element = self.get_instance();
let ptr: *mut gst_base_sys::GstBaseTransform = element.to_glib_none().0 as *mut _;
let sinkpad: gst::Pad = from_glib_borrow((*ptr).sinkpad);
let sinkpad: Borrowed<gst::Pad> = from_glib_borrow((*ptr).sinkpad);
let _stream_lock = sinkpad.stream_lock();
let buffer = (*ptr).queued_buf;
from_glib_none(buffer)
@ -917,7 +917,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: BaseTransform = from_glib_borrow(ptr);
let wrap: Borrowed<BaseTransform> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
match imp.start(&wrap) {
@ -940,7 +940,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: BaseTransform = from_glib_borrow(ptr);
let wrap: Borrowed<BaseTransform> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
match imp.stop(&wrap) {
@ -966,20 +966,16 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: BaseTransform = from_glib_borrow(ptr);
let wrap: Borrowed<BaseTransform> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), None, {
let filter = if filter.is_null() {
None
} else {
Some(from_glib_borrow(filter))
};
let filter: Borrowed<Option<gst::Caps>> = from_glib_borrow(filter);
imp.transform_caps(
&wrap,
from_glib(direction),
&from_glib_borrow(caps),
filter.as_ref(),
filter.as_ref().as_ref(),
)
})
.map(|caps| caps.into_ptr())
@ -998,7 +994,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: BaseTransform = from_glib_borrow(ptr);
let wrap: Borrowed<BaseTransform> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), gst::Caps::new_empty(), {
imp.fixate_caps(
@ -1022,13 +1018,13 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: BaseTransform = from_glib_borrow(ptr);
let wrap: Borrowed<BaseTransform> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
match imp.set_caps(&wrap, &from_glib_borrow(incaps), &from_glib_borrow(outcaps)) {
Ok(()) => true,
Err(err) => {
err.log_with_object(&wrap);
err.log_with_object(&*wrap);
false
}
}
@ -1047,7 +1043,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: BaseTransform = from_glib_borrow(ptr);
let wrap: Borrowed<BaseTransform> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
imp.accept_caps(&wrap, from_glib(direction), &from_glib_borrow(caps))
@ -1066,7 +1062,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: BaseTransform = from_glib_borrow(ptr);
let wrap: Borrowed<BaseTransform> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
BaseTransformImpl::query(
@ -1093,7 +1089,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: BaseTransform = from_glib_borrow(ptr);
let wrap: Borrowed<BaseTransform> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
match imp.transform_size(
@ -1124,7 +1120,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: BaseTransform = from_glib_borrow(ptr);
let wrap: Borrowed<BaseTransform> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
match imp.get_unit_size(&wrap, &from_glib_borrow(caps)) {
@ -1149,7 +1145,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: BaseTransform = from_glib_borrow(ptr);
let wrap: Borrowed<BaseTransform> = from_glib_borrow(ptr);
// FIXME: Wrong signature in FFI
let outbuf = outbuf as *mut *mut gst_sys::GstBuffer;
@ -1180,7 +1176,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: BaseTransform = from_glib_borrow(ptr);
let wrap: Borrowed<BaseTransform> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
imp.sink_event(&wrap, from_glib_full(event))
@ -1198,7 +1194,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: BaseTransform = from_glib_borrow(ptr);
let wrap: Borrowed<BaseTransform> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
imp.src_event(&wrap, from_glib_full(event))
@ -1217,7 +1213,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: BaseTransform = from_glib_borrow(ptr);
let wrap: Borrowed<BaseTransform> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), gst::FlowReturn::Error, {
imp.transform(
@ -1240,7 +1236,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: BaseTransform = from_glib_borrow(ptr);
let wrap: Borrowed<BaseTransform> = from_glib_borrow(ptr);
// FIXME: Wrong signature in FFI
let buf = buf as *mut gst_sys::GstBuffer;
@ -1269,7 +1265,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: BaseTransform = from_glib_borrow(ptr);
let wrap: Borrowed<BaseTransform> = from_glib_borrow(ptr);
let inbuf = gst::BufferRef::from_ptr(inbuf);
@ -1295,12 +1291,12 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: BaseTransform = from_glib_borrow(ptr);
let wrap: Borrowed<BaseTransform> = from_glib_borrow(ptr);
if gst_sys::gst_mini_object_is_writable(outbuf as *mut _) == glib_sys::GFALSE {
gst_warning!(
gst::CAT_RUST,
obj: &wrap,
obj: &*wrap,
"buffer {:?} not writable",
outbuf
);
@ -1315,7 +1311,7 @@ where
) {
Ok(_) => true,
Err(err) => {
err.log_with_object(&wrap);
err.log_with_object(&*wrap);
false
}
}
@ -1332,7 +1328,7 @@ unsafe extern "C" fn base_transform_before_transform<T: ObjectSubclass>(
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: BaseTransform = from_glib_borrow(ptr);
let wrap: Borrowed<BaseTransform> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), (), {
imp.before_transform(&wrap, gst::BufferRef::from_ptr(inbuf));
@ -1350,7 +1346,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: BaseTransform = from_glib_borrow(ptr);
let wrap: Borrowed<BaseTransform> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), gst::FlowReturn::Error, {
imp.submit_input_buffer(&wrap, from_glib(is_discont), from_glib_full(buf))
@ -1369,7 +1365,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: BaseTransform = from_glib_borrow(ptr);
let wrap: Borrowed<BaseTransform> = from_glib_borrow(ptr);
*buf = ptr::null_mut();

View file

@ -140,7 +140,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: PushSrc = from_glib_borrow(ptr);
let wrap: Borrowed<PushSrc> = from_glib_borrow(ptr);
let buffer = gst::BufferRef::from_mut_ptr(buffer);
gst_panic_to_error!(&wrap, &instance.panicked(), gst::FlowReturn::Error, {
@ -159,7 +159,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: PushSrc = from_glib_borrow(ptr);
let wrap: Borrowed<PushSrc> = from_glib_borrow(ptr);
// FIXME: Wrong signature in -sys bindings
// https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/issues/3
let buffer_ptr = buffer_ptr as *mut *mut gst_sys::GstBuffer;
@ -186,7 +186,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: PushSrc = from_glib_borrow(ptr);
let wrap: Borrowed<PushSrc> = from_glib_borrow(ptr);
// FIXME: Wrong signature in -sys bindings
// https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/issues/3
let buffer_ptr = buffer_ptr as *mut *mut gst_sys::GstBuffer;

View file

@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 0a4cfc4)
from gir-files (https://github.com/gtk-rs/gir-files @ 4607c4a0)
Generated by gir (https://github.com/gtk-rs/gir @ 997cbcb)
from gir-files (https://github.com/gtk-rs/gir-files @ a57b90d4)

View file

@ -241,7 +241,7 @@ impl<O: IsA<Asset>> AssetExt for O {
P: IsA<Asset>,
{
let f: &F = &*(f as *const F);
f(&Asset::from_glib_borrow(this).unsafe_cast())
f(&Asset::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -266,7 +266,7 @@ impl<O: IsA<Asset>> AssetExt for O {
P: IsA<Asset>,
{
let f: &F = &*(f as *const F);
f(&Asset::from_glib_borrow(this).unsafe_cast())
f(&Asset::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);

View file

@ -237,7 +237,7 @@ impl<O: IsA<Clip>> ClipExt for O {
P: IsA<Clip>,
{
let f: &F = &*(f as *const F);
f(&Clip::from_glib_borrow(this).unsafe_cast())
f(&Clip::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -262,7 +262,7 @@ impl<O: IsA<Clip>> ClipExt for O {
P: IsA<Clip>,
{
let f: &F = &*(f as *const F);
f(&Clip::from_glib_borrow(this).unsafe_cast())
f(&Clip::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);

View file

@ -165,7 +165,7 @@ impl<O: IsA<Container>> GESContainerExt for O {
{
let f: &F = &*(f as *const F);
f(
&Container::from_glib_borrow(this).unsafe_cast(),
&Container::from_glib_borrow(this).unsafe_cast_ref(),
&from_glib_borrow(element),
)
}
@ -193,7 +193,7 @@ impl<O: IsA<Container>> GESContainerExt for O {
{
let f: &F = &*(f as *const F);
f(
&Container::from_glib_borrow(this).unsafe_cast(),
&Container::from_glib_borrow(this).unsafe_cast_ref(),
&from_glib_borrow(element),
)
}
@ -217,7 +217,7 @@ impl<O: IsA<Container>> GESContainerExt for O {
P: IsA<Container>,
{
let f: &F = &*(f as *const F);
f(&Container::from_glib_borrow(this).unsafe_cast())
f(&Container::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);

View file

@ -209,7 +209,7 @@ impl<O: IsA<Group>> GroupExt for O {
P: IsA<Group>,
{
let f: &F = &*(f as *const F);
f(&Group::from_glib_borrow(this).unsafe_cast())
f(&Group::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -231,7 +231,7 @@ impl<O: IsA<Group>> GroupExt for O {
P: IsA<Group>,
{
let f: &F = &*(f as *const F);
f(&Group::from_glib_borrow(this).unsafe_cast())
f(&Group::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -256,7 +256,7 @@ impl<O: IsA<Group>> GroupExt for O {
P: IsA<Group>,
{
let f: &F = &*(f as *const F);
f(&Group::from_glib_borrow(this).unsafe_cast())
f(&Group::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -280,7 +280,7 @@ impl<O: IsA<Group>> GroupExt for O {
P: IsA<Group>,
{
let f: &F = &*(f as *const F);
f(&Group::from_glib_borrow(this).unsafe_cast())
f(&Group::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -302,7 +302,7 @@ impl<O: IsA<Group>> GroupExt for O {
P: IsA<Group>,
{
let f: &F = &*(f as *const F);
f(&Group::from_glib_borrow(this).unsafe_cast())
f(&Group::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);

View file

@ -220,7 +220,7 @@ impl<O: IsA<Layer>> LayerExt for O {
{
let f: &F = &*(f as *const F);
f(
&Layer::from_glib_borrow(this).unsafe_cast(),
&Layer::from_glib_borrow(this).unsafe_cast_ref(),
&from_glib_borrow(clip),
)
}
@ -245,7 +245,7 @@ impl<O: IsA<Layer>> LayerExt for O {
{
let f: &F = &*(f as *const F);
f(
&Layer::from_glib_borrow(this).unsafe_cast(),
&Layer::from_glib_borrow(this).unsafe_cast_ref(),
&from_glib_borrow(clip),
)
}
@ -272,7 +272,7 @@ impl<O: IsA<Layer>> LayerExt for O {
P: IsA<Layer>,
{
let f: &F = &*(f as *const F);
f(&Layer::from_glib_borrow(this).unsafe_cast())
f(&Layer::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -296,7 +296,7 @@ impl<O: IsA<Layer>> LayerExt for O {
P: IsA<Layer>,
{
let f: &F = &*(f as *const F);
f(&Layer::from_glib_borrow(this).unsafe_cast())
f(&Layer::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);

View file

@ -382,7 +382,7 @@ impl<O: IsA<Pipeline>> GESPipelineExt for O {
P: IsA<Pipeline>,
{
let f: &F = &*(f as *const F);
f(&Pipeline::from_glib_borrow(this).unsafe_cast())
f(&Pipeline::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -406,7 +406,7 @@ impl<O: IsA<Pipeline>> GESPipelineExt for O {
P: IsA<Pipeline>,
{
let f: &F = &*(f as *const F);
f(&Pipeline::from_glib_borrow(this).unsafe_cast())
f(&Pipeline::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -428,7 +428,7 @@ impl<O: IsA<Pipeline>> GESPipelineExt for O {
P: IsA<Pipeline>,
{
let f: &F = &*(f as *const F);
f(&Pipeline::from_glib_borrow(this).unsafe_cast())
f(&Pipeline::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -450,7 +450,7 @@ impl<O: IsA<Pipeline>> GESPipelineExt for O {
P: IsA<Pipeline>,
{
let f: &F = &*(f as *const F);
f(&Pipeline::from_glib_borrow(this).unsafe_cast())
f(&Pipeline::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -475,7 +475,7 @@ impl<O: IsA<Pipeline>> GESPipelineExt for O {
P: IsA<Pipeline>,
{
let f: &F = &*(f as *const F);
f(&Pipeline::from_glib_borrow(this).unsafe_cast())
f(&Pipeline::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -499,7 +499,7 @@ impl<O: IsA<Pipeline>> GESPipelineExt for O {
P: IsA<Pipeline>,
{
let f: &F = &*(f as *const F);
f(&Pipeline::from_glib_borrow(this).unsafe_cast())
f(&Pipeline::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);

View file

@ -251,7 +251,7 @@ impl<O: IsA<Project>> ProjectExt for O {
{
let f: &F = &*(f as *const F);
f(
&Project::from_glib_borrow(this).unsafe_cast(),
&Project::from_glib_borrow(this).unsafe_cast_ref(),
&from_glib_borrow(asset),
)
}
@ -276,7 +276,7 @@ impl<O: IsA<Project>> ProjectExt for O {
{
let f: &F = &*(f as *const F);
f(
&Project::from_glib_borrow(this).unsafe_cast(),
&Project::from_glib_borrow(this).unsafe_cast_ref(),
&from_glib_borrow(asset),
)
}
@ -301,7 +301,7 @@ impl<O: IsA<Project>> ProjectExt for O {
{
let f: &F = &*(f as *const F);
f(
&Project::from_glib_borrow(this).unsafe_cast(),
&Project::from_glib_borrow(this).unsafe_cast_ref(),
&from_glib_borrow(asset),
)
}
@ -336,7 +336,7 @@ impl<O: IsA<Project>> ProjectExt for O {
{
let f: &F = &*(f as *const F);
f(
&Project::from_glib_borrow(this).unsafe_cast(),
&Project::from_glib_borrow(this).unsafe_cast_ref(),
&from_glib_borrow(error),
&GString::from_glib_borrow(id),
from_glib(extractable_type),
@ -365,7 +365,7 @@ impl<O: IsA<Project>> ProjectExt for O {
{
let f: &F = &*(f as *const F);
f(
&Project::from_glib_borrow(this).unsafe_cast(),
&Project::from_glib_borrow(this).unsafe_cast_ref(),
&from_glib_borrow(timeline),
)
}
@ -398,7 +398,7 @@ impl<O: IsA<Project>> ProjectExt for O {
{
let f: &F = &*(f as *const F);
f(
&Project::from_glib_borrow(this).unsafe_cast(),
&Project::from_glib_borrow(this).unsafe_cast_ref(),
&from_glib_borrow(error),
&from_glib_borrow(wrong_asset),
)

View file

@ -426,7 +426,7 @@ impl<O: IsA<Timeline>> TimelineExt for O {
P: IsA<Timeline>,
{
let f: &F = &*(f as *const F);
f(&Timeline::from_glib_borrow(this).unsafe_cast())
f(&Timeline::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -449,7 +449,7 @@ impl<O: IsA<Timeline>> TimelineExt for O {
{
let f: &F = &*(f as *const F);
f(
&Timeline::from_glib_borrow(this).unsafe_cast(),
&Timeline::from_glib_borrow(this).unsafe_cast_ref(),
&from_glib_borrow(group),
)
}
@ -478,7 +478,7 @@ impl<O: IsA<Timeline>> TimelineExt for O {
{
let f: &F = &*(f as *const F);
f(
&Timeline::from_glib_borrow(this).unsafe_cast(),
&Timeline::from_glib_borrow(this).unsafe_cast_ref(),
&from_glib_borrow(layer),
)
}
@ -503,7 +503,7 @@ impl<O: IsA<Timeline>> TimelineExt for O {
{
let f: &F = &*(f as *const F);
f(
&Timeline::from_glib_borrow(this).unsafe_cast(),
&Timeline::from_glib_borrow(this).unsafe_cast_ref(),
&from_glib_borrow(layer),
)
}
@ -540,7 +540,7 @@ impl<O: IsA<Timeline>> TimelineExt for O {
{
let f: &F = &*(f as *const F);
f(
&Timeline::from_glib_borrow(this).unsafe_cast(),
&Timeline::from_glib_borrow(this).unsafe_cast_ref(),
&from_glib_borrow(obj1),
&from_glib_borrow(obj2),
position,
@ -575,7 +575,7 @@ impl<O: IsA<Timeline>> TimelineExt for O {
{
let f: &F = &*(f as *const F);
f(
&Timeline::from_glib_borrow(this).unsafe_cast(),
&Timeline::from_glib_borrow(this).unsafe_cast_ref(),
&from_glib_borrow(obj1),
&from_glib_borrow(obj2),
position,
@ -602,7 +602,7 @@ impl<O: IsA<Timeline>> TimelineExt for O {
{
let f: &F = &*(f as *const F);
f(
&Timeline::from_glib_borrow(this).unsafe_cast(),
&Timeline::from_glib_borrow(this).unsafe_cast_ref(),
&from_glib_borrow(track),
)
}
@ -627,7 +627,7 @@ impl<O: IsA<Timeline>> TimelineExt for O {
{
let f: &F = &*(f as *const F);
f(
&Timeline::from_glib_borrow(this).unsafe_cast(),
&Timeline::from_glib_borrow(this).unsafe_cast_ref(),
&from_glib_borrow(track),
)
}
@ -654,7 +654,7 @@ impl<O: IsA<Timeline>> TimelineExt for O {
P: IsA<Timeline>,
{
let f: &F = &*(f as *const F);
f(&Timeline::from_glib_borrow(this).unsafe_cast())
f(&Timeline::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -678,7 +678,7 @@ impl<O: IsA<Timeline>> TimelineExt for O {
P: IsA<Timeline>,
{
let f: &F = &*(f as *const F);
f(&Timeline::from_glib_borrow(this).unsafe_cast())
f(&Timeline::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -703,7 +703,7 @@ impl<O: IsA<Timeline>> TimelineExt for O {
P: IsA<Timeline>,
{
let f: &F = &*(f as *const F);
f(&Timeline::from_glib_borrow(this).unsafe_cast())
f(&Timeline::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);

View file

@ -494,7 +494,7 @@ impl<O: IsA<TimelineElement>> TimelineElementExt for O {
P: IsA<TimelineElement>,
{
let f: &F = &*(f as *const F);
f(&TimelineElement::from_glib_borrow(this).unsafe_cast())
f(&TimelineElement::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -516,7 +516,7 @@ impl<O: IsA<TimelineElement>> TimelineElementExt for O {
P: IsA<TimelineElement>,
{
let f: &F = &*(f as *const F);
f(&TimelineElement::from_glib_borrow(this).unsafe_cast())
f(&TimelineElement::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -541,7 +541,7 @@ impl<O: IsA<TimelineElement>> TimelineElementExt for O {
P: IsA<TimelineElement>,
{
let f: &F = &*(f as *const F);
f(&TimelineElement::from_glib_borrow(this).unsafe_cast())
f(&TimelineElement::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -565,7 +565,7 @@ impl<O: IsA<TimelineElement>> TimelineElementExt for O {
P: IsA<TimelineElement>,
{
let f: &F = &*(f as *const F);
f(&TimelineElement::from_glib_borrow(this).unsafe_cast())
f(&TimelineElement::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -587,7 +587,7 @@ impl<O: IsA<TimelineElement>> TimelineElementExt for O {
P: IsA<TimelineElement>,
{
let f: &F = &*(f as *const F);
f(&TimelineElement::from_glib_borrow(this).unsafe_cast())
f(&TimelineElement::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -609,7 +609,7 @@ impl<O: IsA<TimelineElement>> TimelineElementExt for O {
P: IsA<TimelineElement>,
{
let f: &F = &*(f as *const F);
f(&TimelineElement::from_glib_borrow(this).unsafe_cast())
f(&TimelineElement::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -631,7 +631,7 @@ impl<O: IsA<TimelineElement>> TimelineElementExt for O {
P: IsA<TimelineElement>,
{
let f: &F = &*(f as *const F);
f(&TimelineElement::from_glib_borrow(this).unsafe_cast())
f(&TimelineElement::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -653,7 +653,7 @@ impl<O: IsA<TimelineElement>> TimelineElementExt for O {
P: IsA<TimelineElement>,
{
let f: &F = &*(f as *const F);
f(&TimelineElement::from_glib_borrow(this).unsafe_cast())
f(&TimelineElement::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -675,7 +675,7 @@ impl<O: IsA<TimelineElement>> TimelineElementExt for O {
P: IsA<TimelineElement>,
{
let f: &F = &*(f as *const F);
f(&TimelineElement::from_glib_borrow(this).unsafe_cast())
f(&TimelineElement::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);

View file

@ -242,7 +242,7 @@ impl<O: IsA<Track>> GESTrackExt for O {
P: IsA<Track>,
{
let f: &F = &*(f as *const F);
f(&Track::from_glib_borrow(this).unsafe_cast())
f(&Track::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -268,7 +268,7 @@ impl<O: IsA<Track>> GESTrackExt for O {
{
let f: &F = &*(f as *const F);
f(
&Track::from_glib_borrow(this).unsafe_cast(),
&Track::from_glib_borrow(this).unsafe_cast_ref(),
&from_glib_borrow(effect),
)
}
@ -301,7 +301,7 @@ impl<O: IsA<Track>> GESTrackExt for O {
{
let f: &F = &*(f as *const F);
f(
&Track::from_glib_borrow(this).unsafe_cast(),
&Track::from_glib_borrow(this).unsafe_cast_ref(),
&from_glib_borrow(effect),
)
}
@ -327,7 +327,7 @@ impl<O: IsA<Track>> GESTrackExt for O {
P: IsA<Track>,
{
let f: &F = &*(f as *const F);
f(&Track::from_glib_borrow(this).unsafe_cast())
f(&Track::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -349,7 +349,7 @@ impl<O: IsA<Track>> GESTrackExt for O {
P: IsA<Track>,
{
let f: &F = &*(f as *const F);
f(&Track::from_glib_borrow(this).unsafe_cast())
f(&Track::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -374,7 +374,7 @@ impl<O: IsA<Track>> GESTrackExt for O {
P: IsA<Track>,
{
let f: &F = &*(f as *const F);
f(&Track::from_glib_borrow(this).unsafe_cast())
f(&Track::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);

View file

@ -256,7 +256,7 @@ impl<O: IsA<TrackElement>> TrackElementExt for O {
P: IsA<TrackElement>,
{
let f: &F = &*(f as *const F);
f(&TrackElement::from_glib_borrow(this).unsafe_cast())
f(&TrackElement::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -278,7 +278,7 @@ impl<O: IsA<TrackElement>> TrackElementExt for O {
P: IsA<TrackElement>,
{
let f: &F = &*(f as *const F);
f(&TrackElement::from_glib_borrow(this).unsafe_cast())
f(&TrackElement::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -300,7 +300,7 @@ impl<O: IsA<TrackElement>> TrackElementExt for O {
P: IsA<TrackElement>,
{
let f: &F = &*(f as *const F);
f(&TrackElement::from_glib_borrow(this).unsafe_cast())
f(&TrackElement::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);

View file

@ -142,7 +142,7 @@ impl<O: IsA<UriClip>> UriClipExt for O {
P: IsA<UriClip>,
{
let f: &F = &*(f as *const F);
f(&UriClip::from_glib_borrow(this).unsafe_cast())
f(&UriClip::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -164,7 +164,7 @@ impl<O: IsA<UriClip>> UriClipExt for O {
P: IsA<UriClip>,
{
let f: &F = &*(f as *const F);
f(&UriClip::from_glib_borrow(this).unsafe_cast())
f(&UriClip::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -189,7 +189,7 @@ impl<O: IsA<UriClip>> UriClipExt for O {
P: IsA<UriClip>,
{
let f: &F = &*(f as *const F);
f(&UriClip::from_glib_borrow(this).unsafe_cast())
f(&UriClip::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);

View file

@ -120,7 +120,7 @@ impl<O: IsA<UriClipAsset>> UriClipAssetExt for O {
P: IsA<UriClipAsset>,
{
let f: &F = &*(f as *const F);
f(&UriClipAsset::from_glib_borrow(this).unsafe_cast())
f(&UriClipAsset::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);

View file

@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 0a4cfc4)
from gir-files (https://github.com/gtk-rs/gir-files @ 4607c4a0)
Generated by gir (https://github.com/gtk-rs/gir @ 997cbcb)
from gir-files (https://github.com/gtk-rs/gir-files @ a57b90d4)

View file

@ -78,7 +78,7 @@ impl<O: IsA<GLBaseFilter>> GLBaseFilterExt for O {
P: IsA<GLBaseFilter>,
{
let f: &F = &*(f as *const F);
f(&GLBaseFilter::from_glib_borrow(this).unsafe_cast())
f(&GLBaseFilter::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);

View file

@ -176,7 +176,7 @@ impl<O: IsA<GLDisplay>> GLDisplayExt for O {
{
let f: &F = &*(f as *const F);
f(
&GLDisplay::from_glib_borrow(this).unsafe_cast(),
&GLDisplay::from_glib_borrow(this).unsafe_cast_ref(),
&from_glib_borrow(context),
)
.to_glib_full()

View file

@ -238,7 +238,7 @@ impl<O: IsA<GLWindow>> GLWindowExt for O {
{
let f: &F = &*(f as *const F);
f(
&GLWindow::from_glib_borrow(this).unsafe_cast(),
&GLWindow::from_glib_borrow(this).unsafe_cast_ref(),
&GString::from_glib_borrow(id),
&GString::from_glib_borrow(key),
)
@ -273,7 +273,7 @@ impl<O: IsA<GLWindow>> GLWindowExt for O {
{
let f: &F = &*(f as *const F);
f(
&GLWindow::from_glib_borrow(this).unsafe_cast(),
&GLWindow::from_glib_borrow(this).unsafe_cast_ref(),
&GString::from_glib_borrow(id),
button,
x,

View file

@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 0a4cfc4)
from gir-files (https://github.com/gtk-rs/gir-files @ 4607c4a0)
Generated by gir (https://github.com/gtk-rs/gir @ 997cbcb)
from gir-files (https://github.com/gtk-rs/gir-files @ a57b90d4)

View file

@ -128,7 +128,7 @@ impl<'a> VideoFrameGLExt for VideoFrameRef<&'a gst::BufferRef> {
"Failed to fill in the values of GstVideoFrame"
))
} else {
Ok(VideoFrameRef::from_glib_borrow(&frame.assume_init()))
Ok(VideoFrameRef::from_glib_full(frame.assume_init()))
}
}
}

View file

@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 0a4cfc4)
from gir-files (https://github.com/gtk-rs/gir-files @ 4607c4a0)
Generated by gir (https://github.com/gtk-rs/gir @ 997cbcb)
from gir-files (https://github.com/gtk-rs/gir-files @ a57b90d4)

View file

@ -129,7 +129,9 @@ impl Discoverer {
f(
&from_glib_borrow(this),
&from_glib_borrow(info),
Option::<glib::Error>::from_glib_borrow(error).as_ref(),
Option::<glib::Error>::from_glib_borrow(error)
.as_ref()
.as_ref(),
)
}
unsafe {

View file

@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 0a4cfc4)
from gir-files (https://github.com/gtk-rs/gir-files @ 4607c4a0)
Generated by gir (https://github.com/gtk-rs/gir @ 997cbcb)
from gir-files (https://github.com/gtk-rs/gir-files @ a57b90d4)

View file

@ -75,5 +75,5 @@ unsafe extern "C" fn notify_timeout_trampoline<P, F: Fn(&P) + Send + Sync + 'sta
P: IsA<Discoverer>,
{
let f: &F = &*(f as *const F);
f(&Discoverer::from_glib_borrow(this).unsafe_cast())
f(&Discoverer::from_glib_borrow(this).unsafe_cast_ref())
}

View file

@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 0a4cfc4)
from gir-files (https://github.com/gtk-rs/gir-files @ 4607c4a0)
Generated by gir (https://github.com/gtk-rs/gir @ 997cbcb)
from gir-files (https://github.com/gtk-rs/gir-files @ a57b90d4)

View file

@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 0a4cfc4)
from gir-files (https://github.com/gtk-rs/gir-files @ 4607c4a0)
Generated by gir (https://github.com/gtk-rs/gir @ 997cbcb)
from gir-files (https://github.com/gtk-rs/gir-files @ a57b90d4)

View file

@ -297,7 +297,7 @@ impl<O: IsA<RTSPAuth>> RTSPAuthExt for O {
{
let f: &F = &*(f as *const F);
f(
&RTSPAuth::from_glib_borrow(this).unsafe_cast(),
&RTSPAuth::from_glib_borrow(this).unsafe_cast_ref(),
&from_glib_borrow(connection),
&from_glib_borrow(peer_cert),
from_glib(errors),

View file

@ -439,7 +439,7 @@ impl<O: IsA<RTSPClient>> RTSPClientExt for O {
{
let f: &F = &*(f as *const F);
f(
&RTSPClient::from_glib_borrow(this).unsafe_cast(),
&RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
&from_glib_borrow(ctx),
)
}
@ -466,7 +466,7 @@ impl<O: IsA<RTSPClient>> RTSPClientExt for O {
P: IsA<RTSPClient>,
{
let f: &F = &*(f as *const F);
f(&RTSPClient::from_glib_borrow(this).unsafe_cast())
f(&RTSPClient::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -495,7 +495,7 @@ impl<O: IsA<RTSPClient>> RTSPClientExt for O {
{
let f: &F = &*(f as *const F);
f(
&RTSPClient::from_glib_borrow(this).unsafe_cast(),
&RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
&from_glib_borrow(ctx),
)
}
@ -526,7 +526,7 @@ impl<O: IsA<RTSPClient>> RTSPClientExt for O {
{
let f: &F = &*(f as *const F);
f(
&RTSPClient::from_glib_borrow(this).unsafe_cast(),
&RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
&from_glib_borrow(ctx),
)
}
@ -559,7 +559,7 @@ impl<O: IsA<RTSPClient>> RTSPClientExt for O {
{
let f: &F = &*(f as *const F);
f(
&RTSPClient::from_glib_borrow(this).unsafe_cast(),
&RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
&from_glib_borrow(ctx),
)
}
@ -590,7 +590,7 @@ impl<O: IsA<RTSPClient>> RTSPClientExt for O {
{
let f: &F = &*(f as *const F);
f(
&RTSPClient::from_glib_borrow(this).unsafe_cast(),
&RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
&from_glib_borrow(object),
)
}
@ -621,7 +621,7 @@ impl<O: IsA<RTSPClient>> RTSPClientExt for O {
{
let f: &F = &*(f as *const F);
f(
&RTSPClient::from_glib_borrow(this).unsafe_cast(),
&RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
&from_glib_borrow(ctx),
)
}
@ -652,7 +652,7 @@ impl<O: IsA<RTSPClient>> RTSPClientExt for O {
{
let f: &F = &*(f as *const F);
f(
&RTSPClient::from_glib_borrow(this).unsafe_cast(),
&RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
&from_glib_borrow(ctx),
)
}
@ -683,7 +683,7 @@ impl<O: IsA<RTSPClient>> RTSPClientExt for O {
{
let f: &F = &*(f as *const F);
f(
&RTSPClient::from_glib_borrow(this).unsafe_cast(),
&RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
&from_glib_borrow(ctx),
)
}
@ -718,7 +718,7 @@ impl<O: IsA<RTSPClient>> RTSPClientExt for O {
{
let f: &F = &*(f as *const F);
f(
&RTSPClient::from_glib_borrow(this).unsafe_cast(),
&RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
&from_glib_borrow(ctx),
)
.to_glib()
@ -756,7 +756,7 @@ impl<O: IsA<RTSPClient>> RTSPClientExt for O {
{
let f: &F = &*(f as *const F);
f(
&RTSPClient::from_glib_borrow(this).unsafe_cast(),
&RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
&from_glib_borrow(ctx),
)
.to_glib()
@ -794,7 +794,7 @@ impl<O: IsA<RTSPClient>> RTSPClientExt for O {
{
let f: &F = &*(f as *const F);
f(
&RTSPClient::from_glib_borrow(this).unsafe_cast(),
&RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
&from_glib_borrow(ctx),
)
.to_glib()
@ -832,7 +832,7 @@ impl<O: IsA<RTSPClient>> RTSPClientExt for O {
{
let f: &F = &*(f as *const F);
f(
&RTSPClient::from_glib_borrow(this).unsafe_cast(),
&RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
&from_glib_borrow(ctx),
)
.to_glib()
@ -870,7 +870,7 @@ impl<O: IsA<RTSPClient>> RTSPClientExt for O {
{
let f: &F = &*(f as *const F);
f(
&RTSPClient::from_glib_borrow(this).unsafe_cast(),
&RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
&from_glib_borrow(ctx),
)
.to_glib()
@ -906,7 +906,7 @@ impl<O: IsA<RTSPClient>> RTSPClientExt for O {
{
let f: &F = &*(f as *const F);
f(
&RTSPClient::from_glib_borrow(this).unsafe_cast(),
&RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
&from_glib_borrow(ctx),
)
.to_glib()
@ -942,7 +942,7 @@ impl<O: IsA<RTSPClient>> RTSPClientExt for O {
{
let f: &F = &*(f as *const F);
f(
&RTSPClient::from_glib_borrow(this).unsafe_cast(),
&RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
&from_glib_borrow(ctx),
)
.to_glib()
@ -978,7 +978,7 @@ impl<O: IsA<RTSPClient>> RTSPClientExt for O {
{
let f: &F = &*(f as *const F);
f(
&RTSPClient::from_glib_borrow(this).unsafe_cast(),
&RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
&from_glib_borrow(ctx),
)
.to_glib()
@ -1016,7 +1016,7 @@ impl<O: IsA<RTSPClient>> RTSPClientExt for O {
{
let f: &F = &*(f as *const F);
f(
&RTSPClient::from_glib_borrow(this).unsafe_cast(),
&RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
&from_glib_borrow(ctx),
)
.to_glib()
@ -1052,7 +1052,7 @@ impl<O: IsA<RTSPClient>> RTSPClientExt for O {
{
let f: &F = &*(f as *const F);
f(
&RTSPClient::from_glib_borrow(this).unsafe_cast(),
&RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
&from_glib_borrow(ctx),
)
.to_glib()
@ -1086,7 +1086,7 @@ impl<O: IsA<RTSPClient>> RTSPClientExt for O {
{
let f: &F = &*(f as *const F);
f(
&RTSPClient::from_glib_borrow(this).unsafe_cast(),
&RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
&from_glib_borrow(ctx),
)
}
@ -1121,7 +1121,7 @@ impl<O: IsA<RTSPClient>> RTSPClientExt for O {
{
let f: &F = &*(f as *const F);
f(
&RTSPClient::from_glib_borrow(this).unsafe_cast(),
&RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
&from_glib_borrow(ctx),
)
}
@ -1154,7 +1154,7 @@ impl<O: IsA<RTSPClient>> RTSPClientExt for O {
{
let f: &F = &*(f as *const F);
f(
&RTSPClient::from_glib_borrow(this).unsafe_cast(),
&RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
&from_glib_borrow(ctx),
)
}
@ -1185,7 +1185,7 @@ impl<O: IsA<RTSPClient>> RTSPClientExt for O {
{
let f: &F = &*(f as *const F);
f(
&RTSPClient::from_glib_borrow(this).unsafe_cast(),
&RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
&from_glib_borrow(ctx),
)
}
@ -1212,7 +1212,7 @@ impl<O: IsA<RTSPClient>> RTSPClientExt for O {
P: IsA<RTSPClient>,
{
let f: &F = &*(f as *const F);
f(&RTSPClient::from_glib_borrow(this).unsafe_cast())
f(&RTSPClient::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -1239,7 +1239,7 @@ impl<O: IsA<RTSPClient>> RTSPClientExt for O {
P: IsA<RTSPClient>,
{
let f: &F = &*(f as *const F);
f(&RTSPClient::from_glib_borrow(this).unsafe_cast())
f(&RTSPClient::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -1266,7 +1266,7 @@ impl<O: IsA<RTSPClient>> RTSPClientExt for O {
P: IsA<RTSPClient>,
{
let f: &F = &*(f as *const F);
f(&RTSPClient::from_glib_borrow(this).unsafe_cast())
f(&RTSPClient::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);

View file

@ -23,6 +23,7 @@ use RTSPAddressPool;
use RTSPMediaStatus;
use RTSPPublishClockMode;
use RTSPStream;
use RTSPStreamTransport;
use RTSPSuspendMode;
use RTSPThread;
use RTSPTransportMode;
@ -55,7 +56,7 @@ pub trait RTSPMediaExt: 'static {
fn collect_streams(&self);
//#[cfg(any(feature = "v1_14", feature = "dox"))]
//fn complete_pipeline(&self, transports: /*Unknown conversion*//*Unimplemented*/PtrArray TypeId { ns_id: 10, id: 31 }) -> bool;
//fn complete_pipeline(&self, transports: /*Ignored*/&[&gst_rtsp::RTSPTransport]) -> bool;
fn create_stream<P: IsA<gst::Element>, Q: IsA<gst::Pad>>(
&self,
@ -171,7 +172,7 @@ pub trait RTSPMediaExt: 'static {
fn set_shared(&self, shared: bool);
//fn set_state(&self, state: gst::State, transports: /*Unknown conversion*//*Unimplemented*/PtrArray TypeId { ns_id: 1, id: 27 }) -> bool;
fn set_state(&self, state: gst::State, transports: &[RTSPStreamTransport]) -> bool;
fn set_stop_on_disconnect(&self, stop_on_disconnect: bool);
@ -308,7 +309,7 @@ impl<O: IsA<RTSPMedia>> RTSPMediaExt for O {
}
//#[cfg(any(feature = "v1_14", feature = "dox"))]
//fn complete_pipeline(&self, transports: /*Unknown conversion*//*Unimplemented*/PtrArray TypeId { ns_id: 10, id: 31 }) -> bool {
//fn complete_pipeline(&self, transports: /*Ignored*/&[&gst_rtsp::RTSPTransport]) -> bool {
// unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_media_complete_pipeline() }
//}
@ -718,9 +719,15 @@ impl<O: IsA<RTSPMedia>> RTSPMediaExt for O {
}
}
//fn set_state(&self, state: gst::State, transports: /*Unknown conversion*//*Unimplemented*/PtrArray TypeId { ns_id: 1, id: 27 }) -> bool {
// unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_media_set_state() }
//}
fn set_state(&self, state: gst::State, transports: &[RTSPStreamTransport]) -> bool {
unsafe {
from_glib(gst_rtsp_server_sys::gst_rtsp_media_set_state(
self.as_ref().to_glib_none().0,
state.to_glib(),
transports.to_glib_none().0,
))
}
}
fn set_stop_on_disconnect(&self, stop_on_disconnect: bool) {
unsafe {
@ -921,7 +928,7 @@ impl<O: IsA<RTSPMedia>> RTSPMediaExt for O {
P: IsA<RTSPMedia>,
{
let f: &F = &*(f as *const F);
f(&RTSPMedia::from_glib_borrow(this).unsafe_cast(), object)
f(&RTSPMedia::from_glib_borrow(this).unsafe_cast_ref(), object)
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -950,7 +957,7 @@ impl<O: IsA<RTSPMedia>> RTSPMediaExt for O {
{
let f: &F = &*(f as *const F);
f(
&RTSPMedia::from_glib_borrow(this).unsafe_cast(),
&RTSPMedia::from_glib_borrow(this).unsafe_cast_ref(),
&from_glib_borrow(object),
)
}
@ -973,7 +980,7 @@ impl<O: IsA<RTSPMedia>> RTSPMediaExt for O {
P: IsA<RTSPMedia>,
{
let f: &F = &*(f as *const F);
f(&RTSPMedia::from_glib_borrow(this).unsafe_cast())
f(&RTSPMedia::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -1002,7 +1009,7 @@ impl<O: IsA<RTSPMedia>> RTSPMediaExt for O {
{
let f: &F = &*(f as *const F);
f(
&RTSPMedia::from_glib_borrow(this).unsafe_cast(),
&RTSPMedia::from_glib_borrow(this).unsafe_cast_ref(),
&from_glib_borrow(object),
)
}
@ -1029,7 +1036,7 @@ impl<O: IsA<RTSPMedia>> RTSPMediaExt for O {
P: IsA<RTSPMedia>,
{
let f: &F = &*(f as *const F);
f(&RTSPMedia::from_glib_borrow(this).unsafe_cast(), object)
f(&RTSPMedia::from_glib_borrow(this).unsafe_cast_ref(), object)
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -1050,7 +1057,7 @@ impl<O: IsA<RTSPMedia>> RTSPMediaExt for O {
P: IsA<RTSPMedia>,
{
let f: &F = &*(f as *const F);
f(&RTSPMedia::from_glib_borrow(this).unsafe_cast())
f(&RTSPMedia::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -1078,7 +1085,7 @@ impl<O: IsA<RTSPMedia>> RTSPMediaExt for O {
P: IsA<RTSPMedia>,
{
let f: &F = &*(f as *const F);
f(&RTSPMedia::from_glib_borrow(this).unsafe_cast())
f(&RTSPMedia::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -1105,7 +1112,7 @@ impl<O: IsA<RTSPMedia>> RTSPMediaExt for O {
P: IsA<RTSPMedia>,
{
let f: &F = &*(f as *const F);
f(&RTSPMedia::from_glib_borrow(this).unsafe_cast())
f(&RTSPMedia::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -1130,7 +1137,7 @@ impl<O: IsA<RTSPMedia>> RTSPMediaExt for O {
P: IsA<RTSPMedia>,
{
let f: &F = &*(f as *const F);
f(&RTSPMedia::from_glib_borrow(this).unsafe_cast())
f(&RTSPMedia::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -1155,7 +1162,7 @@ impl<O: IsA<RTSPMedia>> RTSPMediaExt for O {
P: IsA<RTSPMedia>,
{
let f: &F = &*(f as *const F);
f(&RTSPMedia::from_glib_borrow(this).unsafe_cast())
f(&RTSPMedia::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -1182,7 +1189,7 @@ impl<O: IsA<RTSPMedia>> RTSPMediaExt for O {
P: IsA<RTSPMedia>,
{
let f: &F = &*(f as *const F);
f(&RTSPMedia::from_glib_borrow(this).unsafe_cast())
f(&RTSPMedia::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -1207,7 +1214,7 @@ impl<O: IsA<RTSPMedia>> RTSPMediaExt for O {
P: IsA<RTSPMedia>,
{
let f: &F = &*(f as *const F);
f(&RTSPMedia::from_glib_borrow(this).unsafe_cast())
f(&RTSPMedia::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -1234,7 +1241,7 @@ impl<O: IsA<RTSPMedia>> RTSPMediaExt for O {
P: IsA<RTSPMedia>,
{
let f: &F = &*(f as *const F);
f(&RTSPMedia::from_glib_borrow(this).unsafe_cast())
f(&RTSPMedia::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -1259,7 +1266,7 @@ impl<O: IsA<RTSPMedia>> RTSPMediaExt for O {
P: IsA<RTSPMedia>,
{
let f: &F = &*(f as *const F);
f(&RTSPMedia::from_glib_borrow(this).unsafe_cast())
f(&RTSPMedia::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -1284,7 +1291,7 @@ impl<O: IsA<RTSPMedia>> RTSPMediaExt for O {
P: IsA<RTSPMedia>,
{
let f: &F = &*(f as *const F);
f(&RTSPMedia::from_glib_borrow(this).unsafe_cast())
f(&RTSPMedia::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -1309,7 +1316,7 @@ impl<O: IsA<RTSPMedia>> RTSPMediaExt for O {
P: IsA<RTSPMedia>,
{
let f: &F = &*(f as *const F);
f(&RTSPMedia::from_glib_borrow(this).unsafe_cast())
f(&RTSPMedia::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -1337,7 +1344,7 @@ impl<O: IsA<RTSPMedia>> RTSPMediaExt for O {
P: IsA<RTSPMedia>,
{
let f: &F = &*(f as *const F);
f(&RTSPMedia::from_glib_borrow(this).unsafe_cast())
f(&RTSPMedia::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -1364,7 +1371,7 @@ impl<O: IsA<RTSPMedia>> RTSPMediaExt for O {
P: IsA<RTSPMedia>,
{
let f: &F = &*(f as *const F);
f(&RTSPMedia::from_glib_borrow(this).unsafe_cast())
f(&RTSPMedia::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -1391,7 +1398,7 @@ impl<O: IsA<RTSPMedia>> RTSPMediaExt for O {
P: IsA<RTSPMedia>,
{
let f: &F = &*(f as *const F);
f(&RTSPMedia::from_glib_borrow(this).unsafe_cast())
f(&RTSPMedia::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -1421,7 +1428,7 @@ impl<O: IsA<RTSPMedia>> RTSPMediaExt for O {
P: IsA<RTSPMedia>,
{
let f: &F = &*(f as *const F);
f(&RTSPMedia::from_glib_borrow(this).unsafe_cast())
f(&RTSPMedia::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);

View file

@ -724,7 +724,7 @@ impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExt for O {
{
let f: &F = &*(f as *const F);
f(
&RTSPMediaFactory::from_glib_borrow(this).unsafe_cast(),
&RTSPMediaFactory::from_glib_borrow(this).unsafe_cast_ref(),
&from_glib_borrow(object),
)
}
@ -755,7 +755,7 @@ impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExt for O {
{
let f: &F = &*(f as *const F);
f(
&RTSPMediaFactory::from_glib_borrow(this).unsafe_cast(),
&RTSPMediaFactory::from_glib_borrow(this).unsafe_cast_ref(),
&from_glib_borrow(object),
)
}
@ -785,7 +785,7 @@ impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExt for O {
P: IsA<RTSPMediaFactory>,
{
let f: &F = &*(f as *const F);
f(&RTSPMediaFactory::from_glib_borrow(this).unsafe_cast())
f(&RTSPMediaFactory::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -812,7 +812,7 @@ impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExt for O {
P: IsA<RTSPMediaFactory>,
{
let f: &F = &*(f as *const F);
f(&RTSPMediaFactory::from_glib_borrow(this).unsafe_cast())
f(&RTSPMediaFactory::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -837,7 +837,7 @@ impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExt for O {
P: IsA<RTSPMediaFactory>,
{
let f: &F = &*(f as *const F);
f(&RTSPMediaFactory::from_glib_borrow(this).unsafe_cast())
f(&RTSPMediaFactory::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -862,7 +862,7 @@ impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExt for O {
P: IsA<RTSPMediaFactory>,
{
let f: &F = &*(f as *const F);
f(&RTSPMediaFactory::from_glib_borrow(this).unsafe_cast())
f(&RTSPMediaFactory::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -889,7 +889,7 @@ impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExt for O {
P: IsA<RTSPMediaFactory>,
{
let f: &F = &*(f as *const F);
f(&RTSPMediaFactory::from_glib_borrow(this).unsafe_cast())
f(&RTSPMediaFactory::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -914,7 +914,7 @@ impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExt for O {
P: IsA<RTSPMediaFactory>,
{
let f: &F = &*(f as *const F);
f(&RTSPMediaFactory::from_glib_borrow(this).unsafe_cast())
f(&RTSPMediaFactory::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -939,7 +939,7 @@ impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExt for O {
P: IsA<RTSPMediaFactory>,
{
let f: &F = &*(f as *const F);
f(&RTSPMediaFactory::from_glib_borrow(this).unsafe_cast())
f(&RTSPMediaFactory::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -966,7 +966,7 @@ impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExt for O {
P: IsA<RTSPMediaFactory>,
{
let f: &F = &*(f as *const F);
f(&RTSPMediaFactory::from_glib_borrow(this).unsafe_cast())
f(&RTSPMediaFactory::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -991,7 +991,7 @@ impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExt for O {
P: IsA<RTSPMediaFactory>,
{
let f: &F = &*(f as *const F);
f(&RTSPMediaFactory::from_glib_borrow(this).unsafe_cast())
f(&RTSPMediaFactory::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -1016,7 +1016,7 @@ impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExt for O {
P: IsA<RTSPMediaFactory>,
{
let f: &F = &*(f as *const F);
f(&RTSPMediaFactory::from_glib_borrow(this).unsafe_cast())
f(&RTSPMediaFactory::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -1044,7 +1044,7 @@ impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExt for O {
P: IsA<RTSPMediaFactory>,
{
let f: &F = &*(f as *const F);
f(&RTSPMediaFactory::from_glib_borrow(this).unsafe_cast())
f(&RTSPMediaFactory::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -1071,7 +1071,7 @@ impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExt for O {
P: IsA<RTSPMediaFactory>,
{
let f: &F = &*(f as *const F);
f(&RTSPMediaFactory::from_glib_borrow(this).unsafe_cast())
f(&RTSPMediaFactory::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -1101,7 +1101,7 @@ impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExt for O {
P: IsA<RTSPMediaFactory>,
{
let f: &F = &*(f as *const F);
f(&RTSPMediaFactory::from_glib_borrow(this).unsafe_cast())
f(&RTSPMediaFactory::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);

View file

@ -118,7 +118,7 @@ impl<O: IsA<RTSPMediaFactoryURI>> RTSPMediaFactoryURIExt for O {
P: IsA<RTSPMediaFactoryURI>,
{
let f: &F = &*(f as *const F);
f(&RTSPMediaFactoryURI::from_glib_borrow(this).unsafe_cast())
f(&RTSPMediaFactoryURI::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -143,7 +143,7 @@ impl<O: IsA<RTSPMediaFactoryURI>> RTSPMediaFactoryURIExt for O {
P: IsA<RTSPMediaFactoryURI>,
{
let f: &F = &*(f as *const F);
f(&RTSPMediaFactoryURI::from_glib_borrow(this).unsafe_cast())
f(&RTSPMediaFactoryURI::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);

View file

@ -396,7 +396,7 @@ impl<O: IsA<RTSPServer>> RTSPServerExt for O {
{
let f: &F = &*(f as *const F);
f(
&RTSPServer::from_glib_borrow(this).unsafe_cast(),
&RTSPServer::from_glib_borrow(this).unsafe_cast_ref(),
&from_glib_borrow(object),
)
}
@ -423,7 +423,7 @@ impl<O: IsA<RTSPServer>> RTSPServerExt for O {
P: IsA<RTSPServer>,
{
let f: &F = &*(f as *const F);
f(&RTSPServer::from_glib_borrow(this).unsafe_cast())
f(&RTSPServer::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -448,7 +448,7 @@ impl<O: IsA<RTSPServer>> RTSPServerExt for O {
P: IsA<RTSPServer>,
{
let f: &F = &*(f as *const F);
f(&RTSPServer::from_glib_borrow(this).unsafe_cast())
f(&RTSPServer::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -473,7 +473,7 @@ impl<O: IsA<RTSPServer>> RTSPServerExt for O {
P: IsA<RTSPServer>,
{
let f: &F = &*(f as *const F);
f(&RTSPServer::from_glib_borrow(this).unsafe_cast())
f(&RTSPServer::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -498,7 +498,7 @@ impl<O: IsA<RTSPServer>> RTSPServerExt for O {
P: IsA<RTSPServer>,
{
let f: &F = &*(f as *const F);
f(&RTSPServer::from_glib_borrow(this).unsafe_cast())
f(&RTSPServer::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -525,7 +525,7 @@ impl<O: IsA<RTSPServer>> RTSPServerExt for O {
P: IsA<RTSPServer>,
{
let f: &F = &*(f as *const F);
f(&RTSPServer::from_glib_borrow(this).unsafe_cast())
f(&RTSPServer::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -550,7 +550,7 @@ impl<O: IsA<RTSPServer>> RTSPServerExt for O {
P: IsA<RTSPServer>,
{
let f: &F = &*(f as *const F);
f(&RTSPServer::from_glib_borrow(this).unsafe_cast())
f(&RTSPServer::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);

View file

@ -290,7 +290,7 @@ impl<O: IsA<RTSPSession>> RTSPSessionExt for O {
P: IsA<RTSPSession>,
{
let f: &F = &*(f as *const F);
f(&RTSPSession::from_glib_borrow(this).unsafe_cast())
f(&RTSPSession::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -318,7 +318,7 @@ impl<O: IsA<RTSPSession>> RTSPSessionExt for O {
P: IsA<RTSPSession>,
{
let f: &F = &*(f as *const F);
f(&RTSPSession::from_glib_borrow(this).unsafe_cast())
f(&RTSPSession::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);

View file

@ -50,8 +50,8 @@ pub trait RTSPSessionMediaExt: 'static {
fn get_transport(&self, idx: u32) -> Option<RTSPStreamTransport>;
//#[cfg(any(feature = "v1_14", feature = "dox"))]
//fn get_transports(&self) -> /*Unknown conversion*//*Unimplemented*/PtrArray TypeId { ns_id: 1, id: 27 };
#[cfg(any(feature = "v1_14", feature = "dox"))]
fn get_transports(&self) -> Vec<RTSPStreamTransport>;
fn matches(&self, path: &str) -> Option<i32>;
@ -104,10 +104,16 @@ impl<O: IsA<RTSPSessionMedia>> RTSPSessionMediaExt for O {
}
}
//#[cfg(any(feature = "v1_14", feature = "dox"))]
//fn get_transports(&self) -> /*Unknown conversion*//*Unimplemented*/PtrArray TypeId { ns_id: 1, id: 27 } {
// unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_session_media_get_transports() }
//}
#[cfg(any(feature = "v1_14", feature = "dox"))]
fn get_transports(&self) -> Vec<RTSPStreamTransport> {
unsafe {
FromGlibPtrContainer::from_glib_full(
gst_rtsp_server_sys::gst_rtsp_session_media_get_transports(
self.as_ref().to_glib_none().0,
),
)
}
}
fn matches(&self, path: &str) -> Option<i32> {
unsafe {

View file

@ -194,7 +194,7 @@ impl<O: IsA<RTSPSessionPool>> RTSPSessionPoolExt for O {
{
let f: &F = &*(f as *const F);
f(
&RTSPSessionPool::from_glib_borrow(this).unsafe_cast(),
&RTSPSessionPool::from_glib_borrow(this).unsafe_cast_ref(),
&from_glib_borrow(object),
)
}
@ -221,7 +221,7 @@ impl<O: IsA<RTSPSessionPool>> RTSPSessionPoolExt for O {
P: IsA<RTSPSessionPool>,
{
let f: &F = &*(f as *const F);
f(&RTSPSessionPool::from_glib_borrow(this).unsafe_cast())
f(&RTSPSessionPool::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);

View file

@ -1090,7 +1090,7 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
{
let f: &F = &*(f as *const F);
f(
&RTSPStream::from_glib_borrow(this).unsafe_cast(),
&RTSPStream::from_glib_borrow(this).unsafe_cast_ref(),
&from_glib_borrow(object),
)
}
@ -1121,7 +1121,7 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
{
let f: &F = &*(f as *const F);
f(
&RTSPStream::from_glib_borrow(this).unsafe_cast(),
&RTSPStream::from_glib_borrow(this).unsafe_cast_ref(),
&from_glib_borrow(object),
)
}
@ -1152,7 +1152,7 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
{
let f: &F = &*(f as *const F);
f(
&RTSPStream::from_glib_borrow(this).unsafe_cast(),
&RTSPStream::from_glib_borrow(this).unsafe_cast_ref(),
&from_glib_borrow(object),
)
}
@ -1181,7 +1181,7 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
P: IsA<RTSPStream>,
{
let f: &F = &*(f as *const F);
f(&RTSPStream::from_glib_borrow(this).unsafe_cast())
f(&RTSPStream::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -1206,7 +1206,7 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
P: IsA<RTSPStream>,
{
let f: &F = &*(f as *const F);
f(&RTSPStream::from_glib_borrow(this).unsafe_cast())
f(&RTSPStream::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -1231,7 +1231,7 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
P: IsA<RTSPStream>,
{
let f: &F = &*(f as *const F);
f(&RTSPStream::from_glib_borrow(this).unsafe_cast())
f(&RTSPStream::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);

View file

@ -101,7 +101,7 @@ impl<O: IsA<RTSPThreadPool>> RTSPThreadPoolExt for O {
P: IsA<RTSPThreadPool>,
{
let f: &F = &*(f as *const F);
f(&RTSPThreadPool::from_glib_borrow(this).unsafe_cast())
f(&RTSPThreadPool::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);

View file

@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 0a4cfc4)
from gir-files (https://github.com/gtk-rs/gir-files @ 4607c4a0)
Generated by gir (https://github.com/gtk-rs/gir @ 997cbcb)
from gir-files (https://github.com/gtk-rs/gir-files @ a57b90d4)

View file

@ -89,7 +89,7 @@ where
{
let f: &F = &*(f as *const F);
match f(
&RTSPAuth::from_glib_borrow(this).unsafe_cast(),
&RTSPAuth::from_glib_borrow(this).unsafe_cast_ref(),
&from_glib_borrow(connection),
&from_glib_borrow(peer_cert),
from_glib(errors),

View file

@ -6,7 +6,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use glib;
use glib::translate::*;
use gst_rtsp_server_sys;
use std::ptr;
@ -30,22 +30,20 @@ impl RTSPContext {
}
#[doc(hidden)]
impl glib::translate::FromGlibPtrBorrow<*mut gst_rtsp_server_sys::GstRTSPContext> for RTSPContext {
impl FromGlibPtrBorrow<*mut gst_rtsp_server_sys::GstRTSPContext> for RTSPContext {
#[inline]
unsafe fn from_glib_borrow(ptr: *mut gst_rtsp_server_sys::GstRTSPContext) -> Self {
unsafe fn from_glib_borrow(ptr: *mut gst_rtsp_server_sys::GstRTSPContext) -> Borrowed<Self> {
assert!(!ptr.is_null());
RTSPContext(ptr::NonNull::new_unchecked(ptr))
Borrowed::new(RTSPContext(ptr::NonNull::new_unchecked(ptr)))
}
}
#[doc(hidden)]
impl<'a> glib::translate::ToGlibPtr<'a, *mut gst_rtsp_server_sys::GstRTSPContext> for RTSPContext {
impl<'a> ToGlibPtr<'a, *mut gst_rtsp_server_sys::GstRTSPContext> for RTSPContext {
type Storage = &'a RTSPContext;
fn to_glib_none(
&'a self,
) -> glib::translate::Stash<'a, *mut gst_rtsp_server_sys::GstRTSPContext, Self> {
glib::translate::Stash(self.0.as_ptr(), self)
fn to_glib_none(&'a self) -> Stash<'a, *mut gst_rtsp_server_sys::GstRTSPContext, Self> {
Stash(self.0.as_ptr(), self)
}
fn to_glib_full(&self) -> *mut gst_rtsp_server_sys::GstRTSPContext {

View file

@ -839,7 +839,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: RTSPClient = from_glib_borrow(ptr);
let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr);
let sdp = imp.create_sdp(&wrap, &from_glib_borrow(media));
let ptr = sdp.to_glib_none().0;
@ -859,7 +859,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: RTSPClient = from_glib_borrow(ptr);
let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr);
match imp.configure_client_media(
&wrap,
@ -869,7 +869,7 @@ where
) {
Ok(()) => glib_sys::GTRUE,
Err(err) => {
err.log_with_object(&wrap);
err.log_with_object(&*wrap);
glib_sys::GFALSE
}
}
@ -884,7 +884,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: RTSPClient = from_glib_borrow(ptr);
let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr);
imp.params_set(&wrap, &from_glib_borrow(ctx)).to_glib()
}
@ -898,7 +898,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: RTSPClient = from_glib_borrow(ptr);
let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr);
imp.params_get(&wrap, &from_glib_borrow(ctx)).to_glib()
}
@ -912,7 +912,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: RTSPClient = from_glib_borrow(ptr);
let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr);
imp.make_path_from_uri(&wrap, &from_glib_borrow(url))
.to_glib_full()
@ -924,7 +924,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: RTSPClient = from_glib_borrow(ptr);
let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr);
imp.closed(&wrap);
}
@ -937,7 +937,7 @@ unsafe extern "C" fn client_new_session<T: ObjectSubclass>(
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: RTSPClient = from_glib_borrow(ptr);
let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr);
imp.new_session(&wrap, &from_glib_borrow(session));
}
@ -950,7 +950,7 @@ unsafe extern "C" fn client_options_request<T: ObjectSubclass>(
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: RTSPClient = from_glib_borrow(ptr);
let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr);
imp.options_request(&wrap, &from_glib_borrow(ctx));
}
@ -963,7 +963,7 @@ unsafe extern "C" fn client_describe_request<T: ObjectSubclass>(
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: RTSPClient = from_glib_borrow(ptr);
let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr);
imp.describe_request(&wrap, &from_glib_borrow(ctx));
}
@ -976,7 +976,7 @@ unsafe extern "C" fn client_setup_request<T: ObjectSubclass>(
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: RTSPClient = from_glib_borrow(ptr);
let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr);
imp.setup_request(&wrap, &from_glib_borrow(ctx));
}
@ -989,7 +989,7 @@ unsafe extern "C" fn client_play_request<T: ObjectSubclass>(
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: RTSPClient = from_glib_borrow(ptr);
let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr);
imp.play_request(&wrap, &from_glib_borrow(ctx));
}
@ -1002,7 +1002,7 @@ unsafe extern "C" fn client_pause_request<T: ObjectSubclass>(
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: RTSPClient = from_glib_borrow(ptr);
let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr);
imp.pause_request(&wrap, &from_glib_borrow(ctx));
}
@ -1015,7 +1015,7 @@ unsafe extern "C" fn client_teardown_request<T: ObjectSubclass>(
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: RTSPClient = from_glib_borrow(ptr);
let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr);
imp.teardown_request(&wrap, &from_glib_borrow(ctx));
}
@ -1028,7 +1028,7 @@ unsafe extern "C" fn client_set_parameter_request<T: ObjectSubclass>(
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: RTSPClient = from_glib_borrow(ptr);
let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr);
imp.set_parameter_request(&wrap, &from_glib_borrow(ctx));
}
@ -1041,7 +1041,7 @@ unsafe extern "C" fn client_get_parameter_request<T: ObjectSubclass>(
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: RTSPClient = from_glib_borrow(ptr);
let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr);
imp.get_parameter_request(&wrap, &from_glib_borrow(ctx));
}
@ -1054,7 +1054,7 @@ unsafe extern "C" fn client_announce_request<T: ObjectSubclass>(
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: RTSPClient = from_glib_borrow(ptr);
let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr);
imp.announce_request(&wrap, &from_glib_borrow(ctx));
}
@ -1067,7 +1067,7 @@ unsafe extern "C" fn client_record_request<T: ObjectSubclass>(
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: RTSPClient = from_glib_borrow(ptr);
let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr);
imp.record_request(&wrap, &from_glib_borrow(ctx));
}
@ -1080,7 +1080,7 @@ unsafe extern "C" fn client_handle_response<T: ObjectSubclass>(
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: RTSPClient = from_glib_borrow(ptr);
let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr);
imp.handle_response(&wrap, &from_glib_borrow(ctx));
}
@ -1096,7 +1096,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: RTSPClient = from_glib_borrow(ptr);
let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr);
match imp.handle_sdp(
&wrap,
@ -1106,7 +1106,7 @@ where
) {
Ok(()) => glib_sys::GTRUE,
Err(err) => {
err.log_with_object(&wrap);
err.log_with_object(&*wrap);
glib_sys::GFALSE
}
}
@ -1122,7 +1122,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: RTSPClient = from_glib_borrow(ptr);
let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr);
imp.check_requirements(
&wrap,
@ -1141,7 +1141,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: RTSPClient = from_glib_borrow(ptr);
let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr);
imp.pre_options_request(&wrap, &from_glib_borrow(ctx))
.to_glib()
@ -1156,7 +1156,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: RTSPClient = from_glib_borrow(ptr);
let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr);
imp.pre_describe_request(&wrap, &from_glib_borrow(ctx))
.to_glib()
@ -1171,7 +1171,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: RTSPClient = from_glib_borrow(ptr);
let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr);
imp.pre_setup_request(&wrap, &from_glib_borrow(ctx))
.to_glib()
@ -1186,7 +1186,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: RTSPClient = from_glib_borrow(ptr);
let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr);
imp.pre_play_request(&wrap, &from_glib_borrow(ctx))
.to_glib()
@ -1201,7 +1201,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: RTSPClient = from_glib_borrow(ptr);
let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr);
imp.pre_pause_request(&wrap, &from_glib_borrow(ctx))
.to_glib()
@ -1216,7 +1216,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: RTSPClient = from_glib_borrow(ptr);
let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr);
imp.pre_teardown_request(&wrap, &from_glib_borrow(ctx))
.to_glib()
@ -1231,7 +1231,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: RTSPClient = from_glib_borrow(ptr);
let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr);
imp.pre_set_parameter_request(&wrap, &from_glib_borrow(ctx))
.to_glib()
@ -1246,7 +1246,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: RTSPClient = from_glib_borrow(ptr);
let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr);
imp.pre_get_parameter_request(&wrap, &from_glib_borrow(ctx))
.to_glib()
@ -1261,7 +1261,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: RTSPClient = from_glib_borrow(ptr);
let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr);
imp.pre_announce_request(&wrap, &from_glib_borrow(ctx))
.to_glib()
@ -1276,7 +1276,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: RTSPClient = from_glib_borrow(ptr);
let wrap: Borrowed<RTSPClient> = from_glib_borrow(ptr);
imp.pre_record_request(&wrap, &from_glib_borrow(ctx))
.to_glib()

View file

@ -486,7 +486,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: RTSPMedia = from_glib_borrow(ptr);
let wrap: Borrowed<RTSPMedia> = from_glib_borrow(ptr);
imp.handle_message(&wrap, gst::MessageRef::from_ptr(message))
.to_glib()
@ -501,12 +501,12 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: RTSPMedia = from_glib_borrow(ptr);
let wrap: Borrowed<RTSPMedia> = from_glib_borrow(ptr);
match imp.prepare(&wrap, &from_glib_borrow(thread)) {
Ok(()) => glib_sys::GTRUE,
Err(err) => {
err.log_with_object(&wrap);
err.log_with_object(&*wrap);
glib_sys::GFALSE
}
}
@ -520,12 +520,12 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: RTSPMedia = from_glib_borrow(ptr);
let wrap: Borrowed<RTSPMedia> = from_glib_borrow(ptr);
match imp.unprepare(&wrap) {
Ok(()) => glib_sys::GTRUE,
Err(err) => {
err.log_with_object(&wrap);
err.log_with_object(&*wrap);
glib_sys::GFALSE
}
}
@ -539,12 +539,12 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: RTSPMedia = from_glib_borrow(ptr);
let wrap: Borrowed<RTSPMedia> = from_glib_borrow(ptr);
match imp.suspend(&wrap) {
Ok(()) => glib_sys::GTRUE,
Err(err) => {
err.log_with_object(&wrap);
err.log_with_object(&*wrap);
glib_sys::GFALSE
}
}
@ -558,12 +558,12 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: RTSPMedia = from_glib_borrow(ptr);
let wrap: Borrowed<RTSPMedia> = from_glib_borrow(ptr);
match imp.unsuspend(&wrap) {
Ok(()) => glib_sys::GTRUE,
Err(err) => {
err.log_with_object(&wrap);
err.log_with_object(&*wrap);
glib_sys::GFALSE
}
}
@ -578,7 +578,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: RTSPMedia = from_glib_borrow(ptr);
let wrap: Borrowed<RTSPMedia> = from_glib_borrow(ptr);
match imp.query_position(&wrap) {
Some(pos) => {
@ -598,7 +598,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: RTSPMedia = from_glib_borrow(ptr);
let wrap: Borrowed<RTSPMedia> = from_glib_borrow(ptr);
match imp.query_stop(&wrap) {
Some(s) => {
@ -617,7 +617,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: RTSPMedia = from_glib_borrow(ptr);
let wrap: Borrowed<RTSPMedia> = from_glib_borrow(ptr);
let res: *mut gst_sys::GstElement = imp.create_rtpbin(&wrap).to_glib_full();
@ -637,7 +637,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: 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
// we don't accidentally take ownership of it somewhere along the line
@ -648,7 +648,7 @@ where
let res = match imp.setup_rtpbin(&wrap, &from_glib_borrow(rtpbin)) {
Ok(()) => glib_sys::GTRUE,
Err(err) => {
err.log_with_object(&wrap);
err.log_with_object(&*wrap);
glib_sys::GFALSE
}
};
@ -669,7 +669,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: RTSPMedia = from_glib_borrow(ptr);
let wrap: Borrowed<RTSPMedia> = from_glib_borrow(ptr);
match imp.setup_sdp(
&wrap,
@ -678,7 +678,7 @@ where
) {
Ok(()) => glib_sys::GTRUE,
Err(err) => {
err.log_with_object(&wrap);
err.log_with_object(&*wrap);
glib_sys::GFALSE
}
}
@ -692,7 +692,7 @@ unsafe extern "C" fn media_new_stream<T: ObjectSubclass>(
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: RTSPMedia = from_glib_borrow(ptr);
let wrap: Borrowed<RTSPMedia> = from_glib_borrow(ptr);
imp.new_stream(&wrap, &from_glib_borrow(stream));
}
@ -705,7 +705,7 @@ unsafe extern "C" fn media_removed_stream<T: ObjectSubclass>(
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: RTSPMedia = from_glib_borrow(ptr);
let wrap: Borrowed<RTSPMedia> = from_glib_borrow(ptr);
imp.removed_stream(&wrap, &from_glib_borrow(stream));
}
@ -716,7 +716,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: RTSPMedia = from_glib_borrow(ptr);
let wrap: Borrowed<RTSPMedia> = from_glib_borrow(ptr);
imp.prepared(&wrap);
}
@ -728,7 +728,7 @@ unsafe extern "C" fn media_unprepared<T: ObjectSubclass>(
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: RTSPMedia = from_glib_borrow(ptr);
let wrap: Borrowed<RTSPMedia> = from_glib_borrow(ptr);
imp.unprepared(&wrap);
}
@ -741,7 +741,7 @@ unsafe extern "C" fn media_target_state<T: ObjectSubclass>(
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: RTSPMedia = from_glib_borrow(ptr);
let wrap: Borrowed<RTSPMedia> = from_glib_borrow(ptr);
imp.target_state(&wrap, from_glib(state));
}
@ -754,7 +754,7 @@ unsafe extern "C" fn media_new_state<T: ObjectSubclass>(
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: RTSPMedia = from_glib_borrow(ptr);
let wrap: Borrowed<RTSPMedia> = from_glib_borrow(ptr);
imp.new_state(&wrap, from_glib(state));
}
@ -768,12 +768,12 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: RTSPMedia = from_glib_borrow(ptr);
let wrap: Borrowed<RTSPMedia> = from_glib_borrow(ptr);
match imp.handle_sdp(&wrap, &*(sdp as *const gst_sdp::SDPMessageRef)) {
Ok(()) => glib_sys::GTRUE,
Err(err) => {
err.log_with_object(&wrap);
err.log_with_object(&*wrap);
glib_sys::GFALSE
}
}

View file

@ -228,7 +228,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: RTSPMediaFactory = from_glib_borrow(ptr);
let wrap: Borrowed<RTSPMediaFactory> = from_glib_borrow(ptr);
imp.gen_key(&wrap, &from_glib_borrow(url)).to_glib_full()
}
@ -242,7 +242,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: RTSPMediaFactory = from_glib_borrow(ptr);
let wrap: Borrowed<RTSPMediaFactory> = from_glib_borrow(ptr);
let element = imp
.create_element(&wrap, &from_glib_borrow(url))
@ -260,7 +260,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: RTSPMediaFactory = from_glib_borrow(ptr);
let wrap: Borrowed<RTSPMediaFactory> = from_glib_borrow(ptr);
imp.construct(&wrap, &from_glib_borrow(url)).to_glib_full()
}
@ -280,7 +280,7 @@ where
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: RTSPMediaFactory = from_glib_borrow(ptr);
let wrap: Borrowed<RTSPMediaFactory> = from_glib_borrow(ptr);
let pipeline: *mut gst_sys::GstPipeline = imp
.create_pipeline(&wrap, &from_glib_borrow(media))
@ -305,7 +305,7 @@ unsafe extern "C" fn factory_configure<T: ObjectSubclass>(
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: RTSPMediaFactory = from_glib_borrow(ptr);
let wrap: Borrowed<RTSPMediaFactory> = from_glib_borrow(ptr);
imp.configure(&wrap, &from_glib_borrow(media));
}
@ -318,7 +318,7 @@ unsafe extern "C" fn factory_media_constructed<T: ObjectSubclass>(
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: RTSPMediaFactory = from_glib_borrow(ptr);
let wrap: Borrowed<RTSPMediaFactory> = from_glib_borrow(ptr);
imp.media_constructed(&wrap, &from_glib_borrow(media));
}
@ -331,7 +331,7 @@ unsafe extern "C" fn factory_media_configure<T: ObjectSubclass>(
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: RTSPMediaFactory = from_glib_borrow(ptr);
let wrap: Borrowed<RTSPMediaFactory> = from_glib_borrow(ptr);
imp.media_configure(&wrap, &from_glib_borrow(media));
}

View file

@ -73,7 +73,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: RTSPServer = from_glib_borrow(ptr);
let wrap: Borrowed<RTSPServer> = from_glib_borrow(ptr);
imp.create_client(&wrap).to_glib_full()
}
@ -86,7 +86,7 @@ unsafe extern "C" fn server_client_connected<T: ObjectSubclass>(
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: RTSPServer = from_glib_borrow(ptr);
let wrap: Borrowed<RTSPServer> = from_glib_borrow(ptr);
imp.client_connected(&wrap, &from_glib_borrow(client));
}

View file

@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 0a4cfc4)
from gir-files (https://github.com/gtk-rs/gir-files @ 4607c4a0)
Generated by gir (https://github.com/gtk-rs/gir @ 997cbcb)
from gir-files (https://github.com/gtk-rs/gir-files @ a57b90d4)

View file

@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 0a4cfc4)
from gir-files (https://github.com/gtk-rs/gir-files @ 4607c4a0)
Generated by gir (https://github.com/gtk-rs/gir @ 997cbcb)
from gir-files (https://github.com/gtk-rs/gir-files @ a57b90d4)

View file

@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 0a4cfc4)
from gir-files (https://github.com/gtk-rs/gir-files @ 4607c4a0)
Generated by gir (https://github.com/gtk-rs/gir @ 997cbcb)
from gir-files (https://github.com/gtk-rs/gir-files @ a57b90d4)

View file

@ -177,7 +177,7 @@ impl<O: IsA<VideoEncoder>> VideoEncoderExt for O {
P: IsA<VideoEncoder>,
{
let f: &F = &*(f as *const F);
f(&VideoEncoder::from_glib_borrow(this).unsafe_cast())
f(&VideoEncoder::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);

View file

@ -539,7 +539,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: VideoDecoder = from_glib_borrow(ptr);
let wrap: Borrowed<VideoDecoder> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
match imp.open(&wrap) {
@ -562,7 +562,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: VideoDecoder = from_glib_borrow(ptr);
let wrap: Borrowed<VideoDecoder> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
match imp.close(&wrap) {
@ -585,7 +585,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: VideoDecoder = from_glib_borrow(ptr);
let wrap: Borrowed<VideoDecoder> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
match imp.start(&wrap) {
@ -608,7 +608,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: VideoDecoder = from_glib_borrow(ptr);
let wrap: Borrowed<VideoDecoder> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
match imp.stop(&wrap) {
@ -631,7 +631,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: VideoDecoder = from_glib_borrow(ptr);
let wrap: Borrowed<VideoDecoder> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), gst::FlowReturn::Error, {
imp.finish(&wrap).into()
@ -648,7 +648,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: VideoDecoder = from_glib_borrow(ptr);
let wrap: Borrowed<VideoDecoder> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), gst::FlowReturn::Error, {
imp.drain(&wrap).into()
@ -666,7 +666,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: VideoDecoder = from_glib_borrow(ptr);
let wrap: Borrowed<VideoDecoder> = from_glib_borrow(ptr);
gst_video_sys::gst_video_codec_state_ref(state);
let wrap_state = VideoCodecState::<Readable>::new(state);
@ -674,7 +674,7 @@ where
match imp.set_format(&wrap, &wrap_state) {
Ok(()) => true,
Err(err) => {
err.log_with_object(&wrap);
err.log_with_object(&*wrap);
false
}
}
@ -694,10 +694,10 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: VideoDecoder = from_glib_borrow(ptr);
let wrap: Borrowed<VideoDecoder> = from_glib_borrow(ptr);
gst_video_sys::gst_video_codec_frame_ref(frame);
let wrap_frame = VideoCodecFrame::new(frame, &wrap);
let wrap_adapter: gst_base::Adapter = from_glib_borrow(adapter);
let wrap_frame = VideoCodecFrame::new(frame, &*wrap);
let wrap_adapter: Borrowed<gst_base::Adapter> = from_glib_borrow(adapter);
let at_eos: bool = from_glib(at_eos);
gst_panic_to_error!(&wrap, &instance.panicked(), gst::FlowReturn::Error, {
@ -716,8 +716,8 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: VideoDecoder = from_glib_borrow(ptr);
let wrap_frame = VideoCodecFrame::new(frame, &wrap);
let wrap: Borrowed<VideoDecoder> = from_glib_borrow(ptr);
let wrap_frame = VideoCodecFrame::new(frame, &*wrap);
gst_panic_to_error!(&wrap, &instance.panicked(), gst::FlowReturn::Error, {
imp.handle_frame(&wrap, wrap_frame).into()
@ -734,7 +734,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: VideoDecoder = from_glib_borrow(ptr);
let wrap: Borrowed<VideoDecoder> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
VideoDecoderImpl::flush(imp, &wrap)
@ -751,13 +751,13 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: VideoDecoder = from_glib_borrow(ptr);
let wrap: Borrowed<VideoDecoder> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
match imp.negotiate(&wrap) {
Ok(()) => true,
Err(err) => {
err.log_with_object(&wrap);
err.log_with_object(&*wrap);
false
}
}
@ -775,13 +775,15 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: VideoDecoder = from_glib_borrow(ptr);
let wrap: Borrowed<VideoDecoder> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), gst::Caps::new_empty(), {
VideoDecoderImpl::get_caps(
imp,
&wrap,
Option::<gst::Caps>::from_glib_borrow(filter).as_ref(),
Option::<gst::Caps>::from_glib_borrow(filter)
.as_ref()
.as_ref(),
)
})
.to_glib_full()
@ -797,7 +799,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: VideoDecoder = from_glib_borrow(ptr);
let wrap: Borrowed<VideoDecoder> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
imp.sink_event(&wrap, from_glib_full(event))
@ -815,7 +817,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: VideoDecoder = from_glib_borrow(ptr);
let wrap: Borrowed<VideoDecoder> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
imp.sink_query(&wrap, gst::QueryRef::from_mut_ptr(query))
@ -833,7 +835,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: VideoDecoder = from_glib_borrow(ptr);
let wrap: Borrowed<VideoDecoder> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
imp.src_event(&wrap, from_glib_full(event))
@ -851,7 +853,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: VideoDecoder = from_glib_borrow(ptr);
let wrap: Borrowed<VideoDecoder> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
imp.src_query(&wrap, gst::QueryRef::from_mut_ptr(query))
@ -869,7 +871,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: VideoDecoder = from_glib_borrow(ptr);
let wrap: Borrowed<VideoDecoder> = from_glib_borrow(ptr);
let query = gst::QueryRef::from_mut_ptr(query);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
@ -894,7 +896,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: VideoDecoder = from_glib_borrow(ptr);
let wrap: Borrowed<VideoDecoder> = from_glib_borrow(ptr);
let query = gst::QueryRef::from_mut_ptr(query);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {

View file

@ -473,7 +473,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: VideoEncoder = from_glib_borrow(ptr);
let wrap: Borrowed<VideoEncoder> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
match imp.open(&wrap) {
@ -496,7 +496,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: VideoEncoder = from_glib_borrow(ptr);
let wrap: Borrowed<VideoEncoder> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
match imp.close(&wrap) {
@ -519,7 +519,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: VideoEncoder = from_glib_borrow(ptr);
let wrap: Borrowed<VideoEncoder> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
match imp.start(&wrap) {
@ -542,7 +542,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: VideoEncoder = from_glib_borrow(ptr);
let wrap: Borrowed<VideoEncoder> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
match imp.stop(&wrap) {
@ -565,7 +565,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: VideoEncoder = from_glib_borrow(ptr);
let wrap: Borrowed<VideoEncoder> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), gst::FlowReturn::Error, {
imp.finish(&wrap).into()
@ -583,7 +583,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: VideoEncoder = from_glib_borrow(ptr);
let wrap: Borrowed<VideoEncoder> = from_glib_borrow(ptr);
gst_video_sys::gst_video_codec_state_ref(state);
let wrap_state = VideoCodecState::<Readable>::new(state);
@ -591,7 +591,7 @@ where
match imp.set_format(&wrap, &wrap_state) {
Ok(()) => true,
Err(err) => {
err.log_with_object(&wrap);
err.log_with_object(&*wrap);
false
}
}
@ -609,8 +609,8 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: VideoEncoder = from_glib_borrow(ptr);
let wrap_frame = VideoCodecFrame::new(frame, &wrap);
let wrap: Borrowed<VideoEncoder> = from_glib_borrow(ptr);
let wrap_frame = VideoCodecFrame::new(frame, &*wrap);
gst_panic_to_error!(&wrap, &instance.panicked(), gst::FlowReturn::Error, {
imp.handle_frame(&wrap, wrap_frame).into()
@ -627,7 +627,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: VideoEncoder = from_glib_borrow(ptr);
let wrap: Borrowed<VideoEncoder> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
VideoEncoderImpl::flush(imp, &wrap)
@ -644,13 +644,13 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: VideoEncoder = from_glib_borrow(ptr);
let wrap: Borrowed<VideoEncoder> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
match imp.negotiate(&wrap) {
Ok(()) => true,
Err(err) => {
err.log_with_object(&wrap);
err.log_with_object(&*wrap);
false
}
}
@ -668,13 +668,15 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: VideoEncoder = from_glib_borrow(ptr);
let wrap: Borrowed<VideoEncoder> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), gst::Caps::new_empty(), {
VideoEncoderImpl::get_caps(
imp,
&wrap,
Option::<gst::Caps>::from_glib_borrow(filter).as_ref(),
Option::<gst::Caps>::from_glib_borrow(filter)
.as_ref()
.as_ref(),
)
})
.to_glib_full()
@ -690,7 +692,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: VideoEncoder = from_glib_borrow(ptr);
let wrap: Borrowed<VideoEncoder> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
imp.sink_event(&wrap, from_glib_full(event))
@ -708,7 +710,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: VideoEncoder = from_glib_borrow(ptr);
let wrap: Borrowed<VideoEncoder> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
imp.sink_query(&wrap, gst::QueryRef::from_mut_ptr(query))
@ -726,7 +728,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: VideoEncoder = from_glib_borrow(ptr);
let wrap: Borrowed<VideoEncoder> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
imp.src_event(&wrap, from_glib_full(event))
@ -744,7 +746,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: VideoEncoder = from_glib_borrow(ptr);
let wrap: Borrowed<VideoEncoder> = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
imp.src_query(&wrap, gst::QueryRef::from_mut_ptr(query))
@ -762,7 +764,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: VideoEncoder = from_glib_borrow(ptr);
let wrap: Borrowed<VideoEncoder> = from_glib_borrow(ptr);
let query = gst::QueryRef::from_mut_ptr(query);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
@ -787,7 +789,7 @@ where
{
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: VideoEncoder = from_glib_borrow(ptr);
let wrap: Borrowed<VideoEncoder> = from_glib_borrow(ptr);
let query = gst::QueryRef::from_mut_ptr(query);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {

View file

@ -10,7 +10,7 @@ use gst_sys;
use gst_video_sys;
use glib;
use glib::translate::{from_glib, ToGlibPtr};
use glib::translate::{from_glib, Borrowed, ToGlibPtr};
use gst;
use gst::miniobject::MiniObject;
@ -201,7 +201,6 @@ impl<T> VideoFrame<T> {
frame,
buffer: Some(self.buffer()),
info,
borrowed: true,
}
}
@ -390,7 +389,6 @@ impl VideoFrame<Writable> {
frame,
buffer: Some(self.buffer_mut()),
info,
borrowed: true,
}
}
@ -404,7 +402,6 @@ pub struct VideoFrameRef<T> {
frame: gst_video_sys::GstVideoFrame,
buffer: Option<T>,
info: ::VideoInfo,
borrowed: bool,
}
impl<T> VideoFrameRef<T> {
@ -546,17 +543,26 @@ impl<T> VideoFrameRef<T> {
}
impl<'a> VideoFrameRef<&'a gst::BufferRef> {
pub unsafe fn from_glib_borrow(frame: *const gst_video_sys::GstVideoFrame) -> Self {
pub unsafe fn from_glib_borrow(frame: *const gst_video_sys::GstVideoFrame) -> Borrowed<Self> {
assert!(!frame.is_null());
let frame = ptr::read(frame);
let info = ::VideoInfo(ptr::read(&frame.info));
let buffer = gst::BufferRef::from_ptr(frame.buffer);
Borrowed::new(VideoFrameRef {
frame,
buffer: Some(buffer),
info,
})
}
pub unsafe fn from_glib_full(frame: gst_video_sys::GstVideoFrame) -> Self {
let info = ::VideoInfo(ptr::read(&frame.info));
let buffer = gst::BufferRef::from_ptr(frame.buffer);
VideoFrameRef {
frame,
buffer: Some(buffer),
info,
borrowed: false,
}
}
@ -584,7 +590,6 @@ impl<'a> VideoFrameRef<&'a gst::BufferRef> {
frame,
buffer: Some(buffer),
info,
borrowed: false,
})
}
}
@ -616,7 +621,6 @@ impl<'a> VideoFrameRef<&'a gst::BufferRef> {
frame,
buffer: Some(buffer),
info,
borrowed: false,
})
}
}
@ -628,17 +632,26 @@ impl<'a> VideoFrameRef<&'a gst::BufferRef> {
}
impl<'a> VideoFrameRef<&'a mut gst::BufferRef> {
pub unsafe fn from_glib_borrow_mut(frame: *mut gst_video_sys::GstVideoFrame) -> Self {
pub unsafe fn from_glib_borrow_mut(frame: *mut gst_video_sys::GstVideoFrame) -> Borrowed<Self> {
assert!(!frame.is_null());
let frame = ptr::read(frame);
let info = ::VideoInfo(ptr::read(&frame.info));
let buffer = gst::BufferRef::from_mut_ptr(frame.buffer);
Borrowed::new(VideoFrameRef {
frame,
buffer: Some(buffer),
info,
})
}
pub unsafe fn from_glib_full_mut(frame: gst_video_sys::GstVideoFrame) -> Self {
let info = ::VideoInfo(ptr::read(&frame.info));
let buffer = gst::BufferRef::from_mut_ptr(frame.buffer);
VideoFrameRef {
frame,
buffer: Some(buffer),
info,
borrowed: false,
}
}
@ -668,7 +681,6 @@ impl<'a> VideoFrameRef<&'a mut gst::BufferRef> {
frame,
buffer: Some(buffer),
info,
borrowed: false,
})
}
}
@ -702,7 +714,6 @@ impl<'a> VideoFrameRef<&'a mut gst::BufferRef> {
frame,
buffer: Some(buffer),
info,
borrowed: false,
})
}
}
@ -763,12 +774,10 @@ unsafe impl<T> Sync for VideoFrameRef<T> {}
impl<T> Drop for VideoFrameRef<T> {
fn drop(&mut self) {
if !self.borrowed {
unsafe {
gst_video_sys::gst_video_frame_unmap(&mut self.frame);
}
}
}
}
pub trait VideoBufferExt {

View file

@ -425,14 +425,13 @@ macro_rules! generic_impl {
#[doc(hidden)]
impl FromGlibPtrBorrow<*mut gst_video_sys::GstVideoTimeCode> for $name {
#[inline]
unsafe fn from_glib_borrow(ptr: *mut gst_video_sys::GstVideoTimeCode) -> Self {
unsafe fn from_glib_borrow(
ptr: *mut gst_video_sys::GstVideoTimeCode,
) -> Borrowed<Self> {
assert!(!ptr.is_null());
let v = ptr::read(ptr);
if !v.config.latest_daily_jam.is_null() {
glib_sys::g_date_time_ref(v.config.latest_daily_jam);
}
$name(v)
Borrowed::new($name(v))
}
}

View file

@ -207,9 +207,11 @@ impl FromGlibPtrFull<*mut gst_video_sys::GstVideoTimeCodeInterval> for VideoTime
#[doc(hidden)]
impl FromGlibPtrBorrow<*mut gst_video_sys::GstVideoTimeCodeInterval> for VideoTimeCodeInterval {
#[inline]
unsafe fn from_glib_borrow(ptr: *mut gst_video_sys::GstVideoTimeCodeInterval) -> Self {
unsafe fn from_glib_borrow(
ptr: *mut gst_video_sys::GstVideoTimeCodeInterval,
) -> Borrowed<Self> {
assert!(!ptr.is_null());
VideoTimeCodeInterval(ptr::read(ptr))
Borrowed::new(VideoTimeCodeInterval(ptr::read(ptr)))
}
}

View file

@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 0a4cfc4)
from gir-files (https://github.com/gtk-rs/gir-files @ 4607c4a0)
Generated by gir (https://github.com/gtk-rs/gir @ 997cbcb)
from gir-files (https://github.com/gtk-rs/gir-files @ a57b90d4)

View file

@ -320,7 +320,7 @@ impl<O: IsA<Bin>> GstBinExt for O {
{
let f: &F = &*(f as *const F);
f(
&Bin::from_glib_borrow(this).unsafe_cast(),
&Bin::from_glib_borrow(this).unsafe_cast_ref(),
&from_glib_borrow(sub_bin),
&from_glib_borrow(element),
)
@ -354,7 +354,7 @@ impl<O: IsA<Bin>> GstBinExt for O {
{
let f: &F = &*(f as *const F);
f(
&Bin::from_glib_borrow(this).unsafe_cast(),
&Bin::from_glib_borrow(this).unsafe_cast_ref(),
&from_glib_borrow(sub_bin),
&from_glib_borrow(element),
)
@ -388,7 +388,7 @@ impl<O: IsA<Bin>> GstBinExt for O {
{
let f: &F = &*(f as *const F);
f(
&Bin::from_glib_borrow(this).unsafe_cast(),
&Bin::from_glib_borrow(this).unsafe_cast_ref(),
&from_glib_borrow(element),
)
}
@ -419,7 +419,7 @@ impl<O: IsA<Bin>> GstBinExt for O {
{
let f: &F = &*(f as *const F);
f(
&Bin::from_glib_borrow(this).unsafe_cast(),
&Bin::from_glib_borrow(this).unsafe_cast_ref(),
&from_glib_borrow(element),
)
}
@ -449,7 +449,7 @@ impl<O: IsA<Bin>> GstBinExt for O {
P: IsA<Bin>,
{
let f: &F = &*(f as *const F);
f(&Bin::from_glib_borrow(this).unsafe_cast())
f(&Bin::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -479,7 +479,7 @@ impl<O: IsA<Bin>> GstBinExt for O {
P: IsA<Bin>,
{
let f: &F = &*(f as *const F);
f(&Bin::from_glib_borrow(this).unsafe_cast())
f(&Bin::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);

View file

@ -153,7 +153,7 @@ impl<O: IsA<ChildProxy>> ChildProxyExt for O {
{
let f: &F = &*(f as *const F);
f(
&ChildProxy::from_glib_borrow(this).unsafe_cast(),
&ChildProxy::from_glib_borrow(this).unsafe_cast_ref(),
&from_glib_borrow(object),
&GString::from_glib_borrow(name),
)
@ -186,7 +186,7 @@ impl<O: IsA<ChildProxy>> ChildProxyExt for O {
{
let f: &F = &*(f as *const F);
f(
&ChildProxy::from_glib_borrow(this).unsafe_cast(),
&ChildProxy::from_glib_borrow(this).unsafe_cast_ref(),
&from_glib_borrow(object),
&GString::from_glib_borrow(name),
)

View file

@ -430,7 +430,7 @@ impl<O: IsA<Clock>> ClockExt for O {
{
let f: &F = &*(f as *const F);
f(
&Clock::from_glib_borrow(this).unsafe_cast(),
&Clock::from_glib_borrow(this).unsafe_cast_ref(),
from_glib(synced),
)
}
@ -457,7 +457,7 @@ impl<O: IsA<Clock>> ClockExt for O {
P: IsA<Clock>,
{
let f: &F = &*(f as *const F);
f(&Clock::from_glib_borrow(this).unsafe_cast())
f(&Clock::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -482,7 +482,7 @@ impl<O: IsA<Clock>> ClockExt for O {
P: IsA<Clock>,
{
let f: &F = &*(f as *const F);
f(&Clock::from_glib_borrow(this).unsafe_cast())
f(&Clock::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -510,7 +510,7 @@ impl<O: IsA<Clock>> ClockExt for O {
P: IsA<Clock>,
{
let f: &F = &*(f as *const F);
f(&Clock::from_glib_borrow(this).unsafe_cast())
f(&Clock::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);

View file

@ -134,7 +134,7 @@ impl<O: IsA<Device>> DeviceExt for O {
P: IsA<Device>,
{
let f: &F = &*(f as *const F);
f(&Device::from_glib_borrow(this).unsafe_cast())
f(&Device::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);

View file

@ -152,7 +152,7 @@ impl<O: IsA<DeviceMonitor>> DeviceMonitorExt for O {
P: IsA<DeviceMonitor>,
{
let f: &F = &*(f as *const F);
f(&DeviceMonitor::from_glib_borrow(this).unsafe_cast())
f(&DeviceMonitor::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);

View file

@ -188,7 +188,7 @@ impl<O: IsA<DeviceProvider>> DeviceProviderExt for O {
{
let f: &F = &*(f as *const F);
f(
&DeviceProvider::from_glib_borrow(this).unsafe_cast(),
&DeviceProvider::from_glib_borrow(this).unsafe_cast_ref(),
&GString::from_glib_borrow(object),
)
}
@ -219,7 +219,7 @@ impl<O: IsA<DeviceProvider>> DeviceProviderExt for O {
{
let f: &F = &*(f as *const F);
f(
&DeviceProvider::from_glib_borrow(this).unsafe_cast(),
&DeviceProvider::from_glib_borrow(this).unsafe_cast_ref(),
&GString::from_glib_borrow(object),
)
}

View file

@ -670,7 +670,7 @@ impl<O: IsA<Element>> ElementExt for O {
P: IsA<Element>,
{
let f: &F = &*(f as *const F);
f(&Element::from_glib_borrow(this).unsafe_cast())
f(&Element::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -696,7 +696,7 @@ impl<O: IsA<Element>> ElementExt for O {
{
let f: &F = &*(f as *const F);
f(
&Element::from_glib_borrow(this).unsafe_cast(),
&Element::from_glib_borrow(this).unsafe_cast_ref(),
&from_glib_borrow(new_pad),
)
}
@ -724,7 +724,7 @@ impl<O: IsA<Element>> ElementExt for O {
{
let f: &F = &*(f as *const F);
f(
&Element::from_glib_borrow(this).unsafe_cast(),
&Element::from_glib_borrow(this).unsafe_cast_ref(),
&from_glib_borrow(old_pad),
)
}

View file

@ -301,7 +301,7 @@ impl<O: IsA<Object>> GstObjectExt for O {
P: IsA<Object>,
{
let f: &F = &*(f as *const F);
f(&Object::from_glib_borrow(this).unsafe_cast())
f(&Object::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -326,7 +326,7 @@ impl<O: IsA<Object>> GstObjectExt for O {
P: IsA<Object>,
{
let f: &F = &*(f as *const F);
f(&Object::from_glib_borrow(this).unsafe_cast())
f(&Object::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);

View file

@ -573,7 +573,7 @@ impl<O: IsA<Pad>> PadExt for O {
{
let f: &F = &*(f as *const F);
f(
&Pad::from_glib_borrow(this).unsafe_cast(),
&Pad::from_glib_borrow(this).unsafe_cast_ref(),
&from_glib_borrow(peer),
)
}
@ -601,7 +601,7 @@ impl<O: IsA<Pad>> PadExt for O {
{
let f: &F = &*(f as *const F);
f(
&Pad::from_glib_borrow(this).unsafe_cast(),
&Pad::from_glib_borrow(this).unsafe_cast_ref(),
&from_glib_borrow(peer),
)
}
@ -628,7 +628,7 @@ impl<O: IsA<Pad>> PadExt for O {
P: IsA<Pad>,
{
let f: &F = &*(f as *const F);
f(&Pad::from_glib_borrow(this).unsafe_cast())
f(&Pad::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -653,7 +653,7 @@ impl<O: IsA<Pad>> PadExt for O {
P: IsA<Pad>,
{
let f: &F = &*(f as *const F);
f(&Pad::from_glib_borrow(this).unsafe_cast())
f(&Pad::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -678,7 +678,7 @@ impl<O: IsA<Pad>> PadExt for O {
P: IsA<Pad>,
{
let f: &F = &*(f as *const F);
f(&Pad::from_glib_borrow(this).unsafe_cast())
f(&Pad::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);

View file

@ -159,7 +159,7 @@ impl<O: IsA<Pipeline>> PipelineExt for O {
P: IsA<Pipeline>,
{
let f: &F = &*(f as *const F);
f(&Pipeline::from_glib_borrow(this).unsafe_cast())
f(&Pipeline::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -186,7 +186,7 @@ impl<O: IsA<Pipeline>> PipelineExt for O {
P: IsA<Pipeline>,
{
let f: &F = &*(f as *const F);
f(&Pipeline::from_glib_borrow(this).unsafe_cast())
f(&Pipeline::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
@ -211,7 +211,7 @@ impl<O: IsA<Pipeline>> PipelineExt for O {
P: IsA<Pipeline>,
{
let f: &F = &*(f as *const F);
f(&Pipeline::from_glib_borrow(this).unsafe_cast())
f(&Pipeline::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);

View file

@ -94,7 +94,7 @@ impl<O: IsA<SystemClock>> SystemClockExt for O {
P: IsA<SystemClock>,
{
let f: &F = &*(f as *const F);
f(&SystemClock::from_glib_borrow(this).unsafe_cast())
f(&SystemClock::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);

View file

@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 0a4cfc4)
from gir-files (https://github.com/gtk-rs/gir-files @ 4607c4a0)
Generated by gir (https://github.com/gtk-rs/gir @ 997cbcb)
from gir-files (https://github.com/gtk-rs/gir-files @ a57b90d4)

View file

@ -214,10 +214,10 @@ where
P: IsA<Bin>,
{
let f: &F = &*(f as *const F);
match f(&Bin::from_glib_borrow(this).unsafe_cast()) {
match f(&Bin::from_glib_borrow(this).unsafe_cast_ref()) {
Ok(()) => true,
Err(err) => {
err.log_with_object(&Bin::from_glib_borrow(this));
err.log_with_object(&*Bin::from_glib_borrow(this));
false
}
}

View file

@ -768,7 +768,7 @@ impl<O: IsA<Element>> ElementExtManual for O {
let user_data: &mut Option<F> = &mut *(user_data as *mut _);
let callback = user_data.take().unwrap();
callback(&Element::from_glib_borrow(element).unsafe_cast());
callback(&Element::from_glib_borrow(element).unsafe_cast_ref());
}
unsafe extern "C" fn free_user_data<O: IsA<Element>, F: FnOnce(&O) + Send + 'static>(

View file

@ -35,7 +35,6 @@ pub enum IteratorError {
// Implemented manually so that we can use generics for the item
pub struct Iterator<T> {
iter: ptr::NonNull<gst_sys::GstIterator>,
borrowed: bool,
phantom: PhantomData<T>,
}
@ -463,19 +462,16 @@ impl<T> fmt::Debug for Iterator<T> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.debug_struct("Iterator")
.field("iter", &self.iter)
.field("borrowed", &self.borrowed)
.finish()
}
}
impl<T> Drop for Iterator<T> {
fn drop(&mut self) {
if !self.borrowed {
unsafe {
gst_sys::gst_iterator_free(self.iter.as_ptr());
}
}
}
}
impl<T> iter::IntoIterator for Iterator<T>
@ -584,17 +580,16 @@ impl<T: StaticType> glib::translate::FromGlibPtrNone<*mut gst_sys::GstIterator>
#[doc(hidden)]
impl<T: StaticType> glib::translate::FromGlibPtrBorrow<*mut gst_sys::GstIterator> for Iterator<T> {
#[inline]
unsafe fn from_glib_borrow(ptr: *mut gst_sys::GstIterator) -> Self {
unsafe fn from_glib_borrow(ptr: *mut gst_sys::GstIterator) -> Borrowed<Self> {
assert!(!ptr.is_null());
assert_ne!(
gobject_sys::g_type_is_a((*ptr).type_, T::static_type().to_glib()),
glib_sys::GFALSE
);
Self {
Borrowed::new(Self {
iter: ptr::NonNull::new_unchecked(ptr),
borrowed: true,
phantom: PhantomData,
}
})
}
}
@ -609,7 +604,6 @@ impl<T: StaticType> glib::translate::FromGlibPtrFull<*mut gst_sys::GstIterator>
);
Self {
iter: ptr::NonNull::new_unchecked(ptr),
borrowed: false,
phantom: PhantomData,
}
}

View file

@ -19,7 +19,7 @@ use once_cell::sync::Lazy;
use gobject_sys;
use gst_sys;
use glib::translate::{from_glib, from_glib_borrow, ToGlib, ToGlibPtr};
use glib::translate::*;
use glib::IsA;
use glib_sys::gpointer;
@ -329,7 +329,7 @@ unsafe extern "C" fn log_handler<T>(
let file = CStr::from_ptr(file).to_string_lossy();
let function = CStr::from_ptr(function).to_string_lossy();
let line = line as u32;
let object: Option<glib::Object> = from_glib_borrow(object);
let object: Borrowed<Option<glib::Object>> = from_glib_borrow(object);
let message = DebugMessage(ptr::NonNull::new_unchecked(message));
let handler = &*(user_data as *mut T);
(handler)(
@ -338,7 +338,7 @@ unsafe extern "C" fn log_handler<T>(
&file,
&function,
line,
object.as_ref(),
object.as_ref().as_ref(),
&message,
);
}

View file

@ -12,11 +12,7 @@ use std::ptr;
use std::{borrow, fmt, ops};
use glib;
use glib::translate::{
from_glib, from_glib_full, from_glib_none, FromGlibContainerAsVec,
FromGlibPtrArrayContainerAsVec, FromGlibPtrBorrow, FromGlibPtrFull, FromGlibPtrNone,
GlibPtrDefault, Stash, StashMut, ToGlibContainerFromSlice, ToGlibPtr, ToGlibPtrMut,
};
use glib::translate::*;
use glib_sys;
use glib_sys::gpointer;
use gobject_sys;
@ -24,7 +20,6 @@ use gst_sys;
pub struct GstRc<T: MiniObject> {
obj: ptr::NonNull<T>,
borrowed: bool,
phantom: PhantomData<T>,
}
@ -36,7 +31,6 @@ impl<T: MiniObject> GstRc<T> {
GstRc {
obj: ptr::NonNull::new_unchecked(ptr as *mut T::GstType as *mut T),
borrowed: false,
phantom: PhantomData,
}
}
@ -46,19 +40,17 @@ impl<T: MiniObject> GstRc<T> {
GstRc {
obj: ptr::NonNull::new_unchecked(ptr as *mut T::GstType as *mut T),
borrowed: false,
phantom: PhantomData,
}
}
pub unsafe fn from_glib_borrow(ptr: *const T::GstType) -> Self {
pub unsafe fn from_glib_borrow(ptr: *const T::GstType) -> Borrowed<Self> {
assert!(!ptr.is_null());
GstRc {
Borrowed::new(GstRc {
obj: ptr::NonNull::new_unchecked(ptr as *mut T::GstType as *mut T),
borrowed: true,
phantom: PhantomData,
}
})
}
pub unsafe fn replace_ptr(&mut self, ptr: *mut T::GstType) {
@ -153,12 +145,10 @@ impl<T: MiniObject> Clone for GstRc<T> {
impl<T: MiniObject> Drop for GstRc<T> {
fn drop(&mut self) {
if !self.borrowed {
unsafe {
gst_sys::gst_mini_object_unref(self.as_mut_ptr() as *mut gst_sys::GstMiniObject);
}
}
}
}
unsafe impl<T: MiniObject + Sync + Send> Sync for GstRc<T> {}
@ -363,13 +353,13 @@ impl<T: MiniObject + 'static> FromGlibPtrFull<*mut T::GstType> for GstRc<T> {
}
impl<T: MiniObject + 'static> FromGlibPtrBorrow<*const T::GstType> for GstRc<T> {
unsafe fn from_glib_borrow(ptr: *const T::GstType) -> Self {
unsafe fn from_glib_borrow(ptr: *const T::GstType) -> Borrowed<Self> {
Self::from_glib_borrow(ptr)
}
}
impl<T: MiniObject + 'static> FromGlibPtrBorrow<*mut T::GstType> for GstRc<T> {
unsafe fn from_glib_borrow(ptr: *mut T::GstType) -> Self {
unsafe fn from_glib_borrow(ptr: *mut T::GstType) -> Borrowed<Self> {
Self::from_glib_borrow(ptr)
}
}
@ -524,8 +514,13 @@ macro_rules! gst_define_mini_object_wrapper(
$name($crate::glib::translate::from_glib_full(ptr))
}
pub unsafe fn from_glib_borrow(ptr: *const $gst_sys_name) -> Self {
$name($crate::glib::translate::from_glib_borrow(ptr))
pub unsafe fn from_glib_borrow(ptr: *const $gst_sys_name) -> $crate::glib::translate::Borrowed<Self> {
$crate::glib::translate::Borrowed::new(
$name(
$crate::glib::translate::from_glib_borrow::<_, $crate::GstRc::<$ref_name>>(ptr)
.into_inner()
)
)
}
pub unsafe fn into_ptr(self) -> *mut $gst_sys_name {
@ -725,13 +720,13 @@ macro_rules! gst_define_mini_object_wrapper(
}
impl $crate::glib::translate::FromGlibPtrBorrow<*const $gst_sys_name> for $name {
unsafe fn from_glib_borrow(ptr: *const $gst_sys_name) -> Self {
unsafe fn from_glib_borrow(ptr: *const $gst_sys_name) -> $crate::glib::translate::Borrowed<Self> {
Self::from_glib_borrow(ptr)
}
}
impl $crate::glib::translate::FromGlibPtrBorrow<*mut $gst_sys_name> for $name {
unsafe fn from_glib_borrow(ptr: *mut $gst_sys_name) -> Self {
unsafe fn from_glib_borrow(ptr: *mut $gst_sys_name) -> $crate::glib::translate::Borrowed<Self> {
Self::from_glib_borrow(ptr)
}
}

View file

@ -42,7 +42,7 @@ impl<O: IsA<::Object>> GstObjectExtManual for O {
"deep-notify".into()
};
let obj: glib::Object =
let obj: Borrowed<glib::Object> =
unsafe { from_glib_borrow(self.as_ptr() as *mut gobject_sys::GObject) };
obj.connect(signal_name.as_str(), false, move |values| {

Some files were not shown because too many files have changed in this diff Show more