mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-13 15:29:45 +03:00
android: CameraDevice: Mark getResultMetadata() const function
CameraDevice::getResultMetadata() doesn't change either |descriptor| and member variables. It should be marked as a const function and |descriptor| should be passed with const lvalue reference. Signed-off-by: Hirokazu Honda <hiroh@chromium.org> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
parent
f101cc6878
commit
82b8151aa7
2 changed files with 7 additions and 6 deletions
|
@ -1924,7 +1924,7 @@ void CameraDevice::requestComplete(Request *request)
|
|||
* pipeline handlers) timestamp in the Request itself.
|
||||
*/
|
||||
uint64_t timestamp = buffers.begin()->second->metadata().timestamp;
|
||||
resultMetadata = getResultMetadata(descriptor, timestamp);
|
||||
resultMetadata = getResultMetadata(*descriptor, timestamp);
|
||||
|
||||
/* Handle any JPEG compression. */
|
||||
for (camera3_stream_buffer_t &buffer : descriptor->buffers_) {
|
||||
|
@ -2030,11 +2030,11 @@ void CameraDevice::notifyError(uint32_t frameNumber, camera3_stream_t *stream)
|
|||
* Produce a set of fixed result metadata.
|
||||
*/
|
||||
std::unique_ptr<CameraMetadata>
|
||||
CameraDevice::getResultMetadata(Camera3RequestDescriptor *descriptor,
|
||||
int64_t timestamp)
|
||||
CameraDevice::getResultMetadata(const Camera3RequestDescriptor &descriptor,
|
||||
int64_t timestamp) const
|
||||
{
|
||||
const ControlList &metadata = descriptor->request_->metadata();
|
||||
const CameraMetadata &settings = descriptor->settings_;
|
||||
const ControlList &metadata = descriptor.request_->metadata();
|
||||
const CameraMetadata &settings = descriptor.settings_;
|
||||
camera_metadata_ro_entry_t entry;
|
||||
bool found;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue