mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-01-05 00:38:40 +00:00
Update per glib::SignalBuilder changes
This commit is contained in:
parent
7d666ce517
commit
52973d975e
6 changed files with 139 additions and 160 deletions
|
@ -124,8 +124,7 @@ impl ObjectSubclass for EbuR128Level {
|
||||||
impl ObjectImpl for EbuR128Level {
|
impl ObjectImpl for EbuR128Level {
|
||||||
fn signals() -> &'static [glib::subclass::Signal] {
|
fn signals() -> &'static [glib::subclass::Signal] {
|
||||||
static SIGNALS: Lazy<Vec<glib::subclass::Signal>> = Lazy::new(|| {
|
static SIGNALS: Lazy<Vec<glib::subclass::Signal>> = Lazy::new(|| {
|
||||||
vec![
|
vec![glib::subclass::Signal::builder("reset")
|
||||||
glib::subclass::Signal::builder("reset", &[], glib::Type::UNIT.into())
|
|
||||||
.action()
|
.action()
|
||||||
.class_handler(|_token, args| {
|
.class_handler(|_token, args| {
|
||||||
let this = args[0].get::<super::EbuR128Level>().unwrap();
|
let this = args[0].get::<super::EbuR128Level>().unwrap();
|
||||||
|
@ -136,8 +135,7 @@ impl ObjectImpl for EbuR128Level {
|
||||||
|
|
||||||
None
|
None
|
||||||
})
|
})
|
||||||
.build(),
|
.build()]
|
||||||
]
|
|
||||||
});
|
});
|
||||||
|
|
||||||
&*SIGNALS
|
&*SIGNALS
|
||||||
|
|
|
@ -511,11 +511,9 @@ impl ObjectImpl for AppSrc {
|
||||||
fn signals() -> &'static [glib::subclass::Signal] {
|
fn signals() -> &'static [glib::subclass::Signal] {
|
||||||
static SIGNALS: Lazy<Vec<glib::subclass::Signal>> = Lazy::new(|| {
|
static SIGNALS: Lazy<Vec<glib::subclass::Signal>> = Lazy::new(|| {
|
||||||
vec![
|
vec![
|
||||||
glib::subclass::Signal::builder(
|
glib::subclass::Signal::builder("push-buffer")
|
||||||
"push-buffer",
|
.param_types(&[gst::Buffer::static_type()])
|
||||||
&[gst::Buffer::static_type().into()],
|
.return_type::<bool>()
|
||||||
bool::static_type().into(),
|
|
||||||
)
|
|
||||||
.action()
|
.action()
|
||||||
.class_handler(|_, args| {
|
.class_handler(|_, args| {
|
||||||
let element = args[0].get::<super::AppSrc>().expect("signal arg");
|
let element = args[0].get::<super::AppSrc>().expect("signal arg");
|
||||||
|
@ -525,7 +523,8 @@ impl ObjectImpl for AppSrc {
|
||||||
Some(appsrc.push_buffer(&element, buffer).to_value())
|
Some(appsrc.push_buffer(&element, buffer).to_value())
|
||||||
})
|
})
|
||||||
.build(),
|
.build(),
|
||||||
glib::subclass::Signal::builder("end-of-stream", &[], bool::static_type().into())
|
glib::subclass::Signal::builder("end-of-stream")
|
||||||
|
.return_type::<bool>()
|
||||||
.action()
|
.action()
|
||||||
.class_handler(|_, args| {
|
.class_handler(|_, args| {
|
||||||
let element = args[0].get::<super::AppSrc>().expect("signal arg");
|
let element = args[0].get::<super::AppSrc>().expect("signal arg");
|
||||||
|
|
|
@ -1416,11 +1416,7 @@ impl ObjectImpl for JitterBuffer {
|
||||||
|
|
||||||
fn signals() -> &'static [glib::subclass::Signal] {
|
fn signals() -> &'static [glib::subclass::Signal] {
|
||||||
static SIGNALS: Lazy<Vec<glib::subclass::Signal>> = Lazy::new(|| {
|
static SIGNALS: Lazy<Vec<glib::subclass::Signal>> = Lazy::new(|| {
|
||||||
vec![glib::subclass::Signal::builder(
|
vec![glib::subclass::Signal::builder("clear-pt-map")
|
||||||
"clear-pt-map",
|
|
||||||
&[],
|
|
||||||
glib::types::Type::UNIT.into(),
|
|
||||||
)
|
|
||||||
.action()
|
.action()
|
||||||
.class_handler(|_, args| {
|
.class_handler(|_, args| {
|
||||||
let element = args[0].get::<super::JitterBuffer>().expect("signal arg");
|
let element = args[0].get::<super::JitterBuffer>().expect("signal arg");
|
||||||
|
|
|
@ -1045,11 +1045,8 @@ impl ObjectImpl for UdpSink {
|
||||||
fn signals() -> &'static [glib::subclass::Signal] {
|
fn signals() -> &'static [glib::subclass::Signal] {
|
||||||
static SIGNALS: Lazy<Vec<glib::subclass::Signal>> = Lazy::new(|| {
|
static SIGNALS: Lazy<Vec<glib::subclass::Signal>> = Lazy::new(|| {
|
||||||
vec![
|
vec![
|
||||||
glib::subclass::Signal::builder(
|
glib::subclass::Signal::builder("add")
|
||||||
"add",
|
.param_types(&[String::static_type(), i32::static_type()])
|
||||||
&[String::static_type().into(), i32::static_type().into()],
|
|
||||||
glib::types::Type::UNIT.into(),
|
|
||||||
)
|
|
||||||
.action()
|
.action()
|
||||||
.class_handler(|_, args| {
|
.class_handler(|_, args| {
|
||||||
let element = args[0].get::<super::UdpSink>().expect("signal arg");
|
let element = args[0].get::<super::UdpSink>().expect("signal arg");
|
||||||
|
@ -1065,11 +1062,8 @@ impl ObjectImpl for UdpSink {
|
||||||
None
|
None
|
||||||
})
|
})
|
||||||
.build(),
|
.build(),
|
||||||
glib::subclass::Signal::builder(
|
glib::subclass::Signal::builder("remove")
|
||||||
"remove",
|
.param_types(&[String::static_type(), i32::static_type()])
|
||||||
&[String::static_type().into(), i32::static_type().into()],
|
|
||||||
glib::types::Type::UNIT.into(),
|
|
||||||
)
|
|
||||||
.action()
|
.action()
|
||||||
.class_handler(|_, args| {
|
.class_handler(|_, args| {
|
||||||
let element = args[0].get::<super::UdpSink>().expect("signal arg");
|
let element = args[0].get::<super::UdpSink>().expect("signal arg");
|
||||||
|
@ -1085,7 +1079,7 @@ impl ObjectImpl for UdpSink {
|
||||||
None
|
None
|
||||||
})
|
})
|
||||||
.build(),
|
.build(),
|
||||||
glib::subclass::Signal::builder("clear", &[], glib::types::Type::UNIT.into())
|
glib::subclass::Signal::builder("clear")
|
||||||
.action()
|
.action()
|
||||||
.class_handler(|_, args| {
|
.class_handler(|_, args| {
|
||||||
let element = args[0].get::<super::UdpSink>().expect("signal arg");
|
let element = args[0].get::<super::UdpSink>().expect("signal arg");
|
||||||
|
|
|
@ -579,11 +579,9 @@ impl ObjectImpl for HlsSink3 {
|
||||||
fn signals() -> &'static [glib::subclass::Signal] {
|
fn signals() -> &'static [glib::subclass::Signal] {
|
||||||
static SIGNALS: Lazy<Vec<glib::subclass::Signal>> = Lazy::new(|| {
|
static SIGNALS: Lazy<Vec<glib::subclass::Signal>> = Lazy::new(|| {
|
||||||
vec![
|
vec![
|
||||||
glib::subclass::Signal::builder(
|
glib::subclass::Signal::builder(SIGNAL_GET_PLAYLIST_STREAM)
|
||||||
SIGNAL_GET_PLAYLIST_STREAM,
|
.param_types(&[String::static_type()])
|
||||||
&[String::static_type().into()],
|
.return_type::<gio::OutputStream>()
|
||||||
gio::OutputStream::static_type().into(),
|
|
||||||
)
|
|
||||||
.class_handler(|_, args| {
|
.class_handler(|_, args| {
|
||||||
let element = args[0]
|
let element = args[0]
|
||||||
.get::<super::HlsSink3>()
|
.get::<super::HlsSink3>()
|
||||||
|
@ -605,11 +603,9 @@ impl ObjectImpl for HlsSink3 {
|
||||||
false
|
false
|
||||||
})
|
})
|
||||||
.build(),
|
.build(),
|
||||||
glib::subclass::Signal::builder(
|
glib::subclass::Signal::builder(SIGNAL_GET_FRAGMENT_STREAM)
|
||||||
SIGNAL_GET_FRAGMENT_STREAM,
|
.param_types(&[String::static_type()])
|
||||||
&[String::static_type().into()],
|
.return_type::<gio::OutputStream>()
|
||||||
gio::OutputStream::static_type().into(),
|
|
||||||
)
|
|
||||||
.class_handler(|_, args| {
|
.class_handler(|_, args| {
|
||||||
let element = args[0]
|
let element = args[0]
|
||||||
.get::<super::HlsSink3>()
|
.get::<super::HlsSink3>()
|
||||||
|
@ -631,11 +627,9 @@ impl ObjectImpl for HlsSink3 {
|
||||||
false
|
false
|
||||||
})
|
})
|
||||||
.build(),
|
.build(),
|
||||||
glib::subclass::Signal::builder(
|
glib::subclass::Signal::builder(SIGNAL_DELETE_FRAGMENT)
|
||||||
SIGNAL_DELETE_FRAGMENT,
|
.param_types(&[String::static_type()])
|
||||||
&[String::static_type().into()],
|
.return_type::<bool>()
|
||||||
glib::types::Type::BOOL.into(),
|
|
||||||
)
|
|
||||||
.class_handler(|_, args| {
|
.class_handler(|_, args| {
|
||||||
let element = args[0].get::<super::HlsSink3>().expect("signal arg");
|
let element = args[0].get::<super::HlsSink3>().expect("signal arg");
|
||||||
let fragment_location = args[1].get::<String>().expect("signal arg");
|
let fragment_location = args[1].get::<String>().expect("signal arg");
|
||||||
|
|
|
@ -653,11 +653,9 @@ impl ObjectImpl for FallbackSrc {
|
||||||
fn signals() -> &'static [glib::subclass::Signal] {
|
fn signals() -> &'static [glib::subclass::Signal] {
|
||||||
static SIGNALS: Lazy<Vec<glib::subclass::Signal>> = Lazy::new(|| {
|
static SIGNALS: Lazy<Vec<glib::subclass::Signal>> = Lazy::new(|| {
|
||||||
vec![
|
vec![
|
||||||
glib::subclass::Signal::builder(
|
glib::subclass::Signal::builder("update-uri")
|
||||||
"update-uri",
|
.param_types(&[String::static_type()])
|
||||||
&[String::static_type().into()],
|
.return_type::<String>()
|
||||||
String::static_type().into(),
|
|
||||||
)
|
|
||||||
.class_handler(|_token, args| {
|
.class_handler(|_token, args| {
|
||||||
// Simply return the input by default
|
// Simply return the input by default
|
||||||
Some(args[1].clone())
|
Some(args[1].clone())
|
||||||
|
@ -668,7 +666,7 @@ impl ObjectImpl for FallbackSrc {
|
||||||
false
|
false
|
||||||
})
|
})
|
||||||
.build(),
|
.build(),
|
||||||
glib::subclass::Signal::builder("unblock", &[], glib::types::Type::UNIT.into())
|
glib::subclass::Signal::builder("unblock")
|
||||||
.action()
|
.action()
|
||||||
.class_handler(|_token, args| {
|
.class_handler(|_token, args| {
|
||||||
let element = args[0].get::<super::FallbackSrc>().expect("signal arg");
|
let element = args[0].get::<super::FallbackSrc>().expect("signal arg");
|
||||||
|
|
Loading…
Reference in a new issue