简体   繁体   English

是否可以在较旧的Android版本上使用ICS的本机库?

[英]Is it possible to use native libraries from ICS on older Android versions?

I have to be able to play HLS stream on Android OS starting version 2.2. 我必须能够从2.2版开始在Android OS上播放HLS流。 I have done a research of existing possibilities: 我对现有可能性进行了研究:

  1. I can use some 3rd party stuff like Vitamio . 我可以使用Vitamio等第三方的东西。 It works, but the source is closed, performance is rather poor, their plug-in sends some user info somewhere to China and I don't want to bother our users by installing some 3rd party stuff... So that's not a good option from my perspective. 它可以工作,但是源代码是封闭的,性能相当差,他们的插件将一些用户信息发送到中国某个地方,我不想通过安装一些第三方的东西来打扰我们的用户……所以这不是一个好选择依我看来。

  2. I can try to build some Android port of FFmpeg framework, there are at least three of them, but I haven't been able to build at least one so far. 我可以尝试构建一些FFmpeg框架的Android端口,其中至少有三个,但是到目前为止我还不能构建至少一个。 I think it needs more patience and Googling... However, in case of success, there is also a problem with licensing - not as serious as with Vitamio and I am willing to pay license fees to MPEG LA if necessary, but it is still under LGPA. 我认为它需要更多的耐心和谷歌搜索...但是,如果成功,则许可也存在问题-不像Vitamio那样严重,我愿意在必要时向MPEG LA支付许可费用,但仍然根据LGPA。

Finally I got an Idea to use MediaPlayer from ICS, which already supports HLS streaming. 最终,我有了一个使用ICS的MediaPlayer的想法,该想法已经支持HLS流。 My plan was to build the Android Stagefright media engine from the latest sources to get all the native libraries and distribute them together with my application. 我的计划是从最新资源构建Android Stagefright媒体引擎,以获取所有本机库并将它们与我的应用程序一起分发。

I have successfully built all the Android stuff; 我已经成功构建了所有Android产品; got all the native libraries I need, but now I have a problem to load them on Froyo. 获得了我需要的所有本机库,但是现在我在将它们加载到Froyo时遇到了问题。 I have placed the libraries into the projects libs folder, but application refuses to load them. 我已将库放入项目的libs文件夹中,但应用程序拒绝加载它们。 It loads the original system libraries instead - if they are present on the current version. 如果当前版本中存在原始系统库,则改为加载原始系统库。

So my question is, if it is possible to use native libraries from higher Android version on old ones. 所以我的问题是,是否有可能在旧版本上使用更高版本的Android的本地库。 If so, then what I am doing wrong. 如果是这样,那我做错了。 How can I force my application to load ICS native libraries from its libs folder? 如何强制我的应用程序从其libs文件夹加载ICS本机库? Is it even possible? 可能吗?

Any comments, suggestions, ideas are highly appreciated... 任何意见,建议,想法都将受到高度赞赏...

You may try some opensource video player, such as VLC or mplayer, which has Android version. 您可以尝试使用具有Android版本的某些开源视频播放器,例如VLC或mplayer。

And you can use ICS libraries, buy you need to do many work to modify and compile them with your target Android version. 您可以使用ICS库,购买时需要做很多工作才能用目标Android版本对其进行修改和编译。 I've used some code from ICS in some of my apps. 我在某些应用程序中使用了ICS的一些代码。

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

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