diff --git a/audio/audiofx/examples/hrtfrender.rs b/audio/audiofx/examples/hrtfrender.rs index 61d70988..86a71b62 100644 --- a/audio/audiofx/examples/hrtfrender.rs +++ b/audio/audiofx/examples/hrtfrender.rs @@ -110,7 +110,7 @@ fn run() -> Result<(), Error> { match msg.view() { MessageView::StateChanged(state_changed) => { - if state_changed.src().map(|s| s == pipeline).unwrap_or(false) + if state_changed.src().map(|s| s == &pipeline).unwrap_or(false) && state_changed.current() == gst::State::Playing { let (lock, cvar) = &*state_cond; diff --git a/net/hlssink3/src/imp.rs b/net/hlssink3/src/imp.rs index c61e53f3..09e66ed6 100644 --- a/net/hlssink3/src/imp.rs +++ b/net/hlssink3/src/imp.rs @@ -382,7 +382,7 @@ impl BinImpl for HlsSink3 { let event_is_from_splitmuxsink = { let settings = self.settings.lock().unwrap(); - msg.src().as_ref() == Some(settings.splitmuxsink.upcast_ref()) + msg.src() == Some(settings.splitmuxsink.upcast_ref()) }; if !event_is_from_splitmuxsink { return; diff --git a/net/webrtc/src/webrtcsink/imp.rs b/net/webrtc/src/webrtcsink/imp.rs index fe376938..e1e7c745 100644 --- a/net/webrtc/src/webrtcsink/imp.rs +++ b/net/webrtc/src/webrtcsink/imp.rs @@ -1695,7 +1695,7 @@ impl WebRTCSink { } gst::MessageView::StateChanged(state_changed) => { if let Some(pipeline) = pipeline_clone.upgrade() { - if Some(pipeline.clone().upcast()) == state_changed.src() { + if state_changed.src() == Some(pipeline.upcast_ref()) { pipeline.debug_to_dot_file_with_ts( gst::DebugGraphDetails::all(), format!( diff --git a/tutorial/src/progressbin/imp.rs b/tutorial/src/progressbin/imp.rs index 3811c0be..e65d2bca 100644 --- a/tutorial/src/progressbin/imp.rs +++ b/tutorial/src/progressbin/imp.rs @@ -223,7 +223,7 @@ impl BinImpl for ProgressBin { // handling of the parent class, i.e. forwarding to the parent // bins and the application. MessageView::Element(msg) - if msg.src().as_ref() == Some(self.progress.upcast_ref()) + if msg.src() == Some(self.progress.upcast_ref()) && msg .structure() .map(|s| s.name() == "progress") diff --git a/utils/fallbackswitch/src/fallbacksrc/custom_source/imp.rs b/utils/fallbackswitch/src/fallbacksrc/custom_source/imp.rs index a536a154..8db7e28a 100644 --- a/utils/fallbackswitch/src/fallbacksrc/custom_source/imp.rs +++ b/utils/fallbackswitch/src/fallbacksrc/custom_source/imp.rs @@ -344,7 +344,7 @@ impl CustomSource { .map(|p| p.stream.clone()) .collect::>(); let collection = gst::StreamCollection::builder(None) - .streams(&streams) + .streams(streams) .build(); drop(state); diff --git a/utils/fallbackswitch/src/fallbacksrc/imp.rs b/utils/fallbackswitch/src/fallbacksrc/imp.rs index 1f9a0161..378eef13 100644 --- a/utils/fallbackswitch/src/fallbacksrc/imp.rs +++ b/utils/fallbackswitch/src/fallbacksrc/imp.rs @@ -2778,7 +2778,7 @@ impl FallbackSrc { Some(state) => state, }; - let src = match m.src().and_then(|s| s.downcast::().ok()) { + let src = match m.src().and_then(|s| s.downcast_ref::()) { None => return false, Some(src) => src, }; @@ -2790,7 +2790,7 @@ impl FallbackSrc { src.path_string() ); - if src == state.source.source || src.has_as_ancestor(&state.source.source) { + if src == &state.source.source || src.has_as_ancestor(&state.source.source) { self.handle_source_error(state, RetryReason::Error, false); drop(state_guard); self.obj().notify("status"); @@ -2800,7 +2800,7 @@ impl FallbackSrc { // Check if error is from fallback input and if so, use a dummy fallback if let Some(ref source) = state.fallback_source { - if src == source.source || src.has_as_ancestor(&source.source) { + if src == &source.source || src.has_as_ancestor(&source.source) { self.handle_source_error(state, RetryReason::Error, true); drop(state_guard); self.obj().notify("status"); diff --git a/utils/uriplaylistbin/tests/uriplaylistbin.rs b/utils/uriplaylistbin/tests/uriplaylistbin.rs index 5236d585..77424780 100644 --- a/utils/uriplaylistbin/tests/uriplaylistbin.rs +++ b/utils/uriplaylistbin/tests/uriplaylistbin.rs @@ -213,7 +213,7 @@ fn assert_stream_collection(msg: gst::Message, n_streams: usize) -> gst::Object MessageView::StreamCollection(sc) => { let collection = sc.stream_collection(); assert_eq!(collection.len(), n_streams); - sc.src().unwrap() + sc.src().unwrap().clone() } _ => { panic!("message is not a stream collection"); @@ -226,7 +226,7 @@ fn assert_stream_selected(msg: gst::Message, n_streams: usize) -> gst::Object { MessageView::StreamsSelected(ss) => { let collection = ss.stream_collection(); assert_eq!(collection.len(), n_streams); - ss.src().unwrap() + ss.src().unwrap().clone() } _ => { panic!("message is not stream selected"); diff --git a/video/closedcaption/src/transcriberbin/imp.rs b/video/closedcaption/src/transcriberbin/imp.rs index 33679bed..059af53d 100644 --- a/video/closedcaption/src/transcriberbin/imp.rs +++ b/video/closedcaption/src/transcriberbin/imp.rs @@ -878,7 +878,7 @@ impl BinImpl for TranscriberBin { let s = self.state.lock().unwrap(); if let Some(state) = s.as_ref() { - if msg.src().as_ref() == Some(state.transcriber.upcast_ref()) { + if msg.src() == Some(state.transcriber.upcast_ref()) { gst::error!( CAT, imp: self,