iced_video_player: silence local check warnings

This commit is contained in:
Lionel DARNIS 2026-05-18 16:16:39 +02:00
parent 1e0a8add0f
commit fd03f98738
2 changed files with 4 additions and 3 deletions

View file

@ -32,7 +32,7 @@ pub struct VideoPipeline {
}
impl VideoPipeline {
fn new(device: &wgpu::Device, format: wgpu::TextureFormat, queue: &wgpu::Queue) -> Self {
fn new(device: &wgpu::Device, format: wgpu::TextureFormat, _queue: &wgpu::Queue) -> Self {
let shader = device.create_shader_module(wgpu::ShaderModuleDescriptor {
label: Some("iced_video_player shader"),
source: wgpu::ShaderSource::Wgsl(include_str!("shader.wgsl").into()),
@ -417,7 +417,7 @@ impl Primitive for VideoPrimitive {
device: &wgpu::Device,
queue: &wgpu::Queue,
bounds: &Rectangle,
viewport: &Viewport,
_viewport: &Viewport,
) {
if self.upload_frame {
if let Some(readable) = self.frame.lock().expect("lock frame mutex").readable() {

View file

@ -50,6 +50,7 @@ impl Frame {
pub fn new() -> Self {
Self(gst::Sample::builder().build())
}
#[allow(dead_code)]
pub fn store(&mut self, sample: gst::Sample) -> Option<()> {
if sample.buffer().is_some() {
self.0 = sample;
@ -58,7 +59,7 @@ impl Frame {
None
}
}
pub fn readable(&self) -> Option<gst::BufferMap<gst::buffer::Readable>> {
pub fn readable(&self) -> Option<gst::BufferMap<'_, gst::buffer::Readable>> {
self.0.buffer().map(|x| x.map_readable().ok()).flatten()
}
}