mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-12-01 07:51:01 +00:00
Update for API changes
This commit is contained in:
parent
d846f527af
commit
27435ad82e
8 changed files with 11 additions and 11 deletions
|
@ -110,7 +110,7 @@ fn run() -> Result<(), Error> {
|
||||||
|
|
||||||
match msg.view() {
|
match msg.view() {
|
||||||
MessageView::StateChanged(state_changed) => {
|
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
|
&& state_changed.current() == gst::State::Playing
|
||||||
{
|
{
|
||||||
let (lock, cvar) = &*state_cond;
|
let (lock, cvar) = &*state_cond;
|
||||||
|
|
|
@ -382,7 +382,7 @@ impl BinImpl for HlsSink3 {
|
||||||
let event_is_from_splitmuxsink = {
|
let event_is_from_splitmuxsink = {
|
||||||
let settings = self.settings.lock().unwrap();
|
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 {
|
if !event_is_from_splitmuxsink {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -1695,7 +1695,7 @@ impl WebRTCSink {
|
||||||
}
|
}
|
||||||
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 state_changed.src() == Some(pipeline.upcast_ref()) {
|
||||||
pipeline.debug_to_dot_file_with_ts(
|
pipeline.debug_to_dot_file_with_ts(
|
||||||
gst::DebugGraphDetails::all(),
|
gst::DebugGraphDetails::all(),
|
||||||
format!(
|
format!(
|
||||||
|
|
|
@ -223,7 +223,7 @@ impl BinImpl for ProgressBin {
|
||||||
// handling of the parent class, i.e. forwarding to the parent
|
// handling of the parent class, i.e. forwarding to the parent
|
||||||
// bins and the application.
|
// bins and the application.
|
||||||
MessageView::Element(msg)
|
MessageView::Element(msg)
|
||||||
if msg.src().as_ref() == Some(self.progress.upcast_ref())
|
if msg.src() == Some(self.progress.upcast_ref())
|
||||||
&& msg
|
&& msg
|
||||||
.structure()
|
.structure()
|
||||||
.map(|s| s.name() == "progress")
|
.map(|s| s.name() == "progress")
|
||||||
|
|
|
@ -344,7 +344,7 @@ impl CustomSource {
|
||||||
.map(|p| p.stream.clone())
|
.map(|p| p.stream.clone())
|
||||||
.collect::<Vec<_>>();
|
.collect::<Vec<_>>();
|
||||||
let collection = gst::StreamCollection::builder(None)
|
let collection = gst::StreamCollection::builder(None)
|
||||||
.streams(&streams)
|
.streams(streams)
|
||||||
.build();
|
.build();
|
||||||
drop(state);
|
drop(state);
|
||||||
|
|
||||||
|
|
|
@ -2778,7 +2778,7 @@ impl FallbackSrc {
|
||||||
Some(state) => state,
|
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,
|
None => return false,
|
||||||
Some(src) => src,
|
Some(src) => src,
|
||||||
};
|
};
|
||||||
|
@ -2790,7 +2790,7 @@ impl FallbackSrc {
|
||||||
src.path_string()
|
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);
|
self.handle_source_error(state, RetryReason::Error, false);
|
||||||
drop(state_guard);
|
drop(state_guard);
|
||||||
self.obj().notify("status");
|
self.obj().notify("status");
|
||||||
|
@ -2800,7 +2800,7 @@ impl FallbackSrc {
|
||||||
|
|
||||||
// Check if error is from fallback input and if so, use a dummy fallback
|
// Check if error is from fallback input and if so, use a dummy fallback
|
||||||
if let Some(ref source) = state.fallback_source {
|
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);
|
self.handle_source_error(state, RetryReason::Error, true);
|
||||||
drop(state_guard);
|
drop(state_guard);
|
||||||
self.obj().notify("status");
|
self.obj().notify("status");
|
||||||
|
|
|
@ -213,7 +213,7 @@ fn assert_stream_collection(msg: gst::Message, n_streams: usize) -> gst::Object
|
||||||
MessageView::StreamCollection(sc) => {
|
MessageView::StreamCollection(sc) => {
|
||||||
let collection = sc.stream_collection();
|
let collection = sc.stream_collection();
|
||||||
assert_eq!(collection.len(), n_streams);
|
assert_eq!(collection.len(), n_streams);
|
||||||
sc.src().unwrap()
|
sc.src().unwrap().clone()
|
||||||
}
|
}
|
||||||
_ => {
|
_ => {
|
||||||
panic!("message is not a stream collection");
|
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) => {
|
MessageView::StreamsSelected(ss) => {
|
||||||
let collection = ss.stream_collection();
|
let collection = ss.stream_collection();
|
||||||
assert_eq!(collection.len(), n_streams);
|
assert_eq!(collection.len(), n_streams);
|
||||||
ss.src().unwrap()
|
ss.src().unwrap().clone()
|
||||||
}
|
}
|
||||||
_ => {
|
_ => {
|
||||||
panic!("message is not stream selected");
|
panic!("message is not stream selected");
|
||||||
|
|
|
@ -878,7 +878,7 @@ impl BinImpl for TranscriberBin {
|
||||||
let s = self.state.lock().unwrap();
|
let s = self.state.lock().unwrap();
|
||||||
|
|
||||||
if let Some(state) = s.as_ref() {
|
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!(
|
gst::error!(
|
||||||
CAT,
|
CAT,
|
||||||
imp: self,
|
imp: self,
|
||||||
|
|
Loading…
Reference in a new issue