Skip to content

rust: port extracted obs_source_get_output_flags to obs-source #5340

Closed

Description

@zackees

Phase 6 Lane S follow-up to the C characterization/extraction prerequisite #5338. Wait for that prerequisite to merge, then port only obs_source_get_output_flags from libobs/obs-source-output-flags.c.h into obs-source.

Preserve the public C signature, return exactly source->info.output_flags (not current instance flags, not default_flags), and preserve NULL returning zero with the existing LOG_DEBUG diagnostic. Check NULL before calling any private field adapter.

Keep the new test/cmocka/test_source_output_flags.c unchanged for Tier 2 against C reference and hybrid libobs; its external-build switch allows the separately linked implementation to run the same assertions. Mirror every assertion in safe Rust Tier 1; add an oracle wrapper around the extracted original, randomized Tier 3 differential tests, layout checks for any FFI types, and a mutation check. Use the existing Core state category binary. Tier 4 is inapplicable to this non-protocol getter. Move the extracted include to its own ported unity group, add per-unit registration/export fragments, and put real private adapter Rust-static support only in test/cmocka/build/rust-static-support.json, never per-target support files.

No public header, existing C test, WebSocket plugin, or workflow changes. The prerequisite PR is the C-only deliverable; this issue is intentionally unclaimed.

Activity

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

    @rdoupe
    Collaborator

    Claiming: investigation

    Checking that the prerequisite (#5338, PR #5352) has landed and the unit is ready to port.

  3. github-actions commented on Nov 20, 2026

    @github-actions

    Claim bot: @rdoupe, this can't be claimed yet: it is blocked by 1 open issue(s) (see "Blocked by" on the issue); claim it once they close.

  4. rdoupe commented on Nov 20, 2026

    @rdoupe
    Collaborator

    /ready

    The prerequisite landed in #5352 (#5338 is now closed): libobs/obs-source-output-flags.c.h and test/cmocka/test_source_output_flags.c are on master, and the issue body already states the acceptance and tiers.

  5. rdoupe commented on Nov 20, 2026

    @rdoupe
    Collaborator

    Claiming: port of obs_source_get_output_flags to obs-source

    1. RED: Tier 1 mirrors of the three cases of test_source_output_flags.c in obs-tests-core against a stub core.
    2. GREEN: safe core plus a thin shim that rejects NULL (logging the exact LOG_DEBUG line) before reading info.output_flags through the existing obs_source_audio_mixers_flags_field adapter, which every Rust-static consumer already links, so no new adapter or link support. The original moves to its own reference-only ported group.
    3. Tier 2: the unchanged test, plus a SOURCE_OUTPUT_FLAGS_EXTERNAL twin that calls the exported symbol of the real libobs (Rust in hybrid, C in the reference). Tier 3: oracle wrapper of the extracted original against the Rust export on noise-filled real-header sources, exact diagnostics, a proptest and a pinned truth table. Tier 4 does not apply.

    PR expected within the hour.

  6. added
    ready
    on Nov 20, 2026
  7. moved this from Blocked to In progress in obs-rust Multiviewon Nov 21, 2026
  8. rdoupe commented on Nov 21, 2026

    @rdoupe
    Collaborator

    Done in #5373 (merged 2026-11-21): obs_source_get_output_flags now runs through safe Rust in obs-source, with the NULL guard and its debug log kept; master push run is green.

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

Metadata

Metadata

Assignees

Labels

P3portreadysize:S

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions