Skip to content

obs-source: port get_source_info2 and obs_enable_source_type to Rust (Fixes #6014) - #6016

Merged
zackees merged 5 commits into
masterfrom
port/6014-source-info2
Nov 30, 2026
Merged

zackees merged 5 commits into
masterfrom
port/6014-source-info2

Conversation

@rdoupe

@rdoupe rdoupe commented Nov 30, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #6014.

Ports get_source_info2() (the versioned source type lookup behind obs_register_source_s()'s duplicate check) and the hidden export obs_enable_source_type() (used by the Lua source scripting to disable and re-enable a type it redefines) to obs-source, the shape of #4608 (get_source_info()).

Commits

  1. test: characterize — new cmocka test_source_info_versioned, through the public calls: a second registration with the same unversioned ID and version is refused with one Source '<id>' already exists! Duplicate library? warning and the first stays (across the input and filter lists too); another version of the same ID is kept, in either order; the unversioned ID is compared whole and case-sensitively (info2_x v1, stored as info2_x_v1, does not refuse an unversioned info2_x_v1); obs_enable_source_type() sets and clears OBS_SOURCE_CAP_DISABLED by full ID, keeps the other flags, and ignores unknown IDs.
  2. libobs: extract verbatim — both bodies move unchanged from obs-source.c.h into obs-source-info-versioned.c.h (live group libobs.core-source).
  3. RED — safe core obs-source::info_versioned (find over a VersionedRegistry, set_enabled over TypeFlags) as todo!(), with 10 Tier 1 tests.
  4. GREEN — the core, ffi::source_info_versioned (get_source_info2 hidden through rust-hidden.d, obs_enable_source_type exported through rust-exports.d), unversioned ID / version / output flags accessors added to obs-source-info-lookup-fields.c.h, the original moved to the reference-only group libobs.ported-source-info-versioned, Tier 3 parity, the build registration test and the rust/README.md row.

Intentional differences, the same as get_source_info()'s since #4608: a NULL asked ID or name finds nothing and changes nothing, and a registered NULL unversioned ID matches nothing (the C passed both to strcmp). Not user-visible, so no features ledger line.

Evidence

RED (commit 3):

soldr cargo test -p obs-data --test obs-tests-core source::info_versioned
test result: FAILED. 0 passed; 10 failed (not yet implemented: get_source_info2 / obs_enable_source_type)

GREEN (commit 4):

soldr cargo test -p obs-data --test obs-tests-core source::info_
test result: ok. 28 passed; 0 failed   (10 Tier 1 + 6 Tier 3 new, 12 existing info_lookup)
soldr cargo test -p obs-studio-rust --test obs-tests-app canonical_source_info_versioned
test result: ok. 1 passed

Tier 3 mutation check: dropping the version compare in find, or toggling instead of setting the disabled bit, fails characterized_lookups_match_c, random_lookups_match_c and random_switches_match_c.

Tier 2, in the linux-validate container, each test against the hybrid libobs and the C reference (LD_LIBRARY_PATH=/build/tree/libobs-c-reference):

test hybrid C reference
test_source_info_versioned (new) 6/6 6/6
test_source_info_lookup 3/3 3/3
test_source_type_info 6/6 6/6
test_missing_source_types 4/4 4/4
test_source_type_enum 2/2 2/2
test_source_type_id_getters 2/2 2/2

The characterization test passed 6/6 on both libraries before the port as well. ./lint passes.

Test cost: the new Rust tests (source::info_versioned and source::info_versioned_parity, 16 tests) run in 0.04 s in debug (0.01 s with OBS_PARITY_CASES=reduced), peak RSS 18.5 MB, and start no threads of their own.

🤖 Generated with Claude Code

Windows oracle fix (commit 5): clang-cl refused the renamed oracle_obs_enable_source_type because the original's EXPORT added dllexport on a redeclaration (-Wdll-attribute-on-redeclaration, the Rust Cross Lint and Windows Link Check failures on the first push). The oracle now includes the original with EXPORT empty.

soldr cargo build -p obs-c-oracle --locked --target x86_64-pc-windows-msvc
before: obs-source-info-versioned.c.h(21,13): error: redeclaration of 'oracle_obs_enable_source_type' should not add 'dllexport' attribute
after:  Finished `dev` profile

@rdoupe
rdoupe requested a review from zackees as a code owner November 30, 2026 17:55
rdoupe and others added 5 commits November 30, 2026 13:00
…urce_type (Refs #6014)

The new cmocka test_source_info_versioned pins get_source_info2() through
obs_register_source(), whose duplicate check it is: a second registration
with the same unversioned ID and version is refused, with one
"Source '<id>' already exists!  Duplicate library?" warning, and the first
one stays, across the input and filter lists too; another version of the
same ID is kept, in either order; the unversioned ID is compared whole and
case-sensitively, so "info2_x" at version 1 (stored as "info2_x_v1") does
not refuse an unversioned "info2_x_v1". obs_enable_source_type() sets and
clears OBS_SOURCE_CAP_DISABLED by full (versioned) ID, keeps every other
flag, and leaves unknown IDs alone. A NULL ID is left out: the C passes it
to strcmp.

6/6 against hybrid and the C reference.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…(Refs #6014)

Move get_source_info2(), the versioned source type lookup behind
obs_register_source_s()'s duplicate check, and the hidden export
obs_enable_source_type() unchanged out of obs-source.c.h into
obs-source-info-versioned.c.h (live group libobs.core-source). Both keep
their names and linkage. No behavior change.

test_source_info_versioned 6/6 against hybrid and the C reference.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ED (Refs #6014)

The safe core obs-source::info_versioned: find() over a VersionedRegistry
(the count, each entry's unversioned ID and its version) and
set_enabled() over a type's TypeFlags, both todo!(). Ten Tier 1 tests over
model registries: the cases of test_source_info_versioned as the
registration's duplicate check sees them (same ID and version refused,
other versions kept, the unversioned ID compared whole and bytewise), the
first match winning, the C loop's read order (the count before every entry
and at the end, the version only after the ID matched), the asked ID read
once and never with nothing registered, NULL asked and registered IDs
finding nothing, and the disabled bit set and cleared with every other bit
kept, the flags read once and stored once.

  soldr cargo test -p obs-data --test obs-tests-core source::info_versioned
  test result: FAILED. 0 passed; 10 failed (not yet implemented:
  get_source_info2 / obs_enable_source_type)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ixes #6014)

get_source_info2() is now the safe core obs-source::info_versioned::find
behind the hidden export of the same name (rust-hidden.d; declared in
obs-internal.h without EXPORT), so obs_register_source_s()'s duplicate
check reaches it unchanged: the first source_types entry, in registration
order, whose unversioned ID equals the asked one bytewise and whose
version equals the asked version, returned as the C entry's own address.
The count is read before each entry and the version only after the ID
matched, as the C loop and its && did.

obs_enable_source_type(), the hidden export the Lua source scripting uses
to disable and re-enable a type it redefines, is now the Rust export of
the same name (rust-exports.d): the type found by full ID through
get_source_info(), its output_flags read once and stored once with
OBS_SOURCE_CAP_DISABLED cleared or set, every other flag kept; an unknown
ID changes nothing.

The entries stay C: obs-source-info-lookup-fields.c.h gains the
unversioned ID, version and output flags accessors beside
get_source_info()'s, and the original moves to the reference-only group
libobs.ported-source-info-versioned.

Intentional differences, the same as get_source_info()'s (#4608): a NULL
asked ID or name finds nothing and changes nothing, and a registered NULL
unversioned ID matches nothing; the C passed both to strcmp.

Tier 1: 10/10. Tier 3 (oracle/source_info_lookup.c) runs the original C of
both against the Rust exports over the production adapter on the
per-thread stand-in core: the characterized cases, an unread asked ID with
nothing registered, and proptests over registries of up to 12 entries,
comparing the entry found by address and every byte of the registry; the
NULL differences are checked on the Rust side alone. Dropping the version
compare or toggling instead of setting the disabled bit fails it.

Tier 2: test_source_info_versioned 6/6, test_source_info_lookup 3/3,
test_source_type_info 6/6, test_missing_source_types 4/4,
test_source_type_enum 2/2 and test_source_type_id_getters 2/2, against
hybrid and the C reference.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Ci-Attestation: {"at":1796060999,"gate":"data/all/compatibility","host":"linux-x86_64","key":"","lane":"client-checks","parents":["b1c938f13a1914bf86621bbaeb16d94a6f8439bf"],"secs":78,"stamp":"7d26dc7499b5f6fe04468fbfd2130308","tree":"4c528f5ac91309c54dfef0f23442a53c430cb725","v":1,"via":"run"}
Ci-Attestation: {"at":1796060999,"gate":"data/all/flatpak-manifest","host":"linux-x86_64","key":"","lane":"client-checks","parents":["b1c938f13a1914bf86621bbaeb16d94a6f8439bf"],"secs":78,"stamp":"14ff3cfd020ec02382e1db4371b1262c","tree":"4c528f5ac91309c54dfef0f23442a53c430cb725","v":1,"via":"run"}
Ci-Attestation: {"at":1796060999,"gate":"data/all/qt-xml","host":"linux-x86_64","key":"","lane":"client-checks","parents":["b1c938f13a1914bf86621bbaeb16d94a6f8439bf"],"secs":78,"stamp":"2067ba4a34697ecea6ae3784f7863177","tree":"4c528f5ac91309c54dfef0f23442a53c430cb725","v":1,"via":"run"}
Ci-Attestation: {"at":1796060999,"gate":"data/all/services-schema","host":"linux-x86_64","key":"","lane":"client-checks","parents":["b1c938f13a1914bf86621bbaeb16d94a6f8439bf"],"secs":78,"stamp":"ccab9bb9f8fb2087ee19e1a30755458f","tree":"4c528f5ac91309c54dfef0f23442a53c430cb725","v":1,"via":"run"}
Ci-Attestation: {"at":1796060921,"gate":"general/all/client-lint","host":"linux-x86_64","key":"1fe24d75c7137483de1c700296aad4568daadacbfde9c75a2a3576a9d8f8d5ab","lane":"client-lint","parents":["b1c938f13a1914bf86621bbaeb16d94a6f8439bf"],"secs":120,"stamp":"a6aecfe1e69ab17fc479f042fdf1a7c8","tree":"4c528f5ac91309c54dfef0f23442a53c430cb725","v":1,"via":"run"}
Ci-Attestation: {"at":1796060999,"gate":"python/all/self-test","host":"linux-x86_64","key":"","lane":"client-checks","parents":["b1c938f13a1914bf86621bbaeb16d94a6f8439bf"],"secs":78,"stamp":"8e019fbd48188e5b20aed7a4239e4810","tree":"4c528f5ac91309c54dfef0f23442a53c430cb725","v":1,"via":"run"}
Ci-Attestation: {"at":1796060921,"gate":"rust/aarch64-apple-darwin/client-clippy","host":"linux-x86_64","key":"1fe24d75c7137483de1c700296aad4568daadacbfde9c75a2a3576a9d8f8d5ab","lane":"client-lint","parents":["b1c938f13a1914bf86621bbaeb16d94a6f8439bf"],"secs":120,"stamp":"f201ef1e9980b4ff5671aa2bf718c30f","tree":"4c528f5ac91309c54dfef0f23442a53c430cb725","v":1,"via":"run"}
Ci-Attestation: {"at":1796060921,"gate":"rust/aarch64-apple-darwin/client-dylint","host":"linux-x86_64","key":"1fe24d75c7137483de1c700296aad4568daadacbfde9c75a2a3576a9d8f8d5ab","lane":"client-lint","parents":["b1c938f13a1914bf86621bbaeb16d94a6f8439bf"],"secs":120,"stamp":"4e5f122955455108e93ade137a156068","tree":"4c528f5ac91309c54dfef0f23442a53c430cb725","v":1,"via":"run"}
Ci-Attestation: {"at":1796060921,"gate":"rust/aarch64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"1fe24d75c7137483de1c700296aad4568daadacbfde9c75a2a3576a9d8f8d5ab","lane":"client-lint","parents":["b1c938f13a1914bf86621bbaeb16d94a6f8439bf"],"secs":120,"stamp":"2cd9ba3902939df28f78c34cea8a3aea","tree":"4c528f5ac91309c54dfef0f23442a53c430cb725","v":1,"via":"run"}
Ci-Attestation: {"at":1796060921,"gate":"rust/aarch64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"1fe24d75c7137483de1c700296aad4568daadacbfde9c75a2a3576a9d8f8d5ab","lane":"client-lint","parents":["b1c938f13a1914bf86621bbaeb16d94a6f8439bf"],"secs":120,"stamp":"8ac9f663af4490acede9d4eef5c218e5","tree":"4c528f5ac91309c54dfef0f23442a53c430cb725","v":1,"via":"run"}
Ci-Attestation: {"at":1796060921,"gate":"rust/aarch64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"1fe24d75c7137483de1c700296aad4568daadacbfde9c75a2a3576a9d8f8d5ab","lane":"client-lint","parents":["b1c938f13a1914bf86621bbaeb16d94a6f8439bf"],"secs":120,"stamp":"30102248758bb7eb351b2a659c8c9967","tree":"4c528f5ac91309c54dfef0f23442a53c430cb725","v":1,"via":"run"}
Ci-Attestation: {"at":1796060921,"gate":"rust/aarch64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"1fe24d75c7137483de1c700296aad4568daadacbfde9c75a2a3576a9d8f8d5ab","lane":"client-lint","parents":["b1c938f13a1914bf86621bbaeb16d94a6f8439bf"],"secs":120,"stamp":"720b2602d98fe8aa2e63ae9666eea66d","tree":"4c528f5ac91309c54dfef0f23442a53c430cb725","v":1,"via":"run"}
Ci-Attestation: {"at":1796060921,"gate":"rust/x86_64-apple-darwin/client-clippy","host":"linux-x86_64","key":"1fe24d75c7137483de1c700296aad4568daadacbfde9c75a2a3576a9d8f8d5ab","lane":"client-lint","parents":["b1c938f13a1914bf86621bbaeb16d94a6f8439bf"],"secs":120,"stamp":"af10e6988c661e06b1015f4c9cf653a4","tree":"4c528f5ac91309c54dfef0f23442a53c430cb725","v":1,"via":"run"}
Ci-Attestation: {"at":1796060921,"gate":"rust/x86_64-apple-darwin/client-dylint","host":"linux-x86_64","key":"1fe24d75c7137483de1c700296aad4568daadacbfde9c75a2a3576a9d8f8d5ab","lane":"client-lint","parents":["b1c938f13a1914bf86621bbaeb16d94a6f8439bf"],"secs":120,"stamp":"5f1c1aada11b18803bd9cb852d2fd3a5","tree":"4c528f5ac91309c54dfef0f23442a53c430cb725","v":1,"via":"run"}
Ci-Attestation: {"at":1796060921,"gate":"rust/x86_64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"1fe24d75c7137483de1c700296aad4568daadacbfde9c75a2a3576a9d8f8d5ab","lane":"client-lint","parents":["b1c938f13a1914bf86621bbaeb16d94a6f8439bf"],"secs":120,"stamp":"bbe2acf0cb68214d5f50534978cd01d5","tree":"4c528f5ac91309c54dfef0f23442a53c430cb725","v":1,"via":"run"}
Ci-Attestation: {"at":1796060921,"gate":"rust/x86_64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"1fe24d75c7137483de1c700296aad4568daadacbfde9c75a2a3576a9d8f8d5ab","lane":"client-lint","parents":["b1c938f13a1914bf86621bbaeb16d94a6f8439bf"],"secs":120,"stamp":"83b0dc4bf91def7d7de9206fd018a0c3","tree":"4c528f5ac91309c54dfef0f23442a53c430cb725","v":1,"via":"run"}
Ci-Attestation: {"at":1796060921,"gate":"rust/x86_64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"1fe24d75c7137483de1c700296aad4568daadacbfde9c75a2a3576a9d8f8d5ab","lane":"client-lint","parents":["b1c938f13a1914bf86621bbaeb16d94a6f8439bf"],"secs":120,"stamp":"f572bcdeee2623326bcfa1f481d27009","tree":"4c528f5ac91309c54dfef0f23442a53c430cb725","v":1,"via":"run"}
Ci-Attestation: {"at":1796060921,"gate":"rust/x86_64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"1fe24d75c7137483de1c700296aad4568daadacbfde9c75a2a3576a9d8f8d5ab","lane":"client-lint","parents":["b1c938f13a1914bf86621bbaeb16d94a6f8439bf"],"secs":120,"stamp":"fe4ad3fbc5c8c2e68785a19c0434ff86","tree":"4c528f5ac91309c54dfef0f23442a53c430cb725","v":1,"via":"run"}
Ci-Attestation: {"at":1796061305,"gate":"rust/x86_64-unknown-linux-gnu/client-test","host":"linux-x86_64","key":"dae2e0dec733a9cf0f1577c21950d0f96930d406aa056cddaa4efbce58903e04","lane":"client-test-x86_64-unknown-linux-gnu","parents":["b1c938f13a1914bf86621bbaeb16d94a6f8439bf"],"secs":305,"stamp":"e86edaaa9592c5d92bd1a792af51ea9c","tree":"4c528f5ac91309c54dfef0f23442a53c430cb725","v":1,"via":"run"}

Client-Checks: {"checks":{"base":"e230d26f7381e8d26081ae3263428dc681fd138c","coverage":"all-tracked-applicable-files","diff":["libobs/build/libobs.ported-source-info-versioned+.h.c","libobs/build/ported-source-sets/source-info-versioned.json","libobs/cmake/rust-exports.d/obs-source-source_info_versioned.txt","libobs/cmake/rust-hidden.d/obs-source-source_info_versioned.txt","libobs/obs-internal.h","libobs/obs-source-info-lookup-fields.c.h","libobs/obs-source-info-versioned.c.h","libobs/obs-source.c.h","rust/README.md","rust/obs-build/tests/native.rs","rust/obs-build/tests/native/registration/canonical_source_info_versioned_swap_is_registered.rs","rust/obs-build/tests/native/registration/rust-static/support/z-image-decode.json","rust/obs-c-oracle/oracle/source_info_lookup.c","rust/obs-source/src/ffi/mod.rs","rust/obs-source/src/ffi/source_info_versioned.rs","rust/obs-source/src/info_versioned.rs","rust/obs-source/src/lib.rs","rust/obs-source/tests/source/info_versioned.rs","rust/obs-source/tests/source/info_versioned_parity.rs","rust/obs-source/tests/source/main.rs","test/cmocka/build/test-graph.json","test/cmocka/test_source_info_versioned.c","test/cmocka/tests.d/test_source_info_versioned.cmake"],"head":"03f1d854116b291f3869e1237339ab7d1c2fd787","tools":{"orchestrator-python":"3.13.16 (main, Oct 14 2026, 01:04:01) [Clang 23.1.3 ]","schema-dependencies":"3.13.16 (main, Oct 14 2026, 01:04:01) [Clang 23.1.3 ]\n{'jsonschema': '4.26.0', 'json_source_map': '1.0.5'}","uv":"uv 0.13.5 (x86_64-unknown-linux-gnu)","xmllint":"xmllint: using libxml version 21504-GITv2.15.4\n   compiled with: Threads Tree Output Push Reader Patterns Writer SAXv1 DTDValid HTML C14N Catalog XPath XPointer XInclude Iconv ICU ISO8859X Regexps Automata RelaxNG Schemas Schematron Modules Debug Zlib"},"tracked-digest":"86e95645885a028fda892692fe95bd7e09ee6b1a52bccc21e22b7ba01177f582","tree":"4c528f5ac91309c54dfef0f23442a53c430cb725"}}
… (Refs #6014)

clang-cl refuses dllexport on a redeclaration of the renamed oracle symbol.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Ci-Attestation: {"at":1796062158,"gate":"data/all/compatibility","host":"linux-x86_64","key":"","lane":"client-checks","parents":["f598104b7d5e358277fc8551b6b15acc9fa29f74"],"secs":76,"stamp":"55206e3c7827327d83d183476e186d9b","tree":"bf6c5ef0337e715efd78449f9fc35f1d3fdaf5c3","v":1,"via":"run"}
Ci-Attestation: {"at":1796062158,"gate":"data/all/flatpak-manifest","host":"linux-x86_64","key":"","lane":"client-checks","parents":["f598104b7d5e358277fc8551b6b15acc9fa29f74"],"secs":76,"stamp":"2ac928b13645cbbe4333d28cdf0a7cb3","tree":"bf6c5ef0337e715efd78449f9fc35f1d3fdaf5c3","v":1,"via":"run"}
Ci-Attestation: {"at":1796062158,"gate":"data/all/qt-xml","host":"linux-x86_64","key":"","lane":"client-checks","parents":["f598104b7d5e358277fc8551b6b15acc9fa29f74"],"secs":76,"stamp":"ab7df62ca1245755ffd28fbd2e1f163e","tree":"bf6c5ef0337e715efd78449f9fc35f1d3fdaf5c3","v":1,"via":"run"}
Ci-Attestation: {"at":1796062158,"gate":"data/all/services-schema","host":"linux-x86_64","key":"","lane":"client-checks","parents":["f598104b7d5e358277fc8551b6b15acc9fa29f74"],"secs":76,"stamp":"4f6b826134263f9f323ce06d6c2d5d16","tree":"bf6c5ef0337e715efd78449f9fc35f1d3fdaf5c3","v":1,"via":"run"}
Ci-Attestation: {"at":1796062081,"gate":"general/all/client-lint","host":"linux-x86_64","key":"f864a2c18ebd908ad9042d3dd97ffa32b1a2dd14858c84d7e15d9f5e8224d735","lane":"client-lint","parents":["f598104b7d5e358277fc8551b6b15acc9fa29f74"],"secs":96,"stamp":"ee6fd38c1b7c30e8aaf17f656fce2133","tree":"bf6c5ef0337e715efd78449f9fc35f1d3fdaf5c3","v":1,"via":"run"}
Ci-Attestation: {"at":1796062158,"gate":"python/all/self-test","host":"linux-x86_64","key":"","lane":"client-checks","parents":["f598104b7d5e358277fc8551b6b15acc9fa29f74"],"secs":76,"stamp":"9362e207830d15e461c167fc9c5acafe","tree":"bf6c5ef0337e715efd78449f9fc35f1d3fdaf5c3","v":1,"via":"run"}
Ci-Attestation: {"at":1796062081,"gate":"rust/aarch64-apple-darwin/client-clippy","host":"linux-x86_64","key":"f864a2c18ebd908ad9042d3dd97ffa32b1a2dd14858c84d7e15d9f5e8224d735","lane":"client-lint","parents":["f598104b7d5e358277fc8551b6b15acc9fa29f74"],"secs":96,"stamp":"6ea6fbee7f99d4fce78d84eb98ec9fcd","tree":"bf6c5ef0337e715efd78449f9fc35f1d3fdaf5c3","v":1,"via":"run"}
Ci-Attestation: {"at":1796062081,"gate":"rust/aarch64-apple-darwin/client-dylint","host":"linux-x86_64","key":"f864a2c18ebd908ad9042d3dd97ffa32b1a2dd14858c84d7e15d9f5e8224d735","lane":"client-lint","parents":["f598104b7d5e358277fc8551b6b15acc9fa29f74"],"secs":96,"stamp":"2e3d0f3bd222e8bf28d2be6a15d0a084","tree":"bf6c5ef0337e715efd78449f9fc35f1d3fdaf5c3","v":1,"via":"run"}
Ci-Attestation: {"at":1796062081,"gate":"rust/aarch64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"f864a2c18ebd908ad9042d3dd97ffa32b1a2dd14858c84d7e15d9f5e8224d735","lane":"client-lint","parents":["f598104b7d5e358277fc8551b6b15acc9fa29f74"],"secs":96,"stamp":"749310a0299fdd9d45a0c5457a66ce7b","tree":"bf6c5ef0337e715efd78449f9fc35f1d3fdaf5c3","v":1,"via":"run"}
Ci-Attestation: {"at":1796062081,"gate":"rust/aarch64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"f864a2c18ebd908ad9042d3dd97ffa32b1a2dd14858c84d7e15d9f5e8224d735","lane":"client-lint","parents":["f598104b7d5e358277fc8551b6b15acc9fa29f74"],"secs":96,"stamp":"7ab1fbbff8944b17a1d3f6e45817cfda","tree":"bf6c5ef0337e715efd78449f9fc35f1d3fdaf5c3","v":1,"via":"run"}
Ci-Attestation: {"at":1796062081,"gate":"rust/aarch64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"f864a2c18ebd908ad9042d3dd97ffa32b1a2dd14858c84d7e15d9f5e8224d735","lane":"client-lint","parents":["f598104b7d5e358277fc8551b6b15acc9fa29f74"],"secs":96,"stamp":"ba5bf3320c4caa5d674f9d797855f7e6","tree":"bf6c5ef0337e715efd78449f9fc35f1d3fdaf5c3","v":1,"via":"run"}
Ci-Attestation: {"at":1796062081,"gate":"rust/aarch64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"f864a2c18ebd908ad9042d3dd97ffa32b1a2dd14858c84d7e15d9f5e8224d735","lane":"client-lint","parents":["f598104b7d5e358277fc8551b6b15acc9fa29f74"],"secs":96,"stamp":"e62c8c5ad547dd8b30cf1c4e17f10ad1","tree":"bf6c5ef0337e715efd78449f9fc35f1d3fdaf5c3","v":1,"via":"run"}
Ci-Attestation: {"at":1796062081,"gate":"rust/x86_64-apple-darwin/client-clippy","host":"linux-x86_64","key":"f864a2c18ebd908ad9042d3dd97ffa32b1a2dd14858c84d7e15d9f5e8224d735","lane":"client-lint","parents":["f598104b7d5e358277fc8551b6b15acc9fa29f74"],"secs":96,"stamp":"55a193cb3b9118b7f4e361252bba128d","tree":"bf6c5ef0337e715efd78449f9fc35f1d3fdaf5c3","v":1,"via":"run"}
Ci-Attestation: {"at":1796062081,"gate":"rust/x86_64-apple-darwin/client-dylint","host":"linux-x86_64","key":"f864a2c18ebd908ad9042d3dd97ffa32b1a2dd14858c84d7e15d9f5e8224d735","lane":"client-lint","parents":["f598104b7d5e358277fc8551b6b15acc9fa29f74"],"secs":96,"stamp":"9dc83b5e859138bb50b15994ce899d0e","tree":"bf6c5ef0337e715efd78449f9fc35f1d3fdaf5c3","v":1,"via":"run"}
Ci-Attestation: {"at":1796062081,"gate":"rust/x86_64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"f864a2c18ebd908ad9042d3dd97ffa32b1a2dd14858c84d7e15d9f5e8224d735","lane":"client-lint","parents":["f598104b7d5e358277fc8551b6b15acc9fa29f74"],"secs":96,"stamp":"df8464248abc20dc60a6af38011a6a76","tree":"bf6c5ef0337e715efd78449f9fc35f1d3fdaf5c3","v":1,"via":"run"}
Ci-Attestation: {"at":1796062081,"gate":"rust/x86_64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"f864a2c18ebd908ad9042d3dd97ffa32b1a2dd14858c84d7e15d9f5e8224d735","lane":"client-lint","parents":["f598104b7d5e358277fc8551b6b15acc9fa29f74"],"secs":96,"stamp":"8e3d7f90cc614fbe48d5bdf7751b6040","tree":"bf6c5ef0337e715efd78449f9fc35f1d3fdaf5c3","v":1,"via":"run"}
Ci-Attestation: {"at":1796062081,"gate":"rust/x86_64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"f864a2c18ebd908ad9042d3dd97ffa32b1a2dd14858c84d7e15d9f5e8224d735","lane":"client-lint","parents":["f598104b7d5e358277fc8551b6b15acc9fa29f74"],"secs":96,"stamp":"e788d6f9d176ab99c4a16ab559266fa6","tree":"bf6c5ef0337e715efd78449f9fc35f1d3fdaf5c3","v":1,"via":"run"}
Ci-Attestation: {"at":1796062081,"gate":"rust/x86_64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"f864a2c18ebd908ad9042d3dd97ffa32b1a2dd14858c84d7e15d9f5e8224d735","lane":"client-lint","parents":["f598104b7d5e358277fc8551b6b15acc9fa29f74"],"secs":96,"stamp":"546ff6f02c636a9dc49d45f09f4dde6d","tree":"bf6c5ef0337e715efd78449f9fc35f1d3fdaf5c3","v":1,"via":"run"}
Ci-Attestation: {"at":1796062520,"gate":"rust/x86_64-unknown-linux-gnu/client-test","host":"linux-x86_64","key":"b154620f3972146ec6eb61888aedd04c2330143e09d6a81a18ce447ae913822f","lane":"client-test-x86_64-unknown-linux-gnu","parents":["f598104b7d5e358277fc8551b6b15acc9fa29f74"],"secs":362,"stamp":"d7f36294f44ea6d46e04c9bc793bf30e","tree":"bf6c5ef0337e715efd78449f9fc35f1d3fdaf5c3","v":1,"via":"run"}

Client-Checks: {"checks":{"base":"e230d26f7381e8d26081ae3263428dc681fd138c","coverage":"all-tracked-applicable-files","diff":["libobs/build/libobs.ported-source-info-versioned+.h.c","libobs/build/ported-source-sets/source-info-versioned.json","libobs/cmake/rust-exports.d/obs-source-source_info_versioned.txt","libobs/cmake/rust-hidden.d/obs-source-source_info_versioned.txt","libobs/obs-internal.h","libobs/obs-source-info-lookup-fields.c.h","libobs/obs-source-info-versioned.c.h","libobs/obs-source.c.h","rust/README.md","rust/obs-build/tests/native.rs","rust/obs-build/tests/native/registration/canonical_source_info_versioned_swap_is_registered.rs","rust/obs-c-oracle/oracle/source_info_lookup.c","rust/obs-source/src/ffi/mod.rs","rust/obs-source/src/ffi/source_info_versioned.rs","rust/obs-source/src/info_versioned.rs","rust/obs-source/src/lib.rs","rust/obs-source/tests/source/info_versioned.rs","rust/obs-source/tests/source/info_versioned_parity.rs","rust/obs-source/tests/source/main.rs","test/cmocka/build/test-graph.json","test/cmocka/test_source_info_versioned.c","test/cmocka/tests.d/test_source_info_versioned.cmake"],"head":"bae97e08a159fb4de18c76f29a2d6feb79d4900c","tools":{"orchestrator-python":"3.13.16 (main, Oct 14 2026, 01:04:01) [Clang 23.1.3 ]","schema-dependencies":"3.13.16 (main, Oct 14 2026, 01:04:01) [Clang 23.1.3 ]\n{'jsonschema': '4.26.0', 'json_source_map': '1.0.5'}","uv":"uv 0.13.5 (x86_64-unknown-linux-gnu)","xmllint":"xmllint: using libxml version 21504-GITv2.15.4\n   compiled with: Threads Tree Output Push Reader Patterns Writer SAXv1 DTDValid HTML C14N Catalog XPath XPointer XInclude Iconv ICU ISO8859X Regexps Automata RelaxNG Schemas Schematron Modules Debug Zlib"},"tracked-digest":"8cbf7b9ca16168716612b99bc2e4223d9a3e427536ea8e813deefe468f56b6af","tree":"bf6c5ef0337e715efd78449f9fc35f1d3fdaf5c3"}}
@rdoupe
rdoupe force-pushed the port/6014-source-info2 branch from 4ca430b to b4c941f Compare November 30, 2026 18:15

@zackees zackees left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coordinator review: LGTM. It adds a new characterization C test, test_source_info_versioned.c, against the unchanged C, then ports get_source_info2 and obs_enable_source_type with parity tests.

  • Exports: obs_enable_source_type is an EXPORT symbol upstream (declared in obs-source.c, not obs.h), so the rust-exports.d entry keeps the ABI. get_source_info2 is correctly hidden.
  • Rules: no existing C test or header is edited, and it has a Test cost line.

Auto-merge on.

@zackees
zackees enabled auto-merge November 30, 2026 18:21
@zackees
zackees added this pull request to the merge queue Nov 30, 2026
Merged via the queue into master with commit e07c483 Nov 30, 2026
51 checks passed
@zackees
zackees deleted the port/6014-source-info2 branch November 30, 2026 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

rust: port get_source_info2 and obs_enable_source_type to obs-source

2 participants