post fix-getters manual updates

This commit is contained in:
François Laignel 2021-04-12 18:12:05 +02:00
parent 06accc8d98
commit 7d17f88941
47 changed files with 196 additions and 196 deletions

View file

@ -96,14 +96,14 @@ impl ObjectImpl for AudioEcho {
fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![
glib::ParamSpec::uint64("max-delay",
glib::ParamSpec::new_uint64("max-delay",
"Maximum Delay",
"Maximum delay of the echo in nanoseconds (can't be changed in PLAYING or PAUSED state)",
0, u64::MAX,
DEFAULT_MAX_DELAY,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
glib::ParamSpec::uint64(
glib::ParamSpec::new_uint64(
"delay",
"Delay",
"Delay of the echo in nanoseconds",
@ -112,7 +112,7 @@ impl ObjectImpl for AudioEcho {
DEFAULT_DELAY,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING,
),
glib::ParamSpec::double(
glib::ParamSpec::new_double(
"intensity",
"Intensity",
"Intensity of the echo",
@ -121,7 +121,7 @@ impl ObjectImpl for AudioEcho {
DEFAULT_INTENSITY,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING,
),
glib::ParamSpec::double(
glib::ParamSpec::new_double(
"feedback",
"Feedback",
"Amount of feedback",

View file

@ -1754,7 +1754,7 @@ impl ObjectImpl for AudioLoudNorm {
fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![
glib::ParamSpec::double(
glib::ParamSpec::new_double(
"loudness-target",
"Loudness Target",
"Loudness target in LUFS",
@ -1763,7 +1763,7 @@ impl ObjectImpl for AudioLoudNorm {
DEFAULT_LOUDNESS_TARGET,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
glib::ParamSpec::double(
glib::ParamSpec::new_double(
"loudness-range-target",
"Loudness Range Target",
"Loudness range target in LU",
@ -1772,7 +1772,7 @@ impl ObjectImpl for AudioLoudNorm {
DEFAULT_LOUDNESS_RANGE_TARGET,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
glib::ParamSpec::double(
glib::ParamSpec::new_double(
"max-true-peak",
"Maximum True Peak",
"Maximum True Peak in dbTP",
@ -1781,7 +1781,7 @@ impl ObjectImpl for AudioLoudNorm {
DEFAULT_MAX_TRUE_PEAK,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
glib::ParamSpec::double(
glib::ParamSpec::new_double(
"offset",
"Offset Gain",
"Offset Gain in LU",

View file

@ -147,7 +147,7 @@ impl ObjectImpl for EbuR128Level {
fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![
glib::ParamSpec::flags(
glib::ParamSpec::new_flags(
"mode",
"Mode",
"Selection of metrics to calculate",
@ -155,14 +155,14 @@ impl ObjectImpl for EbuR128Level {
DEFAULT_MODE.bits() as u32,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
glib::ParamSpec::boolean(
glib::ParamSpec::new_boolean(
"post-messages",
"Post Messages",
"Whether to post messages on the bus for each interval",
DEFAULT_POST_MESSAGES,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING,
),
glib::ParamSpec::uint64(
glib::ParamSpec::new_uint64(
"interval",
"Interval",
"Interval in nanoseconds for posting messages",

View file

@ -128,8 +128,8 @@ impl State {
impl CsoundFilter {
fn process(&self, csound: &mut Csound, idata: &[f64], odata: &mut [f64]) -> bool {
let spin = csound.spin().unwrap();
let spout = csound.spout().unwrap();
let spin = csound.get_spin().unwrap();
let spout = csound.get_spout().unwrap();
let in_chunks = idata.chunks_exact(spin.len());
let out_chuncks = odata.chunks_exact_mut(spout.len());
@ -190,8 +190,8 @@ impl CsoundFilter {
return Ok(gst::FlowSuccess::Ok);
}
let mut spin = csound.spin().unwrap();
let spout = csound.spout().unwrap();
let mut spin = csound.get_spin().unwrap();
let spout = csound.get_spout().unwrap();
let out_bytes =
(avail / state.in_info.channels() as usize) * state.out_info.channels() as usize;
@ -342,14 +342,14 @@ impl ObjectImpl for CsoundFilter {
fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![
glib::ParamSpec::boolean(
glib::ParamSpec::new_boolean(
"loop",
"Loop",
"loop over the score (can be changed in PLAYING or PAUSED state)",
DEFAULT_LOOP,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING,
),
glib::ParamSpec::string(
glib::ParamSpec::new_string(
"location",
"Location",
"Location of the csd file to be used by csound.
@ -357,7 +357,7 @@ impl ObjectImpl for CsoundFilter {
None,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
glib::ParamSpec::string(
glib::ParamSpec::new_string(
"csd-text",
"CSD-text",
"The content of a csd file passed as a String.
@ -365,7 +365,7 @@ impl ObjectImpl for CsoundFilter {
None,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
glib::ParamSpec::double(
glib::ParamSpec::new_double(
"score-offset",
"Score Offset",
"Score offset in seconds to start the performance",
@ -547,7 +547,7 @@ impl BaseTransformImpl for CsoundFilter {
if compiled {
let csound = self.csound.lock().unwrap();
// Use the sample rate and channels configured in the csound score
let sr = csound.sample_rate() as i32;
let sr = csound.get_sample_rate() as i32;
let ichannels = csound.input_channels() as i32;
let ochannels = csound.output_channels() as i32;
for s in new_caps.make_mut().iter_mut() {
@ -608,7 +608,7 @@ impl BaseTransformImpl for CsoundFilter {
let rate = in_info.rate();
// Check if the negotiated caps are the right ones
if rate != out_info.rate() || rate != csound.sample_rate() as _ {
if rate != out_info.rate() || rate != csound.get_sample_rate() as _ {
return Err(loggable_error!(
CAT,
"Failed to negotiate caps: invalid sample rate {}",
@ -628,7 +628,7 @@ impl BaseTransformImpl for CsoundFilter {
));
}
let ksmps = csound.ksmps();
let ksmps = csound.get_ksmps();
let adapter = gst_base::UniqueAdapter::new();

View file

@ -117,7 +117,7 @@ impl ObjectSubclass for FileSink {
impl ObjectImpl for FileSink {
fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![glib::ParamSpec::string(
vec![glib::ParamSpec::new_string(
"location",
"File Location",
"Location of the file to write",

View file

@ -131,7 +131,7 @@ impl ObjectSubclass for FileSrc {
impl ObjectImpl for FileSrc {
fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![glib::ParamSpec::string(
vec![glib::ParamSpec::new_string(
"location",
"File Location",
"Location of the file to read from",

View file

@ -68,7 +68,7 @@ fn main() -> Result<(), Box<dyn Error>> {
.required(true)
.takes_value(true),
)
.matches();
.get_matches();
gst::init()?;
gstsodium::plugin_register_static().expect("Failed to register sodium plugin");

View file

@ -68,7 +68,7 @@ fn main() -> Result<(), Box<dyn Error>> {
.required(true)
.takes_value(true),
)
.matches();
.get_matches();
gst::init()?;
gstsodium::plugin_register_static().expect("Failed to register sodium plugin");

View file

@ -92,7 +92,7 @@ fn main() {
.short("j")
.help("Write a JSON file instead of a key.prv/key.pub pair"),
)
.matches();
.get_matches();
let keys = Keys::new();

View file

@ -602,14 +602,14 @@ impl ObjectImpl for Decrypter {
fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![
glib::ParamSpec::boxed(
glib::ParamSpec::new_boxed(
"receiver-key",
"Receiver Key",
"The private key of the Reeiver",
glib::Bytes::static_type(),
glib::ParamFlags::READWRITE,
),
glib::ParamSpec::boxed(
glib::ParamSpec::new_boxed(
"sender-key",
"Sender Key",
"The public key of the Sender",

View file

@ -393,21 +393,21 @@ impl ObjectImpl for Encrypter {
fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![
glib::ParamSpec::boxed(
glib::ParamSpec::new_boxed(
"receiver-key",
"Receiver Key",
"The public key of the Receiver",
glib::Bytes::static_type(),
glib::ParamFlags::READWRITE,
),
glib::ParamSpec::boxed(
glib::ParamSpec::new_boxed(
"sender-key",
"Sender Key",
"The private key of the Sender",
glib::Bytes::static_type(),
glib::ParamFlags::WRITABLE,
),
glib::ParamSpec::uint(
glib::ParamSpec::new_uint(
"block-size",
"Block Size",
"The block-size of the chunks",

View file

@ -529,14 +529,14 @@ impl ObjectImpl for AppSrc {
fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![
glib::ParamSpec::string(
glib::ParamSpec::new_string(
"context",
"Context",
"Context name to share threads with",
Some(DEFAULT_CONTEXT),
glib::ParamFlags::READWRITE,
),
glib::ParamSpec::uint(
glib::ParamSpec::new_uint(
"context-wait",
"Context Wait",
"Throttle poll loop to run at most once every this many ms",
@ -545,7 +545,7 @@ impl ObjectImpl for AppSrc {
DEFAULT_CONTEXT_WAIT,
glib::ParamFlags::READWRITE,
),
glib::ParamSpec::uint(
glib::ParamSpec::new_uint(
"max-buffers",
"Max Buffers",
"Maximum number of buffers to queue up",
@ -554,14 +554,14 @@ impl ObjectImpl for AppSrc {
DEFAULT_MAX_BUFFERS,
glib::ParamFlags::READWRITE,
),
glib::ParamSpec::boxed(
glib::ParamSpec::new_boxed(
"caps",
"Caps",
"Caps to use",
gst::Caps::static_type(),
glib::ParamFlags::READWRITE,
),
glib::ParamSpec::boolean(
glib::ParamSpec::new_boolean(
"do-timestamp",
"Do Timestamp",
"Timestamp buffers with the current running time on arrival",

View file

@ -413,14 +413,14 @@ impl ObjectImpl for InputSelector {
fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![
glib::ParamSpec::string(
glib::ParamSpec::new_string(
"context",
"Context",
"Context name to share threads with",
Some(DEFAULT_CONTEXT),
glib::ParamFlags::READWRITE,
),
glib::ParamSpec::uint(
glib::ParamSpec::new_uint(
"context-wait",
"Context Wait",
"Throttle poll loop to run at most once every this many ms",
@ -429,7 +429,7 @@ impl ObjectImpl for InputSelector {
DEFAULT_CONTEXT_WAIT,
glib::ParamFlags::READWRITE,
),
glib::ParamSpec::object(
glib::ParamSpec::new_object(
"active-pad",
"Active Pad",
"Currently active pad",

View file

@ -1362,14 +1362,14 @@ impl ObjectImpl for JitterBuffer {
fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![
glib::ParamSpec::string(
glib::ParamSpec::new_string(
"context",
"Context",
"Context name to share threads with",
Some(DEFAULT_CONTEXT),
glib::ParamFlags::READWRITE,
),
glib::ParamSpec::uint(
glib::ParamSpec::new_uint(
"context-wait",
"Context Wait",
"Throttle poll loop to run at most once every this many ms",
@ -1378,7 +1378,7 @@ impl ObjectImpl for JitterBuffer {
DEFAULT_CONTEXT_WAIT,
glib::ParamFlags::READWRITE,
),
glib::ParamSpec::uint(
glib::ParamSpec::new_uint(
"latency",
"Buffer latency in ms",
"Amount of ms to buffer",
@ -1387,14 +1387,14 @@ impl ObjectImpl for JitterBuffer {
DEFAULT_LATENCY_MS,
glib::ParamFlags::READWRITE,
),
glib::ParamSpec::boolean(
glib::ParamSpec::new_boolean(
"do-lost",
"Do Lost",
"Send an event downstream when a packet is lost",
DEFAULT_DO_LOST,
glib::ParamFlags::READWRITE,
),
glib::ParamSpec::uint(
glib::ParamSpec::new_uint(
"max-dropout-time",
"Max dropout time",
"The maximum time (milliseconds) of missing packets tolerated.",
@ -1403,7 +1403,7 @@ impl ObjectImpl for JitterBuffer {
DEFAULT_MAX_DROPOUT_TIME,
glib::ParamFlags::READWRITE,
),
glib::ParamSpec::uint(
glib::ParamSpec::new_uint(
"max-misorder-time",
"Max misorder time",
"The maximum time (milliseconds) of misordered packets tolerated.",
@ -1412,7 +1412,7 @@ impl ObjectImpl for JitterBuffer {
DEFAULT_MAX_MISORDER_TIME,
glib::ParamFlags::READWRITE,
),
glib::ParamSpec::boxed(
glib::ParamSpec::new_boxed(
"stats",
"Statistics",
"Various statistics",

View file

@ -590,7 +590,7 @@ impl ObjectSubclass for ProxySink {
impl ObjectImpl for ProxySink {
fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![glib::ParamSpec::string(
vec![glib::ParamSpec::new_string(
"proxy-context",
"Proxy Context",
"Context name of the proxy to share with",
@ -1130,14 +1130,14 @@ impl ObjectImpl for ProxySrc {
fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![
glib::ParamSpec::string(
glib::ParamSpec::new_string(
"context",
"Context",
"Context name to share threads with",
Some(DEFAULT_CONTEXT),
glib::ParamFlags::READWRITE,
),
glib::ParamSpec::uint(
glib::ParamSpec::new_uint(
"context-wait",
"Context Wait",
"Throttle poll loop to run at most once every this many ms",
@ -1146,14 +1146,14 @@ impl ObjectImpl for ProxySrc {
DEFAULT_CONTEXT_WAIT,
glib::ParamFlags::READWRITE,
),
glib::ParamSpec::string(
glib::ParamSpec::new_string(
"proxy-context",
"Proxy Context",
"Context name of the proxy to share with",
Some(DEFAULT_PROXY_CONTEXT),
glib::ParamFlags::READWRITE,
),
glib::ParamSpec::uint(
glib::ParamSpec::new_uint(
"max-size-buffers",
"Max Size Buffers",
"Maximum number of buffers to queue (0=unlimited)",
@ -1162,7 +1162,7 @@ impl ObjectImpl for ProxySrc {
DEFAULT_MAX_SIZE_BUFFERS,
glib::ParamFlags::READWRITE,
),
glib::ParamSpec::uint(
glib::ParamSpec::new_uint(
"max-size-bytes",
"Max Size Bytes",
"Maximum number of bytes to queue (0=unlimited)",
@ -1171,7 +1171,7 @@ impl ObjectImpl for ProxySrc {
DEFAULT_MAX_SIZE_BYTES,
glib::ParamFlags::READWRITE,
),
glib::ParamSpec::uint64(
glib::ParamSpec::new_uint64(
"max-size-time",
"Max Size Time",
"Maximum number of nanoseconds to queue (0=unlimited)",

View file

@ -718,14 +718,14 @@ impl ObjectImpl for Queue {
fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![
glib::ParamSpec::string(
glib::ParamSpec::new_string(
"context",
"Context",
"Context name to share threads with",
Some(DEFAULT_CONTEXT),
glib::ParamFlags::READWRITE,
),
glib::ParamSpec::uint(
glib::ParamSpec::new_uint(
"context-wait",
"Context Wait",
"Throttle poll loop to run at most once every this many ms",
@ -734,7 +734,7 @@ impl ObjectImpl for Queue {
DEFAULT_CONTEXT_WAIT,
glib::ParamFlags::READWRITE,
),
glib::ParamSpec::uint(
glib::ParamSpec::new_uint(
"max-size-buffers",
"Max Size Buffers",
"Maximum number of buffers to queue (0=unlimited)",
@ -743,7 +743,7 @@ impl ObjectImpl for Queue {
DEFAULT_MAX_SIZE_BUFFERS,
glib::ParamFlags::READWRITE,
),
glib::ParamSpec::uint(
glib::ParamSpec::new_uint(
"max-size-bytes",
"Max Size Bytes",
"Maximum number of bytes to queue (0=unlimited)",
@ -752,7 +752,7 @@ impl ObjectImpl for Queue {
DEFAULT_MAX_SIZE_BYTES,
glib::ParamFlags::READWRITE,
),
glib::ParamSpec::uint64(
glib::ParamSpec::new_uint64(
"max-size-time",
"Max Size Time",
"Maximum number of nanoseconds to queue (0=unlimited)",

View file

@ -569,14 +569,14 @@ impl ObjectImpl for TcpClientSrc {
fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![
glib::ParamSpec::string(
glib::ParamSpec::new_string(
"context",
"Context",
"Context name to share threads with",
Some(DEFAULT_CONTEXT),
glib::ParamFlags::READWRITE,
),
glib::ParamSpec::uint(
glib::ParamSpec::new_uint(
"context-wait",
"Context Wait",
"Throttle poll loop to run at most once every this many ms",
@ -585,14 +585,14 @@ impl ObjectImpl for TcpClientSrc {
DEFAULT_CONTEXT_WAIT,
glib::ParamFlags::READWRITE,
),
glib::ParamSpec::string(
glib::ParamSpec::new_string(
"host",
"Host",
"The host IP address to receive packets from",
DEFAULT_HOST,
glib::ParamFlags::READWRITE,
),
glib::ParamSpec::int(
glib::ParamSpec::new_int(
"port",
"Port",
"Port to receive packets from",
@ -601,14 +601,14 @@ impl ObjectImpl for TcpClientSrc {
DEFAULT_PORT,
glib::ParamFlags::READWRITE,
),
glib::ParamSpec::boxed(
glib::ParamSpec::new_boxed(
"caps",
"Caps",
"Caps to use",
gst::Caps::static_type(),
glib::ParamFlags::READWRITE,
),
glib::ParamSpec::uint(
glib::ParamSpec::new_uint(
"blocksize",
"Blocksize",
"Size in bytes to read per buffer (-1 = default)",

View file

@ -969,14 +969,14 @@ impl ObjectImpl for UdpSink {
fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![
glib::ParamSpec::string(
glib::ParamSpec::new_string(
"context",
"Context",
"Context name to share threads with",
Some(DEFAULT_CONTEXT),
glib::ParamFlags::READWRITE,
),
glib::ParamSpec::uint(
glib::ParamSpec::new_uint(
"context-wait",
"Context Wait",
"Throttle poll loop to run at most once every this many ms",
@ -985,21 +985,21 @@ impl ObjectImpl for UdpSink {
DEFAULT_CONTEXT_WAIT,
glib::ParamFlags::READWRITE,
),
glib::ParamSpec::boolean(
glib::ParamSpec::new_boolean(
"sync",
"Sync",
"Sync on the clock",
DEFAULT_SYNC,
glib::ParamFlags::READWRITE,
),
glib::ParamSpec::string(
glib::ParamSpec::new_string(
"bind-address",
"Bind Address",
"Address to bind the socket to",
Some(DEFAULT_BIND_ADDRESS),
glib::ParamFlags::READWRITE,
),
glib::ParamSpec::int(
glib::ParamSpec::new_int(
"bind-port",
"Bind Port",
"Port to bind the socket to",
@ -1008,14 +1008,14 @@ impl ObjectImpl for UdpSink {
DEFAULT_BIND_PORT,
glib::ParamFlags::READWRITE,
),
glib::ParamSpec::string(
glib::ParamSpec::new_string(
"bind-address-v6",
"Bind Address V6",
"Address to bind the V6 socket to",
Some(DEFAULT_BIND_ADDRESS_V6),
glib::ParamFlags::READWRITE,
),
glib::ParamSpec::int(
glib::ParamSpec::new_int(
"bind-port-v6",
"Bind Port",
"Port to bind the V6 socket to",
@ -1024,49 +1024,49 @@ impl ObjectImpl for UdpSink {
DEFAULT_BIND_PORT_V6,
glib::ParamFlags::READWRITE,
),
glib::ParamSpec::object(
glib::ParamSpec::new_object(
"socket",
"Socket",
"Socket to use for UDP transmission. (None == allocate)",
gio::Socket::static_type(),
glib::ParamFlags::READWRITE,
),
glib::ParamSpec::object(
glib::ParamSpec::new_object(
"used-socket",
"Used Socket",
"Socket currently in use for UDP transmission. (None = no socket)",
gio::Socket::static_type(),
glib::ParamFlags::READABLE,
),
glib::ParamSpec::object(
glib::ParamSpec::new_object(
"socket-v6",
"Socket V6",
"IPV6 Socket to use for UDP transmission. (None == allocate)",
gio::Socket::static_type(),
glib::ParamFlags::READWRITE,
),
glib::ParamSpec::object(
glib::ParamSpec::new_object(
"used-socket-v6",
"Used Socket V6",
"V6 Socket currently in use for UDP transmission. (None = no socket)",
gio::Socket::static_type(),
glib::ParamFlags::READABLE,
),
glib::ParamSpec::boolean(
glib::ParamSpec::new_boolean(
"auto-multicast",
"Auto multicast",
"Automatically join/leave the multicast groups, FALSE means user has to do it himself",
DEFAULT_AUTO_MULTICAST,
glib::ParamFlags::READWRITE,
),
glib::ParamSpec::boolean(
glib::ParamSpec::new_boolean(
"loop",
"Loop",
"Set the multicast loop parameter.",
DEFAULT_LOOP,
glib::ParamFlags::READWRITE,
),
glib::ParamSpec::uint(
glib::ParamSpec::new_uint(
"ttl",
"Time To Live",
"Used for setting the unicast TTL parameter",
@ -1075,7 +1075,7 @@ impl ObjectImpl for UdpSink {
DEFAULT_TTL,
glib::ParamFlags::READWRITE,
),
glib::ParamSpec::uint(
glib::ParamSpec::new_uint(
"ttl-mc",
"Time To Live Multicast",
"Used for setting the multicast TTL parameter",
@ -1084,7 +1084,7 @@ impl ObjectImpl for UdpSink {
DEFAULT_TTL_MC,
glib::ParamFlags::READWRITE,
),
glib::ParamSpec::int(
glib::ParamSpec::new_int(
"qos-dscp",
"QoS DSCP",
"Quality of Service, differentiated services code point (-1 default)",
@ -1093,7 +1093,7 @@ impl ObjectImpl for UdpSink {
DEFAULT_QOS_DSCP,
glib::ParamFlags::READWRITE,
),
glib::ParamSpec::string(
glib::ParamSpec::new_string(
"clients",
"Clients",
"A comma separated list of host:port pairs with destinations",

View file

@ -710,14 +710,14 @@ impl ObjectImpl for UdpSrc {
fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
let mut properties = vec![
glib::ParamSpec::string(
glib::ParamSpec::new_string(
"context",
"Context",
"Context name to share threads with",
Some(DEFAULT_CONTEXT),
glib::ParamFlags::READWRITE,
),
glib::ParamSpec::uint(
glib::ParamSpec::new_uint(
"context-wait",
"Context Wait",
"Throttle poll loop to run at most once every this many ms",
@ -726,14 +726,14 @@ impl ObjectImpl for UdpSrc {
DEFAULT_CONTEXT_WAIT,
glib::ParamFlags::READWRITE,
),
glib::ParamSpec::string(
glib::ParamSpec::new_string(
"address",
"Address",
"Address/multicast group to listen on",
DEFAULT_ADDRESS,
glib::ParamFlags::READWRITE,
),
glib::ParamSpec::int(
glib::ParamSpec::new_int(
"port",
"Port",
"Port to listen on",
@ -742,21 +742,21 @@ impl ObjectImpl for UdpSrc {
DEFAULT_PORT,
glib::ParamFlags::READWRITE,
),
glib::ParamSpec::boolean(
glib::ParamSpec::new_boolean(
"reuse",
"Reuse",
"Allow reuse of the port",
DEFAULT_REUSE,
glib::ParamFlags::READWRITE,
),
glib::ParamSpec::boxed(
glib::ParamSpec::new_boxed(
"caps",
"Caps",
"Caps to use",
gst::Caps::static_type(),
glib::ParamFlags::READWRITE,
),
glib::ParamSpec::uint(
glib::ParamSpec::new_uint(
"mtu",
"MTU",
"Maximum expected packet size. This directly defines the allocation size of the receive buffer pool",
@ -765,7 +765,7 @@ impl ObjectImpl for UdpSrc {
DEFAULT_MTU,
glib::ParamFlags::READWRITE,
),
glib::ParamSpec::boolean(
glib::ParamSpec::new_boolean(
"retrieve-sender-address",
"Retrieve sender address",
"Whether to retrieve the sender address and add it to buffers as meta. Disabling this might result in minor performance improvements in certain scenarios",
@ -776,14 +776,14 @@ impl ObjectImpl for UdpSrc {
#[cfg(not(windows))]
{
properties.push(glib::ParamSpec::object(
properties.push(glib::ParamSpec::new_object(
"socket",
"Socket",
"Socket to use for UDP reception. (None == allocate)",
gio::Socket::static_type(),
glib::ParamFlags::READWRITE,
));
properties.push(glib::ParamSpec::object(
properties.push(glib::ParamSpec::new_object(
"used-socket",
"Used Socket",
"Socket currently in use for UDP reception. (None = no socket)",

View file

@ -323,7 +323,7 @@ mod imp_src {
impl ObjectImpl for ElementSrcTest {
fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![glib::ParamSpec::string(
vec![glib::ParamSpec::new_string(
"context",
"Context",
"Context name to share threads with",
@ -653,7 +653,7 @@ mod imp_sink {
impl ObjectImpl for ElementSinkTest {
fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![glib::ParamSpec::boxed(
vec![glib::ParamSpec::new_boxed(
"sender",
"Sender",
"Channel sender to forward the incoming items to",

View file

@ -121,8 +121,8 @@ fn test_from_pipeline_to_pipeline() {
pipe_1.set_state(gst::State::Paused).unwrap();
pipe_2.set_state(gst::State::Paused).unwrap();
let _ = pipe_1.state(gst::CLOCK_TIME_NONE);
let _ = pipe_2.state(gst::CLOCK_TIME_NONE);
let _ = pipe_1.get_state(gst::CLOCK_TIME_NONE);
let _ = pipe_2.get_state(gst::CLOCK_TIME_NONE);
pipe_1.set_state(gst::State::Null).unwrap();

View file

@ -579,42 +579,42 @@ impl ObjectImpl for ReqwestHttpSrc {
fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![
glib::ParamSpec::string(
glib::ParamSpec::new_string(
"location",
"Location",
"URL to read from",
None,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
glib::ParamSpec::string(
glib::ParamSpec::new_string(
"user-agent",
"User-Agent",
"Value of the User-Agent HTTP request header field",
DEFAULT_USER_AGENT.into(),
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
glib::ParamSpec::boolean(
glib::ParamSpec::new_boolean(
"is-live",
"Is Live",
"Act like a live source",
DEFAULT_IS_LIVE,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
glib::ParamSpec::string(
glib::ParamSpec::new_string(
"user-id",
"User-id",
"HTTP location URI user id for authentication",
None,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
glib::ParamSpec::string(
glib::ParamSpec::new_string(
"user-pw",
"User-pw",
"HTTP location URI user password for authentication",
None,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
glib::ParamSpec::uint(
glib::ParamSpec::new_uint(
"timeout",
"Timeout",
"Value in seconds to timeout a blocking I/O (0 = No timeout).",
@ -623,35 +623,35 @@ impl ObjectImpl for ReqwestHttpSrc {
DEFAULT_TIMEOUT,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
glib::ParamSpec::boolean(
glib::ParamSpec::new_boolean(
"compress",
"Compress",
"Allow compressed content encodings",
DEFAULT_COMPRESS,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
glib::ParamSpec::boxed(
glib::ParamSpec::new_boxed(
"extra-headers",
"Extra Headers",
"Extra headers to append to the HTTP request",
gst::Structure::static_type(),
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
glib::ParamSpec::boxed(
glib::ParamSpec::new_boxed(
"cookies",
"Cookies",
"HTTP request cookies",
Vec::<String>::static_type(),
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
glib::ParamSpec::boolean(
glib::ParamSpec::new_boolean(
"iradio-mode",
"I-Radio Mode",
"Enable internet radio mode (ask server to send shoutcast/icecast metadata interleaved with the actual stream data",
DEFAULT_IRADIO_MODE,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
glib::ParamSpec::boolean(
glib::ParamSpec::new_boolean(
"keep-alive",
"Keep Alive",
"Use HTTP persistent connections",

View file

@ -1015,7 +1015,7 @@ impl ObjectImpl for Transcriber {
fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![
glib::ParamSpec::string(
glib::ParamSpec::new_string(
"language-code",
"Language Code",
"The Language of the Stream, see \
@ -1024,14 +1024,14 @@ impl ObjectImpl for Transcriber {
Some("en-US"),
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
glib::ParamSpec::boolean(
glib::ParamSpec::new_boolean(
"use-partial-results",
"Latency",
"Whether partial results from AWS should be used",
DEFAULT_USE_PARTIAL_RESULTS,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING,
),
glib::ParamSpec::uint(
glib::ParamSpec::new_uint(
"latency",
"Latency",
"Amount of milliseconds to allow AWS transcribe",
@ -1040,7 +1040,7 @@ impl ObjectImpl for Transcriber {
DEFAULT_LATENCY_MS,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
glib::ParamSpec::string(
glib::ParamSpec::new_string(
"vocabulary-name",
"Vocabulary Name",
"The name of a custom vocabulary, see \

View file

@ -352,28 +352,28 @@ impl ObjectImpl for S3Sink {
fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![
glib::ParamSpec::string(
glib::ParamSpec::new_string(
"bucket",
"S3 Bucket",
"The bucket of the file to write",
None,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
glib::ParamSpec::string(
glib::ParamSpec::new_string(
"key",
"S3 Key",
"The key of the file to write",
None,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
glib::ParamSpec::string(
glib::ParamSpec::new_string(
"region",
"AWS Region",
"An AWS region (e.g. eu-west-2).",
None,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
glib::ParamSpec::uint64(
glib::ParamSpec::new_uint64(
"part-size",
"Part size",
"A size (in bytes) of an individual part used for multipart upload.",

View file

@ -213,7 +213,7 @@ impl ObjectSubclass for S3Src {
impl ObjectImpl for S3Src {
fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![glib::ParamSpec::string(
vec![glib::ParamSpec::new_string(
"uri",
"URI",
"The S3 object URI",

View file

@ -159,7 +159,7 @@ impl ObjectImpl for RegEx {
"commands",
"Commands",
"A set of commands to apply on input text",
&glib::ParamSpec::boxed(
&glib::ParamSpec::new_boxed(
"command",
"Command",
"A command to apply on input text",

View file

@ -475,7 +475,7 @@ impl ObjectImpl for TextWrap {
fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![
glib::ParamSpec::string(
glib::ParamSpec::new_string(
"dictionary",
"Dictionary",
"Path to a dictionary to load at runtime to perform hyphenation, see \
@ -483,7 +483,7 @@ impl ObjectImpl for TextWrap {
None,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING,
),
glib::ParamSpec::uint(
glib::ParamSpec::new_uint(
"columns",
"Columns",
"Maximum number of columns for any given line",
@ -492,7 +492,7 @@ impl ObjectImpl for TextWrap {
DEFAULT_COLUMNS,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING,
),
glib::ParamSpec::uint(
glib::ParamSpec::new_uint(
"lines",
"Lines",
"Split input buffer into output buffers with max lines (0=do not split)",
@ -501,7 +501,7 @@ impl ObjectImpl for TextWrap {
DEFAULT_LINES,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING,
),
glib::ParamSpec::int64(
glib::ParamSpec::new_int64(
"accumulate-time",
"accumulate-time",
"Cut-off time for input text accumulation (-1=do not accumulate)",

View file

@ -82,7 +82,7 @@ impl ObjectImpl for ProgressBin {
// Metadata for the element's properties
fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![glib::ParamSpec::enum_(
vec![glib::ParamSpec::new_enum(
"output",
"Output",
"Defines the output type of the progressbin",

View file

@ -103,14 +103,14 @@ impl ObjectImpl for Rgb2Gray {
// Metadata for the properties
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![
glib::ParamSpec::boolean(
glib::ParamSpec::new_boolean(
"invert",
"Invert",
"Invert grayscale output",
DEFAULT_INVERT,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING,
),
glib::ParamSpec::uint(
glib::ParamSpec::new_uint(
"shift",
"Shift",
"Shift grayscale output (wrapping around)",

View file

@ -166,7 +166,7 @@ impl ObjectImpl for SineSrc {
fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![
glib::ParamSpec::uint(
glib::ParamSpec::new_uint(
"samples-per-buffer",
"Samples Per Buffer",
"Number of samples per output buffer",
@ -175,7 +175,7 @@ impl ObjectImpl for SineSrc {
DEFAULT_SAMPLES_PER_BUFFER,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
glib::ParamSpec::uint(
glib::ParamSpec::new_uint(
"freq",
"Frequency",
"Frequency",
@ -184,7 +184,7 @@ impl ObjectImpl for SineSrc {
DEFAULT_FREQ,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING,
),
glib::ParamSpec::double(
glib::ParamSpec::new_double(
"volume",
"Volume",
"Output volume",
@ -193,14 +193,14 @@ impl ObjectImpl for SineSrc {
DEFAULT_VOLUME,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING,
),
glib::ParamSpec::boolean(
glib::ParamSpec::new_boolean(
"mute",
"Mute",
"Mute",
DEFAULT_MUTE,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING,
),
glib::ParamSpec::boolean(
glib::ParamSpec::new_boolean(
"is-live",
"Is Live",
"(Pseudo) live output",

View file

@ -147,7 +147,7 @@ fn create_ui(app: &gtk::Application) {
None => return,
};
let drop = drop_button.active();
let drop = drop_button.is_active();
if drop {
let mut drop_id = drop_id.borrow_mut();
if drop_id.is_none() {

View file

@ -64,7 +64,7 @@ impl ObjectSubclass for CustomSource {
impl ObjectImpl for CustomSource {
fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![glib::ParamSpec::object(
vec![glib::ParamSpec::new_object(
"source",
"Source",
"Source",
@ -182,7 +182,7 @@ impl CustomSource {
if templates
.iter()
.any(|templ| templ.property_presence() == gst::PadPresence::Request)
.any(|templ| templ.presence() == gst::PadPresence::Request)
{
gst_error!(CAT, obj: element, "Request pads not supported");
gst::element_error!(
@ -195,7 +195,7 @@ impl CustomSource {
let has_sometimes_pads = templates
.iter()
.any(|templ| templ.property_presence() == gst::PadPresence::Sometimes);
.any(|templ| templ.presence() == gst::PadPresence::Sometimes);
// Handle all source pads that already exist
for pad in source.src_pads() {

View file

@ -188,36 +188,36 @@ impl ObjectImpl for FallbackSrc {
fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![
glib::ParamSpec::boolean(
glib::ParamSpec::new_boolean(
"enable-audio",
"Enable Audio",
"Enable the audio stream, this will output silence if there's no audio in the configured URI",
true,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
glib::ParamSpec::boolean(
glib::ParamSpec::new_boolean(
"enable-video",
"Enable Video",
"Enable the video stream, this will output black or the fallback video if there's no video in the configured URI",
true,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
glib::ParamSpec::string("uri", "URI", "URI to use", None, glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY),
glib::ParamSpec::object(
glib::ParamSpec::new_string("uri", "URI", "URI to use", None, glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY),
glib::ParamSpec::new_object(
"source",
"Source",
"Source to use instead of the URI",
gst::Element::static_type(),
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
glib::ParamSpec::string(
glib::ParamSpec::new_string(
"fallback-uri",
"Fallback URI",
"Fallback URI to use for video in case the main stream doesn't work",
None,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
glib::ParamSpec::uint64(
glib::ParamSpec::new_uint64(
"timeout",
"Timeout",
"Timeout for switching to the fallback URI",
@ -226,7 +226,7 @@ impl ObjectImpl for FallbackSrc {
5 * gst::SECOND_VAL,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
glib::ParamSpec::uint64(
glib::ParamSpec::new_uint64(
"restart-timeout",
"Timeout",
"Timeout for restarting an active source",
@ -235,7 +235,7 @@ impl ObjectImpl for FallbackSrc {
5 * gst::SECOND_VAL,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
glib::ParamSpec::uint64(
glib::ParamSpec::new_uint64(
"retry-timeout",
"Retry Timeout",
"Timeout for stopping after repeated failure",
@ -244,14 +244,14 @@ impl ObjectImpl for FallbackSrc {
60 * gst::SECOND_VAL,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
glib::ParamSpec::boolean(
glib::ParamSpec::new_boolean(
"restart-on-eos",
"Restart on EOS",
"Restart source on EOS",
false,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
glib::ParamSpec::enum_(
glib::ParamSpec::new_enum(
"status",
"Status",
"Current source status",
@ -259,7 +259,7 @@ impl ObjectImpl for FallbackSrc {
Status::Stopped as i32,
glib::ParamFlags::READABLE,
),
glib::ParamSpec::uint64(
glib::ParamSpec::new_uint64(
"min-latency",
"Minimum Latency",
"When the main source has a higher latency than the fallback source \
@ -270,7 +270,7 @@ impl ObjectImpl for FallbackSrc {
0,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
glib::ParamSpec::int64(
glib::ParamSpec::new_int64(
"buffer-duration",
"Buffer Duration",
"Buffer duration when buffering streams (-1 default value)",
@ -279,7 +279,7 @@ impl ObjectImpl for FallbackSrc {
-1,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
glib::ParamSpec::boxed(
glib::ParamSpec::new_boxed(
"statistics",
"Statistics",
"Various statistics",

View file

@ -84,14 +84,14 @@ impl ObjectImpl for VideoFallbackSource {
fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![
glib::ParamSpec::string(
glib::ParamSpec::new_string(
"uri",
"URI",
"URI to use for video in case the main stream doesn't work",
None,
glib::ParamFlags::READWRITE | glib::ParamFlags::CONSTRUCT_ONLY,
),
glib::ParamSpec::uint64(
glib::ParamSpec::new_uint64(
"min-latency",
"Minimum Latency",
"Minimum Latency",

View file

@ -670,7 +670,7 @@ impl ObjectImpl for FallbackSwitch {
fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![
glib::ParamSpec::uint64(
glib::ParamSpec::new_uint64(
"timeout",
"Timeout",
"Timeout in nanoseconds",
@ -679,21 +679,21 @@ impl ObjectImpl for FallbackSwitch {
DEFAULT_TIMEOUT,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
glib::ParamSpec::object(
glib::ParamSpec::new_object(
"active-pad",
"Active Pad",
"Currently active pad. Writes are ignored if auto-switch=true",
gst::Pad::static_type(),
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING,
),
glib::ParamSpec::boolean(
glib::ParamSpec::new_boolean(
"auto-switch",
"Automatically switch pads",
"Automatically switch pads (If true, prefer primary sink, otherwise manual selection via the active-pad property)",
DEFAULT_AUTO_SWITCH,
glib::ParamFlags::READWRITE| gst::PARAM_FLAG_MUTABLE_READY,
),
glib::ParamSpec::enum_(
glib::ParamSpec::new_enum(
"primary-health",
"Primary stream state",
"Reports the health of the primary stream on the sink pad",
@ -701,7 +701,7 @@ impl ObjectImpl for FallbackSwitch {
DEFAULT_STREAM_HEALTH as i32,
glib::ParamFlags::READABLE,
),
glib::ParamSpec::enum_(
glib::ParamSpec::new_enum(
"fallback-health",
"Fallback stream state",
"Reports the health of the fallback stream on the fallback_sink pad",

View file

@ -218,15 +218,15 @@ impl HandleData for (gst::ClockTime, gst::ClockTime) {
impl HandleData for gst::Buffer {
fn pts(&self) -> gst::ClockTime {
gst::BufferRef::get_pts(self)
gst::BufferRef::pts(self)
}
fn dts(&self) -> gst::ClockTime {
gst::BufferRef::get_dts(self)
gst::BufferRef::dts(self)
}
fn get_duration(&self, state: &StreamState) -> gst::ClockTime {
let duration = gst::BufferRef::get_duration(self);
let duration = gst::BufferRef::duration(self);
if duration.is_some() {
duration
@ -257,7 +257,7 @@ impl HandleData for gst::Buffer {
}
fn is_keyframe(&self) -> bool {
!gst::BufferRef::get_flags(self).contains(gst::BufferFlags::DELTA_UNIT)
!gst::BufferRef::flags(self).contains(gst::BufferFlags::DELTA_UNIT)
}
fn can_clip(&self, state: &StreamState) -> bool {
@ -294,7 +294,7 @@ impl HandleData for gst::Buffer {
return Some(self);
}
let pts = HandleData::get_pts(&self);
let pts = HandleData::pts(&self);
let duration = HandleData::get_duration(&self, state);
let stop = if duration.is_some() {
pts + duration
@ -1698,14 +1698,14 @@ impl ObjectImpl for ToggleRecord {
fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![
glib::ParamSpec::boolean(
glib::ParamSpec::new_boolean(
"record",
"Record",
"Enable/disable recording",
DEFAULT_RECORD,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING,
),
glib::ParamSpec::boolean(
glib::ParamSpec::new_boolean(
"recording",
"Recording",
"Whether recording is currently taking place",

View file

@ -225,7 +225,7 @@ impl ObjectImpl for CCDetect {
fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![
glib::ParamSpec::uint64(
glib::ParamSpec::new_uint64(
"window",
"Window",
"Window of time (in ns) to determine if captions exist in the stream",
@ -234,14 +234,14 @@ impl ObjectImpl for CCDetect {
DEFAULT_WINDOW,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING,
),
glib::ParamSpec::boolean(
glib::ParamSpec::new_boolean(
"cc608",
"cc608",
"Whether CEA608 captions (CC1/CC3) have been detected",
DEFAULT_CC608,
glib::ParamFlags::READABLE,
),
glib::ParamSpec::boolean(
glib::ParamSpec::new_boolean(
"cc708",
"cc608",
"Whether CEA708 captions (cc_data) have been detected",

View file

@ -578,7 +578,7 @@ impl ObjectSubclass for Cea608Overlay {
impl ObjectImpl for Cea608Overlay {
fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![glib::ParamSpec::int(
vec![glib::ParamSpec::new_int(
"field",
"Field",
"The field to render the caption for when available, (-1=automatic)",

View file

@ -500,14 +500,14 @@ impl ObjectImpl for MccEnc {
fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![
glib::ParamSpec::string(
glib::ParamSpec::new_string(
"uuid",
"UUID",
"UUID for the output file",
None,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
glib::ParamSpec::boxed(
glib::ParamSpec::new_boxed(
"creation-date",
"Creation Date",
"Creation date for the output file",

View file

@ -1020,7 +1020,7 @@ impl ObjectImpl for TtToCea608 {
fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![
glib::ParamSpec::enum_(
glib::ParamSpec::new_enum(
"mode",
"Mode",
"Which mode to operate in",
@ -1028,7 +1028,7 @@ impl ObjectImpl for TtToCea608 {
DEFAULT_MODE as i32,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING,
),
glib::ParamSpec::int(
glib::ParamSpec::new_int(
"origin-row",
"Origin row",
"Origin row, (-1=automatic)",
@ -1037,7 +1037,7 @@ impl ObjectImpl for TtToCea608 {
DEFAULT_ORIGIN_ROW,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING,
),
glib::ParamSpec::uint(
glib::ParamSpec::new_uint(
"origin-column",
"Origin column",
"Origin column",

View file

@ -226,7 +226,7 @@ impl ObjectSubclass for TtToJson {
impl ObjectImpl for TtToJson {
fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![glib::ParamSpec::enum_(
vec![glib::ParamSpec::new_enum(
"mode",
"Mode",
"Which mode to operate in",

View file

@ -278,7 +278,7 @@ impl Dav1dDec {
fn drop_decoded_pictures(&self) {
let mut decoder = self.decoder.lock().unwrap();
while let Ok(pic) = decoder.picture() {
while let Ok(pic) = decoder.get_picture() {
gst_debug!(CAT, "Dropping picture");
drop(pic);
}
@ -289,7 +289,7 @@ impl Dav1dDec {
) -> Result<Vec<(dav1d::Picture, gst_video::VideoFormat)>, gst::FlowError> {
let mut decoder = self.decoder.lock().unwrap();
let mut pictures = vec![];
while let Ok(pic) = decoder.picture() {
while let Ok(pic) = decoder.get_picture() {
let format = self.gst_video_format_from_dav1d_picture(&pic);
if format == gst_video::VideoFormat::Unknown {
return Err(gst::FlowError::NotNegotiated);

View file

@ -140,7 +140,7 @@ impl ObjectSubclass for GifEnc {
impl ObjectImpl for GifEnc {
fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![glib::ParamSpec::int(
vec![glib::ParamSpec::new_int(
"repeat",
"Repeat",
"Repeat (-1 to loop forever, 0 .. n finite repetitions)",

View file

@ -86,7 +86,7 @@ impl ObjectImpl for HsvDetector {
fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![
glib::ParamSpec::float(
glib::ParamSpec::new_float(
"hue-ref",
"Hue reference",
"Hue reference in degrees",
@ -95,7 +95,7 @@ impl ObjectImpl for HsvDetector {
DEFAULT_HUE_REF,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING,
),
glib::ParamSpec::float(
glib::ParamSpec::new_float(
"hue-var",
"Hue variation",
"Allowed hue variation from the reference hue angle, in degrees",
@ -104,7 +104,7 @@ impl ObjectImpl for HsvDetector {
DEFAULT_HUE_VAR,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING,
),
glib::ParamSpec::float(
glib::ParamSpec::new_float(
"saturation-ref",
"Saturation reference",
"Reference saturation value",
@ -113,7 +113,7 @@ impl ObjectImpl for HsvDetector {
DEFAULT_SATURATION_REF,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING,
),
glib::ParamSpec::float(
glib::ParamSpec::new_float(
"saturation-var",
"Saturation variation",
"Allowed saturation variation from the reference value",
@ -122,7 +122,7 @@ impl ObjectImpl for HsvDetector {
DEFAULT_SATURATION_VAR,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING,
),
glib::ParamSpec::float(
glib::ParamSpec::new_float(
"value-ref",
"Value reference",
"Reference value value",
@ -131,7 +131,7 @@ impl ObjectImpl for HsvDetector {
DEFAULT_VALUE_REF,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING,
),
glib::ParamSpec::float(
glib::ParamSpec::new_float(
"value-var",
"Value variation",
"Allowed value variation from the reference value",

View file

@ -81,7 +81,7 @@ impl ObjectImpl for HsvFilter {
fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![
glib::ParamSpec::float(
glib::ParamSpec::new_float(
"hue-shift",
"Hue shift",
"Hue shifting in degrees",
@ -90,7 +90,7 @@ impl ObjectImpl for HsvFilter {
DEFAULT_HUE_SHIFT,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING,
),
glib::ParamSpec::float(
glib::ParamSpec::new_float(
"saturation-mul",
"Saturation multiplier",
"Saturation multiplier to apply to the saturation value (before offset)",
@ -99,7 +99,7 @@ impl ObjectImpl for HsvFilter {
DEFAULT_SATURATION_MUL,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING,
),
glib::ParamSpec::float(
glib::ParamSpec::new_float(
"saturation-off",
"Saturation offset",
"Saturation offset to add to the saturation value (after multiplier)",
@ -108,7 +108,7 @@ impl ObjectImpl for HsvFilter {
DEFAULT_SATURATION_OFF,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING,
),
glib::ParamSpec::float(
glib::ParamSpec::new_float(
"value-mul",
"Value multiplier",
"Value multiplier to apply to the value (before offset)",
@ -117,7 +117,7 @@ impl ObjectImpl for HsvFilter {
DEFAULT_VALUE_MUL,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING,
),
glib::ParamSpec::float(
glib::ParamSpec::new_float(
"value-off",
"Value offset",
"Value offset to add to the value (after multiplier)",

View file

@ -215,7 +215,7 @@ impl ObjectImpl for Rav1Enc {
fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![
glib::ParamSpec::uint(
glib::ParamSpec::new_uint(
"speed-preset",
"Speed Preset",
"Speed preset (10 fastest, 0 slowest)",
@ -224,14 +224,14 @@ impl ObjectImpl for Rav1Enc {
DEFAULT_SPEED_PRESET,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
glib::ParamSpec::boolean(
glib::ParamSpec::new_boolean(
"low-latency",
"Low Latency",
"Low Latency",
DEFAULT_LOW_LATENCY,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
glib::ParamSpec::uint64(
glib::ParamSpec::new_uint64(
"min-key-frame-interval",
"Min Key Frame Interval",
"Min Key Frame Interval",
@ -240,7 +240,7 @@ impl ObjectImpl for Rav1Enc {
DEFAULT_MIN_KEY_FRAME_INTERVAL,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
glib::ParamSpec::uint64(
glib::ParamSpec::new_uint64(
"max-key-frame-interval",
"Max Key Frame Interval",
"Max Key Frame Interval",
@ -249,7 +249,7 @@ impl ObjectImpl for Rav1Enc {
DEFAULT_MAX_KEY_FRAME_INTERVAL,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
glib::ParamSpec::int(
glib::ParamSpec::new_int(
"bitrate",
"Bitrate",
"Bitrate",
@ -258,7 +258,7 @@ impl ObjectImpl for Rav1Enc {
DEFAULT_BITRATE,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
glib::ParamSpec::uint(
glib::ParamSpec::new_uint(
"quantizer",
"Quantizer",
"Quantizer",
@ -267,7 +267,7 @@ impl ObjectImpl for Rav1Enc {
DEFAULT_QUANTIZER as u32,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
glib::ParamSpec::uint(
glib::ParamSpec::new_uint(
"tile-cols",
"Tile Cols",
"Tile Cols",
@ -276,7 +276,7 @@ impl ObjectImpl for Rav1Enc {
DEFAULT_TILE_COLS as u32,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
glib::ParamSpec::uint(
glib::ParamSpec::new_uint(
"tile-rows",
"Tile Rows",
"Tile Rows",
@ -285,7 +285,7 @@ impl ObjectImpl for Rav1Enc {
DEFAULT_TILE_ROWS as u32,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
glib::ParamSpec::uint(
glib::ParamSpec::new_uint(
"tiles",
"Tiles",
"Tiles",
@ -294,7 +294,7 @@ impl ObjectImpl for Rav1Enc {
DEFAULT_TILES as u32,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
glib::ParamSpec::uint(
glib::ParamSpec::new_uint(
"threads",
"Threads",
"Threads",

View file

@ -176,7 +176,7 @@ impl ObjectImpl for PngEncoder {
fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![
glib::ParamSpec::enum_(
glib::ParamSpec::new_enum(
"compression-level",
"Compression level",
"Selects the compression algorithm to use",
@ -184,7 +184,7 @@ impl ObjectImpl for PngEncoder {
DEFAULT_COMPRESSION_LEVEL as i32,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
glib::ParamSpec::enum_(
glib::ParamSpec::new_enum(
"filter",
"Filter",
"Selects the filter type to applied",