Update dependencies using the new Signall::builder API

This commit is contained in:
Thibault Saunier 2022-08-15 23:20:40 -04:00 committed by Mathieu Duponchelle
parent c0c0d42d9a
commit e0ad7e4c16
2 changed files with 310 additions and 259 deletions

454
Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -2480,14 +2480,8 @@ impl ObjectImpl for WebRTCSink {
* This signal can be used to tweak @webrtcbin, creating a data
* channel for example.
*/
glib::subclass::Signal::builder(
"consumer-added",
&[
String::static_type().into(),
gst::Element::static_type().into(),
],
glib::types::Type::UNIT.into(),
)
glib::subclass::Signal::builder("consumer-added")
.param_types([String::static_type(), gst::Element::static_type()])
.build(),
/*
* RsWebRTCSink::consumer_removed:
@ -2497,25 +2491,15 @@ impl ObjectImpl for WebRTCSink {
* This signal is emitted right after the connection with a consumer
* has been dropped.
*/
glib::subclass::Signal::builder(
"consumer-removed",
&[
String::static_type().into(),
gst::Element::static_type().into(),
],
glib::types::Type::UNIT.into(),
)
glib::subclass::Signal::builder("consumer-removed")
.param_types([String::static_type(), gst::Element::static_type()])
.build(),
/*
* RsWebRTCSink::get_consumers:
*
* List all consumers (by ID).
*/
glib::subclass::Signal::builder(
"get-consumers",
&[],
<Vec<String>>::static_type().into(),
)
glib::subclass::Signal::builder("get-consumers")
.action()
.class_handler(|_, args| {
let element = args[0].get::<super::WebRTCSink>().expect("signal arg");
@ -2533,6 +2517,7 @@ impl ObjectImpl for WebRTCSink {
);
res
})
.return_type::<Vec<String>>()
.build(),
/*
* RsWebRTCSink::encoder-setup:
@ -2545,15 +2530,13 @@ impl ObjectImpl for WebRTCSink {
* Returns: True if the encoder is entirely configured,
* False to let other handlers run
*/
glib::subclass::Signal::builder(
"encoder-setup",
&[
String::static_type().into(),
String::static_type().into(),
gst::Element::static_type().into(),
],
bool::static_type().into(),
)
glib::subclass::Signal::builder("encoder-setup")
.param_types([
String::static_type(),
String::static_type(),
gst::Element::static_type(),
])
.return_type::<bool>()
.accumulator(|_hint, _ret, value| !value.get::<bool>().unwrap())
.class_handler(|_, args| {
let element = args[0].get::<super::WebRTCSink>().expect("signal arg");