mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-12-02 00:11:01 +00:00
Merge pull request #40 from sdroege/negotiate
Don't do anything in BaseSrc::negotiate()
This commit is contained in:
commit
842603482b
2 changed files with 16 additions and 10 deletions
|
@ -375,7 +375,13 @@ impl ElementImpl 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",);
|
||||
if let Some(ref controller) = *self.receiver_controller.lock().unwrap() {
|
||||
controller.set_flushing(true);
|
||||
|
@ -383,10 +389,7 @@ impl BaseSrcImpl for NdiAudioSrc {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
fn unlock_stop(
|
||||
&self,
|
||||
element: &gst_base::BaseSrc,
|
||||
) -> std::result::Result<(), gst::ErrorMessage> {
|
||||
fn unlock_stop(&self, element: &gst_base::BaseSrc) -> Result<(), gst::ErrorMessage> {
|
||||
gst_debug!(self.cat, obj: element, "Stop unlocking",);
|
||||
if let Some(ref controller) = *self.receiver_controller.lock().unwrap() {
|
||||
controller.set_flushing(false);
|
||||
|
|
|
@ -410,7 +410,13 @@ impl ElementImpl 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",);
|
||||
if let Some(ref controller) = *self.receiver_controller.lock().unwrap() {
|
||||
controller.set_flushing(true);
|
||||
|
@ -418,10 +424,7 @@ impl BaseSrcImpl for NdiVideoSrc {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
fn unlock_stop(
|
||||
&self,
|
||||
element: &gst_base::BaseSrc,
|
||||
) -> std::result::Result<(), gst::ErrorMessage> {
|
||||
fn unlock_stop(&self, element: &gst_base::BaseSrc) -> Result<(), gst::ErrorMessage> {
|
||||
gst_debug!(self.cat, obj: element, "Stop unlocking",);
|
||||
if let Some(ref controller) = *self.receiver_controller.lock().unwrap() {
|
||||
controller.set_flushing(false);
|
||||
|
|
Loading…
Reference in a new issue