antmicro / android-camera-hal Goto Github PK
View Code? Open in Web Editor NEWV4L2-based Android Camera HAL driver.
V4L2-based Android Camera HAL driver.
Minimal working V4L2-based Android Camera HAL driver. HAL version: 3.0 Module version: 2.3 Camera API version: 2 LIMITATIONS ----------- * Supports only one camera * Tested only on Tegra K1, using one specific camera and a webcam. * No parameter control, most of the reported specs are hardcoded. * Resolution detection is limited up to 1920x1080. See availableResolutions() in V4l2Device.cpp. WORKAROUNDS/BUILD TIME CONFIGURATION ------------------------------------ In Android.mk there are some flags which control how the driver works. Some of them might not always work. LOCAL_CFLAGS += -DV4L2DEVICE_FPS_LIMIT=<NNN> <NNN> is positive integer. Limits framerate at the driver level. Helps when the kernel's V4L2 driver allows to read the buffers faster than it fills them with a new frames. Comment out to disable the limit. LOCAL_CFLAGS += -DV4L2DEVICE_BUF_COUNT=<NNN> <NNN> is a positive integer (4 by default) - V4L2 buffers count. LOCAL_CFLAGS += -DV4L2DEVICE_PIXEL_FORMAT=V4L2_PIX_FMT_UYVY #LOCAL_CFLAGS += -DV4L2DEVICE_PIXEL_FORMAT=V4L2_PIX_FMT_YUYV V4L2 source color format. LOCAL_CFLAGS += -DV4L2DEVICE_OPEN_ONCE Opens and initializes /dev/video0 during boot time. Comment out to open/close the device when a camera app is opened/closed. LOCAL_CFLAGS += -DV4L2DEVICE_USE_POLL Use poll() before dequeueing a buffer. BOOT TIME CONFIGURATION ----------------------- The "ro.camera.v4l2device.resolution" system property allows to force one single resolution (must be supported by V4L2). The value is in the "WIDTHxHEIGHT" format. HOW TO BUILD ------------ In your target's makefile (e.g. device/mycompany/mydevice/mydevice.mk) add: PRODUCT_PACKAGES += camera.$(TARGET_BOARD_PLATFORM) PRODUCT_PACKAGES += media_profiles.xml and just build Android.
Hello,
I'm trying to include this HAL on my AOSP to make work my USB Webcam.
I have errors on compilation.
use of undeclared identifier 'kMaxStride'
no member named 'I422ToABGRRow_NEON' in namespace 'libyuv'
no member named 'getOffset' in 'SkDynamicMemoryWStream'
This error are in ImageConverter.cpp
Could you please help me fix this ?
Thanks
Hello,
i build this library with AOSP android 6 ok, but when i open camera app, it shows "Camera error, Can't connect to the camera". I'm sure /dev/video0 is working before.
How can i test it using Android Camera API?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.