Repository navigation
Description
Port exactly the five functions isolated by prerequisite #4768 from libobs/obs-output-weak-lifetime.c.h to obs-output: obs_weak_output_addref, obs_weak_output_release, obs_output_get_weak_output, obs_weak_output_get_output, and obs_weak_output_references_output.
Phase 6 core work; land #4768 before the Rust swap. The prerequisite branch is test/4768-output-weak-lifetime; the pool manager publishes it after native-graph serialization permits. Keep obs_output_get_ref, the existing shared atomic primitives, allocator ABI, and output creation/destruction outside this unit. Preserve the private get_weak dependency through a real private adapter if needed. This unit is disjoint from #4755 / #4762 (obs_get_output_source).
The existing C characterization is test/cmocka/test_output_weak_lifetime.c, registered once in the native test graph. Preserve its assertions and leave it and public headers unchanged. It pins NULL handling, owners-minus-one counter semantics, weak acquisition/addref/release and final freeing, live strong promotion, expired promotion, stored-pointer identity independent of expiry, and a real output's lifetime across promoted and external weak owners. Existing test_obs_enum_outputs_removal.c remains regression coverage.
Follow the testing policy: RED Tier 1 tests against a stub in the existing Core state category (obs-tests-core), then GREEN safe Rust core and thin ABI shims; layout and Tier 3 differential coverage against the retained C implementation, including a mutation check. Keep allocation compatible with bmalloc/bfree, reference synchronization and C ABI intact, add genuine link support for any new C adapters, and run unchanged Tier 2 tests against hybrid libobs and libobs-c-reference plus symbol parity. Tier 4 does not apply to this local lifetime unit. Move only the extracted whole C file to a ported unity group when swapping it; do not change obs-websocket or unrelated output APIs.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
zackees commentedon Nov 12, 2026
Claiming: output weak-handle lifetime Rust swap on port/4778-weak-output-rust, stacked on test/4768-output-weak-lifetime at 49be903. 1. Commit RED Tier 1 characterization in obs-tests-core. 2. Port exactly the five weak-output functions with existing atomic primitives and allocation ABI, add layout/differential and real adapter link support. 3. Run focused tiers, mutation check, formatting and full lint, then push branch only for the landing worker; no PR in this assignment.
rdoupe commentedon Nov 16, 2026
@zackees are you still on this one? It was claimed on 2026-11-12, and
port/4778-weak-output-rusthas finished-looking commits from 2026-11-12 but no PR. If you've moved on, I can rebase that branch onto master, check it, and open the PR under your commits. I'll wait a day before taking it.zackees commentedon Nov 16, 2026
Releasing #4778 — handing it to @rdoupe. There's a partial branch you're welcome to reuse or ignore:
port/4778-weak-output-rust. Thanks for picking it up!rdoupe commentedon Nov 17, 2026
Claiming: #4778. Thanks @zackees. I'll reuse the RED and GREEN commits from
port/4778-weak-output-rust(the extraction half is already on master via #4824), rebase them onto master and check them against the testing policy:obs-tests-coreagainst stubs for the five weak-output functions.test_output_weak_lifetimeagainst hybrid libobs and the C reference.Refs #4778.rdoupe commentedon Nov 18, 2026
Done by #4942 (merged 2026-11-17): the five output weak-handle functions come from
obs-outputon master (rust-exports.d/obs-output-output_weak_lifetime.txt).obs-output: Port the output weak-handle lifetime (Refs obs-rust#4778) (…