Skip to content

rust: Port graphics-ffmpeg-init.c.h decoder lifecycle to obs-graphics #4433

Closed

Description

@zackees

Phase 5 graphics follow-up, dependent on the C characterization/extraction prerequisite #4430 (branch test/ffmpeg-image-init-extract; no PR yet). Port ffmpeg_image_get_buffer, ffmpeg_image_open_decoder_context, ffmpeg_image_init and ffmpeg_image_free from libobs/graphics/graphics-ffmpeg-init.c.h into obs-graphics after that prerequisite lands. Preserve best-stream/decoder selection, guarded buffer callback, the single-known-video-codec probing shortcut, diagnostics, and codec-before-format cleanup order. Keep FFmpeg handles/callbacks in ffi/ and reuse the already-Rust image-size predicate. Characterization: test/cmocka/test_ffmpeg_image_init.c covers empty/missing/valid PNG/corrupt public image loads and repeated cleanup. Add safe-core Tier 1 cases RED then GREEN, keep the C characterization unchanged against hybrid and C reference, and add differential resource/decision coverage including size rejection. Tier 4 is not applicable (no protocol changes). Preserve all public headers and the unchanged C++ WebSocket plugin.

Activity

  1. added
    enhancement
    port
    P2
    size:S
    ready
    on Nov 9, 2026
  2. zackees commented on Nov 9, 2026

    @zackees
    MemberAuthor

    Claiming: FFmpeg image decoder selection, init and free on branch port/4433-ffmpeg-image-init, stacked on test/ffmpeg-image-init-extract at 20b9bfc. 1. Check existing FFmpeg bindings and port the decision/resource core RED then GREEN. 2. Preserve the unchanged C characterization and add Tier 3 parity. 3. Run focused checks, formatting and full lint once, then push the branch only for the pool manager; no PR while the queue is saturated.

  3. moved this from In progress to Ready in obs-rust Multiviewon Nov 11, 2026
  4. rdoupe commented on Nov 16, 2026

    @rdoupe
    Collaborator

    Done by #4493 (merged 2026-11-10, 8a20ddc): ffmpeg_image_init/ffmpeg_image_free and the decoder selection now run from rust/obs-graphics/src/ffi/image_init.rs, with Tier 1 cases in rust/obs-graphics/tests/render/image_init.rs and the differential oracle in rust/obs-c-oracle/oracle/image_init.c. The C body stays only in the libobs.ported-graphics-ffmpeg-init reference group. The PR said "Refs", so this didn't close on merge. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2enhancementportreadysize:S

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions