New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
8287822: [macos] Remove support of duplicated formats from macOS #909
Conversation
👋 Welcome back almatvee! A progress list of the required criteria for merging this PR into |
Webrevs
|
/reviewers 2 |
@kevinrushforth |
isJRT = false; | ||
uri = FXMedia.class.getResource("/fxmediaplayer/media").toURI(); | ||
|
||
if (uri.getScheme().equals("jar")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it possible for uri scheme to be null?
may be "jar".equals(uri.getScheme()) ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Related question: Can uri
itself be null?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so the logic seems to be either a "jar", or else it's a file, right?
is it possible to be something else (i.e. the resource is missing altogether)? or some other condition?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, when we run jar file it will be jar and if we run unpacked it will be file. If resource is missing we will not enumerate files and it is acceptable condition. We should fallback to default playlist if no files present.
tests/manual/media/FXMediaPlayer/src/fxmediaplayer/media/FXMedia.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
Outdated
Show resolved
Hide resolved
modules/javafx.media/src/main/native/jfxmedia/platform/osx/avf/AVFMediaPlayer.mm
Outdated
Show resolved
Hide resolved
modules/javafx.media/src/main/native/jfxmedia/platform/osx/avf/AVFMediaPlayer.mm
Outdated
Show resolved
Hide resolved
isJRT = false; | ||
uri = FXMedia.class.getResource("/fxmediaplayer/media").toURI(); | ||
|
||
if (uri.getScheme().equals("jar")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Related question: Can uri
itself be null?
tests/manual/media/FXMediaPlayer/src/fxmediaplayer/media/FXMedia.java
Outdated
Show resolved
Hide resolved
tests/manual/media/FXMediaPlayer/src/fxmediaplayer/media/FXMedia.java
Outdated
Show resolved
Hide resolved
I did full testing on all three platforms and tested all formats via all protocols. Mostly to make sure that changes for FXMediaPlayer works on all platforms. |
isJRT = false; | ||
uri = FXMedia.class.getResource("/fxmediaplayer/media").toURI(); | ||
|
||
if (uri.getScheme().equals("jar")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so the logic seems to be either a "jar", or else it's a file, right?
is it possible to be something else (i.e. the resource is missing altogether)? or some other condition?
Collections.<String, Object>emptyMap()); | ||
path = fileSystem.getPath("fxmediaplayer", "media"); | ||
} else { | ||
path = Path.of(uri); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we explicitly check if it is a file?
if("file".equals(uri.getScheme()) { ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not see a point of doing it, since it should be a file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Finally getting back to this. The current version looks good to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all my comments got explained and/or resolved. thank you!
@sashamatveev This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 35 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
/integrate |
Going to push as commit fe81a27.
Your commit was automatically rebased without conflicts. |
@sashamatveev Pushed as commit fe81a27. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
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.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jfx pull/909/head:pull/909
$ git checkout pull/909
Update a local copy of the PR:
$ git checkout pull/909
$ git pull https://git.openjdk.org/jfx pull/909/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 909
View PR using the GUI difftool:
$ git pr show -t 909
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jfx/pull/909.diff