Regenerate everything with latest gir

This commit is contained in:
Sebastian Dröge 2019-07-10 11:21:28 +03:00
parent 606525b430
commit bde6a04780
30 changed files with 191 additions and 123 deletions

View file

@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 20feecf) Generated by gir (https://github.com/gtk-rs/gir @ fb0b31c)
from gir-files (https://github.com/gtk-rs/gir-files @ ???) from gir-files (https://github.com/gtk-rs/gir-files @ ???)

View file

@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 20feecf) Generated by gir (https://github.com/gtk-rs/gir @ fb0b31c)
from gir-files (https://github.com/gtk-rs/gir-files @ ???) from gir-files (https://github.com/gtk-rs/gir-files @ ???)

View file

@ -122,15 +122,16 @@ impl Adapter {
size: usize, size: usize,
) -> (isize, u32) { ) -> (isize, u32) {
unsafe { unsafe {
let mut value = mem::uninitialized(); let mut value = mem::MaybeUninit::uninit();
let ret = gst_base_sys::gst_adapter_masked_scan_uint32_peek( let ret = gst_base_sys::gst_adapter_masked_scan_uint32_peek(
self.to_glib_none().0, self.to_glib_none().0,
mask, mask,
pattern, pattern,
offset, offset,
size, size,
&mut value, value.as_mut_ptr(),
); );
let value = value.assume_init();
(ret, value) (ret, value)
} }
} }
@ -142,23 +143,25 @@ impl Adapter {
pub fn prev_dts(&self) -> (gst::ClockTime, u64) { pub fn prev_dts(&self) -> (gst::ClockTime, u64) {
unsafe { unsafe {
let mut distance = mem::uninitialized(); let mut distance = mem::MaybeUninit::uninit();
let ret = from_glib(gst_base_sys::gst_adapter_prev_dts( let ret = from_glib(gst_base_sys::gst_adapter_prev_dts(
self.to_glib_none().0, self.to_glib_none().0,
&mut distance, distance.as_mut_ptr(),
)); ));
let distance = distance.assume_init();
(ret, distance) (ret, distance)
} }
} }
pub fn prev_dts_at_offset(&self, offset: usize) -> (gst::ClockTime, u64) { pub fn prev_dts_at_offset(&self, offset: usize) -> (gst::ClockTime, u64) {
unsafe { unsafe {
let mut distance = mem::uninitialized(); let mut distance = mem::MaybeUninit::uninit();
let ret = from_glib(gst_base_sys::gst_adapter_prev_dts_at_offset( let ret = from_glib(gst_base_sys::gst_adapter_prev_dts_at_offset(
self.to_glib_none().0, self.to_glib_none().0,
offset, offset,
&mut distance, distance.as_mut_ptr(),
)); ));
let distance = distance.assume_init();
(ret, distance) (ret, distance)
} }
} }
@ -166,31 +169,35 @@ impl Adapter {
#[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
pub fn prev_offset(&self) -> (u64, u64) { pub fn prev_offset(&self) -> (u64, u64) {
unsafe { unsafe {
let mut distance = mem::uninitialized(); let mut distance = mem::MaybeUninit::uninit();
let ret = gst_base_sys::gst_adapter_prev_offset(self.to_glib_none().0, &mut distance); let ret =
gst_base_sys::gst_adapter_prev_offset(self.to_glib_none().0, distance.as_mut_ptr());
let distance = distance.assume_init();
(ret, distance) (ret, distance)
} }
} }
pub fn prev_pts(&self) -> (gst::ClockTime, u64) { pub fn prev_pts(&self) -> (gst::ClockTime, u64) {
unsafe { unsafe {
let mut distance = mem::uninitialized(); let mut distance = mem::MaybeUninit::uninit();
let ret = from_glib(gst_base_sys::gst_adapter_prev_pts( let ret = from_glib(gst_base_sys::gst_adapter_prev_pts(
self.to_glib_none().0, self.to_glib_none().0,
&mut distance, distance.as_mut_ptr(),
)); ));
let distance = distance.assume_init();
(ret, distance) (ret, distance)
} }
} }
pub fn prev_pts_at_offset(&self, offset: usize) -> (gst::ClockTime, u64) { pub fn prev_pts_at_offset(&self, offset: usize) -> (gst::ClockTime, u64) {
unsafe { unsafe {
let mut distance = mem::uninitialized(); let mut distance = mem::MaybeUninit::uninit();
let ret = from_glib(gst_base_sys::gst_adapter_prev_pts_at_offset( let ret = from_glib(gst_base_sys::gst_adapter_prev_pts_at_offset(
self.to_glib_none().0, self.to_glib_none().0,
offset, offset,
&mut distance, distance.as_mut_ptr(),
)); ));
let distance = distance.assume_init();
(ret, distance) (ret, distance)
} }
} }

View file

@ -268,17 +268,21 @@ impl<O: IsA<BaseSink>> BaseSinkExt for O {
fn query_latency(&self) -> Option<(bool, bool, gst::ClockTime, gst::ClockTime)> { fn query_latency(&self) -> Option<(bool, bool, gst::ClockTime, gst::ClockTime)> {
unsafe { unsafe {
let mut live = mem::uninitialized(); let mut live = mem::MaybeUninit::uninit();
let mut upstream_live = mem::uninitialized(); let mut upstream_live = mem::MaybeUninit::uninit();
let mut min_latency = mem::uninitialized(); let mut min_latency = mem::MaybeUninit::uninit();
let mut max_latency = mem::uninitialized(); let mut max_latency = mem::MaybeUninit::uninit();
let ret = from_glib(gst_base_sys::gst_base_sink_query_latency( let ret = from_glib(gst_base_sys::gst_base_sink_query_latency(
self.as_ref().to_glib_none().0, self.as_ref().to_glib_none().0,
&mut live, live.as_mut_ptr(),
&mut upstream_live, upstream_live.as_mut_ptr(),
&mut min_latency, min_latency.as_mut_ptr(),
&mut max_latency, max_latency.as_mut_ptr(),
)); ));
let live = live.assume_init();
let upstream_live = upstream_live.assume_init();
let min_latency = min_latency.assume_init();
let max_latency = max_latency.assume_init();
if ret { if ret {
Some(( Some((
from_glib(live), from_glib(live),
@ -392,12 +396,13 @@ impl<O: IsA<BaseSink>> BaseSinkExt for O {
fn wait_clock(&self, time: gst::ClockTime) -> (gst::ClockReturn, gst::ClockTimeDiff) { fn wait_clock(&self, time: gst::ClockTime) -> (gst::ClockReturn, gst::ClockTimeDiff) {
unsafe { unsafe {
let mut jitter = mem::uninitialized(); let mut jitter = mem::MaybeUninit::uninit();
let ret = from_glib(gst_base_sys::gst_base_sink_wait_clock( let ret = from_glib(gst_base_sys::gst_base_sink_wait_clock(
self.as_ref().to_glib_none().0, self.as_ref().to_glib_none().0,
time.to_glib(), time.to_glib(),
&mut jitter, jitter.as_mut_ptr(),
)); ));
let jitter = jitter.assume_init();
(ret, jitter) (ret, jitter)
} }
} }

View file

@ -147,15 +147,18 @@ impl<O: IsA<BaseSrc>> BaseSrcExt for O {
fn query_latency(&self) -> Option<(bool, gst::ClockTime, gst::ClockTime)> { fn query_latency(&self) -> Option<(bool, gst::ClockTime, gst::ClockTime)> {
unsafe { unsafe {
let mut live = mem::uninitialized(); let mut live = mem::MaybeUninit::uninit();
let mut min_latency = mem::uninitialized(); let mut min_latency = mem::MaybeUninit::uninit();
let mut max_latency = mem::uninitialized(); let mut max_latency = mem::MaybeUninit::uninit();
let ret = from_glib(gst_base_sys::gst_base_src_query_latency( let ret = from_glib(gst_base_sys::gst_base_src_query_latency(
self.as_ref().to_glib_none().0, self.as_ref().to_glib_none().0,
&mut live, live.as_mut_ptr(),
&mut min_latency, min_latency.as_mut_ptr(),
&mut max_latency, max_latency.as_mut_ptr(),
)); ));
let live = live.assume_init();
let min_latency = min_latency.assume_init();
let max_latency = max_latency.assume_init();
if ret { if ret {
Some(( Some((
from_glib(live), from_glib(live),

View file

@ -24,12 +24,13 @@ pub fn type_find_helper_for_buffer<P: IsA<gst::Object>>(
) -> (Option<gst::Caps>, gst::TypeFindProbability) { ) -> (Option<gst::Caps>, gst::TypeFindProbability) {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
unsafe { unsafe {
let mut prob = mem::uninitialized(); let mut prob = mem::MaybeUninit::uninit();
let ret = from_glib_full(gst_base_sys::gst_type_find_helper_for_buffer( let ret = from_glib_full(gst_base_sys::gst_type_find_helper_for_buffer(
obj.map(|p| p.as_ref()).to_glib_none().0, obj.map(|p| p.as_ref()).to_glib_none().0,
buf.to_glib_none().0, buf.to_glib_none().0,
&mut prob, prob.as_mut_ptr(),
)); ));
let prob = prob.assume_init();
(ret, from_glib(prob)) (ret, from_glib(prob))
} }
} }
@ -42,15 +43,16 @@ pub fn type_find_helper_for_buffer_with_extension<P: IsA<gst::Object>>(
) -> (Option<gst::Caps>, gst::TypeFindProbability) { ) -> (Option<gst::Caps>, gst::TypeFindProbability) {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
unsafe { unsafe {
let mut prob = mem::uninitialized(); let mut prob = mem::MaybeUninit::uninit();
let ret = from_glib_full( let ret = from_glib_full(
gst_base_sys::gst_type_find_helper_for_buffer_with_extension( gst_base_sys::gst_type_find_helper_for_buffer_with_extension(
obj.map(|p| p.as_ref()).to_glib_none().0, obj.map(|p| p.as_ref()).to_glib_none().0,
buf.to_glib_none().0, buf.to_glib_none().0,
extension.to_glib_none().0, extension.to_glib_none().0,
&mut prob, prob.as_mut_ptr(),
), ),
); );
let prob = prob.assume_init();
(ret, from_glib(prob)) (ret, from_glib(prob))
} }
} }
@ -64,14 +66,15 @@ pub fn type_find_helper_for_data_with_extension<P: IsA<gst::Object>>(
assert_initialized_main_thread!(); assert_initialized_main_thread!();
let size = data.len() as usize; let size = data.len() as usize;
unsafe { unsafe {
let mut prob = mem::uninitialized(); let mut prob = mem::MaybeUninit::uninit();
let ret = from_glib_full(gst_base_sys::gst_type_find_helper_for_data_with_extension( let ret = from_glib_full(gst_base_sys::gst_type_find_helper_for_data_with_extension(
obj.map(|p| p.as_ref()).to_glib_none().0, obj.map(|p| p.as_ref()).to_glib_none().0,
data.to_glib_none().0, data.to_glib_none().0,
size, size,
extension.to_glib_none().0, extension.to_glib_none().0,
&mut prob, prob.as_mut_ptr(),
)); ));
let prob = prob.assume_init();
(ret, from_glib(prob)) (ret, from_glib(prob))
} }
} }

View file

@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 20feecf) Generated by gir (https://github.com/gtk-rs/gir @ fb0b31c)
from gir-files (https://github.com/gtk-rs/gir-files @ ???) from gir-files (https://github.com/gtk-rs/gir-files @ ???)

View file

@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 20feecf) Generated by gir (https://github.com/gtk-rs/gir @ fb0b31c)
from gir-files (https://github.com/gtk-rs/gir-files @ ???) from gir-files (https://github.com/gtk-rs/gir-files @ ???)

View file

@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 20feecf) Generated by gir (https://github.com/gtk-rs/gir @ fb0b31c)
from gir-files (https://github.com/gtk-rs/gir-files @ ???) from gir-files (https://github.com/gtk-rs/gir-files @ ???)

View file

@ -43,13 +43,15 @@ impl GLContext {
pub fn get_current_gl_api(platform: GLPlatform) -> (GLAPI, u32, u32) { pub fn get_current_gl_api(platform: GLPlatform) -> (GLAPI, u32, u32) {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
unsafe { unsafe {
let mut major = mem::uninitialized(); let mut major = mem::MaybeUninit::uninit();
let mut minor = mem::uninitialized(); let mut minor = mem::MaybeUninit::uninit();
let ret = from_glib(gst_gl_sys::gst_gl_context_get_current_gl_api( let ret = from_glib(gst_gl_sys::gst_gl_context_get_current_gl_api(
platform.to_glib(), platform.to_glib(),
&mut major, major.as_mut_ptr(),
&mut minor, minor.as_mut_ptr(),
)); ));
let major = major.assume_init();
let minor = minor.assume_init();
(ret, major, minor) (ret, major, minor)
} }
} }
@ -234,26 +236,30 @@ impl<O: IsA<GLContext>> GLContextExt for O {
fn get_gl_platform_version(&self) -> (i32, i32) { fn get_gl_platform_version(&self) -> (i32, i32) {
unsafe { unsafe {
let mut major = mem::uninitialized(); let mut major = mem::MaybeUninit::uninit();
let mut minor = mem::uninitialized(); let mut minor = mem::MaybeUninit::uninit();
gst_gl_sys::gst_gl_context_get_gl_platform_version( gst_gl_sys::gst_gl_context_get_gl_platform_version(
self.as_ref().to_glib_none().0, self.as_ref().to_glib_none().0,
&mut major, major.as_mut_ptr(),
&mut minor, minor.as_mut_ptr(),
); );
let major = major.assume_init();
let minor = minor.assume_init();
(major, minor) (major, minor)
} }
} }
fn get_gl_version(&self) -> (i32, i32) { fn get_gl_version(&self) -> (i32, i32) {
unsafe { unsafe {
let mut maj = mem::uninitialized(); let mut maj = mem::MaybeUninit::uninit();
let mut min = mem::uninitialized(); let mut min = mem::MaybeUninit::uninit();
gst_gl_sys::gst_gl_context_get_gl_version( gst_gl_sys::gst_gl_context_get_gl_version(
self.as_ref().to_glib_none().0, self.as_ref().to_glib_none().0,
&mut maj, maj.as_mut_ptr(),
&mut min, min.as_mut_ptr(),
); );
let maj = maj.assume_init();
let min = min.assume_init();
(maj, min) (maj, min)
} }
} }

View file

@ -77,13 +77,15 @@ impl<O: IsA<GLFramebuffer>> GLFramebufferExt for O {
fn get_effective_dimensions(&self) -> (u32, u32) { fn get_effective_dimensions(&self) -> (u32, u32) {
unsafe { unsafe {
let mut width = mem::uninitialized(); let mut width = mem::MaybeUninit::uninit();
let mut height = mem::uninitialized(); let mut height = mem::MaybeUninit::uninit();
gst_gl_sys::gst_gl_framebuffer_get_effective_dimensions( gst_gl_sys::gst_gl_framebuffer_get_effective_dimensions(
self.as_ref().to_glib_none().0, self.as_ref().to_glib_none().0,
&mut width, width.as_mut_ptr(),
&mut height, height.as_mut_ptr(),
); );
let width = width.assume_init();
let height = height.assume_init();
(width, height) (width, height)
} }
} }

View file

@ -116,13 +116,15 @@ impl<O: IsA<GLWindow>> GLWindowExt for O {
fn get_surface_dimensions(&self) -> (u32, u32) { fn get_surface_dimensions(&self) -> (u32, u32) {
unsafe { unsafe {
let mut width = mem::uninitialized(); let mut width = mem::MaybeUninit::uninit();
let mut height = mem::uninitialized(); let mut height = mem::MaybeUninit::uninit();
gst_gl_sys::gst_gl_window_get_surface_dimensions( gst_gl_sys::gst_gl_window_get_surface_dimensions(
self.as_ref().to_glib_none().0, self.as_ref().to_glib_none().0,
&mut width, width.as_mut_ptr(),
&mut height, height.as_mut_ptr(),
); );
let width = width.assume_init();
let height = height.assume_init();
(width, height) (width, height)
} }
} }

View file

@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 20feecf) Generated by gir (https://github.com/gtk-rs/gir @ fb0b31c)
from gir-files (https://github.com/gtk-rs/gir-files @ ???) from gir-files (https://github.com/gtk-rs/gir-files @ ???)

View file

@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 20feecf) Generated by gir (https://github.com/gtk-rs/gir @ fb0b31c)
from gir-files (https://github.com/gtk-rs/gir-files @ ???) from gir-files (https://github.com/gtk-rs/gir-files @ ???)

View file

@ -56,11 +56,20 @@ pub fn pb_utils_get_source_description(protocol: &str) -> Option<GString> {
pub fn plugins_base_version() -> (u32, u32, u32, u32) { pub fn plugins_base_version() -> (u32, u32, u32, u32) {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
unsafe { unsafe {
let mut major = mem::uninitialized(); let mut major = mem::MaybeUninit::uninit();
let mut minor = mem::uninitialized(); let mut minor = mem::MaybeUninit::uninit();
let mut micro = mem::uninitialized(); let mut micro = mem::MaybeUninit::uninit();
let mut nano = mem::uninitialized(); let mut nano = mem::MaybeUninit::uninit();
gst_pbutils_sys::gst_plugins_base_version(&mut major, &mut minor, &mut micro, &mut nano); gst_pbutils_sys::gst_plugins_base_version(
major.as_mut_ptr(),
minor.as_mut_ptr(),
micro.as_mut_ptr(),
nano.as_mut_ptr(),
);
let major = major.assume_init();
let minor = minor.assume_init();
let micro = micro.assume_init();
let nano = nano.assume_init();
(major, minor, micro, nano) (major, minor, micro, nano)
} }
} }

View file

@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 20feecf) Generated by gir (https://github.com/gtk-rs/gir @ fb0b31c)
from gir-files (https://github.com/gtk-rs/gir-files @ ???) from gir-files (https://github.com/gtk-rs/gir-files @ ???)

View file

@ -34,17 +34,21 @@ impl PlayerVideoOverlayVideoRenderer {
pub fn get_render_rectangle(&self) -> (i32, i32, i32, i32) { pub fn get_render_rectangle(&self) -> (i32, i32, i32, i32) {
unsafe { unsafe {
let mut x = mem::uninitialized(); let mut x = mem::MaybeUninit::uninit();
let mut y = mem::uninitialized(); let mut y = mem::MaybeUninit::uninit();
let mut width = mem::uninitialized(); let mut width = mem::MaybeUninit::uninit();
let mut height = mem::uninitialized(); let mut height = mem::MaybeUninit::uninit();
gst_player_sys::gst_player_video_overlay_video_renderer_get_render_rectangle( gst_player_sys::gst_player_video_overlay_video_renderer_get_render_rectangle(
self.to_glib_none().0, self.to_glib_none().0,
&mut x, x.as_mut_ptr(),
&mut y, y.as_mut_ptr(),
&mut width, width.as_mut_ptr(),
&mut height, height.as_mut_ptr(),
); );
let x = x.assume_init();
let y = y.assume_init();
let width = width.assume_init();
let height = height.assume_init();
(x, y, width, height) (x, y, width, height)
} }
} }

View file

@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 20feecf) Generated by gir (https://github.com/gtk-rs/gir @ fb0b31c)
from gir-files (https://github.com/gtk-rs/gir-files @ ???) from gir-files (https://github.com/gtk-rs/gir-files @ ???)

View file

@ -68,12 +68,13 @@ impl<O: IsA<RTSPMountPoints>> RTSPMountPointsExt for O {
fn match_(&self, path: &str) -> (RTSPMediaFactory, i32) { fn match_(&self, path: &str) -> (RTSPMediaFactory, i32) {
unsafe { unsafe {
let mut matched = mem::uninitialized(); let mut matched = mem::MaybeUninit::uninit();
let ret = from_glib_full(gst_rtsp_server_sys::gst_rtsp_mount_points_match( let ret = from_glib_full(gst_rtsp_server_sys::gst_rtsp_mount_points_match(
self.as_ref().to_glib_none().0, self.as_ref().to_glib_none().0,
path.to_glib_none().0, path.to_glib_none().0,
&mut matched, matched.as_mut_ptr(),
)); ));
let matched = matched.assume_init();
(ret, matched) (ret, matched)
} }
} }

View file

@ -154,12 +154,13 @@ impl<O: IsA<RTSPSession>> RTSPSessionExt for O {
fn get_media(&self, path: &str) -> (Option<RTSPSessionMedia>, i32) { fn get_media(&self, path: &str) -> (Option<RTSPSessionMedia>, i32) {
unsafe { unsafe {
let mut matched = mem::uninitialized(); let mut matched = mem::MaybeUninit::uninit();
let ret = from_glib_none(gst_rtsp_server_sys::gst_rtsp_session_get_media( let ret = from_glib_none(gst_rtsp_server_sys::gst_rtsp_session_get_media(
self.as_ref().to_glib_none().0, self.as_ref().to_glib_none().0,
path.to_glib_none().0, path.to_glib_none().0,
&mut matched, matched.as_mut_ptr(),
)); ));
let matched = matched.assume_init();
(ret, matched) (ret, matched)
} }
} }

View file

@ -111,12 +111,13 @@ impl<O: IsA<RTSPSessionMedia>> RTSPSessionMediaExt for O {
fn matches(&self, path: &str) -> Option<i32> { fn matches(&self, path: &str) -> Option<i32> {
unsafe { unsafe {
let mut matched = mem::uninitialized(); let mut matched = mem::MaybeUninit::uninit();
let ret = from_glib(gst_rtsp_server_sys::gst_rtsp_session_media_matches( let ret = from_glib(gst_rtsp_server_sys::gst_rtsp_session_media_matches(
self.as_ref().to_glib_none().0, self.as_ref().to_glib_none().0,
path.to_glib_none().0, path.to_glib_none().0,
&mut matched, matched.as_mut_ptr(),
)); ));
let matched = matched.assume_init();
if ret { if ret {
Some(matched) Some(matched)
} else { } else {

View file

@ -527,17 +527,21 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
fn get_rtpinfo(&self) -> Option<(u32, u32, u32, gst::ClockTime)> { fn get_rtpinfo(&self) -> Option<(u32, u32, u32, gst::ClockTime)> {
unsafe { unsafe {
let mut rtptime = mem::uninitialized(); let mut rtptime = mem::MaybeUninit::uninit();
let mut seq = mem::uninitialized(); let mut seq = mem::MaybeUninit::uninit();
let mut clock_rate = mem::uninitialized(); let mut clock_rate = mem::MaybeUninit::uninit();
let mut running_time = mem::uninitialized(); let mut running_time = mem::MaybeUninit::uninit();
let ret = from_glib(gst_rtsp_server_sys::gst_rtsp_stream_get_rtpinfo( let ret = from_glib(gst_rtsp_server_sys::gst_rtsp_stream_get_rtpinfo(
self.as_ref().to_glib_none().0, self.as_ref().to_glib_none().0,
&mut rtptime, rtptime.as_mut_ptr(),
&mut seq, seq.as_mut_ptr(),
&mut clock_rate, clock_rate.as_mut_ptr(),
&mut running_time, running_time.as_mut_ptr(),
)); ));
let rtptime = rtptime.assume_init();
let seq = seq.assume_init();
let clock_rate = clock_rate.assume_init();
let running_time = running_time.assume_init();
if ret { if ret {
Some((rtptime, seq, clock_rate, from_glib(running_time))) Some((rtptime, seq, clock_rate, from_glib(running_time)))
} else { } else {
@ -584,11 +588,12 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
fn get_ssrc(&self) -> u32 { fn get_ssrc(&self) -> u32 {
unsafe { unsafe {
let mut ssrc = mem::uninitialized(); let mut ssrc = mem::MaybeUninit::uninit();
gst_rtsp_server_sys::gst_rtsp_stream_get_ssrc( gst_rtsp_server_sys::gst_rtsp_stream_get_ssrc(
self.as_ref().to_glib_none().0, self.as_ref().to_glib_none().0,
&mut ssrc, ssrc.as_mut_ptr(),
); );
let ssrc = ssrc.assume_init();
ssrc ssrc
} }
} }

View file

@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 20feecf) Generated by gir (https://github.com/gtk-rs/gir @ fb0b31c)
from gir-files (https://github.com/gtk-rs/gir-files @ ???) from gir-files (https://github.com/gtk-rs/gir-files @ ???)

View file

@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 20feecf) Generated by gir (https://github.com/gtk-rs/gir @ fb0b31c)
from gir-files (https://github.com/gtk-rs/gir-files @ ???) from gir-files (https://github.com/gtk-rs/gir-files @ ???)

View file

@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 20feecf) Generated by gir (https://github.com/gtk-rs/gir @ fb0b31c)
from gir-files (https://github.com/gtk-rs/gir-files @ ???) from gir-files (https://github.com/gtk-rs/gir-files @ ???)

View file

@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 20feecf) Generated by gir (https://github.com/gtk-rs/gir @ fb0b31c)
from gir-files (https://github.com/gtk-rs/gir-files @ ???) from gir-files (https://github.com/gtk-rs/gir-files @ ???)

View file

@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 20feecf) Generated by gir (https://github.com/gtk-rs/gir @ fb0b31c)
from gir-files (https://github.com/gtk-rs/gir-files @ ???) from gir-files (https://github.com/gtk-rs/gir-files @ ???)

View file

@ -154,13 +154,14 @@ pub trait ClockExt: 'static {
impl<O: IsA<Clock>> ClockExt for O { impl<O: IsA<Clock>> ClockExt for O {
fn add_observation(&self, slave: ClockTime, master: ClockTime) -> Option<f64> { fn add_observation(&self, slave: ClockTime, master: ClockTime) -> Option<f64> {
unsafe { unsafe {
let mut r_squared = mem::uninitialized(); let mut r_squared = mem::MaybeUninit::uninit();
let ret = from_glib(gst_sys::gst_clock_add_observation( let ret = from_glib(gst_sys::gst_clock_add_observation(
self.as_ref().to_glib_none().0, self.as_ref().to_glib_none().0,
slave.to_glib(), slave.to_glib(),
master.to_glib(), master.to_glib(),
&mut r_squared, r_squared.as_mut_ptr(),
)); ));
let r_squared = r_squared.assume_init();
if ret { if ret {
Some(r_squared) Some(r_squared)
} else { } else {
@ -175,21 +176,26 @@ impl<O: IsA<Clock>> ClockExt for O {
master: ClockTime, master: ClockTime,
) -> Option<(f64, ClockTime, ClockTime, ClockTime, ClockTime)> { ) -> Option<(f64, ClockTime, ClockTime, ClockTime, ClockTime)> {
unsafe { unsafe {
let mut r_squared = mem::uninitialized(); let mut r_squared = mem::MaybeUninit::uninit();
let mut internal = mem::uninitialized(); let mut internal = mem::MaybeUninit::uninit();
let mut external = mem::uninitialized(); let mut external = mem::MaybeUninit::uninit();
let mut rate_num = mem::uninitialized(); let mut rate_num = mem::MaybeUninit::uninit();
let mut rate_denom = mem::uninitialized(); let mut rate_denom = mem::MaybeUninit::uninit();
let ret = from_glib(gst_sys::gst_clock_add_observation_unapplied( let ret = from_glib(gst_sys::gst_clock_add_observation_unapplied(
self.as_ref().to_glib_none().0, self.as_ref().to_glib_none().0,
slave.to_glib(), slave.to_glib(),
master.to_glib(), master.to_glib(),
&mut r_squared, r_squared.as_mut_ptr(),
&mut internal, internal.as_mut_ptr(),
&mut external, external.as_mut_ptr(),
&mut rate_num, rate_num.as_mut_ptr(),
&mut rate_denom, rate_denom.as_mut_ptr(),
)); ));
let r_squared = r_squared.assume_init();
let internal = internal.assume_init();
let external = external.assume_init();
let rate_num = rate_num.assume_init();
let rate_denom = rate_denom.assume_init();
if ret { if ret {
Some(( Some((
r_squared, r_squared,
@ -215,17 +221,21 @@ impl<O: IsA<Clock>> ClockExt for O {
fn get_calibration(&self) -> (ClockTime, ClockTime, ClockTime, ClockTime) { fn get_calibration(&self) -> (ClockTime, ClockTime, ClockTime, ClockTime) {
unsafe { unsafe {
let mut internal = mem::uninitialized(); let mut internal = mem::MaybeUninit::uninit();
let mut external = mem::uninitialized(); let mut external = mem::MaybeUninit::uninit();
let mut rate_num = mem::uninitialized(); let mut rate_num = mem::MaybeUninit::uninit();
let mut rate_denom = mem::uninitialized(); let mut rate_denom = mem::MaybeUninit::uninit();
gst_sys::gst_clock_get_calibration( gst_sys::gst_clock_get_calibration(
self.as_ref().to_glib_none().0, self.as_ref().to_glib_none().0,
&mut internal, internal.as_mut_ptr(),
&mut external, external.as_mut_ptr(),
&mut rate_num, rate_num.as_mut_ptr(),
&mut rate_denom, rate_denom.as_mut_ptr(),
); );
let internal = internal.assume_init();
let external = external.assume_init();
let rate_num = rate_num.assume_init();
let rate_denom = rate_denom.assume_init();
( (
from_glib(internal), from_glib(internal),
from_glib(external), from_glib(external),

View file

@ -223,11 +223,20 @@ pub fn util_get_timestamp() -> ClockTime {
pub fn version() -> (u32, u32, u32, u32) { pub fn version() -> (u32, u32, u32, u32) {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
unsafe { unsafe {
let mut major = mem::uninitialized(); let mut major = mem::MaybeUninit::uninit();
let mut minor = mem::uninitialized(); let mut minor = mem::MaybeUninit::uninit();
let mut micro = mem::uninitialized(); let mut micro = mem::MaybeUninit::uninit();
let mut nano = mem::uninitialized(); let mut nano = mem::MaybeUninit::uninit();
gst_sys::gst_version(&mut major, &mut minor, &mut micro, &mut nano); gst_sys::gst_version(
major.as_mut_ptr(),
minor.as_mut_ptr(),
micro.as_mut_ptr(),
nano.as_mut_ptr(),
);
let major = major.assume_init();
let minor = minor.assume_init();
let micro = micro.assume_init();
let nano = nano.assume_init();
(major, minor, micro, nano) (major, minor, micro, nano)
} }
} }

View file

@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 20feecf) Generated by gir (https://github.com/gtk-rs/gir @ fb0b31c)
from gir-files (https://github.com/gtk-rs/gir-files @ ???) from gir-files (https://github.com/gtk-rs/gir-files @ ???)