When logging was enabled, the log was a little *too*
verbose, making it unreadable. Removing some of the
more frequently hit log messages.
BUG: b/32942120
TEST: Can run camera samples
Change-Id: I136c20279699e4c87b3ef1c3042b88c20c301002
Was assuming HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED was either YUV or JPEG.
BUG: b/32942342
TEST: unit tests pass
Change-Id: I3aaa6ee8040efa699c2856b687fc3b8a6d84b5cc
This allows for verification of callbacks, and will also be helpful
when implementing flush.
BUG: 31653306
TEST: unit tests pass, test program runs
Change-Id: Id43d6cb3c2b9ca4adc96fc08282f88e0b7b904e1
Track which buffer indices are in use to prevent duplicates.
BUG: 31831808
TEST: Test app runs, enqueue errors no longer showing up in logs.
Change-Id: I319f9a1906170c861e194e357bdb57fab81d8c34
Also checks gralloc return results, and cleans up style.
BUG: https://b/31595935, https://b/31589070
TEST: test streaming app works
Change-Id: I4d910524ae21a7b666a1f456e2b7122a8671560f
Actually returns GBR data for now, based on available formats for
RPi3 camera, but claims it's RGB.
BUG: b/31829804
TEST: test program runs, can handle format 0x1 (RGBA_8888)
Change-Id: I41c9ced5c1fa25d1254530d3d0a1446d2d514a1f
Camera now has special synchronized threads to enqueue
buffers and dequeue buffers.
BUG: 29334616
TEST: manually tested with test app
Change-Id: Ibce14cd6b269c4d26403534b3f7985914263bf2b
Set up a series of methods that can be producers/consumers/callbacks.
For now, they call each other synchronously.
TEST: manually tested with app
BUG: 29334616
Change-Id: Icb6cf9d9970521d5291c54f02dc5032f43b26616
RequestTracker keeps track of how many buffers are in flight for
each stream, and what frame numbers correspond to what requests/buffers.
BUG: 31044638
TEST: unit tests pass
Change-Id: I8ef3fcacdf8171514ea7f7eaf77301a641bff61e
Static properties read and validate stream configurations,
stall durations, and reprocess formats.
Static properties can be used to validate a given
camera3_stream_configuration_t to check if the streams
all work together as defined by the metadata properties.
BUG: 31044638
TEST: unit tests pass
Change-Id: I2c8eecb680cd86fbe0340c07e4d73bd25429b4e9
MetadataReader provides a clean wrapper around getting
and translating certain metadata values in a nice form.
StaticProperties will be used by Camera as the source of
truth for metadata properties, extracted directly from a reader,
rather than calling down into the device again.
BUG: 31044638
TEST: unit tests pass
Change-Id: I712a80f87e629a7288c678637de0eae0225acf96
Moved files to a subdir to allow reference implementations
of other versions to join this same space without conflict.
Chery picked from master.
BUG: b/31117512
TEST: lunch bullhead-eng, make -j32, m -j32 camera.default
Change-Id: I9bc3047bd3c00c53ce4d4e4f2070d8ee1453c936
Replaces metadata usage in Camera/V4L2Camera with the
new Metadata class.
Switches Camera from camera_metadata_t to android::CameraMetadata
where appropriate for ease of use/clarity of ownership.
Also cleaned up some "error" logs that were potentially expected,
leaving it to the caller to log if something goes wrong, since
they were numerous and cluttering the log feed.
BUG: https://b/30140438, https://b/29335262
TEST: unit tests pass, test picture program still works,
tested setting a V4L2 control to a non-default value.
Change-Id: I24e50c9b71736dfc576debf8d09dbe36b9bbf23a
States are dynamically changing values. For now
none of them have implementations; they're all fixed
values.
BUG: 30140438
TEST: unit tests pass
Change-Id: I60f97fce5db4542e6b77694bb323934e32eab9f6
Default entries for controls/properties that could theoretically
be queried from/controlled by V4L2, but are not yet implemented
in this HAL.
BUG: 30140438
TEST: unit tests pass
Change-Id: I78264f3f0d37b41614b24ef71000fee175a3bb17
Adds a flow for Metadata to initialize templates.
PartialMetadataInterfaces expose another populate method,
which use a default value getter from ControlOptionsInterfaces.
BUG: 30140438
TEST: unit tests pass
Change-Id: I1c01469dcf4d06f7c4c62ebe2acd3d9b2294a161
This factory queries the device for the properties detailing
what formats it supports. Since this may fail, Metadata/V4L2Metadata
was moved from the weird inheritance/constructor stuff it was doing
to Metadata having a better constructor and V4L2Metadata being a
factory.
BUG: 30140438
TEST: unit tests pass
Change-Id: Id4bcb27fbd8b517e3a9a8e9fb8a984af139254b3
Switches v4l2_metadata over to the updated controls/properties
using inheritance over composition. Slight regression
in that the V4L2-based control factory method was removed,
will be replaced (and improved) in a CL soon.
BUG: 30140438
TEST: unit tests pass
Change-Id: I636fef67cd3ceeb3ebf9853d04b068988c4c4944
Simple wrappers that associate a control delegate
or set of control options with a corresponding
metadata tag.
BUG: 30140438
TEST: unit tests pass
Change-Id: Ib4d769f4a860d661128c8af47d317937d96feb96
Part of moving towards composition over inheritance.
Ignored: Requests to set are ignored.
NoEffect: Tracks a value but does nothing.
V4L2: Goes through a V4l2 device.
TEST: unit tests pass
BUG: 30140438
Change-Id: I9ca636556f4a6ddfe4b8ddfbd042371ed56343b9
These interfaces will be used to increase composition
and decrease inheritance in the metadata controls.
ControlDelegates are responsible for getting/setting values,
While ControlOptions are responsible for validating values
(breaking these two apart allows, for example, unused sliders
and unused enums to share the same ControlDelegate, but have different
options, with minimal code duplication).
StateDelegates are for read-only values that may change.
ControlDelegate inherits from this because it will allow
the State interface to be passed around, while one owner
maintains control of updating it behind the scenes.
BUG: 30140438
TEST: unit tests pass. Interfaces only so no new tests
Change-Id: I8042c1ccf97655558f45a1f8411e3a4a36de7506
Scaling converters scale, as the name implies.
The two wrapping converters, map & ranged sanitize
data for sending to V4L2, either converting a value
to be within a map, or within a range, respectively.
(These are intended for use with V4L2 int menu and int
controls, respectively).
TEST: Unit tests pass
BUG: 30140438
Change-Id: Ie7d86118e00c0b59e6457fc16449228706098952
Using composition for conversion will allow more
code to be shared by different V4L2 controls.
BUG: 30140438
TEST: unit tests pass
Change-Id: I467efc72d71b9593d2476a61615fa44f7a975649
The normal G_CTRL and S_CTRL ioctls are only intended
for the basic user control interface. For the HAL,
we want access to quite a few extended controls as well.
BUG: 30140438
Change-Id: I750e9b1dc5e9e18cf5ad25daf1e1c1e34e756169
Was previously running the clang-format command incorrectly;
was not using the .clang-format file, and so was formatting
in some different style.
Change-Id: I09e81b919d1e6d40a56eb4f3f519aaed281a0c86
TEST: unit tests pass
Add all current enum controls and their mappings
to the metadata constructor.
BUG: https://b/30140438
Change-Id: Ie4a5b89d8bc4bc75531425e5fc8bfb4a181b0a03
Some V4L2 controls are simple enum menus, and are directly
analagous to metadata controls. The new V4L2EnumControl class
is a generalized converter between the two.
BUG: https://b/30140438, https://b/29394024
TEST: unit tests pass
Change-Id: I9f8bed200e21cb7e3f3336608fe210f094b7aa42
Common static functions for manipulating metadata moved
from patial_metadata_interface to metadata_common.h
Common static functions for comparing equivalence with
metadata for tests moved to test_common.h
BUG: 30140438
TEST: Unit tests pass
Change-Id: I4310b4ff05bdd68f7f92f533028989914d0f4c82
Query formats, sizes, and frame rates.
BUG: https://b/29394024, https://b/30605346
TEST: Test java program shows a bunch of formats & rates,
can take pictures in different sizes now.
Change-Id: I203fd8f200dda79cf6946c58f130548b05269fbd
Ignored controls are optioned controls where the value
set by the user is tracked, but doesn't actually matter.
BUG: 30140438
Change-Id: I45819c3c6c855922418f76fd34309a44660fc3f0
TEST: unit tests pass
An optioned control is a control with a fixed list of
accepted options.
BUG: 30140438
Change-Id: Ibf82840629cb23f9082889058f7d11350beffb2a
TEST: unit tests pass
Partial implementation of tagged_partial_metadata. A control
is a value that can be changed.
Implements supported/get/set of parent class, abstracting
into simpler supported/get/set methods for children to implement.
BUG: 30140438
Change-Id: Iaba6fc2f54f6a8786c5ca379972ee1da9604c7a3
TEST: unit tests pass
Fixed properties are, as the name implies, just a single
value that doesn't change.
BUG: 30140438
Change-Id: I2d8d10f16a3665532946a8abca17d01f5c022fdc
TEST: unit tests pass
Partial implementation of tagged partial metadata.
Has a single static tag and implements the populate/supports/set
methods. Adds Value() virtual method that must be overriden.
BUG: 30140438
Change-Id: I2b4927e0d3550235106593cc1ba501c95ba9d2c4
Partial implementation of partial_metadata_interface.
Implements a fixed set of tags at constructor time.
BUG: 30140438
Change-Id: Ie5bde7abf822191ee643d663705f39ba12147ba3
Ownership is much more clear than with the various double
raw metadata pointers.
BUG: 30140438
TEST: unit tests pass
Change-Id: Ib0de3bb4b9e6dc30594230e46f40ffaea06df51d
v4l2_metadata and metadata/metadata. The previous design did not work
as intended for testing (it incorrectly assumed that a constructor
would call an overridden method of a child class), plus this way
makes more sense.
BUG: 30140438
Change-Id: I1293535932fed6daed766682421b1215739e17dd
TEST: Unit tests pass