Skip to content

Commit c8c12ea

Browse files
authored
fix: build and test macOS on macos-15 runners (#492)
* fix: build and test macOS on macos-15 runners macos-14 runner images are in brownout and will be retired on 2026-11-02. macos-15 still ships Xcode 16.1, which the build selects. * fix: let VideoToolbox decode High 10 and 4:4:4 H.264 in the fallback tests VideoToolbox decodes both on the macos-15 runners, which unlike macos-14 have working hardware decoding. The tests now require the software pictures either way.
1 parent 1aec25b commit c8c12ea

3 files changed

Lines changed: 17 additions & 13 deletions

File tree

‎.github/actions/prepare-macos/action.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ runs:
1111
HOMEBREW_NO_AUTO_UPDATE: '1'
1212
HOMEBREW_NO_INSTALL_CLEANUP: '1'
1313
run: |
14-
# Required on macos-14
14+
# Required since macos-14
1515
brew install python-setuptools
1616
# nasm is what FFmpeg assembles its x86 code with, which the Intel
1717
# build needs even though the runner itself is Apple Silicon.

‎.github/workflows/platforms.yml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,10 @@ jobs:
5252
runs-on: ubuntu-22.04
5353
profile: linux-aarch32
5454
- name: macos_arm64
55-
runs-on: macos-14
55+
runs-on: macos-15
5656
profile: ''
5757
- name: macos_x86-64
58-
runs-on: macos-14
58+
runs-on: macos-15
5959
profile: macos-cross-x86_64
6060
runs-on: ${{ matrix.platform.runs-on }}
6161
steps:
@@ -132,7 +132,7 @@ jobs:
132132
java-distribution: liberica
133133
java-architecture: armv7
134134
- name: macos_arm64
135-
runs-on: macos-14
135+
runs-on: macos-15
136136
classifier: macos-aarch64
137137
java-distribution: temurin
138138
java-architecture: ''

‎webrtc-media/src/test/java/dev/onvoid/webrtc/media/player/HardwareDecodingTest.java‎

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,8 @@ class HardwareDecodingTest {
9898
* every eight frames: 1080p H.264 High with B-frames, 1080p VP9, 4K H.264,
9999
* and H.264 at 1366x768. {@code media-test-h264-10bit.mkv} (High 10) and
100100
* {@code media-test-h264-444.mkv} (High 4:4:4 Predictive) are 320x240, in
101-
* formats no hardware decoder takes. All were made with FFmpeg (libx264 and
101+
* formats most hardware decoders do not take; VideoToolbox does on macOS 15.
102+
* All were made with FFmpeg (libx264 and
102103
* libvpx-vp9) from a moving gradient with a little noise, for example:
103104
* <pre>
104105
* ffmpeg -f lavfi -i "gradients=s=1920x1080:r=15:d=1:speed=0.02,noise=alls=4:allf=t,format=yuv420p" \
@@ -743,27 +744,30 @@ void h264MatchesSoftwareLaptopSize() throws Exception {
743744
}
744745

745746
@Test
746-
void tenBitH264FallsBack() throws Exception {
747-
assertFallsBack(H264_10BIT);
747+
void tenBitH264PlaysAsInSoftware() throws Exception {
748+
assertPlaysAsInSoftware(H264_10BIT);
748749
}
749750

750751
@Test
751-
void h264444FallsBack() throws Exception {
752-
assertFallsBack(H264_444);
752+
void h264444PlaysAsInSoftware() throws Exception {
753+
assertPlaysAsInSoftware(H264_444);
753754
}
754755

755756
/**
756-
* A stream that hardware decoders do not take is played in software, with
757-
* the pictures software decoding gives and no error.
757+
* A stream that not every hardware decoder takes plays with the pictures
758+
* software decoding gives and no error: in software where the hardware does
759+
* not take it, and in hardware where it does. VideoToolbox decodes High 10
760+
* and 4:4:4 H.264 on macOS 15, and hands the pictures over as P010 and
761+
* NV24, whose luma swscale brings to 8 bits exactly as it does that of the
762+
* planar formats of software decoding.
758763
*/
759-
private void assertFallsBack(String asset) throws Exception {
764+
private void assertPlaysAsInSoftware(String asset) throws Exception {
760765
Result software = play(asset, false, 0);
761766
Result hardware = play(asset, true, 0);
762767

763768
assertNull(software.error);
764769
assertNull(hardware.error);
765770

766-
assertFalse(hardware.hardware);
767771
assertEquals(15, hardware.frames.size());
768772
assertEquals(software.frames, hardware.frames);
769773
}

0 commit comments

Comments
 (0)