Skip to content

rust: Port the encoder connection lifecycle in obs-encoder.c to Rust #2512

Closed

Description

@rdoupe

Rust port, round 9 unit 6: the encoder callback and connection lifecycle decisions in libobs/obs-encoder.c.h, moved to Rust.

Scope

Rust takes over these decisions:

  • obs_encoder_start_internal: no data or no media, first callback, whether the callback is added, and the keyframe request for a video encoder that gains an output while running;
  • obs_encoder_stop: whether the callback was found, whether it was the last, and whether the group is destroyed;
  • add_connection / remove_connection: audio connect, GPU encode or raw video, and the encoder group steps (LCM start, started count, ready, reset when the last one stops), shutdown only when asked;
  • gpu_encode_available: the texture cap and the mix's NV12/P010 textures;
  • full_stop: which outputs are force-stopped, and the early return for a texture encoder;
  • send_packet / send_first_video_packet: first video packet or plain, the keyframe wait, and whether SEI is prepended.

C keeps every mutex (init, callbacks, outputs, group), the darrays, the callback walk (C passes its result), audio connect and disconnect, GPU and raw video start and stop, the audio and video info, lcm, the ready-group add, shutdown, set_encoder_active, pause_reset, request_keyframe, the force stop, get_mix_for_video and the SEI copy.

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.

Posted after #2511 (same file).

Activity

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

    @rdoupe
    CollaboratorAuthor

    Claiming: #2512 (round 9 unit 6; posts after #2511).

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