Skip to content

rust: Port libobs/obs-raw-video-callbacks.c.h to obs-core #5514

Closed

Description

@rdoupe

Unit

libobs/obs-raw-video-callbacks.c.h (obs_add_raw_video_callback, obs_add_raw_video_callback2, obs_remove_raw_video_callback) to obs-core.

Phase and position

Phase 6 libobs core (#444). The video counterpart of the raw audio pair, already in Rust (obs_remove_raw_audio_callback #5003, obs_add_raw_audio_callback #5512).

Dependencies and existing tests

The extraction and characterization are #5509 (issue #5507): the three functions sit alone in libobs/obs-raw-video-callbacks.c.h, and test/cmocka/test_raw_video_callbacks.c pins them against hybrid libobs and libobs-c-reference; test_main_mix_before_video and test_video_active cover the before-first-reset and raw_active behavior. The callees are the main canvas's mix (obs->data.main_canvas->mix->video) and libobs' own start_raw_video / stop_raw_video (hidden, in obs.c.h, also used by outputs and encoders), which stay in C and are called across the boundary.

Notes

Preserve: obs_add_raw_video_callback is the divisor-1 form of _callback2; with no main canvas or no mix, the add logs its warning and keeps nothing, and the removal does nothing; otherwise exactly one call to start_raw_video / stop_raw_video on the mix's video_t with the conversion pointer, divisor, callback and param unchanged. No validation, locking or fallback added. Tier 1: every test_raw_video_callbacks case in the Core state binary. Tier 2: the unchanged cmocka tests against both libraries. Tier 3: the renamed original C against the Rust bridge with one start/stop recorder (arguments, call count), plus real-header layout checks of the boundary types. Tier 4 does not apply. No public header or existing C test changes. Its own ported group and export fragment, symbol parity kept.

Activity

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

    @rdoupe
    CollaboratorAuthor

    /ready

  3. added
    P2
    size:S
    on Nov 23, 2026
  4. rdoupe commented on Nov 23, 2026

    @rdoupe
    CollaboratorAuthor

    Claiming: the raw video callback Rust swap.

    1. RED: obs-core stub (todo!()) with the Tier 1 cases of test_raw_video_callbacks and the original-C Tier 3 parity test.
    2. GREEN: the port, its ported unity group and export fragment, README row.
      Stacked on libobs: characterize and extract the raw video callback entry points (Refs #5507) #5509 until it merges; one PR, expected this session.
  5. added
    ready
    on Nov 23, 2026
  6. added a commit that references this issue on Nov 29, 2026
    aa1ca3d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P2enhancementportreadysize:S

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions