Commit 92233867 authored by Sebastian Dröge's avatar Sebastian Dröge 🍵

Remove clock parameter from Clock::(un)adjust_with_calibration()

It's useless and not used.
parent 9a7ede1d
......@@ -229,6 +229,16 @@ status = "generate"
[object.function.return]
bool_return_is_error = "Timed out waiting for sync"
[[object.function]]
name = "adjust_with_calibration"
# Useless clock parameter
ignore = true
[[object.function]]
name = "unadjust_with_calibration"
# Useless clock parameter
ignore = true
[[object]]
name = "Gst.SystemClock"
status = "generate"
......
......@@ -67,8 +67,6 @@ pub trait ClockExt {
fn adjust_unlocked(&self, internal: ClockTime) -> ClockTime;
fn adjust_with_calibration(&self, internal_target: ClockTime, cinternal: ClockTime, cexternal: ClockTime, cnum: ClockTime, cdenom: ClockTime) -> ClockTime;
fn get_calibration(&self) -> (ClockTime, ClockTime, ClockTime, ClockTime);
fn get_internal_time(&self) -> ClockTime;
......@@ -103,8 +101,6 @@ pub trait ClockExt {
fn unadjust_unlocked(&self, external: ClockTime) -> ClockTime;
fn unadjust_with_calibration(&self, external_target: ClockTime, cinternal: ClockTime, cexternal: ClockTime, cnum: ClockTime, cdenom: ClockTime) -> ClockTime;
fn wait_for_sync(&self, timeout: ClockTime) -> Result<(), glib::error::BoolError>;
fn get_property_window_size(&self) -> i32;
......@@ -151,12 +147,6 @@ impl<O: IsA<Clock> + IsA<glib::object::Object>> ClockExt for O {
}
}
fn adjust_with_calibration(&self, internal_target: ClockTime, cinternal: ClockTime, cexternal: ClockTime, cnum: ClockTime, cdenom: ClockTime) -> ClockTime {
unsafe {
from_glib(ffi::gst_clock_adjust_with_calibration(self.to_glib_none().0, internal_target.to_glib(), cinternal.to_glib(), cexternal.to_glib(), cnum.to_glib(), cdenom.to_glib()))
}
}
fn get_calibration(&self) -> (ClockTime, ClockTime, ClockTime, ClockTime) {
unsafe {
let mut internal = mem::uninitialized();
......@@ -258,12 +248,6 @@ impl<O: IsA<Clock> + IsA<glib::object::Object>> ClockExt for O {
}
}
fn unadjust_with_calibration(&self, external_target: ClockTime, cinternal: ClockTime, cexternal: ClockTime, cnum: ClockTime, cdenom: ClockTime) -> ClockTime {
unsafe {
from_glib(ffi::gst_clock_unadjust_with_calibration(self.to_glib_none().0, external_target.to_glib(), cinternal.to_glib(), cexternal.to_glib(), cnum.to_glib(), cdenom.to_glib()))
}
}
fn wait_for_sync(&self, timeout: ClockTime) -> Result<(), glib::error::BoolError> {
unsafe {
glib::error::BoolError::from_glib(ffi::gst_clock_wait_for_sync(self.to_glib_none().0, timeout.to_glib()), "Timed out waiting for sync")
......
......@@ -126,6 +126,46 @@ impl Eq for ClockId {}
unsafe impl Send for ClockId {}
unsafe impl Sync for ClockId {}
impl Clock {
pub fn adjust_with_calibration(
internal_target: ClockTime,
cinternal: ClockTime,
cexternal: ClockTime,
cnum: ClockTime,
cdenom: ClockTime,
) -> ClockTime {
unsafe {
from_glib(ffi::gst_clock_adjust_with_calibration(
ptr::null_mut(),
internal_target.to_glib(),
cinternal.to_glib(),
cexternal.to_glib(),
cnum.to_glib(),
cdenom.to_glib(),
))
}
}
pub fn unadjust_with_calibration(
external_target: ClockTime,
cinternal: ClockTime,
cexternal: ClockTime,
cnum: ClockTime,
cdenom: ClockTime,
) -> ClockTime {
unsafe {
from_glib(ffi::gst_clock_unadjust_with_calibration(
ptr::null_mut(),
external_target.to_glib(),
cinternal.to_glib(),
cexternal.to_glib(),
cnum.to_glib(),
cdenom.to_glib(),
))
}
}
}
pub trait ClockExtManual {
fn new_periodic_id(&self, start_time: ClockTime, interval: ClockTime) -> Option<ClockId>;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment