Repository navigation
image-source: Host code behind image-source-host.h (#858) - #1252
Merged
Merged
Conversation
RED: test_image_source_host checks the POSIX host has no JPEG XR, the Image source and slideshow file dialog filters byte for byte as they are today off Windows, and the stat() sub-second modification time. The host file is a stub. Refs #858
GREEN: the 7 platform conditionals in image-source.c.h,
obs-slideshow.c.h, obs-slideshow-mk2.c.h and image-file-version.c.h move
behind image-source-host.h: whether JPEG XR is decoded, the Image source
and slideshow file dialog filters (byte for byte per OS), and the stat()
sub-second modification time with the stat-based
image_file_version_get(). image-source-host-{windows,macos,posix}.c.h are
in per-OS unity groups picked by CMake; the Windows one joins the existing
windows group. Upstream files keep their names.
The tests that compile the shared files alone get the host group attached
from test_image_source_host.cmake (cmake_language DEFER), so their own
files are unchanged. Baseline: image-source entries drop (-7).
Refs #858
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #858 (parent #847). Same shape as #1248 (vlc-video).
Inventory moved (7 conditionals)
image-source.c.h(2): the Image source file dialog filter (*.jxrin "All formats" and the "JXR Files" entry on Windows only) ->image_source_host_image_filter().obs-slideshow.c.h(2):.jxrinvalid_extension()->image_source_host_jxr_supported() && ...; slideshow filter ->image_source_host_slideshow_filter().obs-slideshow-mk2.c.h(1): slideshow filter ->image_source_host_slideshow_filter().image-file-version.c.h(2): the!_WIN32stat-basedimage_file_version_get()and itsst_mtimespec/st_mtimchoice move to the macOS/POSIX hosts, throughimage_source_host_stat_mtime_nsec(). Windows keepsimage-file-version-win32.c.h(name and role unchanged);image_file_version_equal()/_from_filetime()stay shared.New: conditional-free
image-source-host.h;image-source-host-{windows,macos,posix}.c.h. Windows host joins the existingimage-source.windowsgroup; newimage-source.macos/image-source.posixgroups + PCHs, picked byPLATFORM_IDin CMake. Filter strings are byte-identical per OS. No upstream file moved or renamed.Existing tests are unchanged:
test_image_file_version*andtest_slideshow_*compile the shared files on their own, sotests.d/test_image_source_host.cmakeattaches the host group to them viacmake_language(DEFER CALL ...).Baseline delta
ci/platform-ifdef-baseline.jsonregenerated with--update: the 4 image-source entries drop (-7 findings).RED / GREEN (
rust/tools/linux-validate/run.sh --repeat 1)test_image_source_host4/4 FAILED (jxr, image filter, slideshow filter, mtime nsec); the rest of the suite passed.test_image_source_host,test_image_file_version,test_image_file_version_filetime,test_slideshow_empty,test_slideshow_manual_end,test_slideshow_size.Windows / macOS
Not built locally; PR CI verifies them first.
ci/ci_scope.py origin/masterselectsmacos=true windows=true tier2=true linux_targets=image-source.