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:
+26
-26
@@ -669,47 +669,47 @@ Drift: [__100.00_%] ← novo; só visível quando mkvmerge disponível
|
||||
|
||||
**Domain:**
|
||||
|
||||
- [ ] Criar `src/domain/value_objects/sync_transform.rs` com `SyncTransform`
|
||||
- [ ] Atualizar `src/domain/value_objects/mod.rs` para expor `SyncTransform`
|
||||
- [ ] Adicionar `drift_scale: f64` em `AudioTrack` e `SubtitleTrack` (preservando construtores atuais com `drift_scale = 1.0` como default no callsite)
|
||||
- [ ] Adicionar `drift_scale: f64` em `MediaTrackInfo`
|
||||
- [ ] Adicionar `drift_scale()` e `set_drift_scale()` em `Track`
|
||||
- [ ] Adicionar `Project::needs_mkvmerge()` com testes unitários
|
||||
- [x] Criar `src/domain/value_objects/sync_transform.rs` com `SyncTransform`
|
||||
- [x] Atualizar `src/domain/value_objects/mod.rs` para expor `SyncTransform`
|
||||
- [x] Adicionar `drift_scale: f64` em `AudioTrack` e `SubtitleTrack` (preservando construtores atuais com `drift_scale = 1.0` como default no callsite)
|
||||
- [x] Adicionar `drift_scale: f64` em `MediaTrackInfo`
|
||||
- [x] Adicionar `drift_scale()` e `set_drift_scale()` em `Track`
|
||||
- [x] Adicionar `Project::needs_mkvmerge()` com testes unitários
|
||||
|
||||
**Application:**
|
||||
|
||||
- [ ] Criar `adjust_drift.rs` com testes
|
||||
- [ ] Criar `adjust_existing_track_drift.rs` com testes
|
||||
- [ ] Atualizar `add_audio_track.rs` para aceitar `drift_scale`
|
||||
- [ ] Atualizar `add_subtitle.rs` para aceitar `drift_scale`
|
||||
- [ ] Adicionar `ContainerMuxPort` em `ports/mod.rs`
|
||||
- [ ] Atualizar `mod.rs` dos use cases
|
||||
- [x] Criar `adjust_drift.rs` com testes
|
||||
- [x] Criar `adjust_existing_track_drift.rs` com testes
|
||||
- [x] Atualizar `add_audio_track.rs` para aceitar `drift_scale`
|
||||
- [x] Atualizar `add_subtitle.rs` para aceitar `drift_scale`
|
||||
- [x] Adicionar `ContainerMuxPort` em `ports/mod.rs`
|
||||
- [x] Atualizar `mod.rs` dos use cases
|
||||
|
||||
**Adapters:**
|
||||
|
||||
- [ ] Criar `src/adapters/mkvmerge/command_builder.rs` com `MkvmergeCommandBuilder::build()` e `scale_to_rational()`
|
||||
- [ ] Criar testes unitários para `MkvmergeCommandBuilder` (ver seção 9.4)
|
||||
- [ ] Criar `src/adapters/mkvmerge/mkvmerge_gateway.rs` implementando `ContainerMuxPort`
|
||||
- [ ] Criar `src/adapters/mkvmerge/mod.rs`
|
||||
- [ ] Atualizar `src/adapters/mod.rs`
|
||||
- [x] Criar `src/adapters/mkvmerge/command_builder.rs` com `MkvmergeCommandBuilder::build()` e `scale_to_rational()`
|
||||
- [x] Criar testes unitários para `MkvmergeCommandBuilder` (ver seção 9.4)
|
||||
- [x] Criar `src/adapters/mkvmerge/mkvmerge_gateway.rs` implementando `ContainerMuxPort`
|
||||
- [x] Criar `src/adapters/mkvmerge/mod.rs`
|
||||
- [x] Atualizar `src/adapters/mod.rs`
|
||||
|
||||
**Infrastructure:**
|
||||
|
||||
- [ ] Adicionar `run_mkvmerge_async` em `src/infrastructure/process/mod.rs`
|
||||
- [ ] Adicionar `mkvmerge_available()` em `src/infrastructure/process/mod.rs`
|
||||
- [x] Adicionar `run_mkvmerge_async` em `src/infrastructure/process/mod.rs`
|
||||
- [x] Adicionar `mkvmerge_available()` em `src/infrastructure/process/mod.rs`
|
||||
|
||||
**UI:**
|
||||
|
||||
- [ ] Atualizar `SyncOffsetField` com campo de drift (condicionado a `mkvmerge_available`)
|
||||
- [ ] Atualizar `ExistingTrackList` para expor drift e chamar `AdjustExistingTrackDrift`
|
||||
- [ ] Atualizar `AddAudioTrackForm` e `AddSubtitleForm` para passar `drift_scale` ao use case
|
||||
- [ ] Adicionar `mkvmerge_available: bool` em `App`
|
||||
- [ ] Atualizar `App::generate_output()` com dispatch FFmpeg/mkvmerge
|
||||
- [ ] Atualizar `App::start_batch_item()` com o mesmo dispatch
|
||||
- [x] Atualizar `SyncOffsetField` com campo de drift (condicionado a `mkvmerge_available`)
|
||||
- [x] Atualizar `ExistingTrackList` para expor drift e chamar `AdjustExistingTrackDrift`
|
||||
- [x] Atualizar `AddAudioTrackForm` e `AddSubtitleForm` para passar `drift_scale` ao use case
|
||||
- [x] Adicionar `mkvmerge_available: bool` em `App`
|
||||
- [x] Atualizar `App::generate_output()` com dispatch FFmpeg/mkvmerge
|
||||
- [x] Atualizar `App::start_batch_item()` com o mesmo dispatch
|
||||
|
||||
**Validação final:**
|
||||
|
||||
- [ ] `cargo test` — todos os testes existentes passam sem modificação
|
||||
- [x] `cargo test` — todos os testes existentes passam sem modificação
|
||||
- [ ] Verificar manualmente com arquivo de teste que apresenta drift progressivo
|
||||
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user