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 obs_source_default_render to obs-source #5893
obs_source_default_render() (declared in libobs/obs.h, defined in libobs/obs-source.c.h) is still C. It draws a source with the core's default effect: the main render path calls it for sources without OBS_SOURCE_CUSTOM_DRAW, the Rust skip-video-filter and process-filter-begin ports call it through their adapters (obs-source-skip-video-filter-fields.c.h, obs-source-process-filter-begin-fields.c.h), and filter plugins call it through the C ABI (obs-filters GPU delay and scroll, nv-filters). Nothing in the issue list or open PRs covers it; #5827 and #2208 ported its callers, not it.
Behavior the port keeps:
Does nothing when source->context.data is NULL (a source whose create failed, or one being destroyed): no effect lookup, no technique begin.
Otherwise reads obs->video.default_effect, gets its "Draw" technique, calls gs_technique_begin() once, then for each pass gs_technique_begin_pass(tech, i), source_render(source, effect), gs_technique_end_pass(tech), and finally gs_technique_end(tech), in that order. Zero passes still begins and ends the technique.
No NULL check on source itself (callers pass a valid one), so a NULL source crashes as today.
Plan: move the body verbatim into its own libobs/obs-source-default-render.c.h in a live group, with source_render reached through a private seam; characterize it with a new cmocka case against hybrid libobs and the C reference (pass order, the zero-pass case, the NULL-data skip); then a safe core in obs-source over a trait (has data, default effect, technique, begin/end, pass begin/end, render), Tier 1 RED against todo!() in obs-source's existing source test binary, Tier 3 parity against the original C in obs-c-oracle, Tier 2 unchanged.
Continuing this one: branch port/5893-default-render, following the #5828 shape (extraction, characterization, RED, GREEN). Draft PR once the RED commit is in.
Activity
rdoupe commentedon Nov 28, 2026
Claiming: I'll extract, characterize and port it RED then GREEN in one PR, the shape of #5827.
rdoupe commentedon Nov 28, 2026
Continuing this one: branch
port/5893-default-render, following the #5828 shape (extraction, characterization, RED, GREEN). Draft PR once the RED commit is in.libobs: extract obs_source_default_render verbatim (Refs #5893)
test/cmocka: characterize obs_source_default_render (Refs #5893)
obs-source: Tier 1 for obs_source_default_render, RED (Refs #5893)
obs-source: port obs_source_default_render to Rust (Fixes #5893)
obs-source: port obs_source_default_render to Rust (Fixes obs-rust#5893…