Repository navigation
libobs: Characterize and extract source type-info queries (Refs #4718) - #4728
Merged
Merged
Conversation
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.
Refs #4718. The Rust swap is tracked separately in #4719.
What and why
obs_get_source_output_flags,obs_source_get_display_nameandobs_is_source_configurablewere embedded inobs-source.c.h, preventing a whole-file Rust swap. This prerequisite first characterizes their current behavior through actual libobs exports and public source registration, then moves all three bodies verbatim intolibobs/obs-source-type-info.c.h. The new member includes the existing PCH and occupies sorted position inlibobs.core-source+.h.c. All three use the existing externget_source_infoseam; there is no private static dependency or new adapter.The new six-case cmocka test pins unknown/empty/exact IDs; NULL IDs in an observed live empty registry; exactly one get_name callback with non-NULL/NULL type_data and NULL/empty/raw/changing borrowed results; all 32 individual flag bits, zero and a valid mixed mask; and all 16 properties/properties2/defaults/defaults2 presence combinations without invoking callbacks. Defaults alone remain non-configurable. Duplicate registration retains the first type's metadata. IDs remain case-sensitive, byte-exact and NUL-terminated. No instances are created; the normal shutdown frees the registry. Populated-registry NULL IDs, no-core queries and a found record without get_name remain outside the C valid domain. This does not change the lookup/NULL policy owned by #4606 / #4608.
Characterization and extraction
Commit order is characterization
4d2096a61, then behavior-neutral extraction45d479806before attestation. Rust RED/GREEN, Tier 1, layout and Tier 3 differential/mutation coverage belong to #4719 after this lands; Tier 4 is inapplicable. There is no behavior change or user-visible feature.Validation:
test_source_properties/test_source_theme_iconpassed three repeats each against hybrid and C-reference libraries: 18 suite runs (96 cmocka case runs) per phase, no skips.lddverified each loaded library. All 1,768 dynamic exports match in each phase.soldr cargo fmt --all --check, diff checks and pinned self-review passed.SOLDR_PORCELAIN=0 ./lintran with a 1,800-second deadline and passed, exit 0, endinglane lint: ok (138.6s). Matching passing soldr Rust verdicts were reused; full lint was not repeated.The initial exploratory fixture reused a stack ID buffer and therefore hit duplicate registration: registration retains the original unversioned-ID pointer. It was corrected to static per-ID storage before the characterization commit; the final before/after evidence uses identical corrected tests.
No existing C test, public header, Rust source, test-graph.json, native.rs, obs-websocket file or workflow changed. No new Rust test binary. Full Tier 2, native Windows/macOS execution and sanitizers were not run locally; hosted checks remain the merge gate. The current master push failure (43029874707) is the existing Ubuntu apt DNS outage, unrelated to this unit.
Checklist
master.🤖 Generated with Claude Code