test(core/browser/platform): 26 extreme RED/GREEN TDD cycles and full regression hardening (3,235 PASS)
This commit is contained in:
parent
bcd242691f
commit
8677853822
100 changed files with 4814 additions and 333 deletions
|
|
@ -79,9 +79,21 @@ public static class VideoIntroOutroTrimmer
|
|||
double startSec,
|
||||
double durationSec)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(inputPath)) throw new ArgumentException("Input path cannot be null or whitespace.", nameof(inputPath));
|
||||
if (string.IsNullOrWhiteSpace(outputPath)) throw new ArgumentException("Output path cannot be null or whitespace.", nameof(outputPath));
|
||||
|
||||
var cleanIn = inputPath.Trim().Replace("\"", "");
|
||||
var cleanOut = outputPath.Trim().Replace("\"", "");
|
||||
|
||||
if (string.Equals(System.IO.Path.GetFullPath(cleanIn), System.IO.Path.GetFullPath(cleanOut), StringComparison.OrdinalIgnoreCase))
|
||||
throw new InvalidOperationException("입력 파일과 출력 파일 경로가 동일할 수 없습니다.");
|
||||
|
||||
startSec = Math.Max(0.0, startSec);
|
||||
durationSec = Math.Max(0.1, durationSec);
|
||||
|
||||
var s = startSec.ToString("F2", CultureInfo.InvariantCulture);
|
||||
var d = durationSec.ToString("F2", CultureInfo.InvariantCulture);
|
||||
|
||||
return $"-ss {s} -i \"{inputPath}\" -t {d} -c copy \"{outputPath}\" -y";
|
||||
return $"-ss {s} -i \"{cleanIn}\" -t {d} -c copy \"{cleanOut}\" -y";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue