Skip to content

obs-source: port cache_video, clean_cache and free_async_cache to Rust (Fixes #5934) - #5935

Merged
rdoupe merged 3 commits into
masterfrom
port/5934-async-cache
Nov 29, 2026
Merged

rdoupe merged 3 commits into
masterfrom
port/5934-async-cache

Conversation

@rdoupe

@rdoupe rdoupe commented Nov 29, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #5934.

This ports the async frame cache, cache_video(), free_async_cache() and the static clean_cache() with the async_cache_key() and async_frame_key() helpers, to obs-source, in the shape of #5916, #5926 and #5930. obs_source_output_video_internal() (already Rust) calls cache_video() for every frame an async source outputs (media, cameras, capture cards), and free_async_cache() for a NULL frame. Every decision in them was already Rust: the cache step and the per-entry ageing (obs-source::frame_copy) and the convert type (obs-source::conversion_plan). What moves now is the glue on the source's fields, async_mutex, the cache array and the frame refs.

What changes

  1. Extraction, no behavior change (libobs: extract cache_video, clean_cache and free_async_cache verbatim). The five functions move unchanged into libobs/obs-source-async-cache.c.h (live group libobs.core-source). The file comes before obs-source.c.h in the group, so it keeps file-local copies of the 3-line get_convert_type() and obs_source_frame_decref(); MAX_UNUSED_FRAME_DURATION and MAX_ASYNC_FRAMES stay checked in obs-source.c.h. The output video worker's registration test now finds the cache in the new file. The same commit adds the Tier 2 test test_source_async_cache, so it first runs against the unchanged C.
  2. RED: the safe core's Host trait and todo!() steps, with 13 Tier 1 tests over a recording model.
  3. GREEN: the core in obs-source::async_cache, the hidden exports cache_video and free_async_cache in obs-source::ffi::source_async_cache (rust-hidden.d), one-access adapters in libobs/obs-source-async-cache-fields.c.h (live group, no EXPORT), and the original moved to the reference-only group libobs.ported-source-async-cache.

Kept call for call: under async_mutex, the cache step with async_frames.num, the cache's key (async_cache_width, async_cache_height, the convert type of async_cache_format, async_cache_full_range and async_cache_trc) and the frame's. An overflow frees the cache, unlocks and returns NULL; the key stays. A reset frees the cache, then stores the frame's width and height. Then the frame's format, range and trc are stored. The first unused entry is taken: its frame gets the format and loses prev_frame, and the entry is marked used with count 0. clean_cache() then ages the entries from the last one. With no entry taken, a frame is created, given refs = 1 and pushed as a used entry. The frame gets one more reference, the mutex is unlocked, and obs_source_frame_copy() copies the frame outside it. free_async_cache() drops one reference from every entry's frame (destroying it at 0), empties the cache and the queue, and clears cur_async_frame and prev_async_frame. Its loop reads async_cache.num again before each entry, as the C's does; clean_cache() reads it once.

Callers checked (git grep -n 'cache_video\|free_async_cache\|clean_cache'): obs_source_output_video_internal()'s adapters in obs-source-output-video-internal-fields.c.h are the only ones, in both libraries, and they call by name (Rust in hybrid, the original in the reference). The obs-c-oracle stand-ins of source_output_video_internal.c rename the two symbols with #define, so nothing else defines them. obs_source_frame_copy() (Rust export), obs_source_frame_create() and obs_source_frame_destroy() (static inline in obs.h) stay calls, through the adapters. The Rust convert type is conversion_plan::convert_type(), which is what obs_source_conversion_plan_fill() already returns in hybrid. No intentional differences; Tier 4 does not apply. Not user-visible, so no features ledger line.

Tiers

  • Tier 1 (rust/obs-source/tests/source/async_cache.rs, 13 tests): every access in order on a recording model, covering:

    • the first frame;
    • the first unused entry taken while the others age;
    • entries at the limit destroyed and erased from the last;
    • used entries passed by, and a new entry pushed after the ageing;
    • a reset by width, height or convert type (a held frame lives on, the slots are cleared, the new size is stored after the free);
    • a YUV range change, which keeps the cache;
    • the overflow at and past MAX_ASYNC_FRAMES, and one frame below it;
    • how often each loop reads the count.

    The model fails a test when anything is touched with async_mutex in the wrong state, or when a frame is used after its destroy.

  • Tier 2 (new test_source_async_cache, every OS; it needs no video): 8 cases on a private async source through obs_source_output_video(), against both libraries:

    • the first frame;
    • the first unused entry taken while the rest age;
    • an entry aged out at 5;
    • a used entry not counted;
    • a reset by size;
    • a reset by convert type, and a YUV range change that keeps the cache;
    • the overflow at 30 queued frames;
    • a NULL frame.

    A frame someone still holds survives each free with one reference fewer. The existing test_source_output_video_internal runs unchanged.

  • Tier 3 (async_cache_parity.rs with rust/obs-c-oracle/oracle/source_async_cache.c): the original C, with the oracle's original cache step, ageing and conversion plan, against the Rust exports.

    • Setup: real-layout sources and frames, with shared recorders of the lock and of the create, destroy and copy calls. Clobbers in each destroy rewrite the cache's key and the output frame.
    • Inputs: a grid of 12,288 cases (8 key pairs, queues of 0 to 40, 8 cache layouts, held frames, slots, both exports), plus a proptest.
    • Compared: the log, the returned frame, the entries, the queue, the slots, the key, every frame's refs, format, size, flag and destroy, and every other byte.
    • Ten mutants are rejected. A core mutation (no free on a reset) also fails Tier 1 and Tier 3.

Evidence

RED, on the RED commit ae08cd9 (Tier 1 against the todo!() core):

$ soldr cargo test -p obs-data --test obs-tests-core source::async_cache::
not yet implemented: port cache_video      (9 tests)
not yet implemented: port clean_cache      (2 tests)
not yet implemented: port free_async_cache (2 tests)
test result: FAILED. 0 passed; 13 failed; 0 ignored; 0 measured; 7278 filtered out; finished in 0.01s

GREEN:

$ soldr cargo test -p obs-data --test obs-tests-core async_cache
test result: ok. 18 passed; 0 failed; 0 ignored; 0 measured; 7278 filtered out; finished in 0.18s
$ soldr cargo test -p obs-studio-rust --test obs-tests-app canonical_source_
test result: ok. 67 passed; 0 failed; 0 ignored; 0 measured; 400 filtered out; finished in 0.22s
$ ./lint
== lane lint: ok (136.1s)
$ OBS_CMOCKA_LINK=false uv run --no-project ci/windows_link_check.py
exit 0 (every test binary links for x86_64-pc-windows-msvc)

On the Windows oracle archive, llvm-nm --defined-only shows that source_async_cache.o defines only its own oracle_* and obs_source_async_cache_* symbols. It carries none of the UCRT stdio inlines, because _NO_CRT_STDIO_INLINE is set, as #5930 needed.

Tier 2, OBS_CTEST_JOBS=10 uv run rust/tools/linux-validate/run.py --repeat 1 --tests 'test_source_async_cache|test_source_output_video_internal', which runs the whole suite on both libraries and then those tests:

  • on the extraction commit: 100% tests passed, 0 tests failed out of 1157 for the C reference (OFF) and for hybrid (ON), and the repeat 100% tests passed, 0 tests failed out of 2 on each;
  • on GREEN (183f7dc): 100% tests passed, 0 tests failed out of 1157 for the C reference (OFF) and hybrid (ON), and the repeat 100% tests passed, 0 tests failed out of 2 on each.

Test cost: the new Rust tests run longest 0.15 s (rejects_the_mutants, debug; 0.11 s with OBS_PARITY_CASES=reduced), and the full grid takes 0.05 s. Both modules together take 0.19 s with OBS_PARITY_CASES=reduced. Peak RSS over 23 runs of both modules is 22.7 MB (6 to 7 MB typical). The tests start no threads of their own.

🤖 Generated with Claude Code

rdoupe and others added 2 commits November 29, 2026 07:07
…m (Refs #5934)

Move cache_video(), free_async_cache() (both declared in obs-internal.h
without EXPORT), the static clean_cache() and the two key helpers
async_cache_key() and async_frame_key() out of obs-source.c.h into
obs-source-async-cache.c.h (live group libobs.core-source), unchanged.
The new file comes before obs-source.c.h in the group, so it keeps
file-local copies of get_convert_type() (the conversion plan's convert
type) and obs_source_frame_decref(). MAX_UNUSED_FRAME_DURATION and
MAX_ASYNC_FRAMES stay checked in obs-source.c.h. The output video worker's
registration test now finds the cache in the new file. No behavior change.

The new test_source_async_cache characterizes the cache through the real
libobs (obs_source_output_video() on a private async source, nothing
ticking), 8 cases: the first frame makes an entry holding the cache's
reference only and sets the cache's key; a frame takes the first unused
entry (new format, prev_frame cleared, count 0) while the unused entries
left count the call; an unused entry at 5 is destroyed and erased, a used
one is not counted, and with no unused entry a new one is pushed after the
ageing; a size or convert-type change frees the cache (a frame someone
still holds loses one reference and lives on, both slots NULL) and takes
the new size, while a YUV range change keeps it; 30 queued frames free the
cache and refuse the frame, leaving the key; a NULL frame frees the cache.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… RED (Refs #5934)

The safe core's Host trait (async_mutex, async_frames.num, the cache's key
fields and their stores, a frame's size, format, range, trc, prev_frame and
refs, the cache array's count, entries, erase, push and resize, the queue's
resize, the two frame slots, and obs_source_frame_create(), _destroy() and
_copy()) and todo!() steps, with 13 Tier 1 tests over a recording model:
the first frame (an empty cache reset by a zero key, a frame created with
refs 1 and pushed, one more reference, the copy after the unlock); the
first unused entry taken (new format, prev_frame cleared, used, count 0)
while the unused entries left count the call; entries at the limit
destroyed and erased from the last; used entries passed by and a new entry
pushed after the ageing; a reset by width, height or convert type (every
entry's frame loses a reference and is destroyed at 0, a held frame lives
on, cache, queue and both slots cleared, then the new size) while a YUV
range change keeps the cache; the overflow at MAX_ASYNC_FRAMES and past it
(the cache freed, the key left, no copy); one below the limit cached; and
the loops' count reads (free_async_cache() before each entry, clean_cache()
once). The model fails a test on a field, entry or frame touched with
async_mutex in the wrong state, or a frame used after its destroy. All 13
fail on the todo!() core.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ci-Attestation: {"at":1795954254,"gate":"data/all/compatibility","host":"linux-x86_64","key":"","lane":"client-checks","parents":["7f52e4b39523208f05561cac1015637e60640f2f"],"secs":76,"stamp":"ae03d794e89dec7e44262970a8cdb680","tree":"e0dea05bd611cd1f02ffb5f9b17cf287f84f9ab3","v":1,"via":"run"}
Ci-Attestation: {"at":1795954254,"gate":"data/all/flatpak-manifest","host":"linux-x86_64","key":"","lane":"client-checks","parents":["7f52e4b39523208f05561cac1015637e60640f2f"],"secs":76,"stamp":"0db48821697bd4a9f675c961a8cc1738","tree":"e0dea05bd611cd1f02ffb5f9b17cf287f84f9ab3","v":1,"via":"run"}
Ci-Attestation: {"at":1795954254,"gate":"data/all/qt-xml","host":"linux-x86_64","key":"","lane":"client-checks","parents":["7f52e4b39523208f05561cac1015637e60640f2f"],"secs":76,"stamp":"b2613471e4ad77aefbf6c1a4c1bd5a7a","tree":"e0dea05bd611cd1f02ffb5f9b17cf287f84f9ab3","v":1,"via":"run"}
Ci-Attestation: {"at":1795954254,"gate":"data/all/services-schema","host":"linux-x86_64","key":"","lane":"client-checks","parents":["7f52e4b39523208f05561cac1015637e60640f2f"],"secs":76,"stamp":"8735a7bcf62a5af76bfe9165114dc02b","tree":"e0dea05bd611cd1f02ffb5f9b17cf287f84f9ab3","v":1,"via":"run"}
Ci-Attestation: {"at":1795954178,"gate":"general/all/client-lint","host":"linux-x86_64","key":"43b5d8ef56e29670c64e5438b476aac049ac0e192dad33e0a20109b3aa770963","lane":"client-lint","parents":["7f52e4b39523208f05561cac1015637e60640f2f"],"secs":99,"stamp":"d00a844dcbece9a465359eb57e7e7969","tree":"e0dea05bd611cd1f02ffb5f9b17cf287f84f9ab3","v":1,"via":"run"}
Ci-Attestation: {"at":1795954254,"gate":"python/all/self-test","host":"linux-x86_64","key":"","lane":"client-checks","parents":["7f52e4b39523208f05561cac1015637e60640f2f"],"secs":76,"stamp":"e4284f636641b6f9037bc8e212e96734","tree":"e0dea05bd611cd1f02ffb5f9b17cf287f84f9ab3","v":1,"via":"run"}
Ci-Attestation: {"at":1795954178,"gate":"rust/aarch64-apple-darwin/client-clippy","host":"linux-x86_64","key":"43b5d8ef56e29670c64e5438b476aac049ac0e192dad33e0a20109b3aa770963","lane":"client-lint","parents":["7f52e4b39523208f05561cac1015637e60640f2f"],"secs":99,"stamp":"a1a572dc1282e3366bda5a966d47b79c","tree":"e0dea05bd611cd1f02ffb5f9b17cf287f84f9ab3","v":1,"via":"run"}
Ci-Attestation: {"at":1795954178,"gate":"rust/aarch64-apple-darwin/client-dylint","host":"linux-x86_64","key":"43b5d8ef56e29670c64e5438b476aac049ac0e192dad33e0a20109b3aa770963","lane":"client-lint","parents":["7f52e4b39523208f05561cac1015637e60640f2f"],"secs":99,"stamp":"2f74652241e70755b43edd81b802b7aa","tree":"e0dea05bd611cd1f02ffb5f9b17cf287f84f9ab3","v":1,"via":"run"}
Ci-Attestation: {"at":1795954178,"gate":"rust/aarch64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"43b5d8ef56e29670c64e5438b476aac049ac0e192dad33e0a20109b3aa770963","lane":"client-lint","parents":["7f52e4b39523208f05561cac1015637e60640f2f"],"secs":99,"stamp":"8107244e8f2e740069303163976a67dc","tree":"e0dea05bd611cd1f02ffb5f9b17cf287f84f9ab3","v":1,"via":"run"}
Ci-Attestation: {"at":1795954178,"gate":"rust/aarch64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"43b5d8ef56e29670c64e5438b476aac049ac0e192dad33e0a20109b3aa770963","lane":"client-lint","parents":["7f52e4b39523208f05561cac1015637e60640f2f"],"secs":99,"stamp":"5ef0dadfeb24f39c8170a17a76d57c75","tree":"e0dea05bd611cd1f02ffb5f9b17cf287f84f9ab3","v":1,"via":"run"}
Ci-Attestation: {"at":1795954178,"gate":"rust/aarch64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"43b5d8ef56e29670c64e5438b476aac049ac0e192dad33e0a20109b3aa770963","lane":"client-lint","parents":["7f52e4b39523208f05561cac1015637e60640f2f"],"secs":99,"stamp":"15f458821c555ef4859cfa2aa7770cbc","tree":"e0dea05bd611cd1f02ffb5f9b17cf287f84f9ab3","v":1,"via":"run"}
Ci-Attestation: {"at":1795954178,"gate":"rust/aarch64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"43b5d8ef56e29670c64e5438b476aac049ac0e192dad33e0a20109b3aa770963","lane":"client-lint","parents":["7f52e4b39523208f05561cac1015637e60640f2f"],"secs":99,"stamp":"b31115ee8e5eb0b07ea82ba39009b095","tree":"e0dea05bd611cd1f02ffb5f9b17cf287f84f9ab3","v":1,"via":"run"}
Ci-Attestation: {"at":1795954178,"gate":"rust/x86_64-apple-darwin/client-clippy","host":"linux-x86_64","key":"43b5d8ef56e29670c64e5438b476aac049ac0e192dad33e0a20109b3aa770963","lane":"client-lint","parents":["7f52e4b39523208f05561cac1015637e60640f2f"],"secs":99,"stamp":"afcc85c416dc47e71fe2322dc13b19c3","tree":"e0dea05bd611cd1f02ffb5f9b17cf287f84f9ab3","v":1,"via":"run"}
Ci-Attestation: {"at":1795954178,"gate":"rust/x86_64-apple-darwin/client-dylint","host":"linux-x86_64","key":"43b5d8ef56e29670c64e5438b476aac049ac0e192dad33e0a20109b3aa770963","lane":"client-lint","parents":["7f52e4b39523208f05561cac1015637e60640f2f"],"secs":99,"stamp":"a4fef175cd0e511237dc54435aff0c1b","tree":"e0dea05bd611cd1f02ffb5f9b17cf287f84f9ab3","v":1,"via":"run"}
Ci-Attestation: {"at":1795954178,"gate":"rust/x86_64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"43b5d8ef56e29670c64e5438b476aac049ac0e192dad33e0a20109b3aa770963","lane":"client-lint","parents":["7f52e4b39523208f05561cac1015637e60640f2f"],"secs":99,"stamp":"8215e056fa536388d235dab0000aca4e","tree":"e0dea05bd611cd1f02ffb5f9b17cf287f84f9ab3","v":1,"via":"run"}
Ci-Attestation: {"at":1795954178,"gate":"rust/x86_64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"43b5d8ef56e29670c64e5438b476aac049ac0e192dad33e0a20109b3aa770963","lane":"client-lint","parents":["7f52e4b39523208f05561cac1015637e60640f2f"],"secs":99,"stamp":"9762b6a97b6ab5d2449abd12d46adeff","tree":"e0dea05bd611cd1f02ffb5f9b17cf287f84f9ab3","v":1,"via":"run"}
Ci-Attestation: {"at":1795954178,"gate":"rust/x86_64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"43b5d8ef56e29670c64e5438b476aac049ac0e192dad33e0a20109b3aa770963","lane":"client-lint","parents":["7f52e4b39523208f05561cac1015637e60640f2f"],"secs":99,"stamp":"473cf173c9b1a97d07c6f5364b034c7b","tree":"e0dea05bd611cd1f02ffb5f9b17cf287f84f9ab3","v":1,"via":"run"}
Ci-Attestation: {"at":1795954178,"gate":"rust/x86_64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"43b5d8ef56e29670c64e5438b476aac049ac0e192dad33e0a20109b3aa770963","lane":"client-lint","parents":["7f52e4b39523208f05561cac1015637e60640f2f"],"secs":99,"stamp":"c5c1565860fc0268bbe06b89f522cfa1","tree":"e0dea05bd611cd1f02ffb5f9b17cf287f84f9ab3","v":1,"via":"run"}
@rdoupe
rdoupe requested a review from zackees as a code owner November 29, 2026 12:13
@rdoupe
rdoupe marked this pull request as draft November 29, 2026 12:14
@rdoupe rdoupe changed the title obs-source: Tier 1 for cache_video, clean_cache and free_async_cache, RED (Refs #5934) obs-source: port cache_video, clean_cache and free_async_cache to Rust (Fixes #5934) Nov 29, 2026
…t, GREEN (Fixes #5934)

cache_video(), free_async_cache() and clean_cache() are now the safe core
in obs-source::async_cache over a Host trait, exported as the hidden
cache_video() and free_async_cache() in obs-source::ffi::source_async_cache
(rust-hidden.d). The cache step and the ageing are obs-source::frame_copy's,
the convert type obs-source::conversion_plan's. The fields, async_mutex,
the cache array, the queue, the frame refs and the calls of
obs_source_frame_create(), _destroy() and _copy() stay C, one access per
adapter, in obs-source-async-cache-fields.c.h (live group core-source, no
EXPORT). The original moves to the reference-only group
libobs.ported-source-async-cache. obs_source_output_video_internal()'s
adapters still call cache_video() and free_async_cache() by name.

Tier 3 runs the original C in obs-c-oracle (with the oracle's original
cache step, ageing and conversion plan) against the Rust exports over a
grid of keys, queues of 0 to 40, cache layouts, held frames, slots and
both exports plus a proptest, with clobbers that rewrite the cache's key
and the output frame in each destroy, and rejects ten mutants. No
intentional differences.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ci-Attestation: {"at":1795956034,"gate":"data/all/compatibility","host":"linux-x86_64","key":"","lane":"client-checks","parents":["ae08cd960ef60401b50b333b92b57392bae149ec"],"secs":77,"stamp":"067f97e307d535d35a39434eadd02a60","tree":"7afd846f25615075519c71d9c3d552635de88b22","v":1,"via":"run"}
Ci-Attestation: {"at":1795956034,"gate":"data/all/flatpak-manifest","host":"linux-x86_64","key":"","lane":"client-checks","parents":["ae08cd960ef60401b50b333b92b57392bae149ec"],"secs":77,"stamp":"ad36923e4ad93f7e1c312af1566a24e1","tree":"7afd846f25615075519c71d9c3d552635de88b22","v":1,"via":"run"}
Ci-Attestation: {"at":1795956034,"gate":"data/all/qt-xml","host":"linux-x86_64","key":"","lane":"client-checks","parents":["ae08cd960ef60401b50b333b92b57392bae149ec"],"secs":77,"stamp":"4a038b923f070dfd768e42dd020a004d","tree":"7afd846f25615075519c71d9c3d552635de88b22","v":1,"via":"run"}
Ci-Attestation: {"at":1795956034,"gate":"data/all/services-schema","host":"linux-x86_64","key":"","lane":"client-checks","parents":["ae08cd960ef60401b50b333b92b57392bae149ec"],"secs":77,"stamp":"1ce7919a1109f728e5c72ce098705710","tree":"7afd846f25615075519c71d9c3d552635de88b22","v":1,"via":"run"}
Ci-Attestation: {"at":1795955956,"gate":"general/all/client-lint","host":"linux-x86_64","key":"a53f1ad848fb3564fc1b87ef5a528f0992d1482c78d7e4dd97be30521e0b7fc8","lane":"client-lint","parents":["ae08cd960ef60401b50b333b92b57392bae149ec"],"secs":110,"stamp":"fecd16c4700f66666dc3148336b6206e","tree":"7afd846f25615075519c71d9c3d552635de88b22","v":1,"via":"run"}
Ci-Attestation: {"at":1795956034,"gate":"python/all/self-test","host":"linux-x86_64","key":"","lane":"client-checks","parents":["ae08cd960ef60401b50b333b92b57392bae149ec"],"secs":77,"stamp":"0da5797b40d3b569fb88dc48fad32e3b","tree":"7afd846f25615075519c71d9c3d552635de88b22","v":1,"via":"run"}
Ci-Attestation: {"at":1795955957,"gate":"rust/aarch64-apple-darwin/client-clippy","host":"linux-x86_64","key":"a53f1ad848fb3564fc1b87ef5a528f0992d1482c78d7e4dd97be30521e0b7fc8","lane":"client-lint","parents":["ae08cd960ef60401b50b333b92b57392bae149ec"],"secs":110,"stamp":"3960a227c9f39d4cab7b08b66c538315","tree":"7afd846f25615075519c71d9c3d552635de88b22","v":1,"via":"run"}
Ci-Attestation: {"at":1795955957,"gate":"rust/aarch64-apple-darwin/client-dylint","host":"linux-x86_64","key":"a53f1ad848fb3564fc1b87ef5a528f0992d1482c78d7e4dd97be30521e0b7fc8","lane":"client-lint","parents":["ae08cd960ef60401b50b333b92b57392bae149ec"],"secs":110,"stamp":"b19a8f6b16314da80018d59b7e6eeeeb","tree":"7afd846f25615075519c71d9c3d552635de88b22","v":1,"via":"run"}
Ci-Attestation: {"at":1795955956,"gate":"rust/aarch64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"a53f1ad848fb3564fc1b87ef5a528f0992d1482c78d7e4dd97be30521e0b7fc8","lane":"client-lint","parents":["ae08cd960ef60401b50b333b92b57392bae149ec"],"secs":110,"stamp":"dd623334344b9b09161d1ed3e4c5f4d8","tree":"7afd846f25615075519c71d9c3d552635de88b22","v":1,"via":"run"}
Ci-Attestation: {"at":1795955956,"gate":"rust/aarch64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"a53f1ad848fb3564fc1b87ef5a528f0992d1482c78d7e4dd97be30521e0b7fc8","lane":"client-lint","parents":["ae08cd960ef60401b50b333b92b57392bae149ec"],"secs":110,"stamp":"11c3ecfb702dfdc6070b7c846d71de14","tree":"7afd846f25615075519c71d9c3d552635de88b22","v":1,"via":"run"}
Ci-Attestation: {"at":1795955956,"gate":"rust/aarch64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"a53f1ad848fb3564fc1b87ef5a528f0992d1482c78d7e4dd97be30521e0b7fc8","lane":"client-lint","parents":["ae08cd960ef60401b50b333b92b57392bae149ec"],"secs":110,"stamp":"df7bee1832cdf885b28bed626c0d5f80","tree":"7afd846f25615075519c71d9c3d552635de88b22","v":1,"via":"run"}
Ci-Attestation: {"at":1795955956,"gate":"rust/aarch64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"a53f1ad848fb3564fc1b87ef5a528f0992d1482c78d7e4dd97be30521e0b7fc8","lane":"client-lint","parents":["ae08cd960ef60401b50b333b92b57392bae149ec"],"secs":110,"stamp":"1776bd890dbbcd9eebe09d9f570bbaf1","tree":"7afd846f25615075519c71d9c3d552635de88b22","v":1,"via":"run"}
Ci-Attestation: {"at":1795955956,"gate":"rust/x86_64-apple-darwin/client-clippy","host":"linux-x86_64","key":"a53f1ad848fb3564fc1b87ef5a528f0992d1482c78d7e4dd97be30521e0b7fc8","lane":"client-lint","parents":["ae08cd960ef60401b50b333b92b57392bae149ec"],"secs":110,"stamp":"30046cbdddb2314ad81d61efa68ffbb5","tree":"7afd846f25615075519c71d9c3d552635de88b22","v":1,"via":"run"}
Ci-Attestation: {"at":1795955956,"gate":"rust/x86_64-apple-darwin/client-dylint","host":"linux-x86_64","key":"a53f1ad848fb3564fc1b87ef5a528f0992d1482c78d7e4dd97be30521e0b7fc8","lane":"client-lint","parents":["ae08cd960ef60401b50b333b92b57392bae149ec"],"secs":110,"stamp":"4abc04f0f4b2218c75c9352d751cde11","tree":"7afd846f25615075519c71d9c3d552635de88b22","v":1,"via":"run"}
Ci-Attestation: {"at":1795955956,"gate":"rust/x86_64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"a53f1ad848fb3564fc1b87ef5a528f0992d1482c78d7e4dd97be30521e0b7fc8","lane":"client-lint","parents":["ae08cd960ef60401b50b333b92b57392bae149ec"],"secs":110,"stamp":"1402d73c96f8ddcffa855b7570c6131a","tree":"7afd846f25615075519c71d9c3d552635de88b22","v":1,"via":"run"}
Ci-Attestation: {"at":1795955956,"gate":"rust/x86_64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"a53f1ad848fb3564fc1b87ef5a528f0992d1482c78d7e4dd97be30521e0b7fc8","lane":"client-lint","parents":["ae08cd960ef60401b50b333b92b57392bae149ec"],"secs":110,"stamp":"a0f88c80271c3d6a4726ee8ad2f9c15a","tree":"7afd846f25615075519c71d9c3d552635de88b22","v":1,"via":"run"}
Ci-Attestation: {"at":1795955956,"gate":"rust/x86_64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"a53f1ad848fb3564fc1b87ef5a528f0992d1482c78d7e4dd97be30521e0b7fc8","lane":"client-lint","parents":["ae08cd960ef60401b50b333b92b57392bae149ec"],"secs":110,"stamp":"0768aee879b70fcb80fa0da94530aef2","tree":"7afd846f25615075519c71d9c3d552635de88b22","v":1,"via":"run"}
Ci-Attestation: {"at":1795955956,"gate":"rust/x86_64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"a53f1ad848fb3564fc1b87ef5a528f0992d1482c78d7e4dd97be30521e0b7fc8","lane":"client-lint","parents":["ae08cd960ef60401b50b333b92b57392bae149ec"],"secs":110,"stamp":"9de592b51a3fdaeb1fa00504839218f9","tree":"7afd846f25615075519c71d9c3d552635de88b22","v":1,"via":"run"}
Ci-Attestation: {"at":1795956374,"gate":"rust/x86_64-unknown-linux-gnu/client-test","host":"linux-x86_64","key":"41bc837a76468cfafdf0cbeb40cfe2086d41d50f092153314ff9661426efe3cd","lane":"client-test-x86_64-unknown-linux-gnu","parents":["ae08cd960ef60401b50b333b92b57392bae149ec"],"secs":339,"stamp":"780e8882954fa4cbe435c6ce7601d02d","tree":"7afd846f25615075519c71d9c3d552635de88b22","v":1,"via":"run"}

Client-Checks: {"checks":{"base":"51ea895ba22861c78622b0140f4e8ee2ed7d3979","coverage":"all-tracked-applicable-files","diff":["libobs/build/libobs.core-source+.h.c","libobs/build/libobs.ported-source-async-cache+.h.c","libobs/build/ported-source-sets/source-async-cache.json","libobs/cmake/rust-hidden.d/obs-source-source_async_cache.txt","libobs/obs-source-async-cache-fields.c.h","libobs/obs-source-async-cache.c.h","libobs/obs-source-output-video-internal-fields.c.h","libobs/obs-source.c.h","rust/README.md","rust/obs-build/tests/native.rs","rust/obs-build/tests/native/registration/canonical_source_async_cache_swap_is_registered.rs","rust/obs-build/tests/native/registration/canonical_source_output_video_internal_swap_is_registered.rs","rust/obs-c-oracle/oracle.d/source-async-cache.list","rust/obs-c-oracle/oracle/source_async_cache.c","rust/obs-source/src/async_cache.rs","rust/obs-source/src/ffi/mod.rs","rust/obs-source/src/ffi/source_async_cache.rs","rust/obs-source/src/lib.rs","rust/obs-source/tests/source/async_cache.rs","rust/obs-source/tests/source/async_cache_parity.rs","rust/obs-source/tests/source/main.rs","test/cmocka/build/test-graph.json","test/cmocka/test_source_async_cache.c","test/cmocka/tests.d/test_source_async_cache.cmake"],"head":"276afef50784f164f3c0d99a5f488158ecb3cee5","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":"cca36d6c0846e131b66097e6635f191cba7183f840be4f5db23821ba2d9fb9da","tree":"7afd846f25615075519c71d9c3d552635de88b22"}}

@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 has the usual port shape:

  • Extraction: a verbatim extraction into obs-source-async-cache.c.h and the fields adapter. The output-video-internal adapter and registration are updated for the moved functions.
  • Tests: a new Tier 2 test_source_async_cache.c, Tier 1 async_cache.rs, Tier 3 async_cache_parity.rs against the oracle, and canonical-swap registration tests.
  • Rules: a Test cost line, and no existing C test or public header edited.
  • Windows (#5919): no util_mul_div64 and no wide usize inputs, so the MSVC trap doesn't apply.

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 cache_video, clean_cache and free_async_cache to obs-source

2 participants