TASK 21 slice 2a: native-FPS probe seam (ffprobe parse + derive sibling)
- FfmpegFrameRateParser (pure): prefers avg_frame_rate= then r_frame_rate=, rational N/N/M, unknown/0 -> null. - IFrameRateProbe + FfmpegFrameRateProbe: derives sibling ffprobe.exe from the located ffmpeg dir, reuses the IDecodeProcess seam for the ffprobe subprocess text; null if ffprobe absent. - FfmpegLocator now also extracts ffprobe.exe (ProbeFileName) from the pinned archive, conditional so old caches without it degrade to no pacing. - Tests: 6 pure parser units + 1 probe integration via fake locator/process; FfmpegLocatorTests still green. 15/15, 0 warnings. Pacing (probe->delay) is slice 2b. Derivative reference: standard ffprobe avg_frame_rate probing used across OBS/media tooling.
This commit is contained in:
+15
-3
@@ -47,7 +47,19 @@ Next (slice 1 step 4's remaining open end): no session acquisition yet — nothi
|
||||
`AcquireAsync`s a media path, so no frames flow until the UI picker (a later slice)
|
||||
starts a session on add and releases on remove.
|
||||
|
||||
Next (slice 2): native-FPS pacing (ffprobe FPS probe + per-frame pacing seam).
|
||||
Slice 2a shipped: the native-FPS **probe seam** (not yet wired into pacing).
|
||||
`Services/FfmpegFrameRateParser.cs` (pure — prefers `avg_frame_rate=` then
|
||||
`r_frame_rate=`, rational `N`/`N/M`, unknown→null), `Services/FrameRateProbe.cs`
|
||||
(`IFrameRateProbe` + `FfmpegFrameRateProbe` — derives sibling `ffprobe.exe` from
|
||||
the located ffmpeg dir, reuses the `IDecodeProcess` seam for the ffprobe
|
||||
subprocess text, null if ffprobe absent), and `FfmpegLocator.ProbeFileName`
|
||||
(`ffprobe.exe`) + conditional extraction alongside ffmpeg.exe. Tests:
|
||||
`ytLive.Tests/FfmpegFrameRateParserTests.cs` (6 pure units + 1 probe integration
|
||||
via fake locator/process); `FfmpegLocatorTests` still green — 15/15 pass, build
|
||||
0 warnings. **Next wiring step (slice 2b):** inject the probe + a pacing delay
|
||||
seam into `MediaVideoSource` and pace `FrameAvailable` by 1/fps.
|
||||
|
||||
Next (slice 2b): wire the probe into `MediaVideoSource` for native-FPS pacing.
|
||||
Slice 3: loop control (restart decode on `Completed` when `MediaIsLooping`).
|
||||
|
||||
**Landmine:** a stale `testhost` can lock `ytLive.Tests`'s `ytLive.dll` and break
|
||||
@@ -58,8 +70,8 @@ pure tests run in WSL; user verifies the GUI suites on native Windows PowerShell
|
||||
|
||||
## Next
|
||||
|
||||
1. Commit slice 1 step 4 (this unit): resolver/preview wire-in + `Source.DisplaySource` media branch + tests.
|
||||
2. Slice 2: native-FPS pacing (ffprobe FPS probe + per-frame pacing seam).
|
||||
1. Commit slice 2a (this unit): ffprobe extraction + parser + probe seam + tests + docs.
|
||||
2. Slice 2b: wire the probe into `MediaVideoSource` for native-FPS pacing (delay seam + tests).
|
||||
3. Slice 3: loop control (restart decode on `Completed` when `MediaIsLooping`).
|
||||
4. UI picker slice: acquire/release media sessions on add/remove (the remaining slice-1-step-4 open end).
|
||||
5. Await user push checkpoint for the pending TASK 22/21 commits.
|
||||
|
||||
Reference in New Issue
Block a user