-
Notifications
You must be signed in to change notification settings - Fork 0
Camera2 support and partial Usb Camera Support #54
Conversation
…ts called if state matches. Work on abstracting camera code
This would be part of: |
App currently tested to work as normal, since there is no camera2 yet |
camera2 implementation started. Currently does not close properly and size params are wrong. Not hooked up to ffmpeg yet |
Does not work with Dragonboard 410C, so probably will not work on stock android |
Works on Android Things on Raspberry Pi 3B. The camera has to be plugged in when it boots. Does some weird things with displaying it though, and currently is giving a temp warning |
Camera preview can be removed, which should save some battery life and processing power. |
Plan is to configure Android things not to show a camera preview by default |
Going to make sure no memory leaks are introduced before merging |
…, 432" This reverts commit 0a4f32c Also work on experimental text overlay
External webcam library works, just running into issues where the dragonboard looks like it cannot keep up |
Screen can be turned off with camera2. That might save some battery power, especially on LCD displays |
… run in the background. Add telemetry for core startup
… log is redacted now. Motor commands do not get logged
…eComponent.EVENTNAME
…Start timing at 0
Just as note, Camera works as good as it did before. Phone will not get as hot and will use less battery if on API 21 or above. Some TODOs that should be done would be a fallback option for the older camera API, and make the flow faster and less CPU intensive. This does not fix FFMPEG thread locks if it is taking too long to process and upload a frame Camera Changes: |
private final static String TAG = "WebcamManager"; | ||
|
||
//usb摄像头设备 | ||
public final static String VIDEO = "/dev/video1"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change this to your camera path
} | ||
} | ||
cameraId?.let{ | ||
if(useMic) { | ||
core.audio = AudioComponent(context, cameraId!!) | ||
} | ||
holder?.let { | ||
core.camera = CameraComponent(context, cameraId!!, holder!!) | ||
if(false/*TODO StoreUtil or autodetect*/){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change this to true for external camera
Support newer camera api that was introduced in api21 and keep old method for devices under api21.
Using camera2 will allow for USB webcam support for the raspberry pi and other android microcontrollers
Camera abstraction layer
Camera1 Working still
Camera2 fully functional
USB Camera Support (Have to build from source currently)