mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-12-11 12:46:29 +00:00
Don't do anything in BaseSrc::negotiate()
We can't negotiate anything meaningful with downstream and will always set the caps based on the data we receive in ::create() later.
This commit is contained in:
parent
892e54ac4d
commit
7246b1b147
2 changed files with 16 additions and 10 deletions
|
@ -375,7 +375,13 @@ impl ElementImpl for NdiAudioSrc {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl BaseSrcImpl for NdiAudioSrc {
|
impl BaseSrcImpl for NdiAudioSrc {
|
||||||
fn unlock(&self, element: &gst_base::BaseSrc) -> std::result::Result<(), gst::ErrorMessage> {
|
fn negotiate(&self, _element: &gst_base::BaseSrc) -> Result<(), gst::LoggableError> {
|
||||||
|
// Always succeed here without doing anything: we will set the caps once we received a
|
||||||
|
// buffer, there's nothing we can negotiate
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
|
||||||
|
fn unlock(&self, element: &gst_base::BaseSrc) -> Result<(), gst::ErrorMessage> {
|
||||||
gst_debug!(self.cat, obj: element, "Unlocking",);
|
gst_debug!(self.cat, obj: element, "Unlocking",);
|
||||||
if let Some(ref controller) = *self.receiver_controller.lock().unwrap() {
|
if let Some(ref controller) = *self.receiver_controller.lock().unwrap() {
|
||||||
controller.set_flushing(true);
|
controller.set_flushing(true);
|
||||||
|
@ -383,10 +389,7 @@ impl BaseSrcImpl for NdiAudioSrc {
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
fn unlock_stop(
|
fn unlock_stop(&self, element: &gst_base::BaseSrc) -> Result<(), gst::ErrorMessage> {
|
||||||
&self,
|
|
||||||
element: &gst_base::BaseSrc,
|
|
||||||
) -> std::result::Result<(), gst::ErrorMessage> {
|
|
||||||
gst_debug!(self.cat, obj: element, "Stop unlocking",);
|
gst_debug!(self.cat, obj: element, "Stop unlocking",);
|
||||||
if let Some(ref controller) = *self.receiver_controller.lock().unwrap() {
|
if let Some(ref controller) = *self.receiver_controller.lock().unwrap() {
|
||||||
controller.set_flushing(false);
|
controller.set_flushing(false);
|
||||||
|
|
|
@ -410,7 +410,13 @@ impl ElementImpl for NdiVideoSrc {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl BaseSrcImpl for NdiVideoSrc {
|
impl BaseSrcImpl for NdiVideoSrc {
|
||||||
fn unlock(&self, element: &gst_base::BaseSrc) -> std::result::Result<(), gst::ErrorMessage> {
|
fn negotiate(&self, _element: &gst_base::BaseSrc) -> Result<(), gst::LoggableError> {
|
||||||
|
// Always succeed here without doing anything: we will set the caps once we received a
|
||||||
|
// buffer, there's nothing we can negotiate
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
|
||||||
|
fn unlock(&self, element: &gst_base::BaseSrc) -> Result<(), gst::ErrorMessage> {
|
||||||
gst_debug!(self.cat, obj: element, "Unlocking",);
|
gst_debug!(self.cat, obj: element, "Unlocking",);
|
||||||
if let Some(ref controller) = *self.receiver_controller.lock().unwrap() {
|
if let Some(ref controller) = *self.receiver_controller.lock().unwrap() {
|
||||||
controller.set_flushing(true);
|
controller.set_flushing(true);
|
||||||
|
@ -418,10 +424,7 @@ impl BaseSrcImpl for NdiVideoSrc {
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
fn unlock_stop(
|
fn unlock_stop(&self, element: &gst_base::BaseSrc) -> Result<(), gst::ErrorMessage> {
|
||||||
&self,
|
|
||||||
element: &gst_base::BaseSrc,
|
|
||||||
) -> std::result::Result<(), gst::ErrorMessage> {
|
|
||||||
gst_debug!(self.cat, obj: element, "Stop unlocking",);
|
gst_debug!(self.cat, obj: element, "Stop unlocking",);
|
||||||
if let Some(ref controller) = *self.receiver_controller.lock().unwrap() {
|
if let Some(ref controller) = *self.receiver_controller.lock().unwrap() {
|
||||||
controller.set_flushing(false);
|
controller.set_flushing(false);
|
||||||
|
|
Loading…
Reference in a new issue