You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
rust: Port the encoder size and info choices in obs-encoder.c to obs-output #2134
Port the encoder size and info choices in libobs/obs-encoder.c.h to rust/obs-output, as a new module encoder_size next to encoder_roi. These decisions move:
get_audio_info: an unknown format, sample rate or channel layout defaults to the mix's.
get_video_info: the scaled size, and the OBS_ENCODER_CAP_SCALING override that comes after the plugin's get_video_info.
obs_encoder_set_scaled_size:
the refusals: not a video encoder, active, or initialized;
the rule that turns scaling off when the size matches the output.
obs_encoder_scaling_enabled, obs_encoder_get_width, obs_encoder_get_height and obs_encoder_get_sample_rate.
These stay in C:
the plugin callbacks, between the steps in their current order;
the warnings that name the encoder;
video_output_get_info and audio_output_get_info.
Plan (one PR, separate commits)
A behaviour-neutral move into libobs/obs-encoder-size.c.h, as hidden functions.
Characterization in test_encoder_size_steps. It covers:
every refusal;
the match rule with equal and unequal sizes, and with no video info;
the cap override with and without the cap;
the audio defaults with each field unknown;
the width and height with and without a scaled size or media.
RED, then GREEN: the safe Rust core plus shims, in a libobs.ported-encoder-size group. Exported symbols are unchanged.
Tier 3 parity against the original C: exhaustive over caps and flags, plus a proptest over full-range u32 sizes. Also a deliberate-break check and port_comparison numbers.
These real-libobs tests must stay green on every lane:
Activity
rdoupe commentedon Oct 24, 2026
Claiming: #2134.
obs-output: Port the encoder size and info choices (obs-rust#2148)