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

Commit d4db9dcd authored by Eino-Ville Talvala's avatar Eino-Ville Talvala Committed by Android (Google) Code Review
Browse files

Merge "Camera: Wire up dataSpace, clean up ICameraDeviceUser"

parents d4164c3a 3d82c0d9
Loading
Loading
Loading
Loading
+2 −13
Original line number Diff line number Diff line
@@ -208,14 +208,11 @@ public:
        return reply.readInt32();
    }

    virtual status_t createStream(int width, int height, int format,
    virtual status_t createStream(
                          const sp<IGraphicBufferProducer>& bufferProducer)
    {
        Parcel data, reply;
        data.writeInterfaceToken(ICameraDeviceUser::getInterfaceDescriptor());
        data.writeInt32(width);
        data.writeInt32(height);
        data.writeInt32(format);

        data.writeInt32(1); // marker that bufferProducer is not null
        data.writeString16(String16("unknown_name")); // name of surface
@@ -396,14 +393,6 @@ status_t BnCameraDeviceUser::onTransact(
        } break;
        case CREATE_STREAM: {
            CHECK_INTERFACE(ICameraDeviceUser, data, reply);
            int width, height, format;

            width = data.readInt32();
            ALOGV("%s: CREATE_STREAM: width = %d", __FUNCTION__, width);
            height = data.readInt32();
            ALOGV("%s: CREATE_STREAM: height = %d", __FUNCTION__, height);
            format = data.readInt32();
            ALOGV("%s: CREATE_STREAM: format = %d", __FUNCTION__, format);

            sp<IGraphicBufferProducer> bp;
            if (data.readInt32() != 0) {
@@ -419,7 +408,7 @@ status_t BnCameraDeviceUser::onTransact(
            }

            status_t ret;
            ret = createStream(width, height, format, bp);
            ret = createStream(bp);

            reply->writeNoException();
            ALOGV("%s: CREATE_STREAM: write noException", __FUNCTION__);
+0 −1
Original line number Diff line number Diff line
@@ -101,7 +101,6 @@ public:

    virtual status_t        deleteStream(int streamId) = 0;
    virtual status_t        createStream(
            int width, int height, int format,
            const sp<IGraphicBufferProducer>& bufferProducer) = 0;

    // Create a request object from a template.
+2 −1
Original line number Diff line number Diff line
@@ -388,7 +388,8 @@ status_t CameraDeviceClientFlashControl::initializeSurface(
    if (mAnw == NULL) {
        return NO_MEMORY;
    }
    res = device->createStream(mAnw, width, height, format, &mStreamId);
    res = device->createStream(mAnw, width, height, format,
            HAL_DATASPACE_UNKNOWN, &mStreamId);
    if (res) {
        return res;
    }
+1 −1
Original line number Diff line number Diff line
@@ -155,7 +155,7 @@ status_t CallbackProcessor::updateStream(const Parameters &params) {
                callbackFormat, params.previewFormat);
        res = device->createStream(mCallbackWindow,
                params.previewWidth, params.previewHeight,
                callbackFormat, &mCallbackStreamId);
                callbackFormat, HAL_DATASPACE_JFIF, &mCallbackStreamId);
        if (res != OK) {
            ALOGE("%s: Camera %d: Can't create output stream for callbacks: "
                    "%s (%d)", __FUNCTION__, mId,
+2 −1
Original line number Diff line number Diff line
@@ -145,7 +145,8 @@ status_t JpegProcessor::updateStream(const Parameters &params) {
        // Create stream for HAL production
        res = device->createStream(mCaptureWindow,
                params.pictureWidth, params.pictureHeight,
                HAL_PIXEL_FORMAT_BLOB, &mCaptureStreamId);
                HAL_PIXEL_FORMAT_BLOB, HAL_DATASPACE_JFIF,
                &mCaptureStreamId);
        if (res != OK) {
            ALOGE("%s: Camera %d: Can't create output stream for capture: "
                    "%s (%d)", __FUNCTION__, mId,
Loading