Skip to content

obs-source: port async_tick and its filter_frame and get_closest_frame steps to Rust (Fixes #5929) - #5930

Merged
rdoupe merged 4 commits into
masterfrom
port/5929-async-tick
Nov 29, 2026
Merged

rdoupe merged 4 commits into
masterfrom
port/5929-async-tick

Conversation

@rdoupe

@rdoupe rdoupe commented Nov 29, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #5929.

This ports async_tick() and its two static steps, filter_frame() and get_closest_frame(), to obs-source, in the shape of #5916 and #5926. obs_source_video_tick() runs async_tick() once a tick on the video thread for every async source (media, cameras, capture cards). Every decision in it was already Rust: the route (obs-source::video_tick), the frame pacing (obs-source::async_pacing) and the async filter chain (#5917). What moves now is the glue on the source's fields, async_mutex, the frame queue and the frame refs.

What changes

  1. Extraction, no behavior change (libobs: extract async_tick and its steps verbatim). The three functions move unchanged into libobs/obs-source-async-tick.c.h (live group libobs.core-source). async_tick() loses its static; obs-source.c.h declares it without EXPORT for obs_source_video_tick(). The async filter registration test now finds the filter_async_video() call in the new file. The same commit adds the Tier 2 test test_source_async_tick_entry, so it first runs against the unchanged C.
  2. RED: the safe core's Host trait and todo!() steps, with 17 Tier 1 tests over a recording model.
  3. GREEN: the core in obs-source::async_tick, the hidden export in obs-source::ffi::source_async_tick (rust-hidden.d), one-access adapters in libobs/obs-source-async-tick-fields.c.h (live group, no EXPORT), and the original moved to the reference-only group libobs.ported-source-async-tick.

Kept call for call: the canvas frame time is read before the lock. Under async_mutex, the route for deinterlacing_enabled() runs deinterlace_process_last_frame(), or releases cur_async_frame through remove_async_frame() (read for the check and again for the call), stores NULL and stores the closest frame. Then last_sys_timestamp, the route again (the mode is read a second time), the previous frame through the filters only when deinterlacing, then the current one, and async_update_texture from set_async_texture_size() when a current frame is left. filter_frame() adds a reference, runs filter_async_video() and drops a reference from the frame that comes back (not the one passed in), storing the slot, NULL included. get_closest_frame() returns NULL on an empty queue before reading anything else; otherwise it copies every queued timestamp (a heap array past MAX_ASYNC_FRAMES), asks the pacing, drops the passed frames off the front one at a time (read, erased, released), stores last_frame_ts and takes the front frame when the pacing says so.

I checked the callers: obs_source_video_tick() is the only one, in both libraries, and reaches the symbol by name. 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_tick.rs, 17 tests): every access in order on a recording model: an empty queue, unbuffered, the first frame, frames not due, a jump, passed frames dropped, the held frame released first, the frame time read once before the lock, a filter that keeps, replaces or drops the frame, the previous frame left alone without deinterlacing, the mode read again for it, the texture size stored only with a frame left, and every queued timestamp read past the stack array.
  • Tier 2 (new test_source_async_tick_entry, Linux with OpenGL; the tick runs on the video thread): one tick at a time from a tick callback, 12 cases: an empty queue, unbuffered, the first frame, frames not due, a jump, passed frames dropped, the held frame back to the cache, a filter that gets the frame under the lock with one more reference, replaces or drops it, the previous frame left alone without deinterlacing, and with deinterlacing the previous frame filtered first. The existing async tests run unchanged.
  • Tier 3 (async_tick_parity.rs with rust/obs-c-oracle/oracle/source_async_tick.c): the original C (with the oracle's original route and pacing) against the Rust export on real-layout sources and frames, through shared recorders of the lock, the frame time and the four calls, with clobbers that flip the mode and rewrite last_frame_ts, async_unbuffered, last_sys_timestamp and the current slot mid-call. Over a grid of routes, held frames, queues of 0 to 40 in four timestamp patterns, both clocks, filter chains, texture results and deinterlace scripts, plus a proptest, it compares both slots, the queue, every frame's refs, the fields, the event log and every other byte. Eight mutants are rejected.

Evidence

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

$ soldr cargo test -p obs-data --test obs-tests-core source::async_tick::
not yet implemented: port async_tick        (9 tests)
not yet implemented: port get_closest_frame (5 tests)
not yet implemented: port filter_frame      (3 tests)
test result: FAILED. 0 passed; 17 failed; 0 ignored; 0 measured; 7231 filtered out; finished in 0.01s

GREEN:

$ soldr cargo test -p obs-data --test obs-tests-core async_tick
test result: ok. 22 passed; 0 failed; 0 ignored; 0 measured; 7231 filtered out; finished in 0.48s
$ soldr cargo test -p obs-studio-rust --test obs-tests-app canonical_source_async
test result: ok. 3 passed; 0 failed
$ ./lint
== lane lint: ok (114.6s)

Tier 2 on GREEN, OBS_CTEST_JOBS=10 uv run rust/tools/linux-validate/run.py --repeat 1 --tests 'test_source_async_tick_entry|test_source_async_filter|test_async_frame_pacing_steps', which runs the whole suite on both libraries and then those tests: 100% tests passed, 0 tests failed out of 1153 for the C reference (OFF) and hybrid (ON), and the repeat 100% tests passed, 0 tests failed out of 4 on each.

Because ctest counts a cmocka skip() as Passed, I also ran the binary in the kept build volume under xvfb-run -a from rundir/RelWithDebInfo: against hybrid and against libobs-c-reference it reports [==========] tests: 12 test(s) run. and [ PASSED ] 12 test(s).. In the built hybrid libobs.so, get_closest_frame is gone and async_tick is the Rust one; the reference still has the C.

Test cost: the new Rust tests run longest 0.52 s (matches_c_over_the_grid, debug; 0.16 s with OBS_PARITY_CASES=reduced), the Tier 1 module a few ms. Peak RSS is 17.6 MB over both modules. The tests start no threads of their own.

🤖 Generated with Claude Code

@rdoupe
rdoupe requested a review from zackees as a code owner November 29, 2026 08:47
@rdoupe
rdoupe marked this pull request as draft November 29, 2026 08:47
@rdoupe rdoupe changed the title obs-source: Tier 1 for async_tick and its steps, RED (Refs #5929) obs-source: port async_tick and its filter_frame and get_closest_frame steps to Rust (Fixes #5929) Nov 29, 2026
@obs-rust-project-manager obs-rust-project-manager Bot moved this to In progress in obs-rust Multiview Nov 29, 2026
rdoupe and others added 3 commits November 29, 2026 05:09
Move async_tick() and its two static steps, filter_frame() and
get_closest_frame(), out of obs-source.c.h into obs-source-async-tick.c.h
(live group libobs.core-source), unchanged. async_tick() loses its static:
obs-source.c.h declares it (no EXPORT) for obs_source_video_tick(), as it
does process_media_actions(). The new file keeps a file-local copy of
deinterlacing_enabled() and names MAX_ASYNC_FRAMES by the frame copy's
OBS_SOURCE_FRAME_COPY_MAX_ASYNC_FRAMES (30, checked in obs-source.c.h).
The async filter registration test now finds the filter_async_video() call
in the new file. No behavior change.

The new test_source_async_tick_entry characterizes them through the real
libobs, one video tick at a time: a tick callback, which libobs runs before
it ticks the sources, sets an async source's fields and queues its frames,
and in the next tick reads what the source's tick left. 12 cases: an empty
queue (nothing taken, last_frame_ts untouched, no texture size); unbuffered
after a shown frame (the newest taken, the rest dropped to the cache); the
first frame (the oldest, seeding last_frame_ts); frames not due (nothing
taken, the clock moved by the canvas time); a timestamp jump; frames the
clock passed dropped; the held frame released to the cache first; a filter
that keeps the frame (one more reference during the walk, async_mutex
held), replaces it (the replacement loses the reference) or drops it (no
frame, no texture size, the passed frame keeps the reference); the previous
frame left alone without deinterlacing; and with deinterlacing the previous
frame filtered before the current one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The safe core's Host trait (the canvas frame time, async_mutex, the
deinterlace mode, deinterlace_process_last_frame(), the two frame slots,
remove_async_frame(), last_sys_timestamp, last_frame_ts, async_unbuffered,
the queue, a frame's timestamp and refs, filter_async_video(),
set_async_texture_size() and async_update_texture) and todo!() steps, with
17 Tier 1 tests over a recording model: an empty queue (the pacing not
asked, the empty slot stored again), unbuffered after a shown frame, the
first frame, frames not due, a jump, frames passed and dropped (each front
read, erased, then released), the held frame read twice and released
first, every timestamp read past the stack array of MAX_ASYNC_FRAMES, the
frame time read once before the lock; a replacement losing the walk's
reference, a NULL keeping it, an empty slot; no texture size without a
frame left and a false result stored; with deinterlacing the previous frame
filtered before the current one, the mode read again for it either way, and
the previous frame left alone without. The model fails a test on a field,
frame or call touched with async_mutex in the wrong state. All 17 fail on
the todo!() core.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ci-Attestation: {"at":1795941875,"gate":"data/all/compatibility","host":"linux-x86_64","key":"","lane":"client-checks","parents":["990d4c614f86abed5f99d4ea8d5a85a3a4e62b0b"],"secs":75,"stamp":"db0fa76a296bbcfad0264deca7a4ce2f","tree":"6ccf9690d7cfec5123e66c1522101bb9b9d65764","v":1,"via":"run"}
Ci-Attestation: {"at":1795941875,"gate":"data/all/flatpak-manifest","host":"linux-x86_64","key":"","lane":"client-checks","parents":["990d4c614f86abed5f99d4ea8d5a85a3a4e62b0b"],"secs":75,"stamp":"4af15f8f27bf3fbba62db9964c98eb78","tree":"6ccf9690d7cfec5123e66c1522101bb9b9d65764","v":1,"via":"run"}
Ci-Attestation: {"at":1795941875,"gate":"data/all/qt-xml","host":"linux-x86_64","key":"","lane":"client-checks","parents":["990d4c614f86abed5f99d4ea8d5a85a3a4e62b0b"],"secs":75,"stamp":"ba2e208fedb67b5c51263d966277f8c5","tree":"6ccf9690d7cfec5123e66c1522101bb9b9d65764","v":1,"via":"run"}
Ci-Attestation: {"at":1795941875,"gate":"data/all/services-schema","host":"linux-x86_64","key":"","lane":"client-checks","parents":["990d4c614f86abed5f99d4ea8d5a85a3a4e62b0b"],"secs":75,"stamp":"1885df7a8e4de594c79f4b41b8b86e56","tree":"6ccf9690d7cfec5123e66c1522101bb9b9d65764","v":1,"via":"run"}
Ci-Attestation: {"at":1795941798,"gate":"general/all/client-lint","host":"linux-x86_64","key":"b2a1cdc24c8d3a28bfe9ddbc9a9db7b8674bff35313d74f259cb3138bce6262f","lane":"client-lint","parents":["990d4c614f86abed5f99d4ea8d5a85a3a4e62b0b"],"secs":152,"stamp":"cbab53ea3342c2275376979a5ca7549b","tree":"6ccf9690d7cfec5123e66c1522101bb9b9d65764","v":1,"via":"run"}
Ci-Attestation: {"at":1795941875,"gate":"python/all/self-test","host":"linux-x86_64","key":"","lane":"client-checks","parents":["990d4c614f86abed5f99d4ea8d5a85a3a4e62b0b"],"secs":75,"stamp":"79c4ec41cf08fda42bc5760b547c967b","tree":"6ccf9690d7cfec5123e66c1522101bb9b9d65764","v":1,"via":"run"}
Ci-Attestation: {"at":1795941798,"gate":"rust/aarch64-apple-darwin/client-clippy","host":"linux-x86_64","key":"b2a1cdc24c8d3a28bfe9ddbc9a9db7b8674bff35313d74f259cb3138bce6262f","lane":"client-lint","parents":["990d4c614f86abed5f99d4ea8d5a85a3a4e62b0b"],"secs":152,"stamp":"0a685dbba3dd3d25056282a9fbc88967","tree":"6ccf9690d7cfec5123e66c1522101bb9b9d65764","v":1,"via":"run"}
Ci-Attestation: {"at":1795941799,"gate":"rust/aarch64-apple-darwin/client-dylint","host":"linux-x86_64","key":"b2a1cdc24c8d3a28bfe9ddbc9a9db7b8674bff35313d74f259cb3138bce6262f","lane":"client-lint","parents":["990d4c614f86abed5f99d4ea8d5a85a3a4e62b0b"],"secs":152,"stamp":"f52b6dd633a692e1e6f8df7c39177eb1","tree":"6ccf9690d7cfec5123e66c1522101bb9b9d65764","v":1,"via":"run"}
Ci-Attestation: {"at":1795941798,"gate":"rust/aarch64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"b2a1cdc24c8d3a28bfe9ddbc9a9db7b8674bff35313d74f259cb3138bce6262f","lane":"client-lint","parents":["990d4c614f86abed5f99d4ea8d5a85a3a4e62b0b"],"secs":152,"stamp":"edcca1f83db45c757a5f70e9714c5644","tree":"6ccf9690d7cfec5123e66c1522101bb9b9d65764","v":1,"via":"run"}
Ci-Attestation: {"at":1795941798,"gate":"rust/aarch64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"b2a1cdc24c8d3a28bfe9ddbc9a9db7b8674bff35313d74f259cb3138bce6262f","lane":"client-lint","parents":["990d4c614f86abed5f99d4ea8d5a85a3a4e62b0b"],"secs":152,"stamp":"193149473422766867528d0c23f272f0","tree":"6ccf9690d7cfec5123e66c1522101bb9b9d65764","v":1,"via":"run"}
Ci-Attestation: {"at":1795941798,"gate":"rust/aarch64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"b2a1cdc24c8d3a28bfe9ddbc9a9db7b8674bff35313d74f259cb3138bce6262f","lane":"client-lint","parents":["990d4c614f86abed5f99d4ea8d5a85a3a4e62b0b"],"secs":152,"stamp":"3e21d037513ef485c6dd7c1c9cba8573","tree":"6ccf9690d7cfec5123e66c1522101bb9b9d65764","v":1,"via":"run"}
Ci-Attestation: {"at":1795941798,"gate":"rust/aarch64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"b2a1cdc24c8d3a28bfe9ddbc9a9db7b8674bff35313d74f259cb3138bce6262f","lane":"client-lint","parents":["990d4c614f86abed5f99d4ea8d5a85a3a4e62b0b"],"secs":152,"stamp":"30579ca2a4a13794b79a690afa338662","tree":"6ccf9690d7cfec5123e66c1522101bb9b9d65764","v":1,"via":"run"}
Ci-Attestation: {"at":1795941798,"gate":"rust/x86_64-apple-darwin/client-clippy","host":"linux-x86_64","key":"b2a1cdc24c8d3a28bfe9ddbc9a9db7b8674bff35313d74f259cb3138bce6262f","lane":"client-lint","parents":["990d4c614f86abed5f99d4ea8d5a85a3a4e62b0b"],"secs":152,"stamp":"3f2e027696b474bc5e7a6ecfa725001c","tree":"6ccf9690d7cfec5123e66c1522101bb9b9d65764","v":1,"via":"run"}
Ci-Attestation: {"at":1795941798,"gate":"rust/x86_64-apple-darwin/client-dylint","host":"linux-x86_64","key":"b2a1cdc24c8d3a28bfe9ddbc9a9db7b8674bff35313d74f259cb3138bce6262f","lane":"client-lint","parents":["990d4c614f86abed5f99d4ea8d5a85a3a4e62b0b"],"secs":152,"stamp":"ff382636e23c1bfd5147a48b0ca71bdc","tree":"6ccf9690d7cfec5123e66c1522101bb9b9d65764","v":1,"via":"run"}
Ci-Attestation: {"at":1795941798,"gate":"rust/x86_64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"b2a1cdc24c8d3a28bfe9ddbc9a9db7b8674bff35313d74f259cb3138bce6262f","lane":"client-lint","parents":["990d4c614f86abed5f99d4ea8d5a85a3a4e62b0b"],"secs":152,"stamp":"cece41590bd0af3053b5faf8c7801533","tree":"6ccf9690d7cfec5123e66c1522101bb9b9d65764","v":1,"via":"run"}
Ci-Attestation: {"at":1795941798,"gate":"rust/x86_64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"b2a1cdc24c8d3a28bfe9ddbc9a9db7b8674bff35313d74f259cb3138bce6262f","lane":"client-lint","parents":["990d4c614f86abed5f99d4ea8d5a85a3a4e62b0b"],"secs":152,"stamp":"40445439036a2f9a4839d940e92e22aa","tree":"6ccf9690d7cfec5123e66c1522101bb9b9d65764","v":1,"via":"run"}
Ci-Attestation: {"at":1795941798,"gate":"rust/x86_64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"b2a1cdc24c8d3a28bfe9ddbc9a9db7b8674bff35313d74f259cb3138bce6262f","lane":"client-lint","parents":["990d4c614f86abed5f99d4ea8d5a85a3a4e62b0b"],"secs":152,"stamp":"9c9d0cbace2de8bdbcb510d23f4d20b9","tree":"6ccf9690d7cfec5123e66c1522101bb9b9d65764","v":1,"via":"run"}
Ci-Attestation: {"at":1795941798,"gate":"rust/x86_64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"b2a1cdc24c8d3a28bfe9ddbc9a9db7b8674bff35313d74f259cb3138bce6262f","lane":"client-lint","parents":["990d4c614f86abed5f99d4ea8d5a85a3a4e62b0b"],"secs":152,"stamp":"00e3ad58a1cccea50374d47db9fc48d7","tree":"6ccf9690d7cfec5123e66c1522101bb9b9d65764","v":1,"via":"run"}
async_tick(), filter_frame() and get_closest_frame() are now the safe core
in obs-source::async_tick over a Host trait, exported as the hidden
async_tick() in obs-source::ffi::source_async_tick (rust-hidden.d). The
fields, async_mutex, the queue, the frame refs and the calls of
remove_async_frame(), deinterlace_process_last_frame(),
filter_async_video() and set_async_texture_size() stay C, one access per
adapter, in obs-source-async-tick-fields.c.h (live group core-source, no
EXPORT). The original moves to the reference-only group
libobs.ported-source-async-tick.

Tier 3 runs the original C in obs-c-oracle against the Rust export over a
grid of routes, held frames, queues of 0 to 40, both clocks, filter chains,
texture results and deinterlace scripts plus a proptest, with clobbers that
rewrite fields mid-call, and rejects eight mutants. No intentional
differences.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Ci-Attestation: {"at":1795947558,"gate":"data/all/compatibility","host":"linux-x86_64","key":"","lane":"client-checks","parents":["573d406978d48d75b4e4c98bb77b6b10509d0f5a"],"secs":76,"stamp":"c8720ef9daff0585756f154640959a94","tree":"d07cbde3f624e2c86dc8ee67abb8213fb5185baa","v":1,"via":"run"}
Ci-Attestation: {"at":1795947558,"gate":"data/all/flatpak-manifest","host":"linux-x86_64","key":"","lane":"client-checks","parents":["573d406978d48d75b4e4c98bb77b6b10509d0f5a"],"secs":76,"stamp":"65fb2b846fa0202a930756ba45fab9a3","tree":"d07cbde3f624e2c86dc8ee67abb8213fb5185baa","v":1,"via":"run"}
Ci-Attestation: {"at":1795947558,"gate":"data/all/qt-xml","host":"linux-x86_64","key":"","lane":"client-checks","parents":["573d406978d48d75b4e4c98bb77b6b10509d0f5a"],"secs":76,"stamp":"d24a2c6bfc3a75c55b37f34ea9b3cc62","tree":"d07cbde3f624e2c86dc8ee67abb8213fb5185baa","v":1,"via":"run"}
Ci-Attestation: {"at":1795947558,"gate":"data/all/services-schema","host":"linux-x86_64","key":"","lane":"client-checks","parents":["573d406978d48d75b4e4c98bb77b6b10509d0f5a"],"secs":76,"stamp":"7ad491d7e8effe2a21c2c4c002009845","tree":"d07cbde3f624e2c86dc8ee67abb8213fb5185baa","v":1,"via":"run"}
Ci-Attestation: {"at":1795947481,"gate":"general/all/client-lint","host":"linux-x86_64","key":"b09bf2162a7a0d96d4e0f6b338d456f736f59b0fe3ec15206e4ba2b74c045b07","lane":"client-lint","parents":["573d406978d48d75b4e4c98bb77b6b10509d0f5a"],"secs":125,"stamp":"d4d9195d3e01b7c8d73e68d5c1797a41","tree":"d07cbde3f624e2c86dc8ee67abb8213fb5185baa","v":1,"via":"run"}
Ci-Attestation: {"at":1795947558,"gate":"python/all/self-test","host":"linux-x86_64","key":"","lane":"client-checks","parents":["573d406978d48d75b4e4c98bb77b6b10509d0f5a"],"secs":76,"stamp":"591e501b668d95a86df7e609160e092b","tree":"d07cbde3f624e2c86dc8ee67abb8213fb5185baa","v":1,"via":"run"}
Ci-Attestation: {"at":1795947481,"gate":"rust/aarch64-apple-darwin/client-clippy","host":"linux-x86_64","key":"b09bf2162a7a0d96d4e0f6b338d456f736f59b0fe3ec15206e4ba2b74c045b07","lane":"client-lint","parents":["573d406978d48d75b4e4c98bb77b6b10509d0f5a"],"secs":125,"stamp":"52dc5914216995e822cd8273c07a081e","tree":"d07cbde3f624e2c86dc8ee67abb8213fb5185baa","v":1,"via":"run"}
Ci-Attestation: {"at":1795947481,"gate":"rust/aarch64-apple-darwin/client-dylint","host":"linux-x86_64","key":"b09bf2162a7a0d96d4e0f6b338d456f736f59b0fe3ec15206e4ba2b74c045b07","lane":"client-lint","parents":["573d406978d48d75b4e4c98bb77b6b10509d0f5a"],"secs":125,"stamp":"c583b07e3d1910e6af9307235101f18b","tree":"d07cbde3f624e2c86dc8ee67abb8213fb5185baa","v":1,"via":"run"}
Ci-Attestation: {"at":1795947481,"gate":"rust/aarch64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"b09bf2162a7a0d96d4e0f6b338d456f736f59b0fe3ec15206e4ba2b74c045b07","lane":"client-lint","parents":["573d406978d48d75b4e4c98bb77b6b10509d0f5a"],"secs":125,"stamp":"6effe9a1961e46165d41a44655beec5d","tree":"d07cbde3f624e2c86dc8ee67abb8213fb5185baa","v":1,"via":"run"}
Ci-Attestation: {"at":1795947481,"gate":"rust/aarch64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"b09bf2162a7a0d96d4e0f6b338d456f736f59b0fe3ec15206e4ba2b74c045b07","lane":"client-lint","parents":["573d406978d48d75b4e4c98bb77b6b10509d0f5a"],"secs":125,"stamp":"f4aceefa765106070857ace3e641320a","tree":"d07cbde3f624e2c86dc8ee67abb8213fb5185baa","v":1,"via":"run"}
Ci-Attestation: {"at":1795947481,"gate":"rust/aarch64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"b09bf2162a7a0d96d4e0f6b338d456f736f59b0fe3ec15206e4ba2b74c045b07","lane":"client-lint","parents":["573d406978d48d75b4e4c98bb77b6b10509d0f5a"],"secs":125,"stamp":"389b159dee34c07f9cef6be22946e307","tree":"d07cbde3f624e2c86dc8ee67abb8213fb5185baa","v":1,"via":"run"}
Ci-Attestation: {"at":1795947481,"gate":"rust/aarch64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"b09bf2162a7a0d96d4e0f6b338d456f736f59b0fe3ec15206e4ba2b74c045b07","lane":"client-lint","parents":["573d406978d48d75b4e4c98bb77b6b10509d0f5a"],"secs":125,"stamp":"5a70dd979ef4017c4eea24f915076d8e","tree":"d07cbde3f624e2c86dc8ee67abb8213fb5185baa","v":1,"via":"run"}
Ci-Attestation: {"at":1795947481,"gate":"rust/x86_64-apple-darwin/client-clippy","host":"linux-x86_64","key":"b09bf2162a7a0d96d4e0f6b338d456f736f59b0fe3ec15206e4ba2b74c045b07","lane":"client-lint","parents":["573d406978d48d75b4e4c98bb77b6b10509d0f5a"],"secs":125,"stamp":"ddf0191c0ea97e1fc18307d7d6d50596","tree":"d07cbde3f624e2c86dc8ee67abb8213fb5185baa","v":1,"via":"run"}
Ci-Attestation: {"at":1795947481,"gate":"rust/x86_64-apple-darwin/client-dylint","host":"linux-x86_64","key":"b09bf2162a7a0d96d4e0f6b338d456f736f59b0fe3ec15206e4ba2b74c045b07","lane":"client-lint","parents":["573d406978d48d75b4e4c98bb77b6b10509d0f5a"],"secs":125,"stamp":"59a830295976a0525c94b1d1c17e0c2d","tree":"d07cbde3f624e2c86dc8ee67abb8213fb5185baa","v":1,"via":"run"}
Ci-Attestation: {"at":1795947481,"gate":"rust/x86_64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"b09bf2162a7a0d96d4e0f6b338d456f736f59b0fe3ec15206e4ba2b74c045b07","lane":"client-lint","parents":["573d406978d48d75b4e4c98bb77b6b10509d0f5a"],"secs":125,"stamp":"adc5445530d4d12a5e3c0e06ce28d444","tree":"d07cbde3f624e2c86dc8ee67abb8213fb5185baa","v":1,"via":"run"}
Ci-Attestation: {"at":1795947481,"gate":"rust/x86_64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"b09bf2162a7a0d96d4e0f6b338d456f736f59b0fe3ec15206e4ba2b74c045b07","lane":"client-lint","parents":["573d406978d48d75b4e4c98bb77b6b10509d0f5a"],"secs":125,"stamp":"943e6fe41775efdc4427a322a726eb05","tree":"d07cbde3f624e2c86dc8ee67abb8213fb5185baa","v":1,"via":"run"}
Ci-Attestation: {"at":1795947481,"gate":"rust/x86_64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"b09bf2162a7a0d96d4e0f6b338d456f736f59b0fe3ec15206e4ba2b74c045b07","lane":"client-lint","parents":["573d406978d48d75b4e4c98bb77b6b10509d0f5a"],"secs":125,"stamp":"5e66eae392aa8478ae6a385890f7d791","tree":"d07cbde3f624e2c86dc8ee67abb8213fb5185baa","v":1,"via":"run"}
Ci-Attestation: {"at":1795947481,"gate":"rust/x86_64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"b09bf2162a7a0d96d4e0f6b338d456f736f59b0fe3ec15206e4ba2b74c045b07","lane":"client-lint","parents":["573d406978d48d75b4e4c98bb77b6b10509d0f5a"],"secs":125,"stamp":"6dc8b246741786d6eab505acca5352ef","tree":"d07cbde3f624e2c86dc8ee67abb8213fb5185baa","v":1,"via":"run"}
Ci-Attestation: {"at":1795947896,"gate":"rust/x86_64-unknown-linux-gnu/client-test","host":"linux-x86_64","key":"a34292fa51628aae94534600abcf5242db5031fbdd8a04c7f3eb17fc76692c34","lane":"client-test-x86_64-unknown-linux-gnu","parents":["573d406978d48d75b4e4c98bb77b6b10509d0f5a"],"secs":337,"stamp":"7ab371d15fe101ab97ee90feaebd9d89","tree":"d07cbde3f624e2c86dc8ee67abb8213fb5185baa","v":1,"via":"run"}

Client-Checks: {"checks":{"base":"14773a296642f2f7b1c83d9a6e0438a110c2f9e2","coverage":"all-tracked-applicable-files","diff":["libobs/build/libobs.core-source+.h.c","libobs/build/libobs.ported-source-async-tick+.h.c","libobs/build/ported-source-sets/source-async-tick.json","libobs/cmake/rust-hidden.d/obs-source-source_async_tick.txt","libobs/obs-source-async-tick-fields.c.h","libobs/obs-source-async-tick.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_filter_swap_is_registered.rs","rust/obs-build/tests/native/registration/canonical_source_async_tick_swap_is_registered.rs","rust/obs-c-oracle/oracle.d/source-async-tick.list","rust/obs-c-oracle/oracle/source_async_tick.c","rust/obs-source/src/async_tick.rs","rust/obs-source/src/ffi/mod.rs","rust/obs-source/src/ffi/source_async_tick.rs","rust/obs-source/src/lib.rs","rust/obs-source/tests/source/async_tick.rs","rust/obs-source/tests/source/async_tick_parity.rs","rust/obs-source/tests/source/main.rs","test/cmocka/build/test-graph.json","test/cmocka/test_source_async_tick_entry.c","test/cmocka/tests.d/test_source_async_tick_entry.cmake"],"head":"70a4279efaf9cdbf3aa6cd47d17a0282a86556ce","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":"04ccaf3b18dca31a3a6baf12b0d3530ab8f788565fe6221a032bd7304f382e85","tree":"d07cbde3f624e2c86dc8ee67abb8213fb5185baa"}}
@rdoupe
rdoupe force-pushed the port/5929-async-tick branch from 1eeba27 to d6501c2 Compare November 29, 2026 10:25
@rdoupe

rdoupe commented Nov 29, 2026

Copy link
Copy Markdown
Collaborator Author

Rebased onto master (14773a2). The previous run's Windows links failed in obs-util's lib test and obs-tests-codec: COFF pulled the oracle's source_video_tick_callbacks.o into them (it defines the UCRT inline _snprintf), which needs libobs signal symbols those binaries don't link. On the rebased head soldr cargo test --workspace --no-run --locked --target x86_64-pc-windows-msvc exits 0 locally with no undefined symbols, and soldr cargo test -p obs-data --test obs-tests-core --locked -- async_tick passes 22/22. The Fast Gate red was a 90 s timeout in test_local_gate_probe, not a test failure. Waiting on the new CI run.

…nly (Refs #5929)

The UCRT headers define _snprintf and friends inline in every object, so
a COFF link can pick this member for them in a test that never calls it,
and it then needs libobs signal and data symbols obs-tests-codec and
obs-util's lib test don't link. Windows Link Check and the wine Rust
tests failed that way on this PR's archive order.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ci-Attestation: {"at":1795949184,"gate":"data/all/compatibility","host":"linux-x86_64","key":"","lane":"client-checks","parents":["d6501c24d69b23980de408ce4a85282e6d46cafe"],"secs":76,"stamp":"006c35488eacf4ccf247e35899d8eaba","tree":"f1749873825a66453ce37682e4f521ff554ad25e","v":1,"via":"run"}
Ci-Attestation: {"at":1795949184,"gate":"data/all/flatpak-manifest","host":"linux-x86_64","key":"","lane":"client-checks","parents":["d6501c24d69b23980de408ce4a85282e6d46cafe"],"secs":76,"stamp":"83626f75a39bf078b29ca4a25934f7f7","tree":"f1749873825a66453ce37682e4f521ff554ad25e","v":1,"via":"run"}
Ci-Attestation: {"at":1795949184,"gate":"data/all/qt-xml","host":"linux-x86_64","key":"","lane":"client-checks","parents":["d6501c24d69b23980de408ce4a85282e6d46cafe"],"secs":76,"stamp":"61b127ca73ab94ddb244aa5300d9c6ea","tree":"f1749873825a66453ce37682e4f521ff554ad25e","v":1,"via":"run"}
Ci-Attestation: {"at":1795949184,"gate":"data/all/services-schema","host":"linux-x86_64","key":"","lane":"client-checks","parents":["d6501c24d69b23980de408ce4a85282e6d46cafe"],"secs":76,"stamp":"054740df86feef7d71a265771130ff12","tree":"f1749873825a66453ce37682e4f521ff554ad25e","v":1,"via":"run"}
Ci-Attestation: {"at":1795949108,"gate":"general/all/client-lint","host":"linux-x86_64","key":"962400aae9cc543bce1866ab1a7bc72a2b09bee309e4f8e0f937d8f7f09eb4b2","lane":"client-lint","parents":["d6501c24d69b23980de408ce4a85282e6d46cafe"],"secs":45,"stamp":"6ae31c6f0bf96cd20a1f66af58c32211","tree":"f1749873825a66453ce37682e4f521ff554ad25e","v":1,"via":"run"}
Ci-Attestation: {"at":1795949184,"gate":"python/all/self-test","host":"linux-x86_64","key":"","lane":"client-checks","parents":["d6501c24d69b23980de408ce4a85282e6d46cafe"],"secs":76,"stamp":"ff0e8c84f5a107dc57e857e257ea6ce1","tree":"f1749873825a66453ce37682e4f521ff554ad25e","v":1,"via":"run"}
Ci-Attestation: {"at":1795949108,"gate":"rust/aarch64-apple-darwin/client-clippy","host":"linux-x86_64","key":"962400aae9cc543bce1866ab1a7bc72a2b09bee309e4f8e0f937d8f7f09eb4b2","lane":"client-lint","parents":["d6501c24d69b23980de408ce4a85282e6d46cafe"],"secs":45,"stamp":"75e2f573889f39ecc7146911c9e2338f","tree":"f1749873825a66453ce37682e4f521ff554ad25e","v":1,"via":"run"}
Ci-Attestation: {"at":1795949108,"gate":"rust/aarch64-apple-darwin/client-dylint","host":"linux-x86_64","key":"962400aae9cc543bce1866ab1a7bc72a2b09bee309e4f8e0f937d8f7f09eb4b2","lane":"client-lint","parents":["d6501c24d69b23980de408ce4a85282e6d46cafe"],"secs":45,"stamp":"ed6bd001909eb3937f7d5c245ae64349","tree":"f1749873825a66453ce37682e4f521ff554ad25e","v":1,"via":"run"}
Ci-Attestation: {"at":1795949108,"gate":"rust/aarch64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"962400aae9cc543bce1866ab1a7bc72a2b09bee309e4f8e0f937d8f7f09eb4b2","lane":"client-lint","parents":["d6501c24d69b23980de408ce4a85282e6d46cafe"],"secs":45,"stamp":"80b6de823812bb11a0ac97cdec74151c","tree":"f1749873825a66453ce37682e4f521ff554ad25e","v":1,"via":"run"}
Ci-Attestation: {"at":1795949108,"gate":"rust/aarch64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"962400aae9cc543bce1866ab1a7bc72a2b09bee309e4f8e0f937d8f7f09eb4b2","lane":"client-lint","parents":["d6501c24d69b23980de408ce4a85282e6d46cafe"],"secs":45,"stamp":"25e72ec37d1cb50e9c358f885876b6a8","tree":"f1749873825a66453ce37682e4f521ff554ad25e","v":1,"via":"run"}
Ci-Attestation: {"at":1795949108,"gate":"rust/aarch64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"962400aae9cc543bce1866ab1a7bc72a2b09bee309e4f8e0f937d8f7f09eb4b2","lane":"client-lint","parents":["d6501c24d69b23980de408ce4a85282e6d46cafe"],"secs":45,"stamp":"0ce5f4776768e2d2b55d8576228f1943","tree":"f1749873825a66453ce37682e4f521ff554ad25e","v":1,"via":"run"}
Ci-Attestation: {"at":1795949108,"gate":"rust/aarch64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"962400aae9cc543bce1866ab1a7bc72a2b09bee309e4f8e0f937d8f7f09eb4b2","lane":"client-lint","parents":["d6501c24d69b23980de408ce4a85282e6d46cafe"],"secs":45,"stamp":"b43b91917a8e7f410959da05726930c7","tree":"f1749873825a66453ce37682e4f521ff554ad25e","v":1,"via":"run"}
Ci-Attestation: {"at":1795949108,"gate":"rust/x86_64-apple-darwin/client-clippy","host":"linux-x86_64","key":"962400aae9cc543bce1866ab1a7bc72a2b09bee309e4f8e0f937d8f7f09eb4b2","lane":"client-lint","parents":["d6501c24d69b23980de408ce4a85282e6d46cafe"],"secs":45,"stamp":"1702a9d34539c3167960dc997cec61cc","tree":"f1749873825a66453ce37682e4f521ff554ad25e","v":1,"via":"run"}
Ci-Attestation: {"at":1795949108,"gate":"rust/x86_64-apple-darwin/client-dylint","host":"linux-x86_64","key":"962400aae9cc543bce1866ab1a7bc72a2b09bee309e4f8e0f937d8f7f09eb4b2","lane":"client-lint","parents":["d6501c24d69b23980de408ce4a85282e6d46cafe"],"secs":45,"stamp":"3b42e145edea0a9ca019374c0fcc54c1","tree":"f1749873825a66453ce37682e4f521ff554ad25e","v":1,"via":"run"}
Ci-Attestation: {"at":1795949108,"gate":"rust/x86_64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"962400aae9cc543bce1866ab1a7bc72a2b09bee309e4f8e0f937d8f7f09eb4b2","lane":"client-lint","parents":["d6501c24d69b23980de408ce4a85282e6d46cafe"],"secs":45,"stamp":"faac719e64b22820da052b4925ce5b44","tree":"f1749873825a66453ce37682e4f521ff554ad25e","v":1,"via":"run"}
Ci-Attestation: {"at":1795949108,"gate":"rust/x86_64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"962400aae9cc543bce1866ab1a7bc72a2b09bee309e4f8e0f937d8f7f09eb4b2","lane":"client-lint","parents":["d6501c24d69b23980de408ce4a85282e6d46cafe"],"secs":45,"stamp":"24c4df2222ddaafa102b32b84f3ed738","tree":"f1749873825a66453ce37682e4f521ff554ad25e","v":1,"via":"run"}
Ci-Attestation: {"at":1795949108,"gate":"rust/x86_64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"962400aae9cc543bce1866ab1a7bc72a2b09bee309e4f8e0f937d8f7f09eb4b2","lane":"client-lint","parents":["d6501c24d69b23980de408ce4a85282e6d46cafe"],"secs":45,"stamp":"66311ec066e97dc3566c0223e9980af3","tree":"f1749873825a66453ce37682e4f521ff554ad25e","v":1,"via":"run"}
Ci-Attestation: {"at":1795949108,"gate":"rust/x86_64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"962400aae9cc543bce1866ab1a7bc72a2b09bee309e4f8e0f937d8f7f09eb4b2","lane":"client-lint","parents":["d6501c24d69b23980de408ce4a85282e6d46cafe"],"secs":45,"stamp":"95ab669c04be23f6c63cda4edcf74bae","tree":"f1749873825a66453ce37682e4f521ff554ad25e","v":1,"via":"run"}
Ci-Attestation: {"at":1795949430,"gate":"rust/x86_64-unknown-linux-gnu/client-test","host":"linux-x86_64","key":"09334eada25784ac2005f87c93bc40872c9c5c75ab8a5197ecd2313dc0a19ee9","lane":"client-test-x86_64-unknown-linux-gnu","parents":["d6501c24d69b23980de408ce4a85282e6d46cafe"],"secs":245,"stamp":"f17d2a98d649c074733d298bed65d891","tree":"f1749873825a66453ce37682e4f521ff554ad25e","v":1,"via":"run"}

Client-Checks: {"checks":{"base":"14773a296642f2f7b1c83d9a6e0438a110c2f9e2","coverage":"all-tracked-applicable-files","diff":["libobs/build/libobs.core-source+.h.c","libobs/build/libobs.ported-source-async-tick+.h.c","libobs/build/ported-source-sets/source-async-tick.json","libobs/cmake/rust-hidden.d/obs-source-source_async_tick.txt","libobs/obs-source-async-tick-fields.c.h","libobs/obs-source-async-tick.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_filter_swap_is_registered.rs","rust/obs-build/tests/native/registration/canonical_source_async_tick_swap_is_registered.rs","rust/obs-c-oracle/oracle.d/source-async-tick.list","rust/obs-c-oracle/oracle/source_async_tick.c","rust/obs-c-oracle/oracle/source_video_tick_callbacks.c","rust/obs-source/src/async_tick.rs","rust/obs-source/src/ffi/mod.rs","rust/obs-source/src/ffi/source_async_tick.rs","rust/obs-source/src/lib.rs","rust/obs-source/tests/source/async_tick.rs","rust/obs-source/tests/source/async_tick_parity.rs","rust/obs-source/tests/source/main.rs","test/cmocka/build/test-graph.json","test/cmocka/test_source_async_tick_entry.c","test/cmocka/tests.d/test_source_async_tick_entry.cmake"],"head":"778aa2cb76801de3fbe55b98c42e5975a25f3932","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":"9e614f0daf2c21ee8180ff4904f767841fe8028deb98eb2a78d9090a4ff77eec","tree":"f1749873825a66453ce37682e4f521ff554ad25e"}}
@rdoupe

rdoupe commented Nov 29, 2026

Copy link
Copy Markdown
Collaborator Author

The last run's Windows links still failed the same way: obs-tests-codec and obs-util's lib test pulled source_video_tick_callbacks.o for the inline UCRT _snprintf and then needed signal and data symbols they don't link (run 46252220850). My earlier local link passing didn't prove anything: about 427 oracle members export that inline _snprintf, and the archive order here picks a different, harmless one, so this host can't reproduce CI's choice.

5461071 adds _NO_CRT_STDIO_INLINE to that member, the same fix as load_sources.c and output_get_name.c. Checked with llvm-nm --defined-only -A libobs_c_oracle.a on the x86_64-pc-windows-msvc oracle archive. Before, source_video_tick_callbacks.o has T _snprintf, T _vsnprintf, T _vsprintf_l and T __local_stdio_printf_options. After, it has none of them. OBS_CMOCKA_LINK=false soldr cargo test -p obs-nvenc -p obs-util --no-run --locked --target x86_64-pc-windows-msvc links. ./lint passes. Waiting on CI.

@rdoupe
rdoupe marked this pull request as ready for review November 29, 2026 11:36
@rdoupe
rdoupe added this pull request to the merge queue Nov 29, 2026

@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-tick.c.h, with the fields adapter and the hidden export through rust-hidden.d.
  • Tests: a new Tier 2 test_source_async_tick_entry.c, Tier 1 async_tick.rs, and Tier 3 async_tick_parity.rs against the oracle.
  • Registration: a canonical-swap registration test.
  • Rules: a Test cost line, and no existing C test or public header edited.
  • Windows (after #5919): there are no wide usize/u64 inputs and no util_mul_div64 on the path, so the MSVC _udiv128 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 async_tick and its filter_frame and get_closest_frame steps to obs-source

2 participants