mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-01-09 18:55:27 +00:00
livesync: Move single segment prop
Keep it with the settings, not after the stats. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1086>
This commit is contained in:
parent
cccf90f59e
commit
1e67259462
1 changed files with 9 additions and 9 deletions
|
@ -63,6 +63,7 @@ pub struct LiveSync {
|
||||||
struct State {
|
struct State {
|
||||||
latency: gst::ClockTime,
|
latency: gst::ClockTime,
|
||||||
late_threshold: Option<gst::ClockTime>,
|
late_threshold: Option<gst::ClockTime>,
|
||||||
|
single_segment: bool,
|
||||||
|
|
||||||
upstream_latency: Option<gst::ClockTime>,
|
upstream_latency: Option<gst::ClockTime>,
|
||||||
fallback_duration: gst::ClockTime,
|
fallback_duration: gst::ClockTime,
|
||||||
|
@ -93,17 +94,16 @@ struct State {
|
||||||
num_drop: u64,
|
num_drop: u64,
|
||||||
num_out: u64,
|
num_out: u64,
|
||||||
num_duplicate: u64,
|
num_duplicate: u64,
|
||||||
single_segment: bool,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const PROP_LATENCY: &str = "latency";
|
const PROP_LATENCY: &str = "latency";
|
||||||
const PROP_LATE_THRESHOLD: &str = "late-threshold";
|
const PROP_LATE_THRESHOLD: &str = "late-threshold";
|
||||||
|
const PROP_SINGLE_SEGMENT: &str = "single-segment";
|
||||||
|
|
||||||
const PROP_IN: &str = "in";
|
const PROP_IN: &str = "in";
|
||||||
const PROP_DROP: &str = "drop";
|
const PROP_DROP: &str = "drop";
|
||||||
const PROP_OUT: &str = "out";
|
const PROP_OUT: &str = "out";
|
||||||
const PROP_DUPLICATE: &str = "duplicate";
|
const PROP_DUPLICATE: &str = "duplicate";
|
||||||
const PROP_SINGLE_SEGMENT: &str = "single-segment";
|
|
||||||
|
|
||||||
const DEFAULT_LATENCY: gst::ClockTime = gst::ClockTime::ZERO;
|
const DEFAULT_LATENCY: gst::ClockTime = gst::ClockTime::ZERO;
|
||||||
const DEFAULT_DURATION: gst::ClockTime = gst::ClockTime::from_mseconds(100);
|
const DEFAULT_DURATION: gst::ClockTime = gst::ClockTime::from_mseconds(100);
|
||||||
|
@ -115,6 +115,7 @@ impl Default for State {
|
||||||
Self {
|
Self {
|
||||||
latency: DEFAULT_LATENCY,
|
latency: DEFAULT_LATENCY,
|
||||||
late_threshold: DEFAULT_LATE_THRESHOLD,
|
late_threshold: DEFAULT_LATE_THRESHOLD,
|
||||||
|
single_segment: false,
|
||||||
upstream_latency: None,
|
upstream_latency: None,
|
||||||
fallback_duration: DEFAULT_DURATION,
|
fallback_duration: DEFAULT_DURATION,
|
||||||
playing: false,
|
playing: false,
|
||||||
|
@ -137,7 +138,6 @@ impl Default for State {
|
||||||
num_drop: 0,
|
num_drop: 0,
|
||||||
num_out: 0,
|
num_out: 0,
|
||||||
num_duplicate: 0,
|
num_duplicate: 0,
|
||||||
single_segment: false,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -249,6 +249,11 @@ impl ObjectImpl for LiveSync {
|
||||||
.default_value(DEFAULT_LATE_THRESHOLD.into_glib())
|
.default_value(DEFAULT_LATE_THRESHOLD.into_glib())
|
||||||
.mutable_playing()
|
.mutable_playing()
|
||||||
.build(),
|
.build(),
|
||||||
|
glib::ParamSpecBoolean::builder(PROP_SINGLE_SEGMENT)
|
||||||
|
.nick("Single segment")
|
||||||
|
.blurb("Timestamp buffers and eat segments so as to appear as one segment")
|
||||||
|
.mutable_ready()
|
||||||
|
.build(),
|
||||||
glib::ParamSpecUInt64::builder(PROP_IN)
|
glib::ParamSpecUInt64::builder(PROP_IN)
|
||||||
.nick("Frames input")
|
.nick("Frames input")
|
||||||
.blurb("Number of incoming frames accepted")
|
.blurb("Number of incoming frames accepted")
|
||||||
|
@ -269,11 +274,6 @@ impl ObjectImpl for LiveSync {
|
||||||
.blurb("Number of outgoing frames duplicated")
|
.blurb("Number of outgoing frames duplicated")
|
||||||
.read_only()
|
.read_only()
|
||||||
.build(),
|
.build(),
|
||||||
glib::ParamSpecBoolean::builder(PROP_SINGLE_SEGMENT)
|
|
||||||
.nick("Single segment")
|
|
||||||
.blurb("Timestamp buffers and eat segments so as to appear as one segment")
|
|
||||||
.mutable_ready()
|
|
||||||
.build(),
|
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -315,11 +315,11 @@ impl ObjectImpl for LiveSync {
|
||||||
match pspec.name() {
|
match pspec.name() {
|
||||||
PROP_LATENCY => state.latency.to_value(),
|
PROP_LATENCY => state.latency.to_value(),
|
||||||
PROP_LATE_THRESHOLD => state.late_threshold.to_value(),
|
PROP_LATE_THRESHOLD => state.late_threshold.to_value(),
|
||||||
|
PROP_SINGLE_SEGMENT => state.single_segment.to_value(),
|
||||||
PROP_IN => state.num_in.to_value(),
|
PROP_IN => state.num_in.to_value(),
|
||||||
PROP_DROP => state.num_drop.to_value(),
|
PROP_DROP => state.num_drop.to_value(),
|
||||||
PROP_OUT => state.num_out.to_value(),
|
PROP_OUT => state.num_out.to_value(),
|
||||||
PROP_DUPLICATE => state.num_duplicate.to_value(),
|
PROP_DUPLICATE => state.num_duplicate.to_value(),
|
||||||
PROP_SINGLE_SEGMENT => state.single_segment.to_value(),
|
|
||||||
_ => unimplemented!(),
|
_ => unimplemented!(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue