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

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

Merge "Camera3: Provide consumer usage flags to HAL for each stream"

parents f86b18b1 b2f5b19e
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -77,6 +77,8 @@ class Camera3IOStreamBase :


    virtual size_t   getBufferCountLocked();
    virtual size_t   getBufferCountLocked();


    virtual status_t getEndpointUsage(uint32_t *usage) = 0;

    status_t getBufferPreconditionCheckLocked() const;
    status_t getBufferPreconditionCheckLocked() const;
    status_t returnBufferPreconditionCheckLocked() const;
    status_t returnBufferPreconditionCheckLocked() const;


+6 −0
Original line number Original line Diff line number Diff line
@@ -234,6 +234,12 @@ status_t Camera3InputStream::configureQueueLocked() {
    return OK;
    return OK;
}
}


status_t Camera3InputStream::getEndpointUsage(uint32_t *usage) {
    // Per HAL3 spec, input streams have 0 for their initial usage field.
    *usage = 0;
    return OK;
}

}; // namespace camera3
}; // namespace camera3


}; // namespace android
}; // namespace android
+2 −0
Original line number Original line Diff line number Diff line
@@ -79,6 +79,8 @@ class Camera3InputStream : public Camera3IOStreamBase {


    virtual status_t configureQueueLocked();
    virtual status_t configureQueueLocked();


    virtual status_t getEndpointUsage(uint32_t *usage);

}; // class Camera3InputStream
}; // class Camera3InputStream


}; // namespace camera3
}; // namespace camera3
+11 −0
Original line number Original line Diff line number Diff line
@@ -364,6 +364,17 @@ status_t Camera3OutputStream::disconnectLocked() {
    return OK;
    return OK;
}
}


status_t Camera3OutputStream::getEndpointUsage(uint32_t *usage) {

    status_t res;
    int32_t u = 0;
    res = mConsumer->query(mConsumer.get(),
            NATIVE_WINDOW_CONSUMER_USAGE_BITS, &u);
    *usage = u;

    return res;
}

}; // namespace camera3
}; // namespace camera3


}; // namespace android
}; // namespace android
+3 −0
Original line number Original line Diff line number Diff line
@@ -92,6 +92,9 @@ class Camera3OutputStream :


    virtual status_t configureQueueLocked();
    virtual status_t configureQueueLocked();
    virtual status_t disconnectLocked();
    virtual status_t disconnectLocked();

    virtual status_t getEndpointUsage(uint32_t *usage);

}; // class Camera3OutputStream
}; // class Camera3OutputStream


} // namespace camera3
} // namespace camera3
Loading