Skip to content

rust: Port the encoder binding checks in obs-encoder.c to Rust #2496

Closed

Description

@rdoupe

Rust port, round 9 unit 5: the encoder media binding and shutdown checks in libobs/obs-encoder.c.h, moved to Rust.

Scope

Rust takes over these decisions:

  • obs_encoder_set_video / obs_encoder_set_audio: the type, active and initialized gates;
  • encoder_set_video: the timebase from the video info, and whether the frame-rate divisor override is created;
  • the audio timebase in obs_encoder_set_audio (C reads the sample rate);
  • obs_encoder_video, obs_encoder_parent_video, obs_encoder_audio: the type gates and the fps-override choice;
  • obs_encoder_shutdown: whether there is anything to destroy, and the resets;
  • obs_encoder_shutdown_unstarted: shut down only when initialized and not needed;
  • obs_encoder_unbind_video / obs_encoder_rebind_video: the video-type gate, the bound result of C's walk, the active gate, shutdown when initialized, and the rebind gate.

C keeps the init and outputs mutexes and both trylocks (passing their results), the walks over the videos and the outputs, info.destroy, the core video mix clear, the paired-encoder releases, obs_encoder_set_last_error, the frame-rate divisor create and free, the video and audio info reads, and the logs.

Plan

The standard six commits:

  1. move;
  2. characterization test;
  3. Tier 1 RED;
  4. GREEN in a libobs.ported-* group;
  5. Tier 3 parity;
  6. docs.

Activity

  1. added
    ready
    on Oct 26, 2026
  2. rdoupe commented on Oct 26, 2026

    @rdoupe
    CollaboratorAuthor

    Claiming: #2496 (round 9 unit 5, encoder binding checks).

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

Metadata

Metadata

Assignees

Labels

ready

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions