fix-getters-def 0.3.0 pass

This commit is contained in:
François Laignel 2021-04-20 14:57:40 +02:00
parent e0b577fe1d
commit 27bc5c89ca
47 changed files with 77 additions and 85 deletions

View file

@ -166,7 +166,7 @@ impl ObjectImpl for AudioEcho {
}
}
fn get_property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
fn property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
match pspec.name() {
"max-delay" => {
let settings = self.settings.lock().unwrap();

View file

@ -1831,7 +1831,7 @@ impl ObjectImpl for AudioLoudNorm {
}
}
fn get_property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
fn property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
match pspec.name() {
"loudness-target" => {
let settings = self.settings.lock().unwrap();

View file

@ -223,7 +223,7 @@ impl ObjectImpl for EbuR128Level {
}
}
fn get_property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
fn property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
let settings = self.settings.lock().unwrap();
match pspec.name() {
"mode" => settings.mode.to_value(),

View file

@ -375,7 +375,7 @@ impl AudioDepth {
}
}
fn get_claxon_streaminfo(indata: &[u8]) -> Result<claxon::metadata::StreamInfo, &'static str> {
fn claxon_streaminfo(indata: &[u8]) -> Result<claxon::metadata::StreamInfo, &'static str> {
let mut cursor = Cursor::new(indata);
let mut metadata_iter = claxon::metadata::MetadataBlockReader::new(&mut cursor);
let streaminfo = match metadata_iter.next() {
@ -388,9 +388,7 @@ fn get_claxon_streaminfo(indata: &[u8]) -> Result<claxon::metadata::StreamInfo,
Ok(streaminfo)
}
fn get_gstaudioinfo(
streaminfo: claxon::metadata::StreamInfo,
) -> Result<gst_audio::AudioInfo, String> {
fn gstaudioinfo(streaminfo: claxon::metadata::StreamInfo) -> Result<gst_audio::AudioInfo, String> {
let format = match streaminfo.bits_per_sample {
8 => gst_audio::AudioFormat::S8,
16 => gst_audio::AUDIO_FORMAT_S16,

View file

@ -88,7 +88,7 @@ impl State {
in_process_samples * self.out_info.bpf() as usize
}
fn get_bytes_to_read(&mut self, output_size: usize) -> usize {
fn bytes_to_read(&mut self, output_size: usize) -> usize {
// The max amount of bytes at the input that We would need
// for filling an output buffer of size *output_size*
(output_size / self.out_info.bpf() as usize) * self.in_info.bpf() as usize
@ -418,7 +418,7 @@ impl ObjectImpl for CsoundFilter {
}
}
fn get_property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
fn property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
match pspec.name() {
"loop" => {
let settings = self.settings.lock().unwrap();

View file

@ -153,7 +153,7 @@ impl ObjectImpl for FileSink {
};
}
fn get_property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
fn property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
match pspec.name() {
"location" => {
let settings = self.settings.lock().unwrap();
@ -292,11 +292,11 @@ impl BaseSinkImpl for FileSink {
impl URIHandlerImpl for FileSink {
const URI_TYPE: gst::URIType = gst::URIType::Sink;
fn get_protocols() -> &'static [&'static str] {
fn protocols() -> &'static [&'static str] {
&["file"]
}
fn get_uri(&self, _element: &Self::Type) -> Option<String> {
fn uri(&self, _element: &Self::Type) -> Option<String> {
let settings = self.settings.lock().unwrap();
// Conversion to Url already checked while building the `FileLocation`

View file

@ -167,7 +167,7 @@ impl ObjectImpl for FileSrc {
};
}
fn get_property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
fn property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
match pspec.name() {
"location" => {
let settings = self.settings.lock().unwrap();
@ -226,7 +226,7 @@ impl BaseSrcImpl for FileSrc {
true
}
fn get_size(&self, _src: &Self::Type) -> Option<u64> {
fn size(&self, _src: &Self::Type) -> Option<u64> {
let state = self.state.lock().unwrap();
if let State::Started { ref file, .. } = *state {
file.metadata().ok().map(|m| m.len())
@ -345,11 +345,11 @@ impl BaseSrcImpl for FileSrc {
impl URIHandlerImpl for FileSrc {
const URI_TYPE: gst::URIType = gst::URIType::Src;
fn get_protocols() -> &'static [&'static str] {
fn protocols() -> &'static [&'static str] {
&["file"]
}
fn get_uri(&self, _element: &Self::Type) -> Option<String> {
fn uri(&self, _element: &Self::Type) -> Option<String> {
let settings = self.settings.lock().unwrap();
// Conversion to Url already checked while building the `FileLocation`

View file

@ -141,7 +141,7 @@ impl State {
}
// Retrieve the requested buffer out of the adapter.
fn get_requested_buffer(
fn requested_buffer(
&mut self,
pad: &gst::Pad,
buffer: Option<&mut gst::BufferRef>,
@ -496,7 +496,7 @@ impl Decrypter {
})
}
fn get_range(
fn range(
&self,
pad: &gst::Pad,
element: &super::Decrypter,
@ -651,7 +651,7 @@ impl ObjectImpl for Decrypter {
}
}
fn get_property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
fn property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
match pspec.name() {
"receiver-key" => {
let props = self.props.lock().unwrap();

View file

@ -456,7 +456,7 @@ impl ObjectImpl for Encrypter {
}
}
fn get_property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
fn property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
match pspec.name() {
"receiver-key" => {
let props = self.props.lock().unwrap();

View file

@ -646,7 +646,7 @@ impl ObjectImpl for AppSrc {
}
}
fn get_property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
fn property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
let settings = self.settings.lock().unwrap();
match pspec.name() {
"context" => settings.context.to_value(),

View file

@ -493,7 +493,7 @@ impl ObjectImpl for InputSelector {
}
}
fn get_property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
fn property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
match pspec.name() {
"context" => {
let settings = self.settings.lock().unwrap();

View file

@ -847,7 +847,7 @@ impl SrcHandler {
jb.src_pad.push(buffer).await
}
fn get_next_wakeup(
fn next_wakeup(
&self,
element: &super::JitterBuffer,
state: &State,
@ -1495,7 +1495,7 @@ impl ObjectImpl for JitterBuffer {
}
}
fn get_property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
fn property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
match pspec.name() {
"latency" => {
let settings = self.settings.lock().unwrap();

View file

@ -192,12 +192,12 @@ impl RTPPacketRateCtx {
unsafe { ffi::gst_rtp_packet_rate_ctx_update(&mut *self.0, seqnum, ts) }
}
pub fn get_max_dropout(&mut self, time_ms: i32) -> u32 {
pub fn max_dropout(&mut self, time_ms: i32) -> u32 {
unsafe { ffi::gst_rtp_packet_rate_ctx_get_max_dropout(&mut *self.0, time_ms) }
}
#[allow(dead_code)]
pub fn get_max_disorder(&mut self, time_ms: i32) -> u32 {
pub fn max_disorder(&mut self, time_ms: i32) -> u32 {
unsafe { ffi::gst_rtp_packet_rate_ctx_get_max_disorder(&mut *self.0, time_ms) }
}
}

View file

@ -621,7 +621,7 @@ impl ObjectImpl for ProxySink {
}
}
fn get_property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
fn property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
let settings = self.settings.lock().unwrap();
match pspec.name() {
"proxy-context" => settings.proxy_context.to_value(),
@ -1223,7 +1223,7 @@ impl ObjectImpl for ProxySrc {
}
}
fn get_property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
fn property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
let settings = self.settings.lock().unwrap();
match pspec.name() {
"max-size-buffers" => settings.max_size_buffers.to_value(),

View file

@ -798,7 +798,7 @@ impl ObjectImpl for Queue {
}
}
fn get_property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
fn property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
let settings = self.settings.lock().unwrap();
match pspec.name() {
"max-size-buffers" => settings.max_size_buffers.to_value(),

View file

@ -657,7 +657,7 @@ impl ObjectImpl for TcpClientSrc {
}
}
fn get_property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
fn property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
let settings = self.settings.lock().unwrap();
match pspec.name() {
"host" => settings.host.to_value(),

View file

@ -1286,7 +1286,7 @@ impl ObjectImpl for UdpSink {
}
}
fn get_property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
fn property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
let settings = self.settings.lock().unwrap();
match pspec.name() {
"sync" => settings.sync.to_value(),

View file

@ -847,7 +847,7 @@ impl ObjectImpl for UdpSrc {
}
}
fn get_property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
fn property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
let settings = self.settings.lock().unwrap();
match pspec.name() {
"address" => settings.address.to_value(),

View file

@ -739,7 +739,7 @@ impl ObjectImpl for ReqwestHttpSrc {
};
}
fn get_property(&self, obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
fn property(&self, obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
match pspec.name() {
"location" => {
let settings = self.settings.lock().unwrap();
@ -860,7 +860,7 @@ impl BaseSrcImpl for ReqwestHttpSrc {
}
}
fn get_size(&self, _src: &Self::Type) -> Option<u64> {
fn size(&self, _src: &Self::Type) -> Option<u64> {
match *self.state.lock().unwrap() {
State::Started { size, .. } => size,
_ => None,
@ -1096,11 +1096,11 @@ impl PushSrcImpl for ReqwestHttpSrc {
impl URIHandlerImpl for ReqwestHttpSrc {
const URI_TYPE: gst::URIType = gst::URIType::Src;
fn get_protocols() -> &'static [&'static str] {
fn protocols() -> &'static [&'static str] {
&["http", "https"]
}
fn get_uri(&self, _element: &Self::Type) -> Option<String> {
fn uri(&self, _element: &Self::Type) -> Option<String> {
let settings = self.settings.lock().unwrap();
settings.location.as_ref().map(Url::to_string)

View file

@ -1091,7 +1091,7 @@ impl ObjectImpl for Transcriber {
}
}
fn get_property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
fn property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
match pspec.name() {
"language-code" => {
let settings = self.settings.lock().unwrap();

View file

@ -420,7 +420,7 @@ impl ObjectImpl for S3Sink {
}
}
fn get_property(&self, _: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
fn property(&self, _: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
let settings = self.settings.lock().unwrap();
match pspec.name() {

View file

@ -240,7 +240,7 @@ impl ObjectImpl for S3Src {
}
}
fn get_property(&self, _: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
fn property(&self, _: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
match pspec.name() {
"uri" => {
let url = match *self.url.lock().unwrap() {
@ -298,11 +298,11 @@ impl ElementImpl for S3Src {
impl URIHandlerImpl for S3Src {
const URI_TYPE: gst::URIType = gst::URIType::Src;
fn get_protocols() -> &'static [&'static str] {
fn protocols() -> &'static [&'static str] {
&["s3"]
}
fn get_uri(&self, _: &Self::Type) -> Option<String> {
fn uri(&self, _: &Self::Type) -> Option<String> {
self.url.lock().unwrap().as_ref().map(|s| s.to_string())
}
@ -316,7 +316,7 @@ impl BaseSrcImpl for S3Src {
true
}
fn get_size(&self, _: &Self::Type) -> Option<u64> {
fn size(&self, _: &Self::Type) -> Option<u64> {
match *self.state.lock().unwrap() {
StreamingState::Stopped => None,
StreamingState::Started { size, .. } => Some(size),

View file

@ -115,7 +115,7 @@ enum Line<'a> {
}
impl State {
fn get_line(&mut self, drain: bool) -> Result<Option<Line>, (&[u8], serde_json::Error)> {
fn line(&mut self, drain: bool) -> Result<Option<Line>, (&[u8], serde_json::Error)> {
let line = if self.replay_last_line {
self.replay_last_line = false;
&self.last_raw_line

View file

@ -248,7 +248,7 @@ impl ObjectImpl for RegEx {
}
}
fn get_property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
fn property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
match pspec.name() {
"commands" => {
let state = self.state.lock().unwrap();

View file

@ -569,7 +569,7 @@ impl ObjectImpl for TextWrap {
}
}
fn get_property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
fn property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
match pspec.name() {
"dictionary" => {
let settings = self.settings.lock().unwrap();

View file

@ -125,7 +125,7 @@ impl ObjectImpl for ProgressBin {
// Called whenever a value of a property is read. It can be called
// at any time from any thread.
fn get_property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
fn property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
match pspec.name() {
"output" => {
let output_type = self.output_type.lock().unwrap();

View file

@ -165,7 +165,7 @@ impl ObjectImpl for Rgb2Gray {
// Called whenever a value of a property is read. It can be called
// at any time from any thread.
fn get_property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
fn property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
match pspec.name() {
"invert" => {
let settings = self.settings.lock().unwrap();
@ -351,7 +351,7 @@ impl BaseTransformImpl for Rgb2Gray {
// Returns the size of one processing unit (i.e. a frame in our case) corresponding
// to the given caps. This is used for allocating a big enough output buffer and
// sanity checking the input buffer size, among other things.
fn get_unit_size(&self, _element: &Self::Type, caps: &gst::Caps) -> Option<usize> {
fn unit_size(&self, _element: &Self::Type, caps: &gst::Caps) -> Option<usize> {
gst_video::VideoInfo::from_caps(caps)
.map(|info| info.size())
.ok()

View file

@ -303,7 +303,7 @@ impl ObjectImpl for SineSrc {
// Called whenever a value of a property is read. It can be called
// at any time from any thread.
fn get_property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
fn property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
match pspec.name() {
"samples-per-buffer" => {
let settings = self.settings.lock().unwrap();

View file

@ -110,7 +110,7 @@ pub trait AggregatorImpl: AggregatorImplExt + ElementImpl {
self.parent_stop(aggregator)
}
fn get_next_time(&self, aggregator: &Self::Type) -> gst::ClockTime {
fn next_time(&self, aggregator: &Self::Type) -> gst::ClockTime {
self.parent_get_next_time(aggregator)
}

View file

@ -439,7 +439,7 @@ impl ObjectImpl for FallbackSrc {
// Called whenever a value of a property is read. It can be called
// at any time from any thread.
#[allow(clippy::blocks_in_if_conditions)]
fn get_property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
fn property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
match pspec.name() {
"enable-audio" => {
let settings = self.settings.lock().unwrap();

View file

@ -142,7 +142,7 @@ impl ObjectImpl for VideoFallbackSource {
}
}
fn get_property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
fn property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
match pspec.name() {
"uri" => {
let settings = self.settings.lock().unwrap();
@ -235,7 +235,7 @@ impl BinImpl for VideoFallbackSource {
}
impl VideoFallbackSource {
fn get_file_src_for_uri(
fn file_src_for_uri(
&self,
element: &super::VideoFallbackSource,
uri: Option<&str>,

View file

@ -123,7 +123,7 @@ impl Default for Settings {
}
impl OutputState {
fn get_health(
fn health(
&self,
settings: &Settings,
check_primary_pad: bool,
@ -360,7 +360,7 @@ impl FallbackSwitch {
Ok(Some((buffer, active_caps, pad_change)))
}
fn get_backup_buffer(
fn backup_buffer(
&self,
state: &mut OutputState,
settings: &Settings,
@ -477,7 +477,7 @@ impl FallbackSwitch {
}
#[allow(clippy::type_complexity)]
fn get_next_buffer(
fn next_buffer(
&self,
agg: &super::FallbackSwitch,
timeout: bool,
@ -769,7 +769,7 @@ impl ObjectImpl for FallbackSwitch {
}
}
fn get_property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
fn property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
match pspec.name() {
"timeout" => {
let settings = self.settings.lock().unwrap();
@ -980,7 +980,7 @@ impl AggregatorImpl for FallbackSwitch {
}
}
fn get_next_time(&self, agg: &Self::Type) -> gst::ClockTime {
fn next_time(&self, agg: &Self::Type) -> gst::ClockTime {
/* At each iteration, we have a preferred pad and a backup pad. If autoswitch is true,
* the sinkpad is always preferred, otherwise it's the active sinkpad as set by the app.
* The backup pad is the other one (may be None if there's no fallback pad yet).

View file

@ -168,7 +168,7 @@ trait HandleData: Sized {
self.pts()
}
}
fn get_duration(&self, state: &StreamState) -> gst::ClockTime;
fn duration(&self, state: &StreamState) -> gst::ClockTime;
fn is_keyframe(&self) -> bool;
fn can_clip(&self, state: &StreamState) -> bool;
fn clip(
@ -187,7 +187,7 @@ impl HandleData for (gst::ClockTime, gst::ClockTime) {
self.0
}
fn get_duration(&self, _state: &StreamState) -> gst::ClockTime {
fn duration(&self, _state: &StreamState) -> gst::ClockTime {
self.1
}
@ -225,7 +225,7 @@ impl HandleData for gst::Buffer {
gst::BufferRef::dts(self)
}
fn get_duration(&self, state: &StreamState) -> gst::ClockTime {
fn duration(&self, state: &StreamState) -> gst::ClockTime {
let duration = gst::BufferRef::duration(self);
if duration.is_some() {
@ -1743,7 +1743,7 @@ impl ObjectImpl for ToggleRecord {
}
}
fn get_property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
fn property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
match pspec.name() {
"record" => {
let settings = self.settings.lock();

View file

@ -53,7 +53,7 @@ use std::{env, fs, path};
/// - If neither is possible, `COMMIT_ID` is set to the string `UNKNOWN` and `BUILD_REL_DATE` to the
/// current date.
///
pub fn get_info() {
pub fn info() {
let crate_dir =
path::PathBuf::from(env::var("CARGO_MANIFEST_DIR").expect("CARGO_MANIFEST_DIR not set"));
let mut repo_dir = crate_dir.clone();

View file

@ -270,7 +270,7 @@ impl ObjectImpl for CCDetect {
}
}
fn get_property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
fn property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
match pspec.name() {
"window" => {
let settings = self.settings.lock().unwrap();

View file

@ -614,7 +614,7 @@ impl ObjectImpl for Cea608Overlay {
}
}
fn get_property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
fn property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
match pspec.name() {
"field" => {
let settings = self.settings.lock().unwrap();

View file

@ -152,7 +152,7 @@ impl<T: AsRef<[u8]>> LineReader<T> {
assert_eq!(self.buf.len(), len);
}
pub fn get_line_with_drain(&mut self, drain: bool) -> Option<&[u8]> {
pub fn line_with_drain(&mut self, drain: bool) -> Option<&[u8]> {
// Drop all data from the previous line
self.drop_previous_line();

View file

@ -540,7 +540,7 @@ impl ObjectImpl for MccEnc {
}
}
fn get_property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
fn property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
match pspec.name() {
"uuid" => {
let settings = self.settings.lock().unwrap();

View file

@ -156,10 +156,7 @@ fn parse_timecode_rate(
impl State {
#[allow(clippy::type_complexity)]
fn get_line(
&mut self,
drain: bool,
) -> Result<Option<MccLine>, (&[u8], nom::error::Error<&[u8]>)> {
fn line(&mut self, drain: bool) -> Result<Option<MccLine>, (&[u8], nom::error::Error<&[u8]>)> {
let line = if self.replay_last_line {
self.replay_last_line = false;
&self.last_raw_line

View file

@ -139,10 +139,7 @@ fn parse_timecode(
impl State {
#[allow(clippy::type_complexity)]
fn get_line(
&mut self,
drain: bool,
) -> Result<Option<SccLine>, (&[u8], nom::error::Error<&[u8]>)> {
fn line(&mut self, drain: bool) -> Result<Option<SccLine>, (&[u8], nom::error::Error<&[u8]>)> {
let line = match self.reader.get_line_with_drain(drain) {
None => {
return Ok(None);

View file

@ -1094,7 +1094,7 @@ impl ObjectImpl for TtToCea608 {
}
}
fn get_property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
fn property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
match pspec.name() {
"mode" => {
let settings = self.settings.lock().unwrap();

View file

@ -264,7 +264,7 @@ impl ObjectImpl for TtToJson {
}
}
fn get_property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
fn property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
match pspec.name() {
"mode" => {
let settings = self.settings.lock().unwrap();

View file

@ -170,7 +170,7 @@ impl ObjectImpl for GifEnc {
}
}
fn get_property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
fn property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
match pspec.name() {
"repeat" => {
let settings = self.settings.lock().unwrap();
@ -424,7 +424,7 @@ impl GifEnc {
/// Helper method that takes a gstreamer video-frame and copies it into a
/// tightly packed rgb(a) buffer, ready for consumption by the gif encoder.
fn get_tightly_packed_framebuffer(frame: &gst_video::VideoFrameRef<&gst::BufferRef>) -> Vec<u8> {
fn tightly_packed_framebuffer(frame: &gst_video::VideoFrameRef<&gst::BufferRef>) -> Vec<u8> {
assert_eq!(frame.n_planes(), 1); // RGB and RGBA are tightly packed
let line_size = (frame.info().width() * frame.n_components()) as usize;
let line_stride = frame.info().stride()[0] as usize;

View file

@ -232,7 +232,7 @@ impl ObjectImpl for HsvDetector {
// Called whenever a value of a property is read. It can be called
// at any time from any thread.
fn get_property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
fn property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
match pspec.name() {
"hue-ref" => {
let settings = self.settings.lock().unwrap();
@ -390,7 +390,7 @@ impl BaseTransformImpl for HsvDetector {
}
}
fn get_unit_size(&self, _element: &Self::Type, caps: &gst::Caps) -> Option<usize> {
fn unit_size(&self, _element: &Self::Type, caps: &gst::Caps) -> Option<usize> {
gst_video::VideoInfo::from_caps(caps)
.map(|info| info.size())
.ok()

View file

@ -206,7 +206,7 @@ impl ObjectImpl for HsvFilter {
// Called whenever a value of a property is read. It can be called
// at any time from any thread.
fn get_property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
fn property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
match pspec.name() {
"hue-shift" => {
let settings = self.settings.lock().unwrap();
@ -298,7 +298,7 @@ impl BaseTransformImpl for HsvFilter {
const PASSTHROUGH_ON_SAME_CAPS: bool = false;
const TRANSFORM_IP_ON_PASSTHROUGH: bool = false;
fn get_unit_size(&self, _element: &Self::Type, caps: &gst::Caps) -> Option<usize> {
fn unit_size(&self, _element: &Self::Type, caps: &gst::Caps) -> Option<usize> {
gst_video::VideoInfo::from_caps(caps)
.map(|info| info.size())
.ok()

View file

@ -364,7 +364,7 @@ impl ObjectImpl for Rav1Enc {
}
}
fn get_property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
fn property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
match pspec.name() {
"speed-preset" => {
let settings = self.settings.lock().unwrap();

View file

@ -222,7 +222,7 @@ impl ObjectImpl for PngEncoder {
}
}
fn get_property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
fn property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
match pspec.name() {
"compression-level" => {
let settings = self.settings.lock();