feat: add AdjustExistingTrackDrift use case to adjust drift scale of existing tracks

- Implemented AdjustExistingTrackDrift struct with execute method to modify drift scale of existing tracks in a project.
- Added tests for adjusting drift scale, handling non-existent track IDs, and invalid scale values.
- Updated MediaTrackInfo and AudioTrack entities to include drift_scale field.
- Enhanced Project entity with needs_mkvmerge method to determine if mkvmerge is required based on drift scale.
- Integrated drift scale adjustments into existing track list UI, allowing users to modify drift values.
- Updated various use cases and UI components to support drift scale functionality, including add audio/subtitle forms and batch processing.
- Implemented mkvmerge availability check and integrated it into the application workflow for conditional processing.
This commit is contained in:
2026-03-01 12:01:39 -03:00
parent 285f22e2d1
commit 1ef47b3a07
31 changed files with 1081 additions and 62 deletions
+16
View File
@@ -47,4 +47,20 @@ impl Track {
Track::Subtitle(t) => t.language = language,
}
}
/// Retorna o fator de escala temporal da faixa.
pub fn drift_scale(&self) -> f64 {
match self {
Track::Audio(t) => t.drift_scale,
Track::Subtitle(t) => t.drift_scale,
}
}
/// Define o fator de escala temporal da faixa.
pub fn set_drift_scale(&mut self, scale: f64) {
match self {
Track::Audio(t) => t.drift_scale = scale,
Track::Subtitle(t) => t.drift_scale = scale,
}
}
}