diff options
-rw-r--r-- | audio/audiofx/examples/hrtfrender.rs | 2 | ||||
-rw-r--r-- | net/hlssink3/src/imp.rs | 2 | ||||
-rw-r--r-- | net/webrtc/src/webrtcsink/imp.rs | 2 | ||||
-rw-r--r-- | tutorial/src/progressbin/imp.rs | 2 | ||||
-rw-r--r-- | utils/fallbackswitch/src/fallbacksrc/custom_source/imp.rs | 2 | ||||
-rw-r--r-- | utils/fallbackswitch/src/fallbacksrc/imp.rs | 6 | ||||
-rw-r--r-- | utils/uriplaylistbin/tests/uriplaylistbin.rs | 4 | ||||
-rw-r--r-- | video/closedcaption/src/transcriberbin/imp.rs | 2 |
8 files changed, 11 insertions, 11 deletions
diff --git a/audio/audiofx/examples/hrtfrender.rs b/audio/audiofx/examples/hrtfrender.rs index 61d70988c..86a71b621 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 c61e53f34..09e66ed68 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 fe3769382..e1e7c745a 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 3811c0bef..e65d2bcaa 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 a536a154c..8db7e28ad 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::<Vec<_>>(); 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 1f9a0161c..378eef139 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::<gst::Element>().ok()) { + let src = match m.src().and_then(|s| s.downcast_ref::<gst::Element>()) { 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 5236d5851..774247806 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 33679beda..059af53d2 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, |