Plugin: make the paused still actually appear - #130
Merged
Merged
Conversation
Reported from a real OBS: pausing holds the stream correctly, but the source keeps showing the frozen frame — no blur, no pause glyph. Two causes, both of which failed silently. **The still carried no conversion matrix.** Filling `color_matrix` and the range bounds is the source's job, not libobs's: the decoder does it per frame (`avframe_to_obs`), and a frame handed over with the struct's zeroed matrix converts to nothing. The still now calls `video_format_get_parameters_for_format` the same way, for full-range Y800. **The paused flag could be parsed out of a truncated copy.** STATE was read from `device_state`, the NUL-terminated cache kept for `/api/state`, which is capped at 2 KB — and the snapshot has grown enough (lens, resolution, codec and mic lists, plus the two new pause fields) that anything past the cap is simply lost. Swift dictionaries serialize in no particular order, so which fields survive is luck. Parsing now reads the packet payload itself, bounded by its real length, and a snapshot that doesn't fit the cache logs a warning instead of quietly serving a half JSON document to the web panel. Every path out of `output_paused_still` is now logged, including the successful one. A still that doesn't appear is indistinguishable from a frozen frame, so the log has to be able to tell them apart — which is precisely what was missing when this shipped. Release-Bump: patch Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01C83kP6jfQWe7dwrjB4KMPB
Deploying lenslink with
|
| Latest commit: |
3d17a0e
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://1c0c730d.lenslink.pages.dev |
| Branch Preview URL: | https://claude-battery-icon-visibili.lenslink.pages.dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
Reported from a real OBS: pausing holds the stream correctly from both the app and the source properties, but the source keeps showing the frozen frame — no blur, no pause glyph. Two causes, both of which failed silently.
The still carried no conversion matrix. Filling
color_matrixand the range bounds is the source's job, not libobs's — the decoder does it per frame inavframe_to_obs, and a frame handed over with the struct's zeroed matrix converts to nothing. The still now callsvideo_format_get_parameters_for_formatthe same way, for full-range Y800.The paused flag could be parsed out of a truncated copy. STATE was read from
device_state, the NUL-terminated cache kept for/api/state, capped at 2 KB. The snapshot has grown enough — lens, resolution, codec and mic lists, plus the two new pause fields — that anything past the cap is lost, and Swift dictionaries serialize in no particular order, so which fields survive is luck. Parsing now reads the packet payload itself, bounded by its real length (extract_json_bool_n), forpaused,greenScreenandhdralike. A snapshot that doesn't fit the cache now logs a warning rather than quietly serving half a JSON document to the web panel — worth knowing about independently of this bug.Every path out of
output_paused_stillis now logged, including the successful one. A still that doesn't appear is indistinguishable from a frozen frame, so the log has to tell them apart — which is exactly what was missing when this shipped, and why diagnosing it needed a round trip through a release.How it was tested
paused still sent (WxH)means the frame reached libobs and the problem is in how it is displayed (timestamp or format), while anypaused still skipped: …line names the reason it never got that far. Either way the next step stops being guesswork.Release-Bump: patch
🤖 Generated with Claude Code
https://claude.ai/code/session_01C83kP6jfQWe7dwrjB4KMPB
Generated by Claude Code