Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 39e2d42d authored by Emilian Peev's avatar Emilian Peev Committed by android-build-merger
Browse files

Merge "NO PARTIAL RERUN Camera: Update stream consumer usage flag" into oc-dev

am: 456dc6cc

Change-Id: I2101aa5931f85f78f19e35922bdecfabd4687c65
parents d42258ea 456dc6cc
Loading
Loading
Loading
Loading
+30 −16
Original line number Diff line number Diff line
@@ -2454,7 +2454,8 @@ TEST_F(CameraHidlTest, configureStreamsAvailableOutputs) {
                    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,
@@ -2503,7 +2504,8 @@ TEST_F(CameraHidlTest, configureStreamsInvalidOutputs) {
                        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};
@@ -2518,7 +2520,8 @@ TEST_F(CameraHidlTest, configureStreamsInvalidOutputs) {
                        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};
@@ -2533,7 +2536,8 @@ TEST_F(CameraHidlTest, configureStreamsInvalidOutputs) {
                            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};
@@ -2547,7 +2551,8 @@ TEST_F(CameraHidlTest, configureStreamsInvalidOutputs) {
                            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};
@@ -2624,12 +2629,14 @@ TEST_F(CameraHidlTest, configureStreamsZSLInputOutputs) {
                        Stream inputStream = {streamId++, StreamType::INPUT,
                                static_cast<uint32_t> (input.width),
                                static_cast<uint32_t> (input.height),
                                static_cast<PixelFormat> (input.format), 0, 0,
                                static_cast<PixelFormat> (input.format),
                                0, 0,
                                StreamRotation::ROTATION_0};
                        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 = {
@@ -2691,12 +2698,14 @@ TEST_F(CameraHidlTest, configureStreamsPreviewStillOutputs) {
                        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};
@@ -2752,7 +2761,8 @@ TEST_F(CameraHidlTest, configureStreamsConstrainedOutputs) {
                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,
@@ -2768,7 +2778,8 @@ TEST_F(CameraHidlTest, configureStreamsConstrainedOutputs) {
                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,
@@ -2783,7 +2794,8 @@ TEST_F(CameraHidlTest, configureStreamsConstrainedOutputs) {
                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,
@@ -2797,7 +2809,8 @@ TEST_F(CameraHidlTest, configureStreamsConstrainedOutputs) {
                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,
@@ -2855,12 +2868,13 @@ TEST_F(CameraHidlTest, configureStreamsVideoStillOutputs) {
                                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};
@@ -3589,7 +3603,7 @@ void CameraHidlTest::configurePreviewStream(const std::string &name,
            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};