mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-12-30 05:50:31 +00:00
manual fixes remove get prefix round 2
This commit is contained in:
parent
3203f57748
commit
95cdd43f4f
12 changed files with 24 additions and 24 deletions
|
@ -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;
|
||||
|
@ -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 u32 {
|
||||
if rate != out_info.rate() || rate != csound.get_sample_rate() as u32 {
|
||||
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();
|
||||
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ glib::wrapper! {
|
|||
pub struct RTPJitterBuffer(Object<ffi::RTPJitterBuffer>);
|
||||
|
||||
match fn {
|
||||
get_type => || ffi::rtp_jitter_buffer_get_type(),
|
||||
type_ => || ffi::rtp_jitter_buffer_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -475,11 +475,11 @@ impl ReqwestHttpSrc {
|
|||
s.set("content-type", &content_type.as_ref());
|
||||
} else if content_type.type_() == "audio" && content_type.subtype() == "L16" {
|
||||
let channels = content_type
|
||||
.param("channels")
|
||||
.get_param("channels")
|
||||
.and_then(|s| s.as_ref().parse::<i32>().ok())
|
||||
.unwrap_or(2);
|
||||
let rate = content_type
|
||||
.param("rate")
|
||||
.get_param("rate")
|
||||
.and_then(|s| s.as_ref().parse::<i32>().ok())
|
||||
.unwrap_or(44_100);
|
||||
|
||||
|
|
|
@ -459,7 +459,7 @@ fn test_extra_headers() {
|
|||
assert_eq!(headers.get("baz").unwrap(), "1");
|
||||
assert_eq!(
|
||||
headers
|
||||
.all("list")
|
||||
.get_all("list")
|
||||
.iter()
|
||||
.map(|v| v.to_str().unwrap())
|
||||
.collect::<Vec<&str>>(),
|
||||
|
@ -467,7 +467,7 @@ fn test_extra_headers() {
|
|||
);
|
||||
assert_eq!(
|
||||
headers
|
||||
.all("array")
|
||||
.get_all("array")
|
||||
.iter()
|
||||
.map(|v| v.to_str().unwrap())
|
||||
.collect::<Vec<&str>>(),
|
||||
|
|
|
@ -175,7 +175,7 @@ impl S3Src {
|
|||
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 {
|
||||
WaitError::FutureError(err) => Some(gst::error_msg!(
|
||||
|
|
|
@ -111,7 +111,7 @@ pub trait AggregatorImpl: AggregatorImplExt + ElementImpl {
|
|||
}
|
||||
|
||||
fn next_time(&self, aggregator: &Self::Type) -> gst::ClockTime {
|
||||
self.parent_get_next_time(aggregator)
|
||||
self.parent_next_time(aggregator)
|
||||
}
|
||||
|
||||
fn create_new_pad(
|
||||
|
@ -214,7 +214,7 @@ pub trait AggregatorImplExt: ObjectSubclass {
|
|||
|
||||
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(
|
||||
&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 {
|
||||
let data = T::type_data();
|
||||
let parent_class = data.as_ref().parent_class() as *mut ffi::GstAggregatorClass;
|
||||
|
|
|
@ -66,7 +66,7 @@ fn setup_sender_receiver(
|
|||
togglerecord.static_pad("sink").unwrap(),
|
||||
)
|
||||
} 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();
|
||||
(srcpad, sinkpad)
|
||||
};
|
||||
|
@ -263,7 +263,7 @@ fn test_create_pads() {
|
|||
init();
|
||||
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();
|
||||
|
||||
assert_eq!(sinkpad.name(), "sink_0");
|
||||
|
|
|
@ -181,7 +181,7 @@ impl VideoDecoderImpl for CdgDec {
|
|||
.take(CDG_WIDTH as usize)
|
||||
.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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue