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

Commit c31dc7e6 authored by Eino-Ville Talvala's avatar Eino-Ville Talvala
Browse files

Camera3Device: Update frame counters/timestamps for dumpsys info

For output streams, increment frame count and update timestamp when a
filled buffer is queued to the output buffer queue.

For input streams, increment frame count and update timestamp when a
buffer is acquired from the input buffer queue.

Test: Manual inspection of adb shell dumpsys media.camera while
   running DevCamera
Change-Id: I8dc1d134baf5ad467e169f3ba6ffe0d1486df9dc
parent d00111e3
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -85,6 +85,9 @@ status_t Camera3InputStream::getInputBufferLocked(
                        /*releaseFence*/-1, CAMERA3_BUFFER_STATUS_OK, /*output*/false);
    mBuffersInFlight.push_back(bufferItem);

    mFrameCount++;
    mLastTimestamp = bufferItem.mTimestamp;

    return OK;
}

@@ -220,6 +223,7 @@ status_t Camera3InputStream::configureQueueLocked() {

    mHandoutTotalBufferCount = 0;
    mFrameCount = 0;
    mLastTimestamp = 0;

    if (mConsumer.get() == 0) {
        sp<IGraphicBufferProducer> producer;
+1 −0
Original line number Diff line number Diff line
@@ -239,6 +239,7 @@ status_t Camera3OutputStream::returnBufferLocked(
    }

    mLastTimestamp = timestamp;
    mFrameCount++;

    return OK;
}