mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-25 21:11:00 +00:00
ndisrc: Only calculate timecode/timestamp mappings if necessary
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1727>
This commit is contained in:
parent
04da3b2047
commit
57821cade4
1 changed files with 26 additions and 12 deletions
|
@ -651,19 +651,33 @@ impl NdiSrc {
|
||||||
receive_time_real,
|
receive_time_real,
|
||||||
);
|
);
|
||||||
|
|
||||||
let res_timestamp = state.observations_timestamp[idx].process(
|
let res_timestamp = if matches!(
|
||||||
self.obj().upcast_ref(),
|
state.timestamp_mode,
|
||||||
timestamp,
|
TimestampMode::ReceiveTimeTimestamp | TimestampMode::Auto
|
||||||
receive_time_gst,
|
) {
|
||||||
duration,
|
state.observations_timestamp[idx].process(
|
||||||
);
|
self.obj().upcast_ref(),
|
||||||
|
timestamp,
|
||||||
|
receive_time_gst,
|
||||||
|
duration,
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
None
|
||||||
|
};
|
||||||
|
|
||||||
let res_timecode = state.observations_timecode[idx].process(
|
let res_timecode = if matches!(
|
||||||
self.obj().upcast_ref(),
|
state.timestamp_mode,
|
||||||
Some(timecode),
|
TimestampMode::ReceiveTimeTimecode | TimestampMode::Auto
|
||||||
receive_time_gst,
|
) {
|
||||||
duration,
|
state.observations_timecode[idx].process(
|
||||||
);
|
self.obj().upcast_ref(),
|
||||||
|
Some(timecode),
|
||||||
|
receive_time_gst,
|
||||||
|
duration,
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
None
|
||||||
|
};
|
||||||
|
|
||||||
let (pts, duration, discont) = match state.timestamp_mode {
|
let (pts, duration, discont) = match state.timestamp_mode {
|
||||||
TimestampMode::ReceiveTimeTimecode => match res_timecode {
|
TimestampMode::ReceiveTimeTimecode => match res_timecode {
|
||||||
|
|
Loading…
Reference in a new issue