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

Commit 48e25765 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Camera: Update stream consumer usage flag" into oc-dr1-dev

parents 63a9a981 7596b25b
Loading
Loading
Loading
Loading
+28 −15
Original line number Original line Diff line number Diff line
@@ -2458,7 +2458,8 @@ TEST_F(CameraHidlTest, configureStreamsAvailableOutputs) {
                    Stream stream = {streamId, StreamType::OUTPUT,
                    Stream stream = {streamId, StreamType::OUTPUT,
                            static_cast<uint32_t> (it.width),
                            static_cast<uint32_t> (it.width),
                            static_cast<uint32_t> (it.height),
                            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};
                            StreamRotation::ROTATION_0};
                    ::android::hardware::hidl_vec<Stream> streams = {stream};
                    ::android::hardware::hidl_vec<Stream> streams = {stream};
                    StreamConfiguration config = {streams,
                    StreamConfiguration config = {streams,
@@ -2507,7 +2508,8 @@ TEST_F(CameraHidlTest, configureStreamsInvalidOutputs) {
                        static_cast<uint32_t> (0),
                        static_cast<uint32_t> (0),
                        static_cast<uint32_t> (0),
                        static_cast<uint32_t> (0),
                        static_cast<PixelFormat> (outputStreams[0].format),
                        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};
                ::android::hardware::hidl_vec<Stream> streams = {stream};
                StreamConfiguration config = {streams,
                StreamConfiguration config = {streams,
                        StreamConfigurationMode::NORMAL_MODE};
                        StreamConfigurationMode::NORMAL_MODE};
@@ -2522,7 +2524,8 @@ TEST_F(CameraHidlTest, configureStreamsInvalidOutputs) {
                        static_cast<uint32_t> (UINT32_MAX),
                        static_cast<uint32_t> (UINT32_MAX),
                        static_cast<uint32_t> (UINT32_MAX),
                        static_cast<uint32_t> (UINT32_MAX),
                        static_cast<PixelFormat> (outputStreams[0].format),
                        static_cast<PixelFormat> (outputStreams[0].format),
                        0, 0, StreamRotation::ROTATION_0};
                        GRALLOC1_CONSUMER_USAGE_HWCOMPOSER, 0,
                        StreamRotation::ROTATION_0};
                streams[0] = stream;
                streams[0] = stream;
                config = {streams,
                config = {streams,
                        StreamConfigurationMode::NORMAL_MODE};
                        StreamConfigurationMode::NORMAL_MODE};
@@ -2537,7 +2540,8 @@ TEST_F(CameraHidlTest, configureStreamsInvalidOutputs) {
                            static_cast<uint32_t> (it.width),
                            static_cast<uint32_t> (it.width),
                            static_cast<uint32_t> (it.height),
                            static_cast<uint32_t> (it.height),
                            static_cast<PixelFormat> (UINT32_MAX),
                            static_cast<PixelFormat> (UINT32_MAX),
                            0, 0, StreamRotation::ROTATION_0};
                            GRALLOC1_CONSUMER_USAGE_HWCOMPOSER, 0,
                            StreamRotation::ROTATION_0};
                    streams[0] = stream;
                    streams[0] = stream;
                    config = {streams,
                    config = {streams,
                            StreamConfigurationMode::NORMAL_MODE};
                            StreamConfigurationMode::NORMAL_MODE};
@@ -2551,7 +2555,8 @@ TEST_F(CameraHidlTest, configureStreamsInvalidOutputs) {
                            static_cast<uint32_t> (it.width),
                            static_cast<uint32_t> (it.width),
                            static_cast<uint32_t> (it.height),
                            static_cast<uint32_t> (it.height),
                            static_cast<PixelFormat> (it.format),
                            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;
                    streams[0] = stream;
                    config = {streams,
                    config = {streams,
                            StreamConfigurationMode::NORMAL_MODE};
                            StreamConfigurationMode::NORMAL_MODE};
@@ -2633,7 +2638,8 @@ TEST_F(CameraHidlTest, configureStreamsZSLInputOutputs) {
                        Stream outputStream = {streamId++, StreamType::OUTPUT,
                        Stream outputStream = {streamId++, StreamType::OUTPUT,
                                static_cast<uint32_t> (outputIter.width),
                                static_cast<uint32_t> (outputIter.width),
                                static_cast<uint32_t> (outputIter.height),
                                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};
                                StreamRotation::ROTATION_0};


                        ::android::hardware::hidl_vec<Stream> streams = {
                        ::android::hardware::hidl_vec<Stream> streams = {
@@ -2695,12 +2701,14 @@ TEST_F(CameraHidlTest, configureStreamsPreviewStillOutputs) {
                        Stream previewStream = {streamId++, StreamType::OUTPUT,
                        Stream previewStream = {streamId++, StreamType::OUTPUT,
                                static_cast<uint32_t> (previewIter.width),
                                static_cast<uint32_t> (previewIter.width),
                                static_cast<uint32_t> (previewIter.height),
                                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};
                                StreamRotation::ROTATION_0};
                        Stream blobStream = {streamId++, StreamType::OUTPUT,
                        Stream blobStream = {streamId++, StreamType::OUTPUT,
                                static_cast<uint32_t> (blobIter.width),
                                static_cast<uint32_t> (blobIter.width),
                                static_cast<uint32_t> (blobIter.height),
                                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};
                                StreamRotation::ROTATION_0};
                        ::android::hardware::hidl_vec<Stream> streams = {
                        ::android::hardware::hidl_vec<Stream> streams = {
                                previewStream, blobStream};
                                previewStream, blobStream};
@@ -2756,7 +2764,8 @@ TEST_F(CameraHidlTest, configureStreamsConstrainedOutputs) {
                Stream stream = {streamId, StreamType::OUTPUT,
                Stream stream = {streamId, StreamType::OUTPUT,
                        static_cast<uint32_t> (hfrStream.width),
                        static_cast<uint32_t> (hfrStream.width),
                        static_cast<uint32_t> (hfrStream.height),
                        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};
                        StreamRotation::ROTATION_0};
                ::android::hardware::hidl_vec<Stream> streams = {stream};
                ::android::hardware::hidl_vec<Stream> streams = {stream};
                StreamConfiguration config = {streams,
                StreamConfiguration config = {streams,
@@ -2772,7 +2781,8 @@ TEST_F(CameraHidlTest, configureStreamsConstrainedOutputs) {
                stream = {streamId++, StreamType::OUTPUT,
                stream = {streamId++, StreamType::OUTPUT,
                        static_cast<uint32_t> (0),
                        static_cast<uint32_t> (0),
                        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};
                        StreamRotation::ROTATION_0};
                streams[0] = stream;
                streams[0] = stream;
                config = {streams,
                config = {streams,
@@ -2787,7 +2797,8 @@ TEST_F(CameraHidlTest, configureStreamsConstrainedOutputs) {
                stream = {streamId++, StreamType::OUTPUT,
                stream = {streamId++, StreamType::OUTPUT,
                        static_cast<uint32_t> (UINT32_MAX),
                        static_cast<uint32_t> (UINT32_MAX),
                        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};
                        StreamRotation::ROTATION_0};
                streams[0] = stream;
                streams[0] = stream;
                config = {streams,
                config = {streams,
@@ -2801,7 +2812,8 @@ TEST_F(CameraHidlTest, configureStreamsConstrainedOutputs) {
                stream = {streamId++, StreamType::OUTPUT,
                stream = {streamId++, StreamType::OUTPUT,
                        static_cast<uint32_t> (hfrStream.width),
                        static_cast<uint32_t> (hfrStream.width),
                        static_cast<uint32_t> (hfrStream.height),
                        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};
                        StreamRotation::ROTATION_0};
                streams[0] = stream;
                streams[0] = stream;
                config = {streams,
                config = {streams,
@@ -2859,12 +2871,13 @@ TEST_F(CameraHidlTest, configureStreamsVideoStillOutputs) {
                                static_cast<uint32_t> (videoIter.width),
                                static_cast<uint32_t> (videoIter.width),
                                static_cast<uint32_t> (videoIter.height),
                                static_cast<uint32_t> (videoIter.height),
                                static_cast<PixelFormat> (videoIter.format),
                                static_cast<PixelFormat> (videoIter.format),
                                0, 0, StreamRotation::ROTATION_0};
                                GRALLOC1_CONSUMER_USAGE_VIDEO_ENCODER, 0,
                                StreamRotation::ROTATION_0};
                        Stream blobStream = {streamId++, StreamType::OUTPUT,
                        Stream blobStream = {streamId++, StreamType::OUTPUT,
                                static_cast<uint32_t> (blobIter.width),
                                static_cast<uint32_t> (blobIter.width),
                                static_cast<uint32_t> (blobIter.height),
                                static_cast<uint32_t> (blobIter.height),
                                static_cast<PixelFormat> (blobIter.format),
                                static_cast<PixelFormat> (blobIter.format),
                                GRALLOC_USAGE_HW_VIDEO_ENCODER, 0,
                                GRALLOC1_CONSUMER_USAGE_CPU_READ, 0,
                                StreamRotation::ROTATION_0};
                                StreamRotation::ROTATION_0};
                        ::android::hardware::hidl_vec<Stream> streams = {
                        ::android::hardware::hidl_vec<Stream> streams = {
                                videoStream, blobStream};
                                videoStream, blobStream};
@@ -3587,7 +3600,7 @@ void CameraHidlTest::configurePreviewStream(const std::string &name,
            static_cast<uint32_t> (outputPreviewStreams[0].width),
            static_cast<uint32_t> (outputPreviewStreams[0].width),
            static_cast<uint32_t> (outputPreviewStreams[0].height),
            static_cast<uint32_t> (outputPreviewStreams[0].height),
            static_cast<PixelFormat> (outputPreviewStreams[0].format),
            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};
    ::android::hardware::hidl_vec<Stream> streams = {*previewStream};
    StreamConfiguration config = {streams,
    StreamConfiguration config = {streams,
            StreamConfigurationMode::NORMAL_MODE};
            StreamConfigurationMode::NORMAL_MODE};