Skip to content

rust: Port libobs/obs-get-video.c.h to obs-core #5354

Closed

Description

@zackees

Phase 6 follow-up to the C-only characterization/extraction prerequisite #5353. Wait for that prerequisite to merge before swapping the implementation.

Port obs_get_video from libobs/obs-get-video.c.h into the obs-core crate alongside the existing audio/main-canvas getters, keeping the public C API and ABI unchanged. The OBS core is required: do not add NULL-core tolerance. A NULL main canvas or missing mix returns NULL. A main canvas with a mix returns its current borrowed video_t * by identity with no reference acquisition or other mutation.

The prerequisite's test/cmocka/test_get_video.c pins the C source with controlled initialized state. Wire the unchanged assertions to the swapped symbol through a real private state seam, retaining C-reference coverage, rather than treating a C-source-only pass as Rust coverage. Add Tier 1 assertions 1:1, Tier 2 coverage against both hybrid libobs and libobs-c-reference, and Tier 3 differential coverage/mutation evidence. Tier 4 does not apply to this getter. Register real Rust-static link support only in test/cmocka/build/rust-static-support.json; do not add placeholder globals or aborting stubs. Move the extracted whole-file unity include to the appropriate ported group. Preserve existing C tests and public headers.

Activity

  1. added
    enhancement
    port
    ready
    P2
    size:S
    on Nov 20, 2026
  2. changed the title [-]rust: Port libobs/obs-get-video.c.h to the core state owner[/-] [+]rust: Port libobs/obs-get-video.c.h to obs-core[/+] on Nov 20, 2026
  3. rdoupe commented on Nov 21, 2026

    @rdoupe
    Collaborator

    Note from the prerequisite (#5419): the C characterization can't pin "NULL main canvas returns NULL", because the core global is hidden from test executables and no API reaches that state in a live core. Please cover it in this swap's Tier 1 and Tier 3 parity through the main-canvas field adapter.

  4. rdoupe commented on Nov 21, 2026

    @rdoupe
    Collaborator

    Claiming: this follows my extraction PR (#5419), which is in the merge queue now. I'll build on it the same way the obs_get_audio swap (#4810) did, and open the PR once #5419 lands.

  5. moved this from Ready to In progress in obs-rust Multiviewon Nov 21, 2026
  6. rdoupe commented on Nov 22, 2026

    @rdoupe
    Collaborator

    Done in #5421 (merged as ec9208d): obs_get_video now runs through obs-core, with Tier 1 mirrors, the oracle parity test and the existing cmocka coverage.

  7. moved this from In progress to Done in obs-rust Multiviewon Nov 22, 2026
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