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
Inventory of platform conditionals in shared-named files of plugins/vlc-video/ (7 #ifs in 3 files).
file
lines
macro
what the branch does
vlc-video-plugin.c
1
_WIN32
windows.h include
74
__APPLE__
libvlc_core_module global
155
_WIN32
locate libvlc via registry (HKLM\...\VideoLAN\VLC)
181
__APPLE__
hard-coded /Applications/VLC.app paths, set VLC_PLUGIN_PATH, load libvlccore.dylib
238
__APPLE__
os_dlclose(libvlc_core_module) at unload
vlc-video-plugin.h
4
_MSC_VER
typedef SSIZE_T ssize_t
vlc-video-source.c
583
_WIN32
convert / to \ in non-URL paths
Proposed facade
vlc-platform.h with vlc_platform_find_library() (registry / mac bundle / default), vlc_platform_unload(), vlc_platform_native_path(dstr*, is_url); implementations vlc-platform-windows.c, vlc-platform-mac.c, vlc-platform-nix.c.
Likely must stay
vlc-video-plugin.h:4 (ssize_t typedef for MSVC): type shim; move to a Windows compat header or keep as exception.
CMake OS_WINDOWS (CMakeLists.txt:40) stays.
Test approach
Behaviour-preserving moves. Verify with: the plugin's native builds on each platform (ci-full label, since these are outside the quick gate), the existing cmocka tests where the moved function is testable, and ./lint. Where a facade function is pure (path/name/constant selection) add a small unit test per platform implementation. The #847 ratchet lint baseline must go down by the count moved.
Claiming. Per the host naming policy (#1009) and BUILD.md: a vlc-video-host.h interface (find/load libvlc, unload, native path) with vlc-video-host-windows.c.h, vlc-video-host-macos.c.h, vlc-video-host-posix.c.h in per-OS unity groups picked by CMake; shared files keep their names and lose their conditionals; the MSVC ssize_t shim moves to a Windows-only header if the group rules allow, else stays as the documented exception. Pure path conversion gets a cmocka test; baseline goes down by what moves.
Activity
zackees commentedon Oct 17, 2026
Claiming. Per the host naming policy (#1009) and BUILD.md: a
vlc-video-host.hinterface (find/load libvlc, unload, native path) withvlc-video-host-windows.c.h,vlc-video-host-macos.c.h,vlc-video-host-posix.c.hin per-OS unity groups picked by CMake; shared files keep their names and lose their conditionals; the MSVCssize_tshim moves to a Windows-only header if the group rules allow, else stays as the documented exception. Pure path conversion gets a cmocka test; baseline goes down by what moves.vlc-video: Host code behind vlc-video-host.h (obs-rust#857) (obs-rust…