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

Commit 55497fca authored by Emilian Peev's avatar Emilian Peev
Browse files

Camera: Enable surface sharing for all formats

Surface sharing must be enabled for all pixel formats
supported by the camera.

Bug:73135123
Test: Camera CTS
Change-Id: I804a881461a2dc19ad4901b319919df1488be422
parent e54461ae
Loading
Loading
Loading
Loading
+0 −16
Original line number Diff line number Diff line
@@ -633,14 +633,6 @@ binder::Status CameraDeviceClient::createStream(
            return res;

        if (!isStreamInfoValid) {
            // Streaming sharing is only supported for IMPLEMENTATION_DEFINED
            // formats.
            if (isShared && streamInfo.format != HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED) {
                String8 msg = String8::format("Camera %s: Stream sharing is only supported for "
                        "IMPLEMENTATION_DEFINED format", mCameraIdStr.string());
                ALOGW("%s: %s", __FUNCTION__, msg.string());
                return STATUS_ERROR(CameraService::ERROR_ILLEGAL_ARGUMENT, msg.string());
            }
            isStreamInfoValid = true;
        }

@@ -920,14 +912,6 @@ binder::Status CameraDeviceClient::updateOutputConfiguration(int streamId,
        if (!res.isOk())
            return res;

        // Stream sharing is only supported for IMPLEMENTATION_DEFINED
        // formats.
        if (outInfo.format != HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED) {
            String8 msg = String8::format("Camera %s: Stream sharing is only supported for "
                    "IMPLEMENTATION_DEFINED format", mCameraIdStr.string());
            ALOGW("%s: %s", __FUNCTION__, msg.string());
            return STATUS_ERROR(CameraService::ERROR_ILLEGAL_ARGUMENT, msg.string());
        }
        streamInfos.push_back(outInfo);
        newOutputs.push_back(surface);
    }