使用 Android 智能手机控制外部摄像头

发布于 2024-12-23 12:40:07 字数 272 浏览 2 评论 0原文

我想编写一个 Android 应用程序来将命令传递到外部摄像头,其 SDK 可从制造商的网站上获取。 SDK 基于 C,相机 I/O 通过 mini-USB 或 mini-HDMI 端口完成。这是一个由两部分组成的问题:

  • 基于 Android 的智能手机能否向外部 USB 设备发送命令?我确实知道他们可以从外部 USB 设备访问数据。

  • Java 的 C 包装器(可在笔记本电脑上运行)可以在基于 Android 的智能手机上运行吗?

I would like to write an Android app to pass commands to an external camera whose SDK is available from the manufacturer's website. The SDK is C-based and the camera I/O is done through a mini-USB or mini-HDMI ports. This is a two part question:

  • Can Android-based smartphones send commands to external USB devices? I do know that they can access data from an external USB device.

  • Will C wrappers for Java (that work on laptops) work on Android-based smartphone?

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

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

发布评论

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

评论(1

妖妓 2024-12-30 12:40:07

问:Android 智能手机能否向外部 USB 发送命令
设备?我确实知道他们可以从外部 USB 访问数据
设备。

答:当然可以,只要设备通过 Android USB 端口连接即可:)

问:C ... 可以在基于 Android 的智能手机上运行吗?

A:通过努力,你可以在android上实现Java和C的接口(类似于其他平台上的JNI)。有关更多详细信息,请参阅 NDK 文档。

问:我可以连接一个可能编写的二进制 C 语言库吗
对于 Windows,在 i386 目标代码中,从 Java,在 Android 上,运行
ARM CPU?

答:没有。这不仅仅是一种不同的语言。您还要处理不同的平台、不同的对象格式和完全不同的 CPU 架构。

最好的选择是供应商是否可以为设备提供 USB 级或消息级接口。您对二进制 .dll 或 .lib 库接口非常熟悉。

Q: Can Android-based smartphones send commands to external USB
devices? I do know that they can access data from an external USB
device.

A: Sure, as long as the device is connected via the Android USB port :)

Q: Will C ... work on Android-based smartphone?

A: With much effort, you can interface Java and C on android (analogous to JNI on other platforms). Look at the NDK docs for more details.

Q: Can I interface a binary C language library that's probably written
for Windows, in i386 object code, from Java, on Android, running an
ARM CPU?

A: Nope. It's more than just a different language. You're also dealing with a different platform, different object formats, and a completely different CPU architecture.

Your best bet is if the vendor can provide either a USB-level or message-level interface to the device. You're pretty much SOL with a binary .dll or .lib library interface.

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