mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-01-03 07:48:48 +00:00
rtponvifdepay: Set caps on the source pad
The RTP depayloader base class does not take care of this in any way and it has to be done manually.
This commit is contained in:
parent
b9bc331ebc
commit
dcad6ffe34
1 changed files with 9 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
||||||
use gst::glib;
|
use gst::glib;
|
||||||
use gst::subclass::prelude::*;
|
use gst::subclass::prelude::*;
|
||||||
|
use gst_rtp::prelude::*;
|
||||||
use gst_rtp::subclass::prelude::*;
|
use gst_rtp::subclass::prelude::*;
|
||||||
use once_cell::sync::Lazy;
|
use once_cell::sync::Lazy;
|
||||||
use std::sync::Mutex;
|
use std::sync::Mutex;
|
||||||
|
@ -83,6 +84,14 @@ impl ElementImpl for OnvifDepay {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl RTPBaseDepayloadImpl for OnvifDepay {
|
impl RTPBaseDepayloadImpl for OnvifDepay {
|
||||||
|
fn set_caps(&self, element: &Self::Type, _caps: &gst::Caps) -> Result<(), gst::LoggableError> {
|
||||||
|
let src_pad = element.src_pad();
|
||||||
|
let src_caps = src_pad.pad_template_caps();
|
||||||
|
src_pad.push_event(gst::event::Caps::builder(&src_caps).build());
|
||||||
|
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
|
||||||
fn process_rtp_packet(
|
fn process_rtp_packet(
|
||||||
&self,
|
&self,
|
||||||
element: &Self::Type,
|
element: &Self::Type,
|
||||||
|
|
Loading…
Reference in a new issue