Skip to content

facade: shared/ipc-util, media-playback, obs-inject-library: 7 platform conditionals (+ d3d8 vendored note) #886

Closed

Description

@zackees

Part of #847.

Small leftovers. shared/obs-d3d8-api/ (6 conditionals: d3d8.h:47, d3d8types.h:22,26,1597,1680,1683) is a vendored Microsoft header (Copyright Microsoft Corporation) and is EXCLUDED; allow-list it in the ratchet.

Class totals: (a) movable 7, (b) stays - public header 0, (c) Rust-ported 0. Total: 7. Line numbers on origin/master.

file:line macro branch class proposed function / target
shared/ipc-util/ipc-util/pipe.h:24 _MSC_VER inline alias for MSVC (#elif) a CMake option / compat header
shared/ipc-util/ipc-util/pipe.h:45 _WIN32 include pipe-windows.h vs pipe-posix.h a already a dispatch to per-OS files; select by include dir in CMake or document as exception
shared/media-playback/media-playback/decode.h:25 _MSC_VER pragma push disable 4244/4204 around ffmpeg headers a CMake /wd
shared/media-playback/media-playback/decode.h:35 _MSC_VER pragma pop a same
shared/media-playback/media-playback/media.h:26 _MSC_VER pragma push a same
shared/media-playback/media-playback/media.h:37 _MSC_VER pragma pop a same
shared/obs-inject-library/inject-library.c:105 _WIN64 export name x64 vs x86 stdcall decoration a rename to inject-library-windows.c (Windows-only dir), no code change

Classes: (a) movable behind per-platform files; (b) public-header ABI/export/type selection, stays; (c) already replaced by the Rust port (platform code isolated in src/platform/). Macro column abbreviates the #if expression; ! means negated, elif means an #elif line.

Test approach: ipc-util: loopback pipe test (Tier 2 Linux), Windows via native build. media-playback: pragma only, build-checked (ci-full). inject-library is Windows-only; guarded by the native Windows build.

Each move is one function per facade entry, mechanical, so upstream merges stay manageable; the ratchet baseline (step 1) drops by the moved count.

Activity

  1. zackees commented on Oct 16, 2026

    @zackees
    MemberAuthor

    Claiming: ipc-util, media-playback, inject-library.

    Plan (one PR, ci-full), using #900's platform- filename rule where a dispatcher must stay:

    1. media-playback: the MSVC #pragma warning(push/disable 4244 4204)/pop around the ffmpeg includes in decode.h and media.h move, with those includes, into media-playback/platform-ffmpeg-headers.h, which both headers include. Not CMake /wd: these are public headers obs-ffmpeg includes, so an INTERFACE /wd4244 /wd4204 would silence those warnings in every consumer file, not just around ffmpeg's headers.
    2. ipc-util: pipe.h's MSVC inline alias and the pipe-windows.h/pipe-posix.h dispatch move into ipc-util/platform-pipe.h; pipe.h includes it. An edit there affects every OS, which a platform- name now tells ci_scope.
    3. inject-library: inject-library.c → inject-library-windows.c (only win-capture builds it), no code change.
    4. shared/obs-d3d8-api/ (vendored Microsoft header) goes on the ratchet's exclusion list, as the issue says.
    5. Tests: the existing test_pipe/ipc tests and Tier 2 cover ipc-util on Linux; the rest is build-checked by ci-full (Windows MSVC).
  2. added
    claimed
    on Oct 16, 2026
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

    claimed

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions