mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-06-02 05:51:00 +00:00
Use gst::Element::current_running_time() instead of manually implementing it
This commit is contained in:
parent
febb2fb035
commit
0c89e0819f
|
@ -624,13 +624,7 @@ impl Receiver {
|
|||
timecode: i64,
|
||||
duration: Option<gst::ClockTime>,
|
||||
) -> Option<(gst::ClockTime, Option<gst::ClockTime>)> {
|
||||
let clock = element.clock()?;
|
||||
|
||||
// For now take the current running time as PTS. At a later time we
|
||||
// will want to work with the timestamp given by the NDI SDK if available
|
||||
let now = clock.time()?;
|
||||
let base_time = element.base_time()?;
|
||||
let receive_time = now - base_time;
|
||||
let receive_time = element.current_running_time()?;
|
||||
|
||||
let real_time_now = gst::ClockTime::from_nseconds(glib::real_time() as u64 * 1000);
|
||||
let timestamp = if timestamp == ndisys::NDIlib_recv_timestamp_undefined {
|
||||
|
|
Loading…
Reference in a new issue