Skip to content

test: Extract and characterize source audio-capture callback registration before Rust swap #5236

Closed

Description

@zackees

Characterize obs_source_add_audio_capture_callback and obs_source_remove_audio_capture_callback at libobs/obs-source.c.h:3923-3945 before their separate Phase 6 obs-source Rust swap. No implementing Rust ABI body exists; current Rust hits are consumers. Existing source-audio and volmeter tests do not pin registration's complete list/lock contract.

Use real obs-internal.h source and audio_cb_info layouts with native pointer alignment/padding and deterministic recording mutexes: invalid-source diagnostics, append order, duplicate callback/param pairs, first matching removal, absent/repeated removal, exact identities including NULL callback/param, balanced lock/unlock and no invocation. Keep the darray, mutex and allocator C-owned; no host device or audio thread.

Extract only the two wrappers verbatim to libobs/obs-source-audio-capture-callbacks.c.h in the sorted core-source unity group. Add the new C fixture, tests.d pointer and sorted canonical test graph, keeping inventories consistent. No Rust, public-header, existing-C-test or WebSocket edits.

Acceptance: original characterization then extraction RED/GREEN commits, new/unchanged source-audio/volmeter tests OFF/ON and export parity, whole native_build:: module, focused Linux build of the new target and EVERY *_rust target, Windows link check and separate Darwin pass if Windows fails, one full lint. Follow #5207, #5215 and #5232. Scope is distinct from rdoupe's #5228 weak-handle acquisition; check any open S-group PR with merge-tree. File the subsequent Rust swap separately.

Activity

  1. added
    portPort a C unit to Rust (four-tier policy)
    readyMeets the definition of Ready; claimable
    P2Normal priority
    on Nov 19, 2026
  2. zackees commented on Nov 19, 2026

    @zackees
    MemberAuthor

    Claiming: source audio-capture callback registration prerequisite in pool slot obs-studio5, branch test/5236-source-audio-capture. 1. Characterize the original C list, native callback-pair layout, diagnostics and recording mutex contract. 2. Commit extraction RED then behavior-neutral C GREEN. 3. Validate native_build, OFF/ON, every Linux *_rust target, cross links and one lint; publish subject to backpressure. First PR expected this session. Distinct from rdoupe’s #5228 weak-handle swap.

  3. zackees commented on Nov 19, 2026

    @zackees
    MemberAuthor

    Landed on master in #5242 (2ab5188): the source audio-capture callback registration is extracted and characterized. The Rust swap is #5243.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P2Normal priorityportPort a C unit to Rust (four-tier policy)readyMeets the definition of Ready; claimablesize:SHours

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions