Skip to content
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

JavaFX Native Image For Media #1233

Open
natsufumij opened this issue Sep 23, 2023 · 3 comments
Open

JavaFX Native Image For Media #1233

natsufumij opened this issue Sep 23, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@natsufumij
Copy link

Expected Behavior

It is hoped that after JavaFX Native Image, the content of the Media module can be used normally, including common classes such as MediaPlayer、Media etc.

Current Behavior

Although JavaFX programs containing Media modules can pass Native Image, they cannot access code and data normally after running, which is equivalent to media modules not working.

Context

In the sample example given by gluon, I added the reference to media, and added the writing of moduleinfo, and the nativeimage passed, but did not successfully access the content of media, could not play the content, and even the creation of media failed. These can be viewed at gluonfx:nativerun.

I made an attempt to embed the jni and reflect configurations in the project to simulate the configuration of Linux in the media .jar in the substrate, so that it would compile normally and use the contents of the media module.
The project address is:
https://github.com/natsufumij/javafx-native-media-demo
If someone could translate my work into something that would be useful directly to the substrate project, thanks!

by Natsufumi Junichi

@natsufumij natsufumij added the enhancement New feature or request label Sep 23, 2023
@credmond
Copy link

credmond commented Oct 3, 2023

@johanvos / @jperedadnr : could someone from GluonFX comment on this -- is it this simple (surely not...)?

I'd be willing to help add support via PRs, if it is achievable. Bit could I get some background information on why media and web are not supported in Windows or MacOS in the first place? What were the challenges?

@johanvos
Copy link
Contributor

johanvos commented Oct 3, 2023

@natsufumij and @credmond Thanks for bringing this to our attention. Without a detailed look, my first guess is that it should more or less work this way indeed. The difficult part is to have the correct set of jni/reflection configs, to make sure that the versions match correctly, and to avoid duplicate symbols.
The latter has been a problem in the past, as the native library for the javafx media includes symbols that have the same name as symbols used in other libraries, so that is something that needs to be fixed as well.
But we have to work on that, as I agree it would be a great enhancement.

@credmond
Copy link

credmond commented Oct 5, 2023

Thanks for the reply. I won't pretend to fully understand the challenges at the moment.

Happy to help on this if someone on your side could provide some adhoc support (i.e., "am I on the right track?") via some channel.

I have Linux, MacOS and Windows, so testing is covered. Depends on the appetite @ Gluon. I can sense there's not much bandwidth to work on these repos lately, and also that your focus is mobile and commercial changes...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants