Skip to content

libobs: characterize and extract the raw video callback entry points #5507

Closed

Description

@rdoupe

C-only prerequisite for the Phase 6 libobs core migration (#444): characterize the three public raw video callback entry points, obs_add_raw_video_callback, obs_add_raw_video_callback2 and obs_remove_raw_video_callback, then move them verbatim out of libobs/obs.c.h into one new libobs/obs-raw-video-callbacks.c.h, registered alphabetically in the core unity group (BUILD.md). They are the video counterpart of the raw audio pair (obs_remove_raw_audio_callback #4727/#5003, obs_add_raw_audio_callback #5502).

The internal helpers they call, start_raw_video and stop_raw_video, are shared with outputs and encoders and stay in obs.c.h (declared in obs-internal.h).

Existing coverage: test_main_mix_before_video pins the calls before the first obs_reset_video, and test_video_active pins the mix's raw_active count. Add a new test_raw_video_callbacks cmocka test against both hybrid libobs and libobs-c-reference, through the public API, observing registration synchronously (no frame waits). Pin: an add registers on the main canvas mix's video output; obs_add_raw_video_callback is obs_add_raw_video_callback2 with divisor 1; callback and param together are the identity; a removal takes out only its own pair and keeps the mix's active state right; removing a pair that was never added changes nothing; a conversion is accepted; after obs_reset_video a new add goes to the new mix.

No change to existing C tests, public headers, workflows or plugins/obs-websocket. The Rust swap is a separate follow-up after this lands.

Open issue/PR search for raw_video_callback found no competing work.

Activity

  1. added
    port
    on Nov 23, 2026
  2. rdoupe commented on Nov 23, 2026

    @rdoupe
    CollaboratorAuthor

    Claiming: #5507

    1. Characterization: new test_raw_video_callbacks cmocka test, run against hybrid libobs and libobs-c-reference, plus a mutation check that it catches a broken add or remove.
    2. Move the three entry points verbatim into libobs/obs-raw-video-callbacks.c.h, registered alphabetically in the core unity group. No behavior change.
    3. One PR, Refs libobs: characterize and extract the raw video callback entry points #5507; the Rust swap follows separately.
  3. added
    ready
    on Nov 23, 2026
  4. rdoupe commented on Nov 23, 2026

    @rdoupe
    CollaboratorAuthor

    Done in #5509. The Rust swap is #5514 (merged in #5516).

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

Metadata

Metadata

Assignees

Labels

portready

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions