Clean up build warnings

This commit is contained in:
Skyler Lehmkuhl
2026-02-14 11:07:32 -05:00
parent 82b58ae0dc
commit 777d3ef6be
38 changed files with 210 additions and 480 deletions
@@ -1,3 +1,4 @@
#![allow(dead_code)]
//! Audio export functionality
//!
//! Exports audio from the timeline to various formats:
@@ -168,7 +169,7 @@ fn export_audio_ffmpeg_mp3<P: AsRef<Path>>(
// Step 3: Encode frames and write to output
// Convert interleaved f32 samples to planar i16 format
let num_frames = pcm_samples.len() / settings.channels as usize;
let mut planar_samples = convert_to_planar_i16(&pcm_samples, settings.channels);
let planar_samples = convert_to_planar_i16(&pcm_samples, settings.channels);
// Get encoder frame size
let frame_size = encoder.frame_size();
@@ -182,7 +182,7 @@ impl ExportDialog {
("Podcast AAC", AudioExportSettings::podcast_aac()),
];
egui::ComboBox::from_id_source("export_preset")
egui::ComboBox::from_id_salt("export_preset")
.selected_text(presets[self.selected_audio_preset].0)
.show_ui(ui, |ui| {
for (i, (name, _)) in presets.iter().enumerate() {
@@ -207,7 +207,7 @@ impl ExportDialog {
ui.heading("Format");
ui.horizontal(|ui| {
ui.label("Format:");
egui::ComboBox::from_id_source("audio_format")
egui::ComboBox::from_id_salt("audio_format")
.selected_text(self.audio_settings.format.name())
.show_ui(ui, |ui| {
ui.selectable_value(&mut self.audio_settings.format, AudioFormat::Wav, "WAV (Uncompressed)");
@@ -222,7 +222,7 @@ impl ExportDialog {
// Audio settings
ui.horizontal(|ui| {
ui.label("Sample Rate:");
egui::ComboBox::from_id_source("sample_rate")
egui::ComboBox::from_id_salt("sample_rate")
.selected_text(format!("{} Hz", self.audio_settings.sample_rate))
.show_ui(ui, |ui| {
ui.selectable_value(&mut self.audio_settings.sample_rate, 44100, "44100 Hz");
@@ -251,7 +251,7 @@ impl ExportDialog {
if self.audio_settings.format.uses_bitrate() {
ui.horizontal(|ui| {
ui.label("Bitrate:");
egui::ComboBox::from_id_source("bitrate")
egui::ComboBox::from_id_salt("bitrate")
.selected_text(format!("{} kbps", self.audio_settings.bitrate_kbps))
.show_ui(ui, |ui| {
ui.selectable_value(&mut self.audio_settings.bitrate_kbps, 128, "128 kbps");
@@ -269,7 +269,7 @@ impl ExportDialog {
ui.heading("Codec");
ui.horizontal(|ui| {
ui.label("Codec:");
egui::ComboBox::from_id_source("video_codec")
egui::ComboBox::from_id_salt("video_codec")
.selected_text(format!("{:?}", self.video_settings.codec))
.show_ui(ui, |ui| {
ui.selectable_value(&mut self.video_settings.codec, VideoCodec::H264, "H.264 (Most Compatible)");
@@ -287,13 +287,13 @@ impl ExportDialog {
ui.horizontal(|ui| {
ui.label("Width:");
let mut custom_width = self.video_settings.width.unwrap_or(1920);
if ui.add(egui::DragValue::new(&mut custom_width).clamp_range(1..=7680)).changed() {
if ui.add(egui::DragValue::new(&mut custom_width).range(1..=7680)).changed() {
self.video_settings.width = Some(custom_width);
}
ui.label("Height:");
let mut custom_height = self.video_settings.height.unwrap_or(1080);
if ui.add(egui::DragValue::new(&mut custom_height).clamp_range(1..=4320)).changed() {
if ui.add(egui::DragValue::new(&mut custom_height).range(1..=4320)).changed() {
self.video_settings.height = Some(custom_height);
}
});
@@ -320,7 +320,7 @@ impl ExportDialog {
ui.heading("Framerate");
ui.horizontal(|ui| {
ui.label("FPS:");
egui::ComboBox::from_id_source("framerate")
egui::ComboBox::from_id_salt("framerate")
.selected_text(format!("{}", self.video_settings.framerate as u32))
.show_ui(ui, |ui| {
ui.selectable_value(&mut self.video_settings.framerate, 24.0, "24");
@@ -335,7 +335,7 @@ impl ExportDialog {
ui.heading("Quality");
ui.horizontal(|ui| {
ui.label("Quality:");
egui::ComboBox::from_id_source("video_quality")
egui::ComboBox::from_id_salt("video_quality")
.selected_text(self.video_settings.quality.name())
.show_ui(ui, |ui| {
ui.selectable_value(&mut self.video_settings.quality, VideoQuality::Low, VideoQuality::Low.name());
@@ -363,13 +363,13 @@ impl ExportDialog {
ui.label("Start:");
ui.add(egui::DragValue::new(start_time)
.speed(0.1)
.clamp_range(0.0..=*end_time)
.range(0.0..=*end_time)
.suffix(" s"));
ui.label("End:");
ui.add(egui::DragValue::new(end_time)
.speed(0.1)
.clamp_range(*start_time..=f64::MAX)
.range(*start_time..=f64::MAX)
.suffix(" s"));
});
@@ -42,6 +42,7 @@ pub struct VideoExportState {
/// Start time in seconds
start_time: f64,
/// End time in seconds
#[allow(dead_code)]
end_time: f64,
/// Frames per second
framerate: f64,
@@ -163,7 +164,7 @@ impl ExportOrchestrator {
/// For parallel video+audio exports, returns combined progress.
pub fn poll_progress(&mut self) -> Option<ExportProgress> {
// Handle parallel video+audio export
if let Some(ref mut parallel) = self.parallel_export {
if let Some(ref mut _parallel) = self.parallel_export {
return self.poll_parallel_progress();
}
@@ -461,6 +462,7 @@ impl ExportOrchestrator {
/// Wait for the export to complete
///
/// This blocks until the export thread finishes.
#[allow(dead_code)]
pub fn wait_for_completion(&mut self) {
if let Some(handle) = self.thread_handle.take() {
handle.join().ok();
@@ -915,7 +917,7 @@ impl ExportOrchestrator {
}
// Render to GPU (timed)
let render_start = Instant::now();
let _render_start = Instant::now();
let encoder = video_exporter::render_frame_to_gpu_rgba(
document, timestamp, width, height,
device, queue, renderer, image_cache, video_manager,
@@ -1049,7 +1051,7 @@ impl ExportOrchestrator {
// Determine dimensions from first frame
let (width, height) = if let Some((_, _, ref y_plane, _, _)) = first_frame {
// Calculate dimensions from Y plane size (full resolution, 1 byte per pixel)
let pixel_count = y_plane.len();
let _pixel_count = y_plane.len();
// Use settings dimensions if provided, otherwise infer from buffer
let w = settings.width.unwrap_or(1920); // Default to 1920 if not specified
let h = settings.height.unwrap_or(1080); // Default to 1080 if not specified
@@ -1088,7 +1090,7 @@ impl ExportOrchestrator {
println!("🧵 [ENCODER] Encoder initialized, ready to encode frames");
// Process first frame
if let Some((frame_num, timestamp, y_plane, u_plane, v_plane)) = first_frame {
if let Some((_frame_num, timestamp, y_plane, u_plane, v_plane)) = first_frame {
Self::encode_frame(
&mut encoder,
&mut output,
@@ -1115,7 +1117,7 @@ impl ExportOrchestrator {
}
match frame_rx.recv() {
Ok(VideoFrameMessage::Frame { frame_num, timestamp, y_plane, u_plane, v_plane }) => {
Ok(VideoFrameMessage::Frame { frame_num: _, timestamp, y_plane, u_plane, v_plane }) => {
Self::encode_frame(
&mut encoder,
&mut output,
@@ -216,7 +216,7 @@ impl ReadbackPipeline {
/// Call this frequently to process completed transfers.
pub fn poll_nonblocking(&mut self) -> Vec<ReadbackResult> {
// Poll GPU without blocking
self.device.poll(wgpu::PollType::Poll);
let _ = self.device.poll(wgpu::PollType::Poll);
// Collect all completed readbacks
let mut results = Vec::new();
@@ -269,13 +269,14 @@ impl ReadbackPipeline {
/// Flush pipeline and wait for all pending operations
///
/// Call this at the end of export to ensure all frames are processed
#[allow(dead_code)]
pub fn flush(&mut self) -> Vec<ReadbackResult> {
let mut all_results = Vec::new();
// Keep polling until all buffers are Free
loop {
// Poll for new completions
self.device.poll(wgpu::PollType::Poll);
let _ = self.device.poll(wgpu::PollType::Poll);
while let Ok(result) = self.readback_rx.try_recv() {
self.buffers[result.buffer_id].state = BufferState::Mapped;
@@ -310,8 +311,4 @@ impl ReadbackPipeline {
all_results
}
/// Get buffer count currently in flight (for monitoring)
pub fn buffers_in_flight(&self) -> usize {
self.buffers.iter().filter(|b| b.state != BufferState::Free).count()
}
}
@@ -1,3 +1,4 @@
#![allow(dead_code)]
//! Video export functionality
//!
//! Exports video from the timeline using FFmpeg encoding: