Remove needless to_value() calls

This commit is contained in:
Sebastian Dröge 2021-11-20 14:56:34 +02:00
parent 63337c7df1
commit ac60e7b101

View file

@ -1245,15 +1245,11 @@ impl WebRTCSink {
.unwrap();
if let Some(stun_server) = settings.stun_server.as_ref() {
webrtcbin
.set_property("stun-server", stun_server.to_value())
.unwrap();
webrtcbin.set_property("stun-server", stun_server).unwrap();
}
if let Some(turn_server) = settings.turn_server.as_ref() {
webrtcbin
.set_property("turn-server", turn_server.to_value())
.unwrap();
webrtcbin.set_property("turn-server", turn_server).unwrap();
}
pipeline.add(&webrtcbin).unwrap();
@ -1434,10 +1430,15 @@ impl WebRTCSink {
gst::MessageView::StateChanged(state_changed) => {
if let Some(pipeline) = pipeline_clone.upgrade() {
if Some(pipeline.clone().upcast()) == state_changed.src() {
pipeline.debug_to_dot_file_with_ts(gst::DebugGraphDetails::all(),
format!("webrtcsink-peer-{}-{:?}-to-{:?}", peer_id_clone,
pipeline.debug_to_dot_file_with_ts(
gst::DebugGraphDetails::all(),
format!(
"webrtcsink-peer-{}-{:?}-to-{:?}",
peer_id_clone,
state_changed.old(),
state_changed.current()));
state_changed.current()
),
);
}
}
}
@ -1457,7 +1458,7 @@ impl WebRTCSink {
pipeline.set_state(gst::State::Ready)?;
element.emit_by_name("new-webrtcbin", &[&peer_id.to_value(), &webrtcbin.to_value()])?;
element.emit_by_name("new-webrtcbin", &[&peer_id, &webrtcbin])?;
pipeline.set_state(gst::State::Playing)?;
@ -2041,7 +2042,10 @@ impl ObjectImpl for WebRTCSink {
*/
glib::subclass::Signal::builder(
"new-webrtcbin",
&[String::static_type().into(), gst::Element::static_type().into()],
&[
String::static_type().into(),
gst::Element::static_type().into(),
],
glib::types::Type::UNIT.into(),
)
.build(),