在 Android 上使用 OpenMAX (IL?) 进行音频/视频解码

发布于 2024-11-28 16:54:33 字数 780 浏览 2 评论 0原文

许多运行 Android 的较新硬件平台(特别是 NVIDIA 的 Tegra 2)都支持 OpenMAX 媒体加速。如果没有这种支持,当今的设备实际上不可能解码 720p 视频,但 Android 上支持的解复用器数量相当少。我能找到的唯一公共 API 是通过 MediaPlayer Android SDK 中的类。然而,Android 源代码树中有多个位置包含 OpenMAX 相关的花絮。

在我的设备(Samsung Galaxy Tab 10.1)上,我可以通过 /system/lib 中的大量 OpenMAX 库访问硬件解码器,如果能将我的视频应用程序与这些库连接起来,那就太棒了。谁能给我提供有关实现由 OpenMAX 驱动的解码器的信息吗?我找到了 Khronos 的文档,但没有找到示例代码或教程。我已经完成了解复用,甚至软件解码(通过 libavcodec/libavformat),我只想添加挂钩以启用硬件编码。我还假设这里有必要直接链接到设备上可用的设备,这使得它在可移植性方面相当乏善可陈,但它确实有效。

另外,我对任何人都知道的有关用于访问 Tegra 2 设备上可用视频解码的私有 API 的任何信息感兴趣。特别是如果有像 NVIDIA 为桌面 Linux 发行版实现的那样的 vdpau 接口,因为有很多可用的接口 - 但我无法找到表明支持的共享库。

Many of the newer hardware platforms running Android, in particular NVIDIA's Tegra 2, support OpenMAX for media acceleration. It's effectively impossible on today's devices to decode 720p video without this support, but the number of demuxers supported on Android are quite slim. The only public API I've been able to find has been through the MediaPlayer class in the Android SDK. There are multiple places in the Android source tree with OpenMAX related tidbits, however.

On my device (Samsung Galaxy Tab 10.1) I've got access to hardware decoders through a multitude of OpenMAX libs in /system/lib, and it would be great to interface my video application with these. Can anyone point me to information on implementing a decoder powered by OpenMAX? I've found the documentation from Khronos, but nothing in the way of example code or tutorials. I've already got demuxing and even software decoding taken care of (via libavcodec/libavformat), I'd just like to put hooks in to enable hardware encoding. I'm also assuming here it would be necessary to link directly to the ones available on the device, which makes it pretty lackluster in terms of portability, but it works.

Alternatively, I'm interested in anything anyone knows about private APIs for accessing the video decoding available on Tegra 2 devices. Especially if there's a vdpau interface like what NVIDIA implements for desktop linux distributions, since there's plenty available for that - but I wasn't able to find shared libraries that indicate that support.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

饮湿 2024-12-05 16:54:33

https://www.uplinq.com/2011/sites/default/files/images/Snapdragon-Lab-Accessing-Hardware-Accelerated-Video-Codecs-Android-Steve-Lukas.pdf

我找到了有关使用 OpenMAX 访问较新的 Qualcomm 处理器上的硬件解码器的文档 - 它很混乱,需要将 android 源代码树与 NDK 结合使用,但它是最好的到目前为止我能看到的就在那里。

它引用的示例代码可以在他们的开发人员网站上找到 - 只需搜索文档的标题,它就会出现。

https://www.uplinq.com/2011/sites/default/files/images/Snapdragon-Lab-Accessing-Hardware-Accelerated-Video-Codecs-Android-Steve-Lukas.pdf

I found documentation on using OpenMAX to get access to the hardware decoders on the newer Qualcomm processors - it's messy, requires using the android source tree in conjunction with the NDK, but it's the best that's out there so far that I can see.

The sample code it references was found on their developer website - just search the title of the document and it comes up.

弃爱 2024-12-05 16:54:33

我不知道与 Tegra2 相关的文档。

然而,在 TI OMAP4 等其他一些处理器上这可能是可能的。

OPENMAX 用于 TI OMAP4 处理器(如 Archos Gen9 和可能的 RIM Playbook)。

在 Linux 和 Android 上,OPENMAX API 用于访问视频加速器和视频接口。这里提供了一些详细信息:
http://omappedia.com/wiki/OpenMAX_Project
http://processors.wiki.ti.com/index.php/OpenMax_Development_Guide

如果 Archos 为 Gen 9 发布 Angstroem Linux 映像,就像他们为 Gen 8 所做的那样,那么可能有空间直接在平板电脑上使用它。
有关爱可视 G9 的信息:
http://www.archos.com/products /gen9/archos_80g9/specs.html?country=us&lang=en

I am not aware of docs for this that are related to Tegra2.

However it might be possible on some other processors like TI OMAP4.

OPENMAX is being using in TI OMAP4 processors (like Archos Gen9 and probably RIM Playbook).

On both Linux and Android, the OPENMAX API is used to access the video accelerator and the video interfaces. Some details are provided here:
http://omappedia.com/wiki/OpenMAX_Project
http://processors.wiki.ti.com/index.php/OpenMax_Development_Guide

If Archos releases an Angstroem Linux image for Gen 9 as they did for Gen 8 then there might be room to play around with this on the tablet directly.
Info about Archos G9:
http://www.archos.com/products/gen9/archos_80g9/specs.html?country=us&lang=en

Anth.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文