diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2023-01-05 13:32:01 +0300 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2023-01-05 13:33:54 +0300 |
commit | 27435ad82eaad2745fa144d837e7c4d818d3099f (patch) | |
tree | c9e2a446b8a5726ae9b8a32cecd8bf1e61c2255e /utils | |
parent | d846f527af8ed8bf9072aa1b32268390fede16e6 (diff) |
Update for API changes
Diffstat (limited to 'utils')
-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 |
3 files changed, 6 insertions, 6 deletions
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::<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 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::<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 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"); |