Skip to content

rust: Port media-io/audio-resampler-ffmpeg.c.h glue to obs-media-io #4271

Closed

Description

@zackees

Unit

libobs/media-io/audio-resampler-ffmpeg.c.h:62-212: audio_resampler_create, audio_resampler_destroy, audio_resampler_set_compensation_error, audio_resampler_resample and the private update_compensation helper. Target crate: obs-media-io.

Phase and dependencies

Phase 5, media-io after graphics math. Blocked on landing the independent public-API C characterization from #4270 (branch test/4270-audio-resampler-api-characterization). Planning and drift decisions are already Rust; these public functions currently remain external C dependencies of rust/obs-media-io/src/ffi/audio_output.rs. The C file is already an isolated implementation unit.

Scope and test plan

Port wrapper ownership, buffer resize, delay/frame bookkeeping and conversion orchestration while retaining the actual libswresample/libavutil SIMD kernels. Do not replace swresample: preserve guard #3008. This is not the new own-clock compensation behavior proposed in #4182.

After #4270 lands: RED safe-core tests mirroring every C assertion, GREEN implementation with thin C ABI shims and FFmpeg calls confined to ffi, Tier 3 differential tests against the preserved C wrapper (including error paths and compensation), unchanged Tier 2 public API characterization against both libobs implementations, and symbol parity. Add modules to the existing Media I/O category harness; no extra Rust executable. Tier 4 is not applicable. No public header or existing C test changes; no intentional behavioral differences. Validate FFmpeg versions and host ownership constraints before selecting bindings.

Activity

  1. added
    enhancement
    port
    P2
    size:S
    on Nov 9, 2026
  2. zackees commented on Nov 9, 2026

    @zackees
    MemberAuthor

    Claiming: audio resampler FFmpeg wrapper Rust port (#4271), worker im-bo-sw-4271 in obs-studio4, branch port/4271-audio-resampler-ffmpeg stacked on test/4270-audio-resampler-api-characterization at 33aa34e.

    1. Mirror the prerequisite C assertions in the existing Media I/O harness and commit RED.
    2. Port ownership and orchestration to Rust while retaining FFmpeg SIMD, then add oracle differential coverage and validate GREEN.
    3. Push the branch only in this session; no PR until the manager drains the queue. Expected branch handoff this session.
  3. added
    ready
    on Nov 9, 2026
  4. moved this from Triage to In progress in obs-rust Multiviewon Nov 9, 2026
  5. moved this from In progress to Ready in obs-rust Multiviewon Nov 10, 2026
  6. zackees commented on Nov 17, 2026

    @zackees
    MemberAuthor

    Claiming: continuing the held audio resampler FFmpeg Rust swap on new branch port/4271-audio-resampler-ffmpeg-land in obs-studio2, after characterization PR #4928 merged. 1. Cherry-pick only the swap commits after 33aa34e, preserving the original branch and RED before GREEN. 2. Re-verify focused Rust tests, unchanged Tier 2 tests against both builds, differential parity, and lint on current master. 3. Publish and arm a head-pinned PR this session. Refs #4271.

  7. moved this from Ready to In progress in obs-rust Multiviewon Nov 17, 2026
  8. zackees commented on Nov 18, 2026

    @zackees
    MemberAuthor

    Landed on master in #4949 (b64d5e7); verified the merge is an ancestor of origin/master and rust/obs-media-io/src/audio_resampler.rs exists there.

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