You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
obs-core: swap obs_enum_sources, obs_enum_all_sources, obs_enum_canvases and obs_canvas_enum_scenes to Rust #5495
Phase 6 follow-up (#444) to the C-only characterization and extraction of the source and canvas enumerators (#5493, PR #5494).
Port libobs/obs-enum-sources.c.h (obs_enum_sources, obs_enum_all_sources, obs_enum_canvases, obs_canvas_enum_scenes, and the static obs_enum_uuid they share) into obs-core, keeping the public C API and ABI unchanged. Preserve, for each:
obs_enum_sources: under sources_mutex, walks obs->data.sources in uuid-table order; takes a reference on each, skipping one with no reference left; skips private sources; calls back for inputs and for groups only; a false return stops the walk; every reference taken is released.
obs_enum_all_sources: every source in the uuid table, private ones and sources with no reference left included, no reference taken; stops on false.
obs_enum_canvases: every named canvas under canvases_mutex, no reference taken; stops on false.
obs_canvas_enum_scenes: under the canvas's sources_mutex, the canvas's scenes in order, each referenced for the call and released after; stops on false.
The walks over private state (the hash links, the mutexes, the reference get/release, the source type and id, the private flag) stay C behind one hidden adapter file in the core group; the decisions move to Rust, as obs_enum_scenes did (enum_scenes.rs).
Mirror the test_enum_sources assertions in Tier 1 (the existing obs-tests-core binary, no new executable), keep Tier 2 (test_enum_sources, test_enum_scenes) unchanged against hybrid libobs and libobs-c-reference, and add Tier 3 oracle parity: the original and the shim over recording stand-ins for the adapter steps, comparing the visit order, the references taken and released, the locks and the early stop over proptest source lists, with mutants. Tier 4 does not apply. Move the extracted file into its own ported group. Preserve existing C tests and public headers.
RED: Tier 1 mirrors of every test_enum_sources case in obs-tests-core against a todo!() core.
GREEN: the four walks' decisions in obs-core, the hash links, mutexes, references and source fields behind one hidden adapter file in the core group; the original moves to its own ported group for the C reference. Tier 3 parity over recording stand-ins with mutants; Tier 2 test_enum_sources and test_enum_scenes on both libraries.
Stacked on the extraction (PR #5494) until it lands.
Activity
rdoupe commentedon Nov 23, 2026
Claiming: #5495
test_enum_sourcescase inobs-tests-coreagainst atodo!()core.obs-core, the hash links, mutexes, references and source fields behind one hidden adapter file in the core group; the original moves to its own ported group for the C reference. Tier 3 parity over recording stand-ins with mutants; Tier 2test_enum_sourcesandtest_enum_sceneson both libraries.Stacked on the extraction (PR #5494) until it lands.
rdoupe commentedon Nov 23, 2026
Done by #5496 (merged).
obs-core: swap obs_enum_sources and the source/canvas enumerators to …