4 コミット
作成者 SHA1 メッセージ 日付
routersys bf6de65f3c バージョンをv2.0.1へ上げる
リリース / build-and-release (workflow_dispatch) Actions がタグ v2.0.1 のコミットから作成しました
2026-09-15 20:32:05 +09:00
routersys 4f2e566ab8 ffmpegが異常終了した時は入力の書き込みの失敗より終了コードを返す 2026-09-15 20:11:02 +09:00
routersys 9352e8e2c3 メインウィンドウと共に閉じた進捗ウィンドウを作り直す 2026-09-15 20:06:40 +09:00
routersys c377663165 フレームの末尾の時刻でチャンクの選択を試験する 2026-09-13 19:51:45 +09:00
6個のファイルの変更、72行の追加、18行の削除

検索条件に一致するファイルはありません

+1 -1
ファイルの表示
@@ -1,5 +1,5 @@
========================================
ProxyForge for YMM4 v2.0.0
ProxyForge for YMM4 v2.0.1
========================================
YukkuriMovieMaker4(YMM4)上で動作する、編集の間だけ使う解像度の低い
動画ファイルを作り、プレビューでは元の動画の代わりにそれを読み込む
+52
ファイルの表示
@@ -187,6 +187,20 @@ public sealed class ProxyEncoderTests
Assert.False(File.Exists(workspace.OutputPath));
}
[Fact]
public async Task AnOutputThatCannotBeOpenedIsReportedAsAnFFmpegFailure()
{
Ymm4TestEnvironment.Require();
using var workspace = new Workspace();
var encoder = workspace.CreateEncoder(640, 360, 30, 1, 10);
using var session = await encoder.OpenAsync(workspace.Request(50), TestContext.Current.CancellationToken);
var missing = Path.Combine(workspace.Path, "missing", "proxy.mp4");
var exception = await Assert.ThrowsAsync<ProxyEncodeException>(() => session.EncodeAsync(0, 10, missing, null, TestContext.Current.CancellationToken));
Assert.Equal(ProxyEncodeFailure.FFmpegFailed, exception.Failure);
}
[Fact]
public async Task ASoftEdgeIsNotMistakenForTransparency()
{
@@ -474,6 +488,44 @@ public sealed class ProxyEncoderTests
Assert.IsType<IOException>(failure.InnerException);
}
[Fact]
public async Task RunAsyncReportsTheExitOfFFmpegThatStoppedReadingTheInput()
{
Ymm4TestEnvironment.Require();
using var workspace = new Workspace();
var missing = Path.Combine(workspace.Path, "missing", "proxy.mp4");
Exception? failure = null;
var result = await FFmpegProcessRunner.RunAsync(
Ymm4TestEnvironment.FFmpegPath,
arguments =>
{
var request = new FFmpegEncodeRequest(missing, 32, 32, new FrameRate(30, 1), 100_000, 1, SoftwareEncoder);
FFmpegArguments.WriteEncode(arguments, in request);
},
workspace.Path,
(destination, cancellationToken) => Task.Run(() =>
{
var frame = new byte[32 * 32 * 4];
try
{
for (var index = 0; index < 1024; index++)
destination.Write(frame);
}
catch (IOException exception)
{
failure = exception;
throw;
}
}, cancellationToken),
ProcessPriorityClass.BelowNormal,
TestContext.Current.CancellationToken);
Assert.IsType<IOException>(failure);
Assert.False(result.IsSuccess);
Assert.Contains(missing, result.Diagnostics);
}
[Fact]
public async Task RunAsyncRethrowsOtherFailuresOfTheInputWriterUnchanged()
{
+4 -2
ファイルの表示
@@ -203,11 +203,13 @@ public sealed class ProxyVideoSourceTests : IDisposable
var source = CreateSource();
var entry = Register(source, 0, 1, 2);
using var wrapper = CreateWrapper(source, entry, null);
var lastTickOfFrame299 = new FrameRate(30, 1).GetFrameStart(300) - TimeSpan.FromTicks(1);
Assert.Equal(300, FrameTime.TimeToFrame(lastTickOfFrame299, 30, 1));
wrapper.Update(FrameTimeOf(299));
wrapper.Update(lastTickOfFrame299);
Assert.Equal(0, wrapper.ShownChunk);
Assert.Equal(FrameTimeOf(299), chunkSources[0].LastUpdateTime);
Assert.Equal(lastTickOfFrame299, chunkSources[0].LastUpdateTime);
Assert.Equal(299, focus.Get(source));
}
+5 -4
ファイルの表示
@@ -133,12 +133,13 @@ internal static class FFmpegProcessRunner
cancellationToken.ThrowIfCancellationRequested();
if (inputFailure is IOException)
throw new InvalidOperationException(string.Concat("Failed to send frames to FFmpeg. ", diagnostics.ToString()), inputFailure);
if (inputFailure is not null)
var result = new FFmpegProcessResult(process.ExitCode, diagnostics.ToString());
if (inputFailure is IOException && result.IsSuccess)
throw new InvalidOperationException(string.Concat("Failed to send frames to FFmpeg. ", result.Diagnostics), inputFailure);
if (inputFailure is not (null or IOException))
ExceptionDispatchInfo.Throw(inputFailure);
return new FFmpegProcessResult(process.ExitCode, diagnostics.ToString());
return result;
}
static async Task WriteStandardInputAsync(Process process, FFmpegInputWriter writer, CancellationToken cancellationToken)
+1 -1
ファイルの表示
@@ -5,7 +5,7 @@
<UseWPF>true</UseWPF>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Version>2.0.0</Version>
<Version>2.0.1</Version>
<Platforms>AnyCPU;x64;x64</Platforms>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
</PropertyGroup>
+9 -10
ファイルの表示
@@ -2,6 +2,7 @@ using System.Collections.ObjectModel;
using System.Collections.Specialized;
using System.ComponentModel;
using System.Windows;
using System.Windows.Interop;
using ProxyForge.Encoding;
using ProxyForge.ViewModels;
@@ -31,11 +32,7 @@ internal static class GenerationProgressWindowHost
Update();
}
public static void Shutdown()
{
window?.CloseForShutdown();
window = null;
}
public static void Shutdown() => window?.CloseForShutdown();
static void OnItemsChanged(object? sender, NotifyCollectionChangedEventArgs e) => Update();
@@ -56,16 +53,18 @@ internal static class GenerationProgressWindowHost
}
window ??= Create();
if (!window.IsVisible)
if (window is { IsVisible: false })
window.Show();
}
static GenerationProgressWindow Create()
static GenerationProgressWindow? Create()
{
var created = new GenerationProgressWindow(new GenerationProgressViewModel(items!, cancelAll!));
if (Application.Current?.MainWindow is { IsLoaded: true } owner)
created.Owner = owner;
if (Application.Current?.MainWindow is not { } owner || new WindowInteropHelper(owner).Handle == 0)
return null;
var created = new GenerationProgressWindow(new GenerationProgressViewModel(items!, cancelAll!)) { Owner = owner };
created.HideRequested += (_, _) => suppressed = true;
created.Closed += (_, _) => window = null;
return created;
}
}