ndi: Remove unnecessary reference-timestamps feature

This commit is contained in:
Sebastian Dröge 2022-10-12 19:39:33 +03:00
parent fedd67dcaa
commit fb8192f40b
5 changed files with 30 additions and 40 deletions

View file

@ -19,12 +19,11 @@ byteorder = "1.0"
atomic_refcell = "0.1"
[build-dependencies]
gst-plugin-version-helper = "0.7"
gst-plugin-version-helper = { path = "../../version-helper" }
[features]
default = ["interlaced-fields", "reference-timestamps", "sink"]
default = ["interlaced-fields", "sink"]
interlaced-fields = ["gst/v1_16", "gst-video/v1_16"]
reference-timestamps = []
sink = ["gst/v1_18", "gst-base/v1_18"]
advanced-sdk = []

View file

@ -141,10 +141,8 @@ static DEFAULT_RECEIVER_NDI_NAME: Lazy<String> = Lazy::new(|| {
)
});
#[cfg(feature = "reference-timestamps")]
static TIMECODE_CAPS: Lazy<gst::Caps> =
Lazy::new(|| gst::Caps::new_simple("timestamp/x-ndi-timecode", &[]));
#[cfg(feature = "reference-timestamps")]
static TIMESTAMP_CAPS: Lazy<gst::Caps> =
Lazy::new(|| gst::Caps::new_simple("timestamp/x-ndi-timestamp", &[]));

View file

@ -283,7 +283,6 @@ impl NdiSrcDemux {
if element.num_src_pads() == 2 {
element.no_more_pads();
}
}
for ev in events {

View file

@ -1291,8 +1291,6 @@ impl Receiver {
buffer.set_pts(pts);
buffer.set_duration(duration);
#[cfg(feature = "reference-timestamps")]
{
gst::ReferenceTimestampMeta::add(
buffer,
&*TIMECODE_CAPS,
@ -1307,7 +1305,6 @@ impl Receiver {
gst::ClockTime::NONE,
);
}
}
#[cfg(feature = "interlaced-fields")]
{
@ -1667,8 +1664,6 @@ impl Receiver {
buffer.set_pts(pts);
buffer.set_duration(duration);
#[cfg(feature = "reference-timestamps")]
{
gst::ReferenceTimestampMeta::add(
buffer,
&*TIMECODE_CAPS,
@ -1683,7 +1678,6 @@ impl Receiver {
gst::ClockTime::NONE,
);
}
}
let mut dest = buffer.map_writable().unwrap();
let dest = dest