webrtcsink: fix custom_signaller hanging

Since 6a23ae168f, the chain function
of webrtcsink adds a custom meta on input buffers.

That custom meta was registered only by the class_init of the subclasses
of BaseWebRTCSink, but the custom signaller example uses
BaseWebRTCSink::with_signaller() directly.

Fix by registering the meta in BaseWebRTCSink::class_init()

Fixes: #610
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1854>
This commit is contained in:
Mathieu Duponchelle 2024-10-16 15:23:01 +02:00
parent 628dee9079
commit 5f0ca7acde

View file

@ -4419,6 +4419,10 @@ impl ObjectSubclass for BaseWebRTCSink {
type Type = super::BaseWebRTCSink; type Type = super::BaseWebRTCSink;
type ParentType = gst::Bin; type ParentType = gst::Bin;
type Interfaces = (gst::ChildProxy, gst_video::Navigation); type Interfaces = (gst::ChildProxy, gst_video::Navigation);
fn class_init(_klass: &mut Self::Class) {
register_dye_meta();
}
} }
fn register_dye_meta() { fn register_dye_meta() {
@ -4442,12 +4446,7 @@ fn register_dye_meta() {
}); });
} }
unsafe impl<T: BaseWebRTCSinkImpl> IsSubclassable<T> for super::BaseWebRTCSink { unsafe impl<T: BaseWebRTCSinkImpl> IsSubclassable<T> for super::BaseWebRTCSink {}
fn class_init(class: &mut glib::Class<Self>) {
register_dye_meta();
Self::parent_class_init::<T>(class);
}
}
pub(crate) trait BaseWebRTCSinkImpl: BinImpl {} pub(crate) trait BaseWebRTCSinkImpl: BinImpl {}