Skip to content

rust: port extracted obs_canvas_clear_mix orchestration to obs-core #5326

Closed

Description

@zackees

Follow-up to the C-only obs_canvas_clear_mix characterization/extraction prerequisite #5324. Wait for that prerequisite to merge before beginning the Rust swap.

Port the extracted libobs/obs-canvas-clear-mix.c.h to obs-core while preserving the private API and exact orchestration: no-mix early return; acquire the mixes mutex; remove and free the first pointer-equal registered mix while holding the lock; stop scanning; unlock; then clear canvas->mix even when the mix is not registered. Preserve canvas/source strong and weak references and every unrelated field. NULL canvas is outside the existing C valid domain; no new behavior is requested.

Keep the new cmocka characterization immutable. Its source-only recording boundary pins ownership and mutex/callback ordering without graphics/video threads; wire the Rust seam so those assertions can exercise the swap, and retain unchanged real reset/shutdown caller tests for downstream teardown. Add Tier 1 equivalents, layout/FFI checks and Tier 3 differential cases including empty, one, many, absent and duplicate-pointer lists. Use the existing Core state category binary. Tier 4 does not apply to this private non-protocol unit.

Move the whole extracted file into a ported unity group; use thin private adapters for C-owned list/mutex/video teardown where necessary, without moving orchestration into C. Check #5246's shared Rust-static support policy before adding adapters, and run native_build:: plus EVERY Linux and cross-host *_rust consumer if new private symbols are linked. No public-header, existing-C-test, WebSocket or workflow changes. No behavior change or features-ledger entry expected.

Activity

  1. added
    port
    P2
    size:S
    on Nov 20, 2026
  2. rdoupe commented on Nov 20, 2026

    @rdoupe
    Collaborator

    /ready

    Its prerequisite #5324 landed in #5335 (the extracted file is in the live core-source group on master).

  3. rdoupe commented on Nov 20, 2026

    @rdoupe
    Collaborator

    Claiming: Rust swap of obs_canvas_clear_mix on branch port/5310-canvas-video-info, batched with #5310 in one PR (its own RED then GREEN commit pair).

    1. RED: safe Tier 1 mirrors of the clear-mix characterization (empty, one, many, absent, duplicate-pointer lists; lock/free ordering) in the Core state binary.
    2. GREEN: Rust orchestration with thin private C adapters for the mixes list, mutex and obs_free_video_mix; C unit moved to a reference-only ported group; Tier 3 differential cases.
    3. Lint, open the PR this session, queue when green.
  4. added
    ready
    on Nov 20, 2026
  5. moved this from Triage to In progress in obs-rust Multiviewon Nov 20, 2026
  6. rdoupe commented on Nov 20, 2026

    @rdoupe
    Collaborator

    Done in #5360 (merged 2026-11-20 12:37 UTC): the obs_canvas_clear_mix orchestration now runs through safe Rust in obs-core; the C unit moved to its reference-only ported group. Master push run of the merge commit is green.

  7. moved this from In progress to Done in obs-rust Multiviewon Nov 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P2portreadysize:S

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions