mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-12-03 08:46:39 +00:00
Remove needless to_value()
calls
This commit is contained in:
parent
63337c7df1
commit
ac60e7b101
1 changed files with 25 additions and 21 deletions
|
@ -1245,15 +1245,11 @@ impl WebRTCSink {
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
if let Some(stun_server) = settings.stun_server.as_ref() {
|
if let Some(stun_server) = settings.stun_server.as_ref() {
|
||||||
webrtcbin
|
webrtcbin.set_property("stun-server", stun_server).unwrap();
|
||||||
.set_property("stun-server", stun_server.to_value())
|
|
||||||
.unwrap();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if let Some(turn_server) = settings.turn_server.as_ref() {
|
if let Some(turn_server) = settings.turn_server.as_ref() {
|
||||||
webrtcbin
|
webrtcbin.set_property("turn-server", turn_server).unwrap();
|
||||||
.set_property("turn-server", turn_server.to_value())
|
|
||||||
.unwrap();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pipeline.add(&webrtcbin).unwrap();
|
pipeline.add(&webrtcbin).unwrap();
|
||||||
|
@ -1432,12 +1428,17 @@ impl WebRTCSink {
|
||||||
let _ = this.remove_consumer(&element, &peer_id_clone, true);
|
let _ = this.remove_consumer(&element, &peer_id_clone, true);
|
||||||
}
|
}
|
||||||
gst::MessageView::StateChanged(state_changed) => {
|
gst::MessageView::StateChanged(state_changed) => {
|
||||||
if let Some(pipeline) = pipeline_clone.upgrade(){
|
if let Some(pipeline) = pipeline_clone.upgrade() {
|
||||||
if Some(pipeline.clone().upcast()) == state_changed.src() {
|
if Some(pipeline.clone().upcast()) == state_changed.src() {
|
||||||
pipeline.debug_to_dot_file_with_ts(gst::DebugGraphDetails::all(),
|
pipeline.debug_to_dot_file_with_ts(
|
||||||
format!("webrtcsink-peer-{}-{:?}-to-{:?}", peer_id_clone,
|
gst::DebugGraphDetails::all(),
|
||||||
|
format!(
|
||||||
|
"webrtcsink-peer-{}-{:?}-to-{:?}",
|
||||||
|
peer_id_clone,
|
||||||
state_changed.old(),
|
state_changed.old(),
|
||||||
state_changed.current()));
|
state_changed.current()
|
||||||
|
),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1457,7 +1458,7 @@ impl WebRTCSink {
|
||||||
|
|
||||||
pipeline.set_state(gst::State::Ready)?;
|
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)?;
|
pipeline.set_state(gst::State::Playing)?;
|
||||||
|
|
||||||
|
@ -2041,7 +2042,10 @@ impl ObjectImpl for WebRTCSink {
|
||||||
*/
|
*/
|
||||||
glib::subclass::Signal::builder(
|
glib::subclass::Signal::builder(
|
||||||
"new-webrtcbin",
|
"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(),
|
glib::types::Type::UNIT.into(),
|
||||||
)
|
)
|
||||||
.build(),
|
.build(),
|
||||||
|
|
Loading…
Reference in a new issue