feat: atualiza status do progresso de implementação e resolve warnings de código não utilizado
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
use anyhow::Result;
|
||||
use crate::domain::entities::MediaTrackInfo;
|
||||
use crate::domain::value_objects::FilePath;
|
||||
use anyhow::Result;
|
||||
|
||||
/// Port para inspecionar faixas de um arquivo de mídia (implementado pelo FfprobeGateway).
|
||||
pub trait MediaInfoPort {
|
||||
@@ -13,6 +13,7 @@ pub trait MediaProcessorPort {
|
||||
}
|
||||
|
||||
/// Port para abstrair acesso ao sistema de arquivos.
|
||||
#[allow(dead_code)]
|
||||
pub trait FileSystemPort {
|
||||
fn exists(&self, path: &FilePath) -> bool;
|
||||
}
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
use anyhow::{anyhow, Result};
|
||||
use crate::domain::entities::Project;
|
||||
use crate::domain::value_objects::{SyncOffset, TrackId};
|
||||
use anyhow::{Result, anyhow};
|
||||
|
||||
/// Ajusta o offset de sincronização de uma faixa externa existente pelo TrackId.
|
||||
#[allow(dead_code)]
|
||||
pub struct AdjustSync;
|
||||
|
||||
impl AdjustSync {
|
||||
#[allow(dead_code)]
|
||||
pub fn execute(project: &mut Project, id: TrackId, offset: SyncOffset) -> Result<()> {
|
||||
let track = project
|
||||
.find_track_mut(id)
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
use anyhow::Result;
|
||||
use crate::application::ports::MediaProcessorPort;
|
||||
use crate::domain::entities::Project;
|
||||
use anyhow::Result;
|
||||
|
||||
/// Constrói o comando FFmpeg a partir do Project e delega a execução ao MediaProcessorPort.
|
||||
#[allow(dead_code)]
|
||||
pub struct GenerateOutput;
|
||||
|
||||
impl GenerateOutput {
|
||||
#[allow(dead_code)]
|
||||
pub fn execute(project: &Project, port: &dyn MediaProcessorPort) -> Result<()> {
|
||||
use crate::adapters::ffmpeg::command_builder::FfmpegCommandBuilder;
|
||||
let args = FfmpegCommandBuilder::build(project);
|
||||
@@ -16,11 +18,11 @@ impl GenerateOutput {
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use anyhow::Result;
|
||||
use crate::application::ports::MediaProcessorPort;
|
||||
use crate::application::use_cases::add_audio_track::AddAudioTrack;
|
||||
use crate::domain::entities::{MkvOutput, Project, VideoFile};
|
||||
use crate::domain::value_objects::{FilePath, SyncOffset, TrackLanguage};
|
||||
use anyhow::Result;
|
||||
use std::cell::RefCell;
|
||||
|
||||
struct MockProcessor {
|
||||
|
||||
@@ -3,9 +3,11 @@ use crate::domain::entities::Project;
|
||||
use crate::domain::value_objects::{TrackId, TrackLanguage};
|
||||
|
||||
/// Altera o idioma de uma faixa externa pelo TrackId.
|
||||
#[allow(dead_code)]
|
||||
pub struct SetTrackLanguage;
|
||||
|
||||
impl SetTrackLanguage {
|
||||
#[allow(dead_code)]
|
||||
pub fn execute(project: &mut Project, id: TrackId, language: TrackLanguage) -> Result<()> {
|
||||
let track = project
|
||||
.find_track_mut(id)
|
||||
|
||||
Reference in New Issue
Block a user