Repository navigation
Description
Unit
Characterize and verbatim-extract obs_get_source_output_flags, obs_source_get_display_name, and obs_is_source_configurable from libobs/obs-source.c.h (current master lines 1007-1011, 98-102, 990-994) into libobs/obs-source-type-info.c.h in sorted core-source unity position.
Phase and position
Phase 6 source-type metadata, prerequisite under testing-policy.md's extraction and characterization sections, before a separate Rust swap to obs-source. This PR contains no Rust and makes no behavior change.
Dependencies and existing tests
All three bodies call the existing non-static get_source_info declared in obs-internal.h; no private static helper or new seam is needed. #4606 / #4608 owns that shared lookup only, not these wrappers; its planned NULL-ID policy is outside this extraction. Exact-symbol open PR/issue searches found only that distinct lookup work and the unrelated browser packaging issue #1865. Current master still defines all three wrappers in C.
Add a new actual-library cmocka test using public source registration, against hybrid and C-reference libraries before and after extraction. Cover unknown/empty/exact IDs, valid empty-registry NULL IDs, exact get_name callback count/type_data and borrowed result identity (including NULL/empty/raw bytes), flag bits, and all get_properties/get_properties2 presence combinations without invoking callbacks. Defaults alone must not make a source configurable. Existing C tests remain unchanged. Avoid test-graph.json and native.rs edits.
Notes
No source instance is needed. Normal startup/shutdown owns the registry. NULL IDs in a populated C registry and all queries without a live core are outside the C valid domain. A found entry without get_name is likewise outside the valid domain. The prerequisite does not invent a NULL guard. All C constant conversions must avoid MSVC C4310. No public headers, existing C tests, websocket, workflows, or user-visible behavior changes. Tier 1/3 Rust swap coverage is deferred to the follow-up issue; Tier 4 is inapplicable.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
zackees commentedon Nov 11, 2026
Claiming: source type-info characterization and verbatim extraction, branch
test/4718-source-type-info-extract, pool slotobs-studio2.SOLDR_PORCELAIN=0 ./lintexactly once; publish according to backpressure and arm the PR on the verified head. File the Rust swap follow-up. First PR expected this session, subject to the publishing gate.Decisions: this owns only the wrappers, not the shared lookup in #4606 / #4608. Configurability is properties/properties2, and defaults-only must remain false. NULL queries are restricted to the observed live empty registry; populated C registries pass NULL to strcmp. No graph changes are planned.
zackees commentedon Nov 12, 2026
Verified complete on origin/master 1273c7e. PR #4728 merged as a4c9c53, an ancestor of that revision.
The three complete C bodies are present in obs-source-type-info.c.h, byte-identical to their pre-extraction definitions, with the sorted core-source unity include. The registered test_source_type_info fixture covers empty-registry NULL/unknown/exact IDs, borrowed get_name callback results and type_data, every flag bit and callback-presence configurability without invoking properties/defaults. The PR records characterization before extraction and unchanged hybrid/reference replay with symbol parity. This completes the C-only prerequisite; the Rust swap remains separately tracked by #4719.
Closing as completed. This hygiene pass inspected existing code, registrations, tests and recorded validation; it did not rerun builds or tests.
libobs: Characterize and extract source type-info queries (Refs obs-r…