gstreamer: Use obj() instead of instance() in the remaining places

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1202>
This commit is contained in:
Sebastian Dröge 2023-01-21 20:58:06 +02:00
parent 7ca1834cd6
commit b54746cf62

View file

@ -37,10 +37,7 @@ impl<T: AllocatorImpl> AllocatorImplExt for T {
if let Some(f) = (*parent_class).alloc { if let Some(f) = (*parent_class).alloc {
from_glib_full::<*mut ffi::GstMemory, Option<_>>(f( from_glib_full::<*mut ffi::GstMemory, Option<_>>(f(
self.instance() self.obj().unsafe_cast_ref::<Allocator>().to_glib_none().0,
.unsafe_cast_ref::<Allocator>()
.to_glib_none()
.0,
size, size,
mut_override(params.to_glib_none().0), mut_override(params.to_glib_none().0),
)) ))
@ -58,10 +55,7 @@ impl<T: AllocatorImpl> AllocatorImplExt for T {
if let Some(f) = (*parent_class).free { if let Some(f) = (*parent_class).free {
f( f(
self.instance() self.obj().unsafe_cast_ref::<Allocator>().to_glib_none().0,
.unsafe_cast_ref::<Allocator>()
.to_glib_none()
.0,
memory.into_glib_ptr(), memory.into_glib_ptr(),
) )
} }