mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-27 14:01:04 +00:00
ENH: Error handling on fn start
This commit is contained in:
parent
f74b0b4088
commit
1bacf8237b
2 changed files with 14 additions and 2 deletions
|
@ -309,7 +309,13 @@ impl ObjectSubclass for NdiAudioSrc {
|
|||
&settings.stream_name.clone(),
|
||||
);
|
||||
|
||||
Ok(())
|
||||
match settings.id_receiver {
|
||||
0 => Err(gst_error_msg!(
|
||||
gst::ResourceError::Settings,
|
||||
["Could not connect to this source"]
|
||||
)),
|
||||
_ => Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
fn stop(&self, element: &gst_base::BaseSrc) -> Result<(), gst::ErrorMessage> {
|
||||
|
|
|
@ -317,7 +317,13 @@ impl ObjectSubclass for NdiVideoSrc {
|
|||
);
|
||||
|
||||
// settings.id_receiver != 0
|
||||
Ok(())
|
||||
match settings.id_receiver {
|
||||
0 => Err(gst_error_msg!(
|
||||
gst::ResourceError::Settings,
|
||||
["Could not connect to this source"]
|
||||
)),
|
||||
_ => Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
fn stop(&self, element: &gst_base::BaseSrc) -> Result<(), gst::ErrorMessage> {
|
||||
|
|
Loading…
Reference in a new issue