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

It's useless and not used.
This commit is contained in:
Sebastian Dröge 2017-12-18 09:39:37 +02:00
parent 9a7ede1dcc
commit 9223386750
3 changed files with 50 additions and 16 deletions

View file

@ -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"

View file

@ -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")

View file

@ -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>;