Camera: Update stream consumer usage flag
It is possible that the current default consumer usage
flag may not be supported by some provider implementations.
Use either HW composer or some other flag that is appropriate
for the specific use case.
Merged-In: I04f89bf67166805191d6d40e5bd93c15ebc97ea6
Bug: 63913159
Test: vts-tradefed run commandAndExit vts --skip-all-system-status-check
--skip-preconditions --primary-abi-only --module
VtsHalCameraProviderV2_4Target -l INFO
Change-Id: I04f89bf67166805191d6d40e5bd93c15ebc97ea6
diff --git a/camera/provider/2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp b/camera/provider/2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp
index 2ae4853..dab900c 100644
--- a/camera/provider/2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp
+++ b/camera/provider/2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp
@@ -2442,7 +2442,8 @@
Stream stream = {streamId, StreamType::OUTPUT,
static_cast<uint32_t> (it.width),
static_cast<uint32_t> (it.height),
- static_cast<PixelFormat> (it.format), 0, 0,
+ static_cast<PixelFormat> (it.format),
+ GRALLOC1_CONSUMER_USAGE_HWCOMPOSER, 0,
StreamRotation::ROTATION_0};
::android::hardware::hidl_vec<Stream> streams = {stream};
StreamConfiguration config = {streams,
@@ -2491,7 +2492,8 @@
static_cast<uint32_t> (0),
static_cast<uint32_t> (0),
static_cast<PixelFormat> (outputStreams[0].format),
- 0, 0, StreamRotation::ROTATION_0};
+ GRALLOC1_CONSUMER_USAGE_HWCOMPOSER, 0,
+ StreamRotation::ROTATION_0};
::android::hardware::hidl_vec<Stream> streams = {stream};
StreamConfiguration config = {streams,
StreamConfigurationMode::NORMAL_MODE};
@@ -2506,7 +2508,8 @@
static_cast<uint32_t> (UINT32_MAX),
static_cast<uint32_t> (UINT32_MAX),
static_cast<PixelFormat> (outputStreams[0].format),
- 0, 0, StreamRotation::ROTATION_0};
+ GRALLOC1_CONSUMER_USAGE_HWCOMPOSER, 0,
+ StreamRotation::ROTATION_0};
streams[0] = stream;
config = {streams,
StreamConfigurationMode::NORMAL_MODE};
@@ -2521,7 +2524,8 @@
static_cast<uint32_t> (it.width),
static_cast<uint32_t> (it.height),
static_cast<PixelFormat> (UINT32_MAX),
- 0, 0, StreamRotation::ROTATION_0};
+ GRALLOC1_CONSUMER_USAGE_HWCOMPOSER, 0,
+ StreamRotation::ROTATION_0};
streams[0] = stream;
config = {streams,
StreamConfigurationMode::NORMAL_MODE};
@@ -2535,7 +2539,8 @@
static_cast<uint32_t> (it.width),
static_cast<uint32_t> (it.height),
static_cast<PixelFormat> (it.format),
- 0, 0, static_cast<StreamRotation> (UINT32_MAX)};
+ GRALLOC1_CONSUMER_USAGE_HWCOMPOSER, 0,
+ static_cast<StreamRotation> (UINT32_MAX)};
streams[0] = stream;
config = {streams,
StreamConfigurationMode::NORMAL_MODE};
@@ -2617,7 +2622,8 @@
Stream outputStream = {streamId++, StreamType::OUTPUT,
static_cast<uint32_t> (outputIter.width),
static_cast<uint32_t> (outputIter.height),
- static_cast<PixelFormat> (outputIter.format), 0, 0,
+ static_cast<PixelFormat> (outputIter.format),
+ GRALLOC1_CONSUMER_USAGE_HWCOMPOSER, 0,
StreamRotation::ROTATION_0};
::android::hardware::hidl_vec<Stream> streams = {
@@ -2679,12 +2685,14 @@
Stream previewStream = {streamId++, StreamType::OUTPUT,
static_cast<uint32_t> (previewIter.width),
static_cast<uint32_t> (previewIter.height),
- static_cast<PixelFormat> (previewIter.format), 0, 0,
+ static_cast<PixelFormat> (previewIter.format),
+ GRALLOC1_CONSUMER_USAGE_HWCOMPOSER, 0,
StreamRotation::ROTATION_0};
Stream blobStream = {streamId++, StreamType::OUTPUT,
static_cast<uint32_t> (blobIter.width),
static_cast<uint32_t> (blobIter.height),
- static_cast<PixelFormat> (blobIter.format), 0, 0,
+ static_cast<PixelFormat> (blobIter.format),
+ GRALLOC1_CONSUMER_USAGE_CPU_READ, 0,
StreamRotation::ROTATION_0};
::android::hardware::hidl_vec<Stream> streams = {
previewStream, blobStream};
@@ -2740,7 +2748,8 @@
Stream stream = {streamId, StreamType::OUTPUT,
static_cast<uint32_t> (hfrStream.width),
static_cast<uint32_t> (hfrStream.height),
- static_cast<PixelFormat> (hfrStream.format), 0, 0,
+ static_cast<PixelFormat> (hfrStream.format),
+ GRALLOC1_CONSUMER_USAGE_VIDEO_ENCODER, 0,
StreamRotation::ROTATION_0};
::android::hardware::hidl_vec<Stream> streams = {stream};
StreamConfiguration config = {streams,
@@ -2756,7 +2765,8 @@
stream = {streamId++, StreamType::OUTPUT,
static_cast<uint32_t> (0),
static_cast<uint32_t> (0),
- static_cast<PixelFormat> (hfrStream.format), 0, 0,
+ static_cast<PixelFormat> (hfrStream.format),
+ GRALLOC1_CONSUMER_USAGE_VIDEO_ENCODER, 0,
StreamRotation::ROTATION_0};
streams[0] = stream;
config = {streams,
@@ -2771,7 +2781,8 @@
stream = {streamId++, StreamType::OUTPUT,
static_cast<uint32_t> (UINT32_MAX),
static_cast<uint32_t> (UINT32_MAX),
- static_cast<PixelFormat> (hfrStream.format), 0, 0,
+ static_cast<PixelFormat> (hfrStream.format),
+ GRALLOC1_CONSUMER_USAGE_VIDEO_ENCODER, 0,
StreamRotation::ROTATION_0};
streams[0] = stream;
config = {streams,
@@ -2785,7 +2796,8 @@
stream = {streamId++, StreamType::OUTPUT,
static_cast<uint32_t> (hfrStream.width),
static_cast<uint32_t> (hfrStream.height),
- static_cast<PixelFormat> (UINT32_MAX), 0, 0,
+ static_cast<PixelFormat> (UINT32_MAX),
+ GRALLOC1_CONSUMER_USAGE_VIDEO_ENCODER, 0,
StreamRotation::ROTATION_0};
streams[0] = stream;
config = {streams,
@@ -2843,12 +2855,13 @@
static_cast<uint32_t> (videoIter.width),
static_cast<uint32_t> (videoIter.height),
static_cast<PixelFormat> (videoIter.format),
- 0, 0, StreamRotation::ROTATION_0};
+ GRALLOC1_CONSUMER_USAGE_VIDEO_ENCODER, 0,
+ StreamRotation::ROTATION_0};
Stream blobStream = {streamId++, StreamType::OUTPUT,
static_cast<uint32_t> (blobIter.width),
static_cast<uint32_t> (blobIter.height),
static_cast<PixelFormat> (blobIter.format),
- GRALLOC_USAGE_HW_VIDEO_ENCODER, 0,
+ GRALLOC1_CONSUMER_USAGE_CPU_READ, 0,
StreamRotation::ROTATION_0};
::android::hardware::hidl_vec<Stream> streams = {
videoStream, blobStream};
@@ -3570,7 +3583,7 @@
static_cast<uint32_t> (outputPreviewStreams[0].width),
static_cast<uint32_t> (outputPreviewStreams[0].height),
static_cast<PixelFormat> (outputPreviewStreams[0].format),
- 0, 0, StreamRotation::ROTATION_0};
+ GRALLOC1_CONSUMER_USAGE_HWCOMPOSER, 0, StreamRotation::ROTATION_0};
::android::hardware::hidl_vec<Stream> streams = {*previewStream};
StreamConfiguration config = {streams,
StreamConfigurationMode::NORMAL_MODE};