1 コミット
作成者 SHA1 メッセージ 日付
routersys b01ea9159a ポップアップウィンドウへのDWMテーマ自動適用機能の追加
IWindowThemeServiceインターフェースを新規作成し、Bind(Window)メソッドを定義しました。
WindowThemeServiceクラスを実装し、SourceInitializedおよびLoadedイベントにフックしてウィンドウ生成時に自動でテーマを適用するようにしました。
テーマ適用はWindows11以降のみを対象とし、DWM APIのDwmSetWindowAttributeを用いてキャプションバー・ボーダー・テキストの色をWPFのシステムカラーリソースから取得して設定しました。
WindowThemeRegistry静的クラスを導入し、Null Objectパターンにより未登録時でも安全に動作するNullWindowThemeServiceをデフォルト実装として保持するようにしました。
RegisterメソッドはInterlocked.Exchangeでスレッドセーフな差し替えを保証するようにしました。
PluginHostの初期化処理にてWindowThemeServiceをWindowThemeRegistryへ登録し、GenerationPopupView生成直後にWindowThemeRegistry.Bindを呼び出してポップアップウィンドウをテーマサービスに紐付けるようにしました。
2026-03-25 20:19:00 +09:00
6個のファイルの変更、24行の追加、59行の削除

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

+1 -45
ファイルの表示
@@ -13,8 +13,7 @@ internal sealed class VideoCacheDatabase : IVideoCacheDatabase
private const int FormatVersion = 1;
private const int HeaderSize = 32;
private const int HeaderCrcOffset = 16;
private const string OldDbFileName = "zerodiskproxy.vdb";
private const string DbFileName = "proxyforge.vdb";
private const string DbFileName = "zerodiskproxy.vdb";
private const string BackupSuffix = ".bak";
private const string TempSuffix = ".tmp";
@@ -34,49 +33,6 @@ internal sealed class VideoCacheDatabase : IVideoCacheDatabase
Directory.CreateDirectory(_cacheDirectory);
_dbPath = Path.Combine(_cacheDirectory, DbFileName);
_backupPath = _dbPath + BackupSuffix;
var oldDbPath = Path.Combine(_cacheDirectory, OldDbFileName);
if (File.Exists(oldDbPath) && !File.Exists(_dbPath))
{
Debug.WriteLine("[VideoCacheDatabase] Starting robust data migration to ProxyForge format.");
try
{
var migrationTempPath = _dbPath + ".migration.tmp";
File.Copy(oldDbPath, migrationTempPath, true);
var oldBackupPath = oldDbPath + BackupSuffix;
var migrationBackupTempPath = _backupPath + ".migration.tmp";
var hasBackup = File.Exists(oldBackupPath);
if (hasBackup)
{
File.Copy(oldBackupPath, migrationBackupTempPath, true);
}
File.Move(migrationTempPath, _dbPath, true);
if (hasBackup)
{
File.Move(migrationBackupTempPath, _backupPath, true);
}
File.Delete(oldDbPath);
if (hasBackup)
{
File.Delete(oldBackupPath);
}
var oldTempPath = oldDbPath + TempSuffix;
if (File.Exists(oldTempPath))
{
File.Delete(oldTempPath);
}
Debug.WriteLine("[VideoCacheDatabase] Migration completed successfully. Legacy files removed.");
}
catch (Exception ex)
{
Debug.WriteLine(string.Concat("[VideoCacheDatabase] Migration failed: ", ex.Message));
}
}
_diskStore = new VideoCacheDiskStore(_cacheDirectory);
Span<byte> hashBuf = stackalloc byte[32];
+20 -3
ファイルの表示
@@ -30,7 +30,7 @@ internal sealed class ProxyForgePlugin : IVideoFileSourcePlugin
catch (Exception ex)
{
Debug.WriteLine(string.Concat("[ProxyForge] CreateCore failed for ", filePath, ": ", ex.Message));
return null;
return FallbackLoad(devices, filePath);
}
}
@@ -45,7 +45,7 @@ internal sealed class ProxyForgePlugin : IVideoFileSourcePlugin
return null;
if (host.ExportDetector.IsExporting())
return null;
return WrapFromOther(devices, filePath);
if (!IsLargeEnough(filePath, settings.MinFileSizeForProxy))
return null;
@@ -78,7 +78,7 @@ internal sealed class ProxyForgePlugin : IVideoFileSourcePlugin
if (!host.CacheManager.ProxyExists(filePath, proxyScale))
host.CacheManager.StartProxyGeneration(filePath, proxyScale, settings);
return null;
return WrapFromOther(devices, filePath);
}
return null;
@@ -147,6 +147,23 @@ internal sealed class ProxyForgePlugin : IVideoFileSourcePlugin
return null;
}
private static IVideoFileSource? FallbackLoad(IGraphicsDevicesAndContext devices, string filePath)
{
try
{
var lightSource = CreateLightweightSource(devices, filePath);
if (lightSource is not null)
return lightSource;
return WrapFromOther(devices, filePath);
}
catch (Exception ex)
{
Debug.WriteLine(string.Concat("[ProxyForge] FallbackLoad failed for ", filePath, ": ", ex.Message));
return null;
}
}
private static IVideoFileSource? TryLoadProxy(
IGraphicsDevicesAndContext devices, string filePath, float proxyScale, PluginHost host)
{
+1 -1
ファイルの表示
@@ -5,7 +5,7 @@
<UseWPF>true</UseWPF>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Version>1.0.2</Version>
<Version>1.0.0</Version>
<Platforms>AnyCPU;x64;x64</Platforms>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
</PropertyGroup>
+2 -9
ファイルの表示
@@ -8,8 +8,6 @@ YukkuriMovieMaker4 (YMM4) 上で動作する**動画プロキシ自動生成プ
大容量の動画ファイルから低解像度プロキシを自動生成し、編集中のプレビュー負荷を軽減します。
プロキシはディスクにキャッシュされ、動画出力(エクスポート)時にはオリジナル解像度に自動で切り替わるため、最終出力の品質に影響を与えません。
![Image](https://github.com/routersys/YMM4-ProxyForge/blob/main/docs/ProxyForge.png)
## 概要
本プラグインは、YMM4の映像ファイルソースとして動作します。
@@ -66,7 +64,7 @@ YukkuriMovieMaker4 (YMM4) 上で動作する**動画プロキシ自動生成プ
## インストール方法
1. [リリースページ](https://github.com/routersys/YMM4-ProxyForge/releases/latest)から最新の `ProxyForge` プラグインファイルをダウンロードしてください。
2. YMM4が起動していないことを確認し、ダウンロードしたファイルを実行(ダブルクリック)してインストールします。
2. YMM4が起動していないことを確認し、ダウンロードしたファイルをYMM4のプラグインフォルダ(`user/plugin/ProxyForge`)に配置します。
3. YMM4を起動すると、自動的にプラグインが読み込まれます。
## 使い方ガイド
@@ -80,7 +78,7 @@ YukkuriMovieMaker4 (YMM4) 上で動作する**動画プロキシ自動生成プ
### 設定画面
YMM4の「ファイル」→「設定」からProxyForge設定画面を開きます。
YMM4の「ファイル」→「設定」→「映像ファイルソース」からProxyForge設定画面を開きます。
| セクション | 設定項目 | 説明 |
|---|---|---|
@@ -118,11 +116,6 @@ YMM4の「ファイル」→「設定」からProxyForge設定画面を開きま
ご利用は自己責任でお願いします。
## 参考
本プロジェクトは、Dolphin-kun氏の[ProxyVideoSource](https://github.com/Dolphin-kun/ProxyVideoSource)を参考に開発されました。
オリジナルのプロジェクトに深く感謝いたします。
## ライセンス
[MIT License](LICENSE)
サブモジュール YukkuriMovieMaker.Generator が 9d67caf6e6 から削除されました。
バイナリ
ファイルの表示
バイナリファイルは表示されません。

変更前

幅:  |  高さ:  |  サイズ: 519 KiB