all: update due to new has_property signature

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1926>
This commit is contained in:
François Laignel 2024-11-21 10:50:24 +01:00 committed by GStreamer Marge Bot
parent df0e9d311d
commit 4262a8aafe
4 changed files with 11 additions and 11 deletions

View file

@ -96,7 +96,7 @@ impl Default for HlsSink3Settings {
// giostreamsink doesn't let go of its stream until the element is finalized, which might // giostreamsink doesn't let go of its stream until the element is finalized, which might
// be too late for the calling application. Let's try to force it to close while tearing // be too late for the calling application. Let's try to force it to close while tearing
// down the pipeline. // down the pipeline.
if giostreamsink.has_property("close-on-stop", Some(bool::static_type())) { if giostreamsink.has_property_with_type("close-on-stop", bool::static_type()) {
giostreamsink.set_property("close-on-stop", true); giostreamsink.set_property("close-on-stop", true);
} else { } else {
gst::warning!( gst::warning!(

View file

@ -1744,7 +1744,7 @@ impl BaseWebRTCSink {
match extension_configuration_type { match extension_configuration_type {
ExtensionConfigurationType::Auto => { ExtensionConfigurationType::Auto => {
// GstRTPBasePayload::extensions property is only available since GStreamer 1.24 // GstRTPBasePayload::extensions property is only available since GStreamer 1.24
if !payloader.has_property("extensions", Some(gst::Array::static_type())) { if !payloader.has_property_with_type("extensions", gst::Array::static_type()) {
if self.has_connected_payloader_setup_slots() { if self.has_connected_payloader_setup_slots() {
gst::warning!(CAT, imp = self, "'extensions' property is not available: TWCC extension ID will default to 1. \ gst::warning!(CAT, imp = self, "'extensions' property is not available: TWCC extension ID will default to 1. \
Application code must ensure to pick non-conflicting IDs for any additionally configured extensions. \ Application code must ensure to pick non-conflicting IDs for any additionally configured extensions. \
@ -2389,7 +2389,7 @@ impl BaseWebRTCSink {
drop(state); drop(state);
let maybe_munged_offer = if signaller let maybe_munged_offer = if signaller
.has_property("manual-sdp-munging", Some(bool::static_type())) .has_property_with_type("manual-sdp-munging", bool::static_type())
&& signaller.property("manual-sdp-munging") && signaller.property("manual-sdp-munging")
{ {
// Don't munge, signaller will manage this // Don't munge, signaller will manage this
@ -2425,7 +2425,7 @@ impl BaseWebRTCSink {
.emit_by_name::<()>("set-local-description", &[&answer, &None::<gst::Promise>]); .emit_by_name::<()>("set-local-description", &[&answer, &None::<gst::Promise>]);
let maybe_munged_answer = if signaller let maybe_munged_answer = if signaller
.has_property("manual-sdp-munging", Some(bool::static_type())) .has_property_with_type("manual-sdp-munging", bool::static_type())
&& signaller.property("manual-sdp-munging") && signaller.property("manual-sdp-munging")
{ {
// Don't munge, signaller will manage this // Don't munge, signaller will manage this
@ -2885,7 +2885,7 @@ impl BaseWebRTCSink {
session_id, session_id,
move |_webrtcbin: gst::Element, _bin: gst::Bin, e: gst::Element| { move |_webrtcbin: gst::Element, _bin: gst::Bin, e: gst::Element| {
if e.factory().map_or(false, |f| f.name() == "rtprtxsend") { if e.factory().map_or(false, |f| f.name() == "rtprtxsend") {
if e.has_property("stuffing-kbps", Some(i32::static_type())) { if e.has_property_with_type("stuffing-kbps", i32::static_type()) {
element.imp().set_rtptrxsend(&session_id, e); element.imp().set_rtptrxsend(&session_id, e);
} else { } else {
gst::warning!( gst::warning!(

View file

@ -656,7 +656,7 @@ impl Session {
// continue to use that or fallback to webrtcbin pad's msid if the // continue to use that or fallback to webrtcbin pad's msid if the
// peer-producer-id is None. // peer-producer-id is None.
let producer_id = if signaller let producer_id = if signaller
.has_property("producer-peer-id", Some(Option::<String>::static_type())) .has_property_with_type("producer-peer-id", Option::<String>::static_type())
{ {
signaller signaller
.property::<Option<String>>("producer-peer-id") .property::<Option<String>>("producer-peer-id")

View file

@ -517,17 +517,17 @@ impl TranscriberBin {
if let Some(ref transcriber) = pad_state.transcriber { if let Some(ref transcriber) = pad_state.transcriber {
let latency_ms = settings.latency.mseconds() as u32; let latency_ms = settings.latency.mseconds() as u32;
if transcriber.has_property("transcribe-latency", Some(u32::static_type())) { if transcriber.has_property_with_type("transcribe-latency", u32::static_type()) {
transcriber.set_property("transcribe-latency", latency_ms); transcriber.set_property("transcribe-latency", latency_ms);
} else if transcriber.has_property("latency", Some(u32::static_type())) { } else if transcriber.has_property_with_type("latency", u32::static_type()) {
transcriber.set_property("latency", latency_ms); transcriber.set_property("latency", latency_ms);
} }
if transcriber.has_property("translate-latency", Some(u32::static_type())) { if transcriber.has_property_with_type("translate-latency", u32::static_type()) {
let translate_latency_ms = settings.translate_latency.mseconds() as u32; let translate_latency_ms = settings.translate_latency.mseconds() as u32;
transcriber.set_property("translate-latency", translate_latency_ms); transcriber.set_property("translate-latency", translate_latency_ms);
} }
if transcriber.has_property("lateness", Some(u32::static_type())) { if transcriber.has_property_with_type("lateness", u32::static_type()) {
let lateness_ms = settings.lateness.mseconds() as u32; let lateness_ms = settings.lateness.mseconds() as u32;
transcriber.set_property("lateness", lateness_ms); transcriber.set_property("lateness", lateness_ms);
} }
@ -1185,7 +1185,7 @@ impl TranscriberBin {
.and_then(|f| f.load().ok()) .and_then(|f| f.load().ok())
.map(|f| f.element_type()) .map(|f| f.element_type())
.and_then(glib::Class::<gst::Element>::from_type) .and_then(glib::Class::<gst::Element>::from_type)
.map(|k| k.has_property("force-live", Some(bool::static_type()))) .map(|k| k.has_property_with_type("force-live", bool::static_type()))
.unwrap_or(false) .unwrap_or(false)
}; };