manual fixes remove get prefix round 2

This commit is contained in:
François Laignel 2021-04-20 17:28:38 +02:00
parent 3203f57748
commit 95cdd43f4f
12 changed files with 24 additions and 24 deletions

View file

@ -128,8 +128,8 @@ impl State {
impl CsoundFilter { impl CsoundFilter {
fn process(&self, csound: &mut Csound, idata: &[f64], odata: &mut [f64]) -> bool { fn process(&self, csound: &mut Csound, idata: &[f64], odata: &mut [f64]) -> bool {
let spin = csound.spin().unwrap(); let spin = csound.get_spin().unwrap();
let spout = csound.spout().unwrap(); let spout = csound.get_spout().unwrap();
let in_chunks = idata.chunks_exact(spin.len()); let in_chunks = idata.chunks_exact(spin.len());
let out_chuncks = odata.chunks_exact_mut(spout.len()); let out_chuncks = odata.chunks_exact_mut(spout.len());
@ -190,8 +190,8 @@ impl CsoundFilter {
return Ok(gst::FlowSuccess::Ok); return Ok(gst::FlowSuccess::Ok);
} }
let mut spin = csound.spin().unwrap(); let mut spin = csound.get_spin().unwrap();
let spout = csound.spout().unwrap(); let spout = csound.get_spout().unwrap();
let out_bytes = let out_bytes =
(avail / state.in_info.channels() as usize) * state.out_info.channels() as usize; (avail / state.in_info.channels() as usize) * state.out_info.channels() as usize;
@ -547,7 +547,7 @@ impl BaseTransformImpl for CsoundFilter {
if compiled { if compiled {
let csound = self.csound.lock().unwrap(); let csound = self.csound.lock().unwrap();
// Use the sample rate and channels configured in the csound score // 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 ichannels = csound.input_channels() as i32;
let ochannels = csound.output_channels() as i32; let ochannels = csound.output_channels() as i32;
for s in new_caps.make_mut().iter_mut() { for s in new_caps.make_mut().iter_mut() {
@ -608,7 +608,7 @@ impl BaseTransformImpl for CsoundFilter {
let rate = in_info.rate(); let rate = in_info.rate();
// Check if the negotiated caps are the right ones // Check if the negotiated caps are the right ones
if rate != out_info.rate() || rate != csound.sample_rate() as u32 { if rate != out_info.rate() || rate != csound.get_sample_rate() as u32 {
return Err(loggable_error!( return Err(loggable_error!(
CAT, CAT,
"Failed to negotiate caps: invalid sample rate {}", "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(); let adapter = gst_base::UniqueAdapter::new();

View file

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

View file

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

View file

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

View file

@ -28,7 +28,7 @@ glib::wrapper! {
pub struct RTPJitterBuffer(Object<ffi::RTPJitterBuffer>); pub struct RTPJitterBuffer(Object<ffi::RTPJitterBuffer>);
match fn { match fn {
get_type => || ffi::rtp_jitter_buffer_get_type(), type_ => || ffi::rtp_jitter_buffer_get_type(),
} }
} }

View file

@ -475,11 +475,11 @@ impl ReqwestHttpSrc {
s.set("content-type", &content_type.as_ref()); s.set("content-type", &content_type.as_ref());
} else if content_type.type_() == "audio" && content_type.subtype() == "L16" { } else if content_type.type_() == "audio" && content_type.subtype() == "L16" {
let channels = content_type let channels = content_type
.param("channels") .get_param("channels")
.and_then(|s| s.as_ref().parse::<i32>().ok()) .and_then(|s| s.as_ref().parse::<i32>().ok())
.unwrap_or(2); .unwrap_or(2);
let rate = content_type let rate = content_type
.param("rate") .get_param("rate")
.and_then(|s| s.as_ref().parse::<i32>().ok()) .and_then(|s| s.as_ref().parse::<i32>().ok())
.unwrap_or(44_100); .unwrap_or(44_100);

View file

@ -459,7 +459,7 @@ fn test_extra_headers() {
assert_eq!(headers.get("baz").unwrap(), "1"); assert_eq!(headers.get("baz").unwrap(), "1");
assert_eq!( assert_eq!(
headers headers
.all("list") .get_all("list")
.iter() .iter()
.map(|v| v.to_str().unwrap()) .map(|v| v.to_str().unwrap())
.collect::<Vec<&str>>(), .collect::<Vec<&str>>(),
@ -467,7 +467,7 @@ fn test_extra_headers() {
); );
assert_eq!( assert_eq!(
headers headers
.all("array") .get_all("array")
.iter() .iter()
.map(|v| v.to_str().unwrap()) .map(|v| v.to_str().unwrap())
.collect::<Vec<&str>>(), .collect::<Vec<&str>>(),

View file

@ -175,7 +175,7 @@ impl S3Src {
offset + length - 1 offset + length - 1
); );
let response = client.object(request); let response = client.get_object(request);
let output = s3utils::wait(&self.canceller, response).map_err(|err| match err { let output = s3utils::wait(&self.canceller, response).map_err(|err| match err {
WaitError::FutureError(err) => Some(gst::error_msg!( WaitError::FutureError(err) => Some(gst::error_msg!(

View file

@ -111,7 +111,7 @@ pub trait AggregatorImpl: AggregatorImplExt + ElementImpl {
} }
fn next_time(&self, aggregator: &Self::Type) -> gst::ClockTime { fn next_time(&self, aggregator: &Self::Type) -> gst::ClockTime {
self.parent_get_next_time(aggregator) self.parent_next_time(aggregator)
} }
fn create_new_pad( fn create_new_pad(
@ -214,7 +214,7 @@ pub trait AggregatorImplExt: ObjectSubclass {
fn parent_stop(&self, aggregator: &Self::Type) -> Result<(), gst::ErrorMessage>; fn parent_stop(&self, aggregator: &Self::Type) -> Result<(), gst::ErrorMessage>;
fn parent_get_next_time(&self, aggregator: &Self::Type) -> gst::ClockTime; fn parent_next_time(&self, aggregator: &Self::Type) -> gst::ClockTime;
fn parent_create_new_pad( fn parent_create_new_pad(
&self, &self,
@ -498,7 +498,7 @@ impl<T: AggregatorImpl> AggregatorImplExt for T {
} }
} }
fn parent_get_next_time(&self, aggregator: &Self::Type) -> gst::ClockTime { fn parent_next_time(&self, aggregator: &Self::Type) -> gst::ClockTime {
unsafe { unsafe {
let data = T::type_data(); let data = T::type_data();
let parent_class = data.as_ref().parent_class() as *mut ffi::GstAggregatorClass; let parent_class = data.as_ref().parent_class() as *mut ffi::GstAggregatorClass;

View file

@ -66,7 +66,7 @@ fn setup_sender_receiver(
togglerecord.static_pad("sink").unwrap(), togglerecord.static_pad("sink").unwrap(),
) )
} else { } else {
let sinkpad = togglerecord.request_pad("sink_%u").unwrap(); let sinkpad = togglerecord.request_pad_simple("sink_%u").unwrap();
let srcpad = sinkpad.iterate_internal_links().next().unwrap().unwrap(); let srcpad = sinkpad.iterate_internal_links().next().unwrap().unwrap();
(srcpad, sinkpad) (srcpad, sinkpad)
}; };
@ -263,7 +263,7 @@ fn test_create_pads() {
init(); init();
let togglerecord = gst::ElementFactory::make("togglerecord", None).unwrap(); let togglerecord = gst::ElementFactory::make("togglerecord", None).unwrap();
let sinkpad = togglerecord.request_pad("sink_%u").unwrap(); let sinkpad = togglerecord.request_pad_simple("sink_%u").unwrap();
let srcpad = sinkpad.iterate_internal_links().next().unwrap().unwrap(); let srcpad = sinkpad.iterate_internal_links().next().unwrap().unwrap();
assert_eq!(sinkpad.name(), "sink_0"); assert_eq!(sinkpad.name(), "sink_0");

View file

@ -181,7 +181,7 @@ impl VideoDecoderImpl for CdgDec {
.take(CDG_WIDTH as usize) .take(CDG_WIDTH as usize)
.enumerate() .enumerate()
{ {
let p = cdg_inter.pixel(x as u32, y as u32); let p = cdg_inter.get_pixel(x as u32, y as u32);
pixel.copy_from_slice(&p.0); pixel.copy_from_slice(&p.0);
} }
} }

View file

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