Repository navigation
Description
Phase 6 / Graphics follow-up to #5125. Wait for the C-only prerequisite to merge, then replace the complete extracted libobs/graphics/graphics-texture-file-data.c.h unit with safe Rust in obs-graphics while preserving gs_create_texture_file_data and its unchanged public declaration.
The legacy entry point initializes an FFmpeg image using gs_image_max_texture_size, decodes with GS_IMAGE_ALPHA_STRAIGHT, publishes the mapped format and post-decode dimensions only for non-NULL data, and frees the initialized image after either decode outcome. Failed initialization leaves outputs alone and does not call free again. This API has no data3 host fallback. Preserve the ordering, callback identities and caller ownership of the returned allocation.
Keep FFmpeg calls and the real struct ffmpeg_image entirely in a thin private C session adapter in the media family. Reuse existing init/decode engines; add no ffmpeg-sys dependency and copy no FFmpeg layout into Rust. Define the opaque session boundary before implementing the safe decision engine. Link the real adapter into every affected Rust-static consumer through per-unit tests.d link-support fragments, never aborting stubs.
Existing coverage is the unchanged test_graphics_viewport::image_width real generated-PPM/max-size case plus the prerequisite's test_texture_file_data_legacy recording fixture. That fixture explicitly characterizes the original C source with fakes and does not itself call the future Rust wrapper. Retain it unchanged as the original-C baseline; mirror every assertion in the existing Graphics / obs-graphics --test obs-tests-graphics category, and add a Rust-static C-boundary registration using the same recording session contract so Tier 2 reaches the Rust export. Add no Rust test executable.
Commit Tier 1 RED before GREEN. Provide Tier 3 differential tests using the unchanged original C unit and a mutation check. Run applicable unchanged C coverage against C-reference and hybrid libobs, compare full public symbol sets, run the whole native_build:: module, validate affected standalone MSVC links, and run repository lint once. Tier 4 is inapplicable to this non-protocol API. Preserve public headers, existing C tests and the C++ obs-websocket compatibility plugin.
Append points: obs-graphics module lists and existing Graphics category modules; per-unit original-C oracle, exported-symbol and ported-source fragments; media unity/module ownership for the private adapter; applicable native graph and real-adapter link-support fragments. Follow testing-policy.md, BUILD.md, coordination.md and the worker skill. Use soldr for Rust, uv for Python, and ./push for publication.
Prerequisite implementation: #5144, signed head 3da39beb526f16f9d410e20b12aa6ad2bf94f68c. Its RED/GREEN characterization, OFF/ON coverage and public-symbol parity are recorded in the PR. Start this swap only after that prerequisite merges.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
zackees commentedon Nov 18, 2026
Claiming: legacy image-file data orchestration Rust swap in pool slot obs-studio5. 1. Define the opaque C-owned FFmpeg session and commit mirrored safe-core Tier 1 tests RED. 2. Implement the Rust engine and thin export, retain the original C fixture and add Rust-static boundary plus differential/mutation coverage. 3. Run Graphics tests, native_build, unchanged OFF/ON characterization, symbol parity, MSVC links and lint; publish under backpressure. First PR expected this session after verified GREEN.
style(graphics): format image-file native registration (Refs #5145)
test(graphics): pin legacy image-file session ordering RED (Refs #5145)
graphics: swap legacy image-file orchestration to Rust (Refs #5145)
graphics: retain real conversion dependencies in static consumers (Refs
test(graphics): complete static fixture dependencies and registration…
test(graphics): link real logging bridge into image fixture (Refs #5145)
style(graphics): format image-file native registration (Refs #5145)
test(graphics): refresh image-file registration after rebase (Refs #5145
style(graphics): keep image-file graph registration in name order (Refs
53 remaining items
graphics: reuse landed shared support after master rebase (Refs #5145)
test(graphics): require real vertexbuffer teardown support RED (Refs #…
graphics: link real vertexbuffer teardown through shared support (Refs …
test: require a sole static provider for image recording fixture (Refs …
test: isolate image recording fixture from shared libobs binding (Refs …
test: expose eager adapter selection in isolated recording fixture (R…
test: demand-link real support in the isolated image fixture (Refs #5145
test: replay root graph creation order for recording isolation (Refs #…
test: defer recording isolation until graph targets exist (Refs #5145)
style: format image recording registration assertions (Refs #5145)
rdoupe commentedon Nov 28, 2026
@zackees are you still on this one? Your claim is from 2026-11-18 and I can't find a branch or PR for it. If you've dropped it I'll take the
gs_create_texture_file_dataswap tomorrow; say so here if you'd rather keep it.rdoupe commentedon Nov 28, 2026
Done on master by #5155 (merged 2026-11-27):
gs_create_texture_file_datais the Rust export inrust/obs-graphics/src/ffi/texture_file_data.rs, the extracted C sits inlibobs.ported-texture-file-dataas the reference, and the original is the oracle. The PR said "Refs", so this stayed open. Please ignore my question above, @zackees.graphics: port legacy image-file data orchestration to Rust (Refs obs…