RFR: 8287822: [macos] Remove support of duplicated formats from macOS
Kevin Rushforth
kcr at openjdk.org
Tue Oct 11 21:52:15 UTC 2022
On Tue, 11 Oct 2022 00:01:18 GMT, Alexander Matveev <almatvee at openjdk.org> wrote:
> - Added support for JAR and JRT protocol to AVFoundation platform.
> - Removed H.264/MP3 and AAC support from GStreamer platform, which was primary used to playback these formats for JAR and JRT protocols.
> - Added ability to FXMediaPlayer sample to generate playlist for JAR and JRT protocols for testing. See FXMedia.java for how to use it.
> - H.265/HEVC via JAR/JRT protocols should work on macOS after this change. Before it did not work because GStreamer platform did not support H.265/HEVC and AVFoundation did not support JAR/JRT protocols.
> - Minor code clean up.
>
> After this changes:
> GSTPlatform: AIFF and WAV for all protocols.
> AVFoundation: MP3, AAC, HLS, H.264 and H.265 for all protocols.
>
> This change is transparent for end user and does not affect list of supported formats by JavaFX Media.
I left a few comments. I'll want to do some quick testing, but don't have time today.
I presume you have carefully tested this on macOS. Have you done some minimal testing on Windows and Linux, too (since there are platform-independent changes)?
modules/javafx.media/src/main/java/com/sun/media/jfxmediaimpl/platform/gstreamer/GSTMedia.java line 95:
> 93: String contentType,
> 94: long sizeHint,
> 95: long[] nativeMediaHandle);
This file contains whitespace-only changes. Maybe revert the file since it is otherwise unchanged?
modules/javafx.media/src/main/native/jfxmedia/platform/osx/avf/AVFMediaPlayer.mm line 89:
> 87:
> 88: // Max number of bytes we will provide per request
> 89: #define MAX_READ_SIZE 1048576
Optional suggestion: define this as `(1024 * 1024)` ? It's OK to leave it as is if you prefer. Maybe add a comment in that case?
modules/javafx.media/src/main/native/jfxmedia/platform/osx/avf/AVFMediaPlayer.mm line 779:
> 777:
> 778: // Do not provide more then MAX_READ_SIZE at one call, otherwise
> 779: // AVFoundation might fail if we providing too much data.
Minor: "providing" --> "provide"
tests/manual/media/FXMediaPlayer/src/fxmediaplayer/media/FXMedia.java line 141:
> 139: }
> 140:
> 141: }
Minor: missing newline at end of file.
-------------
PR: https://git.openjdk.org/jfx/pull/909
More information about the openjfx-dev
mailing list