mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-01-11 11:45:30 +00:00
Update for glib property API changes
This commit is contained in:
parent
7d1f6b0bd4
commit
fb741f26f3
11 changed files with 108 additions and 146 deletions
|
@ -60,8 +60,8 @@ struct AudioEcho {
|
|||
}
|
||||
|
||||
static PROPERTIES: [subclass::Property; 4] = [
|
||||
subclass::Property("max-delay", || {
|
||||
glib::ParamSpec::uint64("max-delay",
|
||||
subclass::Property("max-delay", |name| {
|
||||
glib::ParamSpec::uint64(name,
|
||||
"Maximum Delay",
|
||||
"Maximum delay of the echo in nanoseconds (can't be changed in PLAYING or PAUSED state)",
|
||||
0, u64::MAX,
|
||||
|
@ -69,9 +69,9 @@ static PROPERTIES: [subclass::Property; 4] = [
|
|||
glib::ParamFlags::READWRITE,
|
||||
)
|
||||
}),
|
||||
subclass::Property("delay", || {
|
||||
subclass::Property("delay", |name| {
|
||||
glib::ParamSpec::uint64(
|
||||
"delay",
|
||||
name,
|
||||
"Delay",
|
||||
"Delay of the echo in nanoseconds",
|
||||
0,
|
||||
|
@ -80,9 +80,9 @@ static PROPERTIES: [subclass::Property; 4] = [
|
|||
glib::ParamFlags::READWRITE,
|
||||
)
|
||||
}),
|
||||
subclass::Property("intensity", || {
|
||||
subclass::Property("intensity", |name| {
|
||||
glib::ParamSpec::double(
|
||||
"intensity",
|
||||
name,
|
||||
"Intensity",
|
||||
"Intensity of the echo",
|
||||
0.0,
|
||||
|
@ -91,9 +91,9 @@ static PROPERTIES: [subclass::Property; 4] = [
|
|||
glib::ParamFlags::READWRITE,
|
||||
)
|
||||
}),
|
||||
subclass::Property("feedback", || {
|
||||
subclass::Property("feedback", |name| {
|
||||
glib::ParamSpec::double(
|
||||
"feedback",
|
||||
name,
|
||||
"Feedback",
|
||||
"Amount of feedback",
|
||||
0.0,
|
||||
|
|
|
@ -40,11 +40,9 @@ impl Default for Settings {
|
|||
}
|
||||
}
|
||||
|
||||
const LOCATION_PROP: &str = "location";
|
||||
|
||||
static PROPERTIES: [subclass::Property; 1] = [subclass::Property(LOCATION_PROP, || {
|
||||
static PROPERTIES: [subclass::Property; 1] = [subclass::Property("location", |name| {
|
||||
glib::ParamSpec::string(
|
||||
LOCATION_PROP,
|
||||
name,
|
||||
"File Location",
|
||||
"Location of the file to write",
|
||||
None,
|
||||
|
@ -79,11 +77,7 @@ impl FileSink {
|
|||
if let State::Started { .. } = *state {
|
||||
return Err(gst::Error::new(
|
||||
gst::LibraryError::Failed,
|
||||
format!(
|
||||
"Changing the `{}` property on a started `filesink` is not supported",
|
||||
LOCATION_PROP,
|
||||
)
|
||||
.as_str(),
|
||||
"Changing the `location` property on a started `filesink` is not supported",
|
||||
));
|
||||
}
|
||||
|
||||
|
@ -95,31 +89,19 @@ impl FileSink {
|
|||
gst_info!(
|
||||
self.cat,
|
||||
obj: element,
|
||||
"Changing `{}` from {:?} to {}",
|
||||
LOCATION_PROP,
|
||||
"Changing `location` from {:?} to {}",
|
||||
location_cur,
|
||||
location,
|
||||
);
|
||||
}
|
||||
None => {
|
||||
gst_info!(
|
||||
self.cat,
|
||||
obj: element,
|
||||
"Setting `{}` to {}",
|
||||
LOCATION_PROP,
|
||||
location,
|
||||
);
|
||||
gst_info!(self.cat, obj: element, "Setting `location` to {}", location,);
|
||||
}
|
||||
}
|
||||
Some(location)
|
||||
}
|
||||
None => {
|
||||
gst_info!(
|
||||
self.cat,
|
||||
obj: element,
|
||||
"Resetting `{}` to None",
|
||||
LOCATION_PROP
|
||||
);
|
||||
gst_info!(self.cat, obj: element, "Resetting `location` to None",);
|
||||
None
|
||||
}
|
||||
};
|
||||
|
@ -175,7 +157,7 @@ impl ObjectImpl for FileSink {
|
|||
fn set_property(&self, obj: &glib::Object, id: usize, value: &glib::Value) {
|
||||
let prop = &PROPERTIES[id];
|
||||
match *prop {
|
||||
subclass::Property(LOCATION_PROP, ..) => {
|
||||
subclass::Property("location", ..) => {
|
||||
let element = obj.downcast_ref::<gst_base::BaseSink>().unwrap();
|
||||
|
||||
let res = match value.get::<String>() {
|
||||
|
@ -188,8 +170,7 @@ impl ObjectImpl for FileSink {
|
|||
gst_error!(
|
||||
self.cat,
|
||||
obj: element,
|
||||
"Failed to set property `{}`: {}",
|
||||
LOCATION_PROP,
|
||||
"Failed to set property `location`: {}",
|
||||
err
|
||||
);
|
||||
}
|
||||
|
@ -201,7 +182,7 @@ impl ObjectImpl for FileSink {
|
|||
fn get_property(&self, _obj: &glib::Object, id: usize) -> Result<glib::Value, ()> {
|
||||
let prop = &PROPERTIES[id];
|
||||
match *prop {
|
||||
subclass::Property(LOCATION_PROP, ..) => {
|
||||
subclass::Property("location", ..) => {
|
||||
let settings = self.settings.lock().unwrap();
|
||||
let location = settings
|
||||
.location
|
||||
|
|
|
@ -39,11 +39,9 @@ impl Default for Settings {
|
|||
}
|
||||
}
|
||||
|
||||
const LOCATION_PROP: &str = "location";
|
||||
|
||||
static PROPERTIES: [subclass::Property; 1] = [subclass::Property(LOCATION_PROP, || {
|
||||
static PROPERTIES: [subclass::Property; 1] = [subclass::Property("location", |name| {
|
||||
glib::ParamSpec::string(
|
||||
LOCATION_PROP,
|
||||
name,
|
||||
"File Location",
|
||||
"Location of the file to read from",
|
||||
None,
|
||||
|
@ -78,11 +76,7 @@ impl FileSrc {
|
|||
if let State::Started { .. } = *state {
|
||||
return Err(gst::Error::new(
|
||||
gst::LibraryError::Failed,
|
||||
format!(
|
||||
"Changing the `{}` property on a started `filesrc` is not supported",
|
||||
LOCATION_PROP,
|
||||
)
|
||||
.as_str(),
|
||||
"Changing the `location` property on a started `filesrc` is not supported",
|
||||
));
|
||||
}
|
||||
|
||||
|
@ -108,31 +102,19 @@ impl FileSrc {
|
|||
gst_info!(
|
||||
self.cat,
|
||||
obj: element,
|
||||
"Changing `{}` from {:?} to {}",
|
||||
LOCATION_PROP,
|
||||
"Changing `location` from {:?} to {}",
|
||||
location_cur,
|
||||
location,
|
||||
);
|
||||
}
|
||||
None => {
|
||||
gst_info!(
|
||||
self.cat,
|
||||
obj: element,
|
||||
"Setting `{}` to {}",
|
||||
LOCATION_PROP,
|
||||
location,
|
||||
);
|
||||
gst_info!(self.cat, obj: element, "Setting `location to {}", location,);
|
||||
}
|
||||
}
|
||||
Some(location)
|
||||
}
|
||||
None => {
|
||||
gst_info!(
|
||||
self.cat,
|
||||
obj: element,
|
||||
"Resetting `{}` to None",
|
||||
LOCATION_PROP
|
||||
);
|
||||
gst_info!(self.cat, obj: element, "Resetting `location` to None",);
|
||||
None
|
||||
}
|
||||
};
|
||||
|
@ -188,7 +170,7 @@ impl ObjectImpl for FileSrc {
|
|||
fn set_property(&self, obj: &glib::Object, id: usize, value: &glib::Value) {
|
||||
let prop = &PROPERTIES[id];
|
||||
match *prop {
|
||||
subclass::Property(LOCATION_PROP, ..) => {
|
||||
subclass::Property("name", ..) => {
|
||||
let element = obj.downcast_ref::<gst_base::BaseSrc>().unwrap();
|
||||
|
||||
let res = match value.get::<String>() {
|
||||
|
@ -201,8 +183,7 @@ impl ObjectImpl for FileSrc {
|
|||
gst_error!(
|
||||
self.cat,
|
||||
obj: element,
|
||||
"Failed to set property `{}`: {}",
|
||||
LOCATION_PROP,
|
||||
"Failed to set property `location`: {}",
|
||||
err
|
||||
);
|
||||
}
|
||||
|
@ -214,7 +195,7 @@ impl ObjectImpl for FileSrc {
|
|||
fn get_property(&self, _obj: &glib::Object, id: usize) -> Result<glib::Value, ()> {
|
||||
let prop = &PROPERTIES[id];
|
||||
match *prop {
|
||||
subclass::Property(LOCATION_PROP, ..) => {
|
||||
subclass::Property("name", ..) => {
|
||||
let settings = self.settings.lock().unwrap();
|
||||
let location = settings
|
||||
.location
|
||||
|
|
|
@ -64,18 +64,18 @@ impl Default for Settings {
|
|||
}
|
||||
|
||||
static PROPERTIES: [subclass::Property; 5] = [
|
||||
subclass::Property("context", || {
|
||||
subclass::Property("context", |name| {
|
||||
glib::ParamSpec::string(
|
||||
"context",
|
||||
name,
|
||||
"Context",
|
||||
"Context name to share threads with",
|
||||
Some(DEFAULT_CONTEXT),
|
||||
glib::ParamFlags::READWRITE,
|
||||
)
|
||||
}),
|
||||
subclass::Property("context-wait", || {
|
||||
subclass::Property("context-wait", |name| {
|
||||
glib::ParamSpec::uint(
|
||||
"context-wait",
|
||||
name,
|
||||
"Context Wait",
|
||||
"Throttle poll loop to run at most once every this many ms",
|
||||
0,
|
||||
|
@ -84,9 +84,9 @@ static PROPERTIES: [subclass::Property; 5] = [
|
|||
glib::ParamFlags::READWRITE,
|
||||
)
|
||||
}),
|
||||
subclass::Property("max-buffers", || {
|
||||
subclass::Property("max-buffers", |name| {
|
||||
glib::ParamSpec::uint(
|
||||
"max-buffers",
|
||||
name,
|
||||
"Max Buffers",
|
||||
"Maximum number of buffers to queue up",
|
||||
1,
|
||||
|
@ -95,18 +95,18 @@ static PROPERTIES: [subclass::Property; 5] = [
|
|||
glib::ParamFlags::READWRITE,
|
||||
)
|
||||
}),
|
||||
subclass::Property("caps", || {
|
||||
subclass::Property("caps", |name| {
|
||||
glib::ParamSpec::boxed(
|
||||
"caps",
|
||||
name,
|
||||
"Caps",
|
||||
"Caps to use",
|
||||
gst::Caps::static_type(),
|
||||
glib::ParamFlags::READWRITE,
|
||||
)
|
||||
}),
|
||||
subclass::Property("do-timestamp", || {
|
||||
subclass::Property("do-timestamp", |name| {
|
||||
glib::ParamSpec::boolean(
|
||||
"do-timestamp",
|
||||
name,
|
||||
"Do Timestamp",
|
||||
"Timestamp buffers with the current running time on arrival",
|
||||
DEFAULT_DO_TIMESTAMP,
|
||||
|
|
|
@ -88,9 +88,9 @@ impl Default for SettingsSrc {
|
|||
}
|
||||
|
||||
static PROPERTIES_SRC: [subclass::Property; 6] = [
|
||||
subclass::Property("max-size-buffers", || {
|
||||
subclass::Property("max-size-buffers", |name| {
|
||||
glib::ParamSpec::uint(
|
||||
"max-size-buffers",
|
||||
name,
|
||||
"Max Size Buffers",
|
||||
"Maximum number of buffers to queue (0=unlimited)",
|
||||
0,
|
||||
|
@ -99,9 +99,9 @@ static PROPERTIES_SRC: [subclass::Property; 6] = [
|
|||
glib::ParamFlags::READWRITE,
|
||||
)
|
||||
}),
|
||||
subclass::Property("max-size-bytes", || {
|
||||
subclass::Property("max-size-bytes", |name| {
|
||||
glib::ParamSpec::uint(
|
||||
"max-size-bytes",
|
||||
name,
|
||||
"Max Size Bytes",
|
||||
"Maximum number of bytes to queue (0=unlimited)",
|
||||
0,
|
||||
|
@ -110,9 +110,9 @@ static PROPERTIES_SRC: [subclass::Property; 6] = [
|
|||
glib::ParamFlags::READWRITE,
|
||||
)
|
||||
}),
|
||||
subclass::Property("max-size-time", || {
|
||||
subclass::Property("max-size-time", |name| {
|
||||
glib::ParamSpec::uint64(
|
||||
"max-size-time",
|
||||
name,
|
||||
"Max Size Time",
|
||||
"Maximum number of nanoseconds to queue (0=unlimited)",
|
||||
0,
|
||||
|
@ -121,18 +121,18 @@ static PROPERTIES_SRC: [subclass::Property; 6] = [
|
|||
glib::ParamFlags::READWRITE,
|
||||
)
|
||||
}),
|
||||
subclass::Property("context", || {
|
||||
subclass::Property("context", |name| {
|
||||
glib::ParamSpec::string(
|
||||
"context",
|
||||
name,
|
||||
"Context",
|
||||
"Context name to share threads with",
|
||||
Some(DEFAULT_CONTEXT),
|
||||
glib::ParamFlags::READWRITE,
|
||||
)
|
||||
}),
|
||||
subclass::Property("context-wait", || {
|
||||
subclass::Property("context-wait", |name| {
|
||||
glib::ParamSpec::uint(
|
||||
"context-wait",
|
||||
name,
|
||||
"Context Wait",
|
||||
"Throttle poll loop to run at most once every this many ms",
|
||||
0,
|
||||
|
@ -141,9 +141,9 @@ static PROPERTIES_SRC: [subclass::Property; 6] = [
|
|||
glib::ParamFlags::READWRITE,
|
||||
)
|
||||
}),
|
||||
subclass::Property("proxy-context", || {
|
||||
subclass::Property("proxy-context", |name| {
|
||||
glib::ParamSpec::string(
|
||||
"proxy-context",
|
||||
name,
|
||||
"Proxy Context",
|
||||
"Context name of the proxy to share with",
|
||||
Some(DEFAULT_PROXY_CONTEXT),
|
||||
|
@ -152,9 +152,9 @@ static PROPERTIES_SRC: [subclass::Property; 6] = [
|
|||
}),
|
||||
];
|
||||
|
||||
static PROPERTIES_SINK: [subclass::Property; 1] = [subclass::Property("proxy-context", || {
|
||||
static PROPERTIES_SINK: [subclass::Property; 1] = [subclass::Property("proxy-context", |name| {
|
||||
glib::ParamSpec::string(
|
||||
"proxy-context",
|
||||
name,
|
||||
"Proxy Context",
|
||||
"Context name of the proxy to share with",
|
||||
Some(DEFAULT_PROXY_CONTEXT),
|
||||
|
|
|
@ -65,9 +65,9 @@ impl Default for Settings {
|
|||
}
|
||||
|
||||
static PROPERTIES: [subclass::Property; 5] = [
|
||||
subclass::Property("max-size-buffers", || {
|
||||
subclass::Property("max-size-buffers", |name| {
|
||||
glib::ParamSpec::uint(
|
||||
"max-size-buffers",
|
||||
name,
|
||||
"Max Size Buffers",
|
||||
"Maximum number of buffers to queue (0=unlimited)",
|
||||
0,
|
||||
|
@ -76,9 +76,9 @@ static PROPERTIES: [subclass::Property; 5] = [
|
|||
glib::ParamFlags::READWRITE,
|
||||
)
|
||||
}),
|
||||
subclass::Property("max-size-bytes", || {
|
||||
subclass::Property("max-size-bytes", |name| {
|
||||
glib::ParamSpec::uint(
|
||||
"max-size-bytes",
|
||||
name,
|
||||
"Max Size Bytes",
|
||||
"Maximum number of bytes to queue (0=unlimited)",
|
||||
0,
|
||||
|
@ -87,9 +87,9 @@ static PROPERTIES: [subclass::Property; 5] = [
|
|||
glib::ParamFlags::READWRITE,
|
||||
)
|
||||
}),
|
||||
subclass::Property("max-size-time", || {
|
||||
subclass::Property("max-size-time", |name| {
|
||||
glib::ParamSpec::uint64(
|
||||
"max-size-time",
|
||||
name,
|
||||
"Max Size Time",
|
||||
"Maximum number of nanoseconds to queue (0=unlimited)",
|
||||
0,
|
||||
|
@ -98,18 +98,18 @@ static PROPERTIES: [subclass::Property; 5] = [
|
|||
glib::ParamFlags::READWRITE,
|
||||
)
|
||||
}),
|
||||
subclass::Property("context", || {
|
||||
subclass::Property("context", |name| {
|
||||
glib::ParamSpec::string(
|
||||
"context",
|
||||
name,
|
||||
"Context",
|
||||
"Context name to share threads with",
|
||||
Some(DEFAULT_CONTEXT),
|
||||
glib::ParamFlags::READWRITE,
|
||||
)
|
||||
}),
|
||||
subclass::Property("context-wait", || {
|
||||
subclass::Property("context-wait", |name| {
|
||||
glib::ParamSpec::uint(
|
||||
"context-wait",
|
||||
name,
|
||||
"Context Wait",
|
||||
"Throttle poll loop to run at most once every this many ms",
|
||||
0,
|
||||
|
|
|
@ -72,18 +72,18 @@ impl Default for Settings {
|
|||
}
|
||||
|
||||
static PROPERTIES: [subclass::Property; 6] = [
|
||||
subclass::Property("address", || {
|
||||
subclass::Property("address", |name| {
|
||||
glib::ParamSpec::string(
|
||||
"address",
|
||||
name,
|
||||
"Address",
|
||||
"Address to receive packets from",
|
||||
DEFAULT_ADDRESS,
|
||||
glib::ParamFlags::READWRITE,
|
||||
)
|
||||
}),
|
||||
subclass::Property("port", || {
|
||||
subclass::Property("port", |name| {
|
||||
glib::ParamSpec::uint(
|
||||
"port",
|
||||
name,
|
||||
"Port",
|
||||
"Port to receive packets from",
|
||||
0,
|
||||
|
@ -92,18 +92,18 @@ static PROPERTIES: [subclass::Property; 6] = [
|
|||
glib::ParamFlags::READWRITE,
|
||||
)
|
||||
}),
|
||||
subclass::Property("caps", || {
|
||||
subclass::Property("caps", |name| {
|
||||
glib::ParamSpec::boxed(
|
||||
"caps",
|
||||
name,
|
||||
"Caps",
|
||||
"Caps to use",
|
||||
gst::Caps::static_type(),
|
||||
glib::ParamFlags::READWRITE,
|
||||
)
|
||||
}),
|
||||
subclass::Property("chunk-size", || {
|
||||
subclass::Property("chunk-size", |name| {
|
||||
glib::ParamSpec::uint(
|
||||
"chunk-size",
|
||||
name,
|
||||
"Chunk Size",
|
||||
"Chunk Size",
|
||||
0,
|
||||
|
@ -112,18 +112,18 @@ static PROPERTIES: [subclass::Property; 6] = [
|
|||
glib::ParamFlags::READWRITE,
|
||||
)
|
||||
}),
|
||||
subclass::Property("context", || {
|
||||
subclass::Property("context", |name| {
|
||||
glib::ParamSpec::string(
|
||||
"context",
|
||||
name,
|
||||
"Context",
|
||||
"Context name to share threads with",
|
||||
Some(DEFAULT_CONTEXT),
|
||||
glib::ParamFlags::READWRITE,
|
||||
)
|
||||
}),
|
||||
subclass::Property("context-wait", || {
|
||||
subclass::Property("context-wait", |name| {
|
||||
glib::ParamSpec::uint(
|
||||
"context-wait",
|
||||
name,
|
||||
"Context Wait",
|
||||
"Throttle poll loop to run at most once every this many ms",
|
||||
0,
|
||||
|
|
|
@ -180,18 +180,18 @@ impl Default for Settings {
|
|||
}
|
||||
|
||||
static PROPERTIES: [subclass::Property; 9] = [
|
||||
subclass::Property("address", || {
|
||||
subclass::Property("address", |name| {
|
||||
glib::ParamSpec::string(
|
||||
"address",
|
||||
name,
|
||||
"Address",
|
||||
"Address/multicast group to listen on",
|
||||
DEFAULT_ADDRESS,
|
||||
glib::ParamFlags::READWRITE,
|
||||
)
|
||||
}),
|
||||
subclass::Property("port", || {
|
||||
subclass::Property("port", |name| {
|
||||
glib::ParamSpec::uint(
|
||||
"port",
|
||||
name,
|
||||
"Port",
|
||||
"Port to listen on",
|
||||
0,
|
||||
|
@ -200,27 +200,27 @@ static PROPERTIES: [subclass::Property; 9] = [
|
|||
glib::ParamFlags::READWRITE,
|
||||
)
|
||||
}),
|
||||
subclass::Property("reuse", || {
|
||||
subclass::Property("reuse", |name| {
|
||||
glib::ParamSpec::boolean(
|
||||
"reuse",
|
||||
name,
|
||||
"Reuse",
|
||||
"Allow reuse of the port",
|
||||
DEFAULT_REUSE,
|
||||
glib::ParamFlags::READWRITE,
|
||||
)
|
||||
}),
|
||||
subclass::Property("caps", || {
|
||||
subclass::Property("caps", |name| {
|
||||
glib::ParamSpec::boxed(
|
||||
"caps",
|
||||
name,
|
||||
"Caps",
|
||||
"Caps to use",
|
||||
gst::Caps::static_type(),
|
||||
glib::ParamFlags::READWRITE,
|
||||
)
|
||||
}),
|
||||
subclass::Property("mtu", || {
|
||||
subclass::Property("mtu", |name| {
|
||||
glib::ParamSpec::uint(
|
||||
"mtu",
|
||||
name,
|
||||
"MTU",
|
||||
"MTU",
|
||||
0,
|
||||
|
@ -229,36 +229,36 @@ static PROPERTIES: [subclass::Property; 9] = [
|
|||
glib::ParamFlags::READWRITE,
|
||||
)
|
||||
}),
|
||||
subclass::Property("socket", || {
|
||||
subclass::Property("socket", |name| {
|
||||
glib::ParamSpec::object(
|
||||
"socket",
|
||||
name,
|
||||
"Socket",
|
||||
"Socket to use for UDP reception. (None == allocate)",
|
||||
gio::Socket::static_type(),
|
||||
glib::ParamFlags::READWRITE,
|
||||
)
|
||||
}),
|
||||
subclass::Property("used-socket", || {
|
||||
subclass::Property("used-socket", |name| {
|
||||
glib::ParamSpec::object(
|
||||
"used-socket",
|
||||
name,
|
||||
"Used Socket",
|
||||
"Socket currently in use for UDP reception. (None = no socket)",
|
||||
gio::Socket::static_type(),
|
||||
glib::ParamFlags::READABLE,
|
||||
)
|
||||
}),
|
||||
subclass::Property("context", || {
|
||||
subclass::Property("context", |name| {
|
||||
glib::ParamSpec::string(
|
||||
"context",
|
||||
name,
|
||||
"Context",
|
||||
"Context name to share threads with",
|
||||
Some(DEFAULT_CONTEXT),
|
||||
glib::ParamFlags::READWRITE,
|
||||
)
|
||||
}),
|
||||
subclass::Property("context-wait", || {
|
||||
subclass::Property("context-wait", |name| {
|
||||
glib::ParamSpec::uint(
|
||||
"context-wait",
|
||||
name,
|
||||
"Context Wait",
|
||||
"Throttle poll loop to run at most once every this many ms",
|
||||
0,
|
||||
|
|
|
@ -47,18 +47,18 @@ impl Default for Settings {
|
|||
}
|
||||
|
||||
static PROPERTIES: [subclass::Property; 2] = [
|
||||
subclass::Property("record", || {
|
||||
subclass::Property("record", |name| {
|
||||
glib::ParamSpec::boolean(
|
||||
"record",
|
||||
name,
|
||||
"Record",
|
||||
"Enable/disable recording",
|
||||
DEFAULT_RECORD,
|
||||
glib::ParamFlags::READWRITE,
|
||||
)
|
||||
}),
|
||||
subclass::Property("recording", || {
|
||||
subclass::Property("recording", |name| {
|
||||
glib::ParamSpec::boolean(
|
||||
"recording",
|
||||
name,
|
||||
"Recording",
|
||||
"Whether recording is currently taking place",
|
||||
DEFAULT_RECORD,
|
||||
|
|
|
@ -41,18 +41,18 @@ impl Default for Settings {
|
|||
|
||||
// Metadata for the properties
|
||||
static PROPERTIES: [subclass::Property; 2] = [
|
||||
subclass::Property("invert", || {
|
||||
subclass::Property("invert", |name| {
|
||||
glib::ParamSpec::boolean(
|
||||
"invert",
|
||||
name,
|
||||
"Invert",
|
||||
"Invert grayscale output",
|
||||
DEFAULT_INVERT,
|
||||
glib::ParamFlags::READWRITE,
|
||||
)
|
||||
}),
|
||||
subclass::Property("shift", || {
|
||||
subclass::Property("shift", |name| {
|
||||
glib::ParamSpec::uint(
|
||||
"shift",
|
||||
name,
|
||||
"Shift",
|
||||
"Shift grayscale output (wrapping around)",
|
||||
0,
|
||||
|
|
|
@ -57,9 +57,9 @@ impl Default for Settings {
|
|||
|
||||
// Metadata for the properties
|
||||
static PROPERTIES: [subclass::Property; 5] = [
|
||||
subclass::Property("samples-per-buffer", || {
|
||||
subclass::Property("samples-per-buffer", |name| {
|
||||
glib::ParamSpec::uint(
|
||||
"samples-per-buffer",
|
||||
name,
|
||||
"Samples Per Buffer",
|
||||
"Number of samples per output buffer",
|
||||
1,
|
||||
|
@ -68,9 +68,9 @@ static PROPERTIES: [subclass::Property; 5] = [
|
|||
glib::ParamFlags::READWRITE,
|
||||
)
|
||||
}),
|
||||
subclass::Property("freq", || {
|
||||
subclass::Property("freq", |name| {
|
||||
glib::ParamSpec::uint(
|
||||
"freq",
|
||||
name,
|
||||
"Frequency",
|
||||
"Frequency",
|
||||
1,
|
||||
|
@ -79,9 +79,9 @@ static PROPERTIES: [subclass::Property; 5] = [
|
|||
glib::ParamFlags::READWRITE,
|
||||
)
|
||||
}),
|
||||
subclass::Property("volume", || {
|
||||
subclass::Property("volume", |name| {
|
||||
glib::ParamSpec::double(
|
||||
"volume",
|
||||
name,
|
||||
"Volume",
|
||||
"Output volume",
|
||||
0.0,
|
||||
|
@ -90,18 +90,18 @@ static PROPERTIES: [subclass::Property; 5] = [
|
|||
glib::ParamFlags::READWRITE,
|
||||
)
|
||||
}),
|
||||
subclass::Property("mute", || {
|
||||
subclass::Property("mute", |name| {
|
||||
glib::ParamSpec::boolean(
|
||||
"mute",
|
||||
name,
|
||||
"Mute",
|
||||
"Mute",
|
||||
DEFAULT_MUTE,
|
||||
glib::ParamFlags::READWRITE,
|
||||
)
|
||||
}),
|
||||
subclass::Property("is-live", || {
|
||||
subclass::Property("is-live", |name| {
|
||||
glib::ParamSpec::boolean(
|
||||
"is-live",
|
||||
name,
|
||||
"Is Live",
|
||||
"(Pseudo) live output",
|
||||
DEFAULT_IS_LIVE,
|
||||
|
|
Loading…
Reference in a new issue