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
{{ message }}
Repository navigation
facade: libobs/obs.c: move 8 platform conditionals into obs-<os> files #868
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: Existing cmocka libobs tests (Tier 2 Linux, Rust OFF/ON); Windows/macOS via native builds (ci-full). Facade has no-op defaults on other OSes.
Each move is one function per facade entry, mechanical, so upstream merges stay manageable; the ratchet baseline (step 1) drops by the moved count.
Plan (one PR, ci-full), using the existing per-OS files (obs-windows.c, obs-nix.c, obs-cocoa.m) and declaring the hooks in obs-internal.h:
obs_video_host_init_surfaces(video) / obs_video_host_free_surfaces(video): the Windows NV12 encode staging surfaces (creation at :375, cleanup at :445 and :804); no-ops elsewhere.
Done by #1069 (libobs/obs-host/): obs.c has no platform conditionals left (only #ifndef SEC_TO_MSEC), and it is out of the #848 baseline. My duplicate #1071 is closed. Nothing left here.
Activity
zackees commentedon Oct 16, 2026
Claiming: libobs/obs.c facade.
Plan (one PR,
ci-full), using the existing per-OS files (obs-windows.c,obs-nix.c,obs-cocoa.m) and declaring the hooks inobs-internal.h:obs_video_host_init_surfaces(video)/obs_video_host_free_surfaces(video): the Windows NV12 encode staging surfaces (creation at:375, cleanup at:445and:804); no-ops elsewhere.obs_host_graphics_thread_attr(pthread_attr_t *): macOSQOS_CLASS_USER_INTERACTIVE(:746); returns NULL attr elsewhere sopthread_createkeeps today's defaults.obs_host_startup()/obs_host_shutdown(): COM init/uninit with thecom_initializedstate moved intoobs-windows.c(:1337,:1400,:1409,:1552); stubs elsewhere.Behavior-preserving;
obs.cleaves the ci: ratchet lint for platform conditionals in shared C/C++ (#847 step 1) #848 baseline. Naming follows Rename platform folders and files to hosts/{windows,macos,linux,posix} (match the Rust layout) #1009 ("host"). Tests: existing libobs cmocka on Tier 2 (OFF/ON) plusci-fullfor Windows/macOS.zackees commentedon Oct 16, 2026
Done by #1069 (
libobs/obs-host/):obs.chas no platform conditionals left (only#ifndef SEC_TO_MSEC), and it is out of the #848 baseline. My duplicate #1071 is closed. Nothing left here.