Repository navigation
Description
obs_source_video_render() (EXPORT) and its source_render_video(), source_draw_route() and get_type_format() steps in libobs/obs-source.c.h (~1092-1200 on master, a173a79) are still C. This is the entry point every scene item, projector, preview and filter target goes through to draw a source. Every decision in it is already Rust in obs-source's render route (obs_source_render_route_video_none, _async_update, _inactive, _draw, _draw_next and the _reads_* probes, PR #2208), and the draws it dispatches to are ported or hidden entries (obs_source_update_async_video #5940, obs_source_render_async_video #5943, obs_source_skip_video_filter #5827). What is left is the glue: the reference bracket, the source's fields read in their old order, the debug marker and the dispatch. It is the last caller-side step of the async-video series (#5938, #5941, #5948, #5951).
Behavior the port keeps, call for call:
obs_source_video_render():obs_source_valid()check with its name,obs_source_get_ref(),source_render_video()on the reference,obs_source_release().source_render_video(): type and flags read for the "no video" check (skip the filter when it has a parent); type and flags read again for the async check,rendering_filterread only when the route asks, thendeinterlace_update_async_video()(only with deinterlacing on) andobs_source_update_async_video();context.dataandenabledread for the inactive check (skip the filter when it has a parent); then the debug marker bracket around the draw route.source_draw_route():filters.num,rendering_filter,info.video_render,filter_targetand deinterlacing read one at a time, only when the route asks; the target'svideo_renderand deinterlacing reads as the route defines.- The draw:
obs_source_render_filters,obs_source_main_render,obs_source_video_render(filter_target),deinterlace_render,obs_source_render_async_video, or nothing. get_type_format()and the marker exist only in_DEBUGbuilds; the port keeps that.
Plan, one PR into obs-source (the shape of #5940 and #5943):
- Extract the four functions verbatim into their own live
core-sourcefile (libobs/obs-source-video-render.c.h). No behavior change. - Tier 1 RED in obs-source's existing category binary against a
todo!()core over a trait for the fields and calls. - GREEN: safe core in
obs-source,obs_source_video_renderas the exported C ABI inffi/, a field shim, the extracted file moved to a reference-only ported group. - Tier 3 parity against the original C in
obs-c-oracle: the same source states through both, comparing the recorded reads and calls and their order. - Tier 2: the existing cmocka cases that render through
obs_source_video_render(filter skip, scene, async render/update) against the hybrid libobs and the C reference, plus a case for any route they don't reach (filter target, deinterlace).
No public header, C test or obs-websocket change.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
rdoupe commentedon Nov 29, 2026
/ready
rdoupe commentedon Nov 29, 2026
Claiming: #5962 (obs_source_video_render and its source_render_video, source_draw_route and get_type_format steps), alone, on branch port/5962-video-render.
First PR (draft, with the RED commit) within a few hours.
obs-source: port obs_source_video_render and its source_render_video,…