[libbluray-devel] Found a JRE compiled for Android (ARM)

Vitor Dall'Acqua veggav at gmail.com
Wed Jan 20 23:42:28 UTC 2021


Oh, my bad, I figured you were.

The distinction applies for everything it plays, including DVDs. Kodi is a
multi layer player and the way input stream bluray passes
chapters/subtitles/audio follows the same route as any other video file
being played.
One example of this is that chapters do not work with Blurays and UHD
Blurays that have popup menus, because there are restrictions to avoid the
end user to skip a chapter during menus, makes sense but during playback
while thinking menus are active stops chapter skipping.

And while possible, and I did, restore chapters for menus that's exactly
the opposite way the problem should be handled.

What I did, in this commit here:
https://github.com/xbmc/xbmc/pull/17210

Is that the user decides if menus are available or not and what he/she
would like to control.
It works but an automatic solution would be a much better user experience.

Libbluray do have some calls that in theory should do this, but those are
never used like:
BD_ARGB_OVERLAY_CLOSE

Even BD_OVERLAY_IG is always != 0.

As you can see I tried to fix that last year, giving an attempt now once
again.
I even went down to irc to nagg libbluray devs around asking this but can't
find an answer.

One of Team Kodi devs proposed a very elaborated solution that's beyond my
skills that is implement a OSD reader, similar to the Google Translator API
used by RetroArch to translate games in real time.
This is like killing an ant with a nuke.

 Hope now that we are discussing this once again a light might come up
because I have debug every single line in here:
https://github.com/xbmc/xbmc/blob/master/xbmc/cores/VideoPlayer/DVDInputStreams/DVDInputStreamBluray.cpp

And nothing is consistent when the popup menu closes.
All I need is a flag saying: the popup menu is gone, that's it.


On Wed, Jan 20, 2021 at 8:05 PM Shaya Potter <spotter at gmail.com> wrote:

> I'm not really a libbluray developer, but I'm wondering if kodi's
> distinction between menu and non menu really applies to blurays in
> general.  One can have menu type stuff on screen when a blurays is playing
> a movie, even resizing the video.  Heck, I've even seen dynamic animations
> done via java code overlayed on top of playing video (ex: the trivia track
> from the breakfast club 30th anniversary blurays, the dvd includes it as a
> normal vobsub, the bluray tries to be fancier).
>
> I.e. if the movie is being played from a java/xlet context, is there a
> difference if it's a menu or not?  I really don't know, hence asking the q.
>
>
> On Thu, Jan 21, 2021, 12:46 AM Vitor Dall'Acqua <veggav at gmail.com> wrote:
>
>> Really glad to hear back on this.
>>
>> Exactly, having libbluray running on Kodi on Android would make many
>> people happy.
>>
>> Alas, this is not my first time attempting this and failing.
>>
>> It would make things much simpler if would be possible to just embed jre
>> into libbluray when compiling but that probably violates several license
>> agreements.
>>
>> Right now, I'm still working on libbluray and Kodi with a different
>> issue, actually the only remaining issue with bluray and bluray uhd
>> playback on Kodi using libbluray (on linux and windows).
>>
>> Kodi has 2 states when playing a disc: inside a menu and playback.
>> The problem I'm facing is the popup menus, which causes Kodi to behave as
>> if it's inside a menu during entire playback.
>>
>> I need to figure out a way to get any value when the popup menu isn't
>> rendering on screen.
>>
>> BD_EVENT_POPUP doesn't change.
>> All the axis, img byte size, the palette, still can't figure out anything
>> that I can use.
>>
>> Do you have advice of what can be used for this?
>>
>> This would greatly improve the user experience using Kodi and full discs.
>>
>> Either way, thank you for taking your time to answer this.
>>
>> Regards
>> Vitor
>>
>>
>>
>>
>> On Wed, Jan 20, 2021, 7:11 PM Shaya Potter <spotter at gmail.com> wrote:
>>
>>> I can't speak to any specifics, but there are some obvious issues that
>>> would prevent libbluray from loading it.
>>>
>>> libbluray searches for the the java root dir in a number of places
>>> (including the JAVA_HOME env)
>>>
>>> from the root dir, it searches in a number of subdir's for libjvm.so
>>>
>>> the dirs it searches are
>>>
>>>     static const char * const jvm_dir[]  = {"jre/lib/" JAVA_ARCH "/server",                                            "lib/server",                                            "lib/client",
>>>
>>>
>>> it turns out that none of those dirs are where this jvm stores
>>> libjvm.so.  it stores it in "lib/arm/client".
>>>
>>> hence it can't find it.  a simple experiment would be for you to build
>>> your own libbluray and add "lib/arm/client" or perhaps even "lib" JAVA_ARCH
>>> "/client" (again, unsure) and see if that improves the situation.
>>>
>>> with that said, I have some skepticism that it can work when loaded into
>>> the shared data partition as google has gone through efforts to lock down
>>> executable code being stored there, with that said, I don't know how that
>>> impact dlopen and the like and might only impact Android Q users.
>>>
>>> but again, this is just low hanging fruit issues, dont really know what
>>> it would be.  (with that said, I think the holy grail for many people would
>>> be to have kodi be able to use java on android).
>>>
>>> The other issue is that these devs don't provide any source code for the
>>> jvm that they built.  as it's under the GPL and they aren't providing
>>> sources they built it from, they are arguably in violation of the license.
>>> that's going to prevent it from anyone putting significant effort into it.
>>>
>>>
>>> On Sat, Jan 2, 2021 at 4:35 AM Vitor Dall'Acqua <veggav at gmail.com>
>>> wrote:
>>>
>>>> Just wanted to share this with you,
>>>>
>>>> Someone made a JRE for Termux that runs on Android devices.
>>>> https://github.com/MasterDevX/Termux-Java
>>>>
>>>> I've tried to add this to Kodi and setenv
>>>>   setenv("JAVA_HOME", "/storage/emulated/0/JAVA/", 1);
>>>>
>>>> added the binaries and the *.jar files
>>>>
>>>> Libbluray still won't see it.
>>>>
>>>> DEBUG <general>: CBlurayCallback::Logger - bdj.c:746: BD-J check:
>>>> Failed to load JVM library
>>>>
>>>> I have little to no experience with Android and how paths are set but
>>>> if it's just a matter of figuring out how to set it, it would be really
>>>> nice to have.
>>>>
>>>> Hope someone shares the sentiment and feels like having a look at it.
>>>>
>>>> Regards
>>>> Vitor
>>>>
>>>> _______________________________________________
>>>> libbluray-devel mailing list
>>>> libbluray-devel at videolan.org
>>>> https://mailman.videolan.org/listinfo/libbluray-devel
>>>>
>>> _______________________________________________
>>> libbluray-devel mailing list
>>> libbluray-devel at videolan.org
>>> https://mailman.videolan.org/listinfo/libbluray-devel
>>>
>> _______________________________________________
>> libbluray-devel mailing list
>> libbluray-devel at videolan.org
>> https://mailman.videolan.org/listinfo/libbluray-devel
>>
> _______________________________________________
> libbluray-devel mailing list
> libbluray-devel at videolan.org
> https://mailman.videolan.org/listinfo/libbluray-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/libbluray-devel/attachments/20210120/5bab147e/attachment.html>


More information about the libbluray-devel mailing list