XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet

XFEToolBox

【WPF】XFE工具箱

公开
关注 0 Fork 0 Star 0
README.md

VideoStudio validation

3.0.2 — first-drop layout/render loop regression

Verified 2026-10-10: 61 focused checks passed, three processes, exit code 0 for each. These checks target the current 3.0.2 workspace; the 1.7 suite and measurements below are historical, not a claim that the entire old suite was rerun against the v4 model.

  • dotnet run --project tests/VideoStudio.Validation/VideoStudio.Validation.csproj --no-restore -- --first-import-only: 11 checks, artifacts bin/Debug/net10.0-windows10.0.17763.0/test-artifacts/20261010-202100/.
  • dotnet run --project tests/VideoStudio.Validation/VideoStudio.Validation.csproj --no-restore -- --first-import-regressions: 47 checks, artifacts .../20261010-202500/.
  • dotnet run --project tests/VideoStudio.Validation/VideoStudio.Validation.csproj --no-restore -- --host-only --check-package: 3 checks, artifacts .../20261010-202553/. Production workspace compilation, exact package/source comparison and extracted-package compilation passed.
  • Package: %LOCALAPPDATA%/XFEToolBox/CrossVersion/EditorWorkspaces/Packages/xfestudio.video-studio-3.0.2.xfetool, 217,883 bytes; SHA-256 15073C0D9CBF43774949E858102336A0D2FFDA450222E9D4CA34601FB1369FBF.

Before the fix, the first drop in a new WPF process never returned during a multi-minute observation. Managed stack samples repeatedly entered LayerSurface.OnRender, UIElement.Arrange and MediaContext layout/render callbacks. The saved stack is .../20261010-201416/first-import-baseline-stack.txt. No successful baseline completion time is claimed. Native decoder drawing assigned a new FrameworkElement.Clip every render, continually invalidating arrange. The fix keeps clip/opacity state on a ContainerVisual, caches changed clip geometries/rotation, publishes a complete linked insertion in one revision and avoids immediately seeking again after SetSequence.

The cold test creates the editor before any other test warms WPF/native media. It invokes the production Explorer-format drop handler with the user's read-only 2,456,724,213-byte H.264/AAC recording, 3840×2160 at 60 fps. This is process-cold, not an OS disk-cache flush or a manual Explorer gesture. Import, thumbnail and native initialization completed in 2,356.08 ms; maximum Input-priority dispatcher heartbeat gap was 554.86 ms. First 8 seconds of playback had a 140.18 ms maximum heartbeat gap, one decoder open and zero corrective seek resets. The paused preview had zero layout passes, proving the continuous loop stopped. Initial codec/WPF initialization still has a short latency; numbers describe this machine/run, not a universal guarantee. Playback timing is checked using source/sequence clocks; the Rendering event count alone is not proof of changing video pixels. The original file's length and last-write timestamp were unchanged; it was not fully hashed.

Regression checks use the current type-specific v4 tracks: complete audio/video publication, one revision, selection, requested placement, lock handling, automatic track creation, linked split, atomic undo/redo and independent audio/image insertion. All 26 transition options are checked at entry/steady/exit against actual FFmpeg single-frame export references. Additional reference pixels cover opacity/scale/position, rotation/canvas clipping, normal/inverted ellipse masks and a wipe with rotated drawing. Reference sampling compensates for preview letterboxing. No video decoder or composed preview movie is used for image animation; paused effects also settle with zero layout passes. Synthetic source hashes remain unchanged. Only owned test windows were closed; user media, settings and running tool windows were preserved.

1.7.0 — linked editing, multi-selection and animation presets (historical)

Verified 2026-09-30: 396 checks passed, exit code 0. Older measurements below are retained as historical baselines.

  • Final command: dotnet run --project tests/VideoStudio.Validation/VideoStudio.Validation.csproj --no-restore -- --check-package --large --playback-file "<original MP3 path>".
  • Artifacts: bin/Debug/net10.0-windows10.0.17763.0/test-artifacts/20260930-055510/; results.json contains all 396 assertions. Screenshots include linked-selection-effects.png, per-preset native-*.png, mp3-original-playback.png, and large-original-playback.png.
  • Package: %LOCALAPPDATA%/XFEToolBox/CrossVersion/EditorWorkspaces/Packages/xfestudio.video-studio-1.7.0.xfetool, 148,078 bytes.
  • SHA-256: 4B28866DC57139996B0032BFF0FE49F110E4B6E7042911650462D646D8140B02.
  • Production workspace compilation, exact packaged-source comparison and extracted-package compilation passed. Earlier packages and running user windows were preserved.

The suite verifies linked move/trim/split/delete and explicit unlinking, Ctrl clip/track multi-selection, atomic edits and undo, ruler-only mouse seeking, v2 migration/v3 persistence, dark tooltips/tabs and individual preset-thumbnail bindings. All 26 animation choices (including None) were actually exported and decoded; live WPF entry/steady/exit pixels were compared against the export. It also checks continuous native video effect redraws, bounded-window timestamps, real hardware effect encoding, large multi-layer filter graphs and linear/equal-power audio fades against decoded PCM. FFmpeg 9.0.1's file-backed filter syntax is exercised end-to-end; older-option selection has a unit check, not an old-binary integration claim.

Every readable effect name in the reference screenshot is included using an original procedural implementation. These are not extracted proprietary effect assets or exact replicas. The five bottom-row names are cropped out and remain pending a complete reference; they are not claimed as identified or completed.

The user's original MP3 opened natively in 94.29 ms in this run and remained byte-identical. Two real indexed H.264/AAC fixtures of 3,298,533,843 bytes each imported in 251.44 ms; maximum dispatcher heartbeat gap across import/play/seek/cross-file/concurrent playback was 63.19 ms, with peak private memory 611.54 MiB from a 399.30 MiB baseline. Playback tests deliberately disabled FFmpeg/FFprobe and still decoded original-source moving frames. Metrics describe this machine/run, not a universal guarantee. Only this run's generated large media were removed; metrics and screenshots remain.

Save ongoing edits and close/reopen the updated tool to use the new runtime. New saves use project format v3; retain an older project copy if older tool compatibility is needed. No installed toolbox binary or user media was modified by these tests. Unchanged Whisper downloads/recognition and all possible codecs/drivers are not claimed as tested.

Historical 1.6.2 — MP3 playback fix

Verified 2026-09-30: 254 checks passed, exit code 0, including the user's original MP3, all prior regressions, two >3 GiB native video sources and both production builds.

  • Final command: dotnet run --project tests/VideoStudio.Validation/VideoStudio.Validation.csproj --no-restore -- --check-package --large --playback-file "<original MP3 path>".
  • Final artifacts: bin/Debug/net10.0-windows10.0.17763.0/test-artifacts/20260930-050512/ (results.json, audio-playback-results.json, mp3-original-playback.png, large-metrics.json).
  • Package: %LOCALAPPDATA%/XFEToolBox/CrossVersion/EditorWorkspaces/Packages/xfestudio.video-studio-1.6.2.xfetool (123,958 bytes).
  • SHA-256: A57217B56D91144304F45C791739A3AAD691C9443E199C43C46F977654AE7A5E.
  • Exact packaged-source equality, production workspace compilation and extracted-package compilation passed. The 1.6.1 package is preserved. Running old tool windows are not hot-reloaded or forcibly closed; save and reopen the updated workspace/package.

MP3 regression evidence

The new regression failed on the old code (20260930-050240): a valid generated MP3 could not open while paused. The reported original MP3 also reproduced the 15-second open timeout in a separate native-player diagnosis. FFmpeg fully decoded it, and starting the same native player immediately opened it in about 0.29 seconds; this was an initialization sequencing defect, not evidence of missing codecs.

The fix primes the native decoder with volume zero and explicit mute. MediaOpened pauses initialization and seeks before applying clip gain or resuming transport. Pending opens have a deadline even when paused. Failure closes the decoder and pauses active transport; explicit Play replaces failed sessions, with no automatic retry loop. Late callbacks from expired/replaced/disposed sessions are ignored. The error message now offers retry instead of asserting a codec installation problem.

NativeAudioPlaybackTests.cs adds 47 checks when --playback-file is supplied:

  • Generated MP3 and the exact original file: full decoding, paused initialization, correct trimmed in-point, real native-source and timeline clock advancement, pause, seek and resume, original-URI reuse, and unchanged SHA-256.
  • Explicit mute during initialization, immediate Play/Pause, two simultaneous MP3 lanes with separate source offsets, opening timeout, synchronous retry failure, late callbacks, inactive polling timer after failure, and disposal during opening.
  • Real missing-file failure followed by restoring a test-owned source: Play succeeds without reimport or restart and creates exactly one replacement decoder.
  • The actual WPF editor imports the original to Project Media, inserts it on A2, plays/pauses/scrubs/resumes using the real transport command, even with FFmpeg/FFprobe deliberately unavailable during playback. Tests mute playback; no hidden transcoding or composed preview is used.

Focused command: dotnet run --project tests/VideoStudio.Validation/VideoStudio.Validation.csproj --no-restore -- --audio-only --playback-file "<original MP3 path>". Omitting --playback-file exercises generated fixtures only. User files are opened read-only; only generated fixtures are copied or cleaned up. Native format/driver coverage remains bounded, not a guarantee of every encoding supported by FFmpeg.

Historical 1.6.1 validation

Verified 2026-09-30: 207 checks passed, exit code 0.

  • Final command: dotnet run --project tests/VideoStudio.Validation/VideoStudio.Validation.csproj --no-restore -- --check-package --large.
  • Artifacts: bin/Debug/net10.0-windows10.0.17763.0/test-artifacts/20260930-045157/.
  • Package: %LOCALAPPDATA%/XFEToolBox/CrossVersion/EditorWorkspaces/Packages/xfestudio.video-studio-1.6.1.xfetool (122,859 bytes).
  • SHA-256: B2F47BE0C7E0BAFF7556F27F47A59B4CD175C2AD89930240F64C4DA6531DF373.
  • Production workspace compilation, exact packaged-source comparison and extracted-package compilation passed. The 1.6.0 package remains available.

New regression coverage

  • Default V1/V2 and A1/A2, additional independent lanes, automatic scrolling to new tracks, synchronized headers, and six-track project persistence. V3 original sound creates A3; a locked matching lane remains untouched; inserting and undoing restores clips and automatically created lanes together.
  • Persistent 15 px horizontal scrollbar: routed events on the actual WPF thumb pan the viewport without moving the playhead; fit resets the offset without hiding the bar. All four default lanes are visible at the normal test window size.
  • Stable material identity: the new test failed on the old mutable record hash after thumbnail changes / notification subscriptions, then passed with reference identity. Second-item selection survives background previews, playback ticks, timeline edits, undo, collection-view currency, multi-selection and completion of an import after a newer user selection.
  • Layout assertions: import button inside Project Media; six editing commands below the monitor; automatic/GPU and CPU modes exclusively checked inside Settings; no obsolete global toolbar; working file-menu export. At minimum width, controls wrap within their region; zero WPF binding errors.
  • Native Shell HDROP parsing (Unicode, deduplication, relative-path and count rejection), real window-message hook delivery into test-owned HWNDs, monitor/bin/timeline routing, target position, locked/busy rejection, invalid-data feedback and cleanup. These are in-process integration tests, not a cross-integrity mouse automation claim. The user separately confirmed actual Explorer dragging works; the prior desktop automation session was stopped by the user.
  • Existing direct playback, independent split/trim/move/properties, CPU and hardware GPU export, visual layering, audio mixing, cancellation and source-preservation regressions all passed.

Final large-file fixtures were two real indexed H.264/AAC files of 3,298,533,843 bytes each. Import took 140.69 ms; maximum dispatcher heartbeat gap across import/play/seek/cross-file/concurrent playback was 54.92 ms. Peak private memory was 581.10 MiB, from a 315.99 MiB baseline. Playback still passed after FFmpeg/FFprobe were deliberately made unavailable. No composed preview movie was generated. Only this run's generated large fixtures were removed; metrics, results and screenshots remain.

Screenshots: multi-track-editor.png, minimum-editor.png, expanded-multi-track-workspace.png, independent-bin-selection.png, and large-original-playback.png.

Additional focused command: --selection-only. Optional --drag-ui opens an isolated manual drag test window with synthetic fixtures; it does not manipulate a user's existing project. Save work and reopen the updated workspace/package to leave an old runtime; no running user tool was forcibly closed.

Historical 1.6.0 baseline (not the current release)

The sections below retain the previous release's evidence and limitations. Current 1.6.1 results and native drop handling are described above.

Verified 2026-09-30: 165 checks passed, exit code 0, including the packaged build. No warnings/errors from the validation build.

  • Artifacts: bin/Debug/net10.0-windows10.0.17763.0/test-artifacts/20260930-042335/.
  • results.json: all assertions. large-metrics.json: actual large-file timings and memory.
  • Package: %LOCALAPPDATA%/XFEToolBox/CrossVersion/EditorWorkspaces/Packages/xfestudio.video-studio-1.6.0.xfetool.
  • Size: 117,845 bytes.
  • SHA-256: 2435F4CD1E78C3EFC7BA990F41F1B427C0CF4A4DD8ACB4CB81106C4CBCCD007B.
  • Production workspace compilation, package-to-workspace byte comparison, and extracted-package compilation all passed.
  • The 1.5.0 package is preserved. This release changes the video workspace, not the toolbox host. Close the old video window and open the updated workspace/package; existing running windows are not hot-reloaded.

Run

Requires Windows, .NET 10, and working FFmpeg / FFprobe paths in ToolData/xfestudio.video-studio/settings.json. Full export validation asserts working hardware encoding on this machine (NVIDIA NVENC); it does not claim testing every GPU vendor.

dotnet run --project tests/VideoStudio.Validation/VideoStudio.Validation.csproj -- --skip-host
dotnet run --project tests/VideoStudio.Validation/VideoStudio.Validation.csproj -- --large-only
dotnet run --project tests/VideoStudio.Validation/VideoStudio.Validation.csproj -- --check-package --large
dotnet run --project tests/VideoStudio.Validation/VideoStudio.Validation.csproj -- --host-only --check-package

Source links point at %LOCALAPPDATA%/XFEToolBox/CrossVersion/EditorWorkspaces/VideoStudio. No user media or saved settings are changed. Tests create their own timestamped fixtures and instantiate owned WPF windows. Native playback is muted during running transport tests. Exported audio is checked using decoded PCM and frequency measurements. Host checks compile only; they do not launch or replace the installed toolbox.

Changes and coverage

  • 1.7: default audio/video link groups, independent effect/gain properties, linked move/head/tail/split/delete/enable, either-lane locks, cancel/undo/redo, v3 persistence and conservative v2 migration.
  • Ctrl clip/track toggle selection without playhead movement, dirtying the project or changing playback revision; batch editing, compatible-lane spacing, atomic rejection and track M/L operations. Mouse seeking can only originate on the top ruler. Explicit dark tooltip and tab templates are exercised.
  • Separate properties/effects inspector, entry/exit/combination cards, every real preset command, selected-card highlighting, duration validation and same-kind batch effect application.
  • 26 animation options including none. Every preset is actually exported and decoded, and its entry/steady/exit pixels are compared against live WPF-rendered output. The procedural shader uses compact specialized PS2 programs (including software-render tests), samples source decoder surfaces and does not render a preview movie.
  • Procedural animation across export chunk boundaries; real native video animation redraws; advanced effect CPU/GPU output; large filter graphs use a staging script; linear/equal-power audio fade gains checked against decoded PCM.
  • Import is metadata-first. A bounded background queue extracts one video thumbnail; complete waveforms are skipped for media over 30 seconds or 128 MiB. Image imports decode one still frame.
  • Ordinary import and Explorer-to-bin drops keep materials separate from clips. Only the project's first video is auto-inserted; audio/images are never implicitly inserted. Clearing the timeline does not re-enable later auto-insertion.
  • Direct Explorer-to-timeline drops place the first video at the drop time, without an extra copy at zero. Subsequent drops of existing files reuse bin assets.
  • Bin-to-timeline multi-selection drag/drop, independent audio/image placement, compatible target types, locked-track rejection, cancellation, and failed import diagnostics.
  • All three native cursor resources construct successfully; film, music and image icons are distinct.
  • Placement ghost, leading/trailing-edge and playhead snapping, screen-pixel tolerance, self-exclusion, toggle/Alt bypass, and edge-autoscroll requests.
  • Head/tail pointer gestures snap to frame boundaries and retain a stable original playhead anchor, preventing feedback drift while trimming. Opposite edges and other tracks are preserved; cancellation and undo are checked.
  • Original-source native playback replaces the old FFmpeg composite/proxy preview. The editor no longer has EnsurePreviewAsync/PreviewFrameAsync entry points.
  • Independent source offsets, half-open clip boundaries, linked original audio/video sharing one decoder, adjacent-cut reuse, bounded next-source preload, closing expired decoders, random seek, actual clock advancement and pause.
  • Still-image rendering and black gaps; independent audio gain/fade mapping and muted visual streams. Preview uses fixed twofold headroom for 0–200% gain ratios; export uses exact clip gain and its limiter.
  • Missing/offline source produces a clear decoder error and remains cancellable; no hidden transcoding fallback.
  • Existing independent track split/move/lock/mute, type-specific inspector, image length/position/opacity/scale, project round-trip and malformed-project protection.
  • Actual CPU and GPU export, dimensions/duration, full output decoding, visual layer pixels, mixed 440/660 Hz audio, clip gain/fades/mute, audio-only/image-only output.
  • Smart-copy fast path, forced GPU failure with CPU retry, cancellation preserving old output, source overwrite rejection, 70 single-frame clips across bounded batches and excessive simultaneous input rejection.
  • Real menu command bindings, zero WPF binding errors, minimum-size/resized layouts and actual native maximized work-area geometry without margins, corners or resize grip.
  • Small synthetic sources remain byte-identical. Large originals retain their sizes and are opened read-only.

The export tests still use the export service's single-frame renderer as a reference for pixel comparison. This is test-only usage, not editor playback or scrubbing.

Focused commands: --editing-only exercises linked and Ctrl selection behavior and the real WPF inspector; --effects-only exports and verifies all effects and audio curves. The procedural presets are original implementations, not proprietary effect assets or frame-for-frame replicas of the reference app. The cropped-off names in the reference image's bottom row require user clarification and are not claimed as identified presets.

Two large-file verification

Each file is 3,298,533,843 bytes (about 3.30 GB / 3.07 GiB), with real indexed H.264/AAC media at 1280×720 / 30 fps. Fixtures repeat a generated moving test pattern with audio; the second is a separate file with the same content. They are not sparse/dummy files or user footage. The large test requires 12 GiB free space, then removes only its exact generated large files, retaining metrics and screenshots. Files are reproducible using --large-only.

Measured in the final full validation run:

Stage Wall time Maximum UI heartbeat gap Peak process private memory
Import both large files 147.43 ms 57.46 ms 339.07 MiB
Play / random seek / changing-pixel verification 1,796.25 ms 47.92 ms 475.80 MiB
Cross to second source 1,591.80 ms 59.73 ms 487.18 MiB
Two large sources playing concurrently 1,458.75 ms 47.50 ms 636.25 MiB

Playback-stage wall times include intentionally waiting for clock advancement and sample frames; they are not startup latency. Baseline private memory was 338.82 MiB after earlier regression checks; the peak increase was about 297.43 MiB. UI heartbeat runs every 20 ms at background priority. These numbers describe this machine/run, not a universal performance guarantee.

After thumbnail jobs finished, both FFmpeg and FFprobe paths were deliberately changed to nonexistent executables. Playback/seek/cross-file/concurrent tests still passed using only original source URIs. Rendered monitor pixels changed during playback, ruling out a frozen poster with a moving clock. Large files were not loaded wholesale into memory and no composed preview movie was produced.

Scope and historical tests

Drag/drop tests invoke the same handlers and placement methods used by WPF on a laid-out view; native cursor construction and guide rendering are also tested. This is not a manual OS mouse/Explorer/UAC acceptance session. Windows can block Explorer drops into an elevated process; run the video tool at the same elevation as Explorer (normally non-admin), or use the import dialog.

Direct preview depends on installed Windows codecs, which do not cover every FFmpeg-supported format. Unsupported sources are reported instead of silently transcoded. Arbitrary encodings, sustained long playback, every display/DPI topology, hardware decoder/driver, and sample-accurate multi-source audio sync are not exhaustively validated. Whisper download/recognition is unchanged and not rerun.

Program.cs and AccelerationTests.cs preserve excluded 1.4 historical tests; LegacyExporter.cs preserves the earlier exporter. The active suite uses MultiTrack*.cs, DirectPlaybackTests.cs, and LargeMediaTests.cs. Historical 1.4/1.5 preview tests and speed benchmarks are not performance claims for this release.