简体   繁体   English

为什么我不能在Android上使用JMF?

[英]Why I can't use JMF on Android?

I don't really have or want to use the Java Media Framework (JMF) on Android but I am looking for detailed information about why it's not possible to use it. 我真的没有使用Android上的Java媒体框架(JMF),但我期待的, 为什么它不可能使用它的详细信息。 (I know that it's considered as outdated anyway and I am aware that there may be better ways to achieve certain things in Android using this for example: http://developer.android.com/guide/topics/media/index.html ) (我知道无论如何它都被认为是过时的,并且我知道使用此方法可能会有更好的方法在Android中实现某些功能,例如: http : //developer.android.com/guide/topics/media/index.html

Nevertheless I need more information regarding JMF on Android but all I could find is, that "JMF isn't working on Android" - but I wonder why. 不过,我需要有关Android上的JMF的更多信息,但我能找到的是“ JMF无法在Android上运行”-但我不知道为什么。

So I have two questions: 所以我有两个问题:

  • Do you know any kind of "official" statement, for example from Google or Oracle, saying that JMF isn't supported on Android? 您是否知道任何形式的“官方”声明,例如Google或Oracle的声明,称Android不支持JMF? I wasn't able to find something like that. 我找不到类似的东西。
  • Why is JMF supposed to be not working on Android? 为什么JMF不能在Android上运行? I am interested in the technical details and would be grateful for all kind of references. 我对技术细节感兴趣,并希望获得所有参考。

Thank you! 谢谢!

EDIT: 编辑:
To be a bit more specific and clarify my approach: I built a tiny test-app and tried to play an audiofile the same way as I have done in a standard java desktop application (which was working as expected). 更具体一点并阐明我的方法:我构建了一个微型测试应用程序,并尝试以与在标准Java桌面应用程序(按预期工作)中相同的方式播放音频文件。 I included the JMF.jar (for now without any modification) compiled, deployed and started the app - no problems so far. 我包括了JMF.jar(目前没有做任何修改),已编译,部署并启动了该应用程序-到目前为止没有问题。 The (first) exception ( javax.media.NoPlayerException ) is thrown when calling Manager.createPlayer() . 调用Manager.createPlayer()时引发(第一个)异常( javax.media.NoPlayerException Manager.createPlayer() That was actually the point where I stopped and wondered if it's worth digging deeper, although the result is kind of predictable. 实际上,这是我停下来想知道是否值得深入研究的地方,尽管结果是可以预测的。 I decided to ask about the technical background first, instead of figuring it out the hard way in hours of testing and debugging (the reason is not a lack of interest but unfortunately a matter of time at the moment). 我决定先问一下技术背景,而不是在数小时的测试和调试中弄清楚它的困难方式(原因不是缺乏兴趣,但不幸的是,这只是时间问题)。

I am looking for detailed information about why it's not possible to use it 我正在寻找有关为什么无法使用它的详细信息

Because it was not included in the Android SDK. 因为它不包含在Android SDK中。 Lots of things from Java SE were not included in Android. Java SE中的许多内容未包含在Android中。

Do you know any kind of "official" statement, for example from Google or Oracle, saying that JMF isn't supported on Android? 您是否知道任何形式的“官方”声明,例如Google或Oracle的声明,称Android不支持JMF?

I am not aware of such a statement. 我不知道这样的说法。 They also have not released a statement indicating why Android does not integrate with the Hubble Space Telescope, why it does not include shoe-shining APIs, etc. There are an infinite number of things that are not in Android; 他们还没有发布声明,说明Android为什么不与Hubble Space Telescope集成,为什么它不包含擦鞋功能的API等。Android中有无数事物。 it would be impossible to list them all. 不可能将它们全部列出。

More generally, Google faces pressure to keep a lid on firmware size, as the bigger the firmware, the more expensive things get (required storage, OTA update costs, etc.). 更一般而言,Google面临限制固件大小的压力,因为固件越大,得到的东西就越贵(所需的存储空间,OTA更新成本等)。 Hence, they only include a subset of the Java SE SDK as one way of helping reduce firmware bloat. 因此,它们仅包含Java SE SDK的子集,以帮助减少固件膨胀。

Why is JMF supposed to be not working on Android? 为什么JMF不能在Android上运行?

Because it was not included in the Android SDK. 因为它不包含在Android SDK中。 I have no idea if it is possible, let alone practical, to create a fork of JMF that offers a JMF-like API but uses Android media capabilities under the covers. 我不知道是否有可能创建一个JMF分支,该分支提供类似JMF的API,但在幕后使用Android媒体功能。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM