PINE64
Programming - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: PinePhone (https://forum.pine64.org/forumdisplay.php?fid=120)
+--- Forum: General Discussion on PinePhone (https://forum.pine64.org/forumdisplay.php?fid=127)
+--- Thread: Programming (/showthread.php?tid=11526)



Programming - AppDeveloper - 09-18-2020

1) How should I access the camera from my program? Is the camera V4L-compatible, requiring C-level programming? Or can I access it with higher level languages like Java?

2) On a related note, how should the hardware be accessed in general? Is everything accessed through the kernel API's, or are there higher level API's?


RE: Programming - barray - 09-18-2020

> 1) How should I access the camera from my program? Is the camera V4L-compatible, requiring C-level programming?
> Or can I access it with higher level languages like Java?

You'll likely find that Java will use something like V4L to access the camera. If the driver is there it's just a case of talking to the camera through some Linux interface like V4L. You should be able to to use V4L to probe which camera devices it detects - if you get nothing check the outputs of `dmesg` on boot, `lshw` and `lsusb`.

> 2) On a related note, how should the hardware be accessed in general? Is everything accessed through the kernel
> API's, or are there higher level API's?

Every device that is detected is mapped to a file by the Kernel. Checkout the kernel APIs, they'll be your best bet.