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

Commit edb86fe5 authored by Igor Murashkin's avatar Igor Murashkin Committed by Android (Google) Code Review
Browse files

Merge "ProCameraTests: Minor add grey/frame count debug-only print outs" into jb-mr2-dev

parents ee6ad3bd 47539189
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -1015,6 +1015,9 @@ TEST_F(ProCameraTest, WaitForDualStreamBuffer) {
    ASSERT_NO_FATAL_FAILURE(createSubmitRequestForStreams(streams, /*count*/2,
                                                    /*requests*/REQUEST_COUNT));

    int depthFrames = 0;
    int greyFrames = 0;

    // Consume two frames simultaneously. Unsynchronized by timestamps.
    for (int i = 0; i < REQUEST_COUNT; ++i) {

@@ -1041,6 +1044,8 @@ TEST_F(ProCameraTest, WaitForDualStreamBuffer) {

        EXPECT_OK(depthConsumer->unlockBuffer(depthBuffer));

        depthFrames++;


        /** Consume Greyscale frames if there are any.
          * There may not be since it runs at half FPS */
@@ -1053,9 +1058,14 @@ TEST_F(ProCameraTest, WaitForDualStreamBuffer) {
                ", timestamp = " << greyBuffer.timestamp << std::endl;

            EXPECT_OK(consumer->unlockBuffer(greyBuffer));

            greyFrames++;
        }
    }

    dout << "Done, summary: depth frames " << std::dec << depthFrames
         << ", grey frames " << std::dec << greyFrames << std::endl;

    // Done: clean up
    EXPECT_OK(mCamera->deleteStream(streamId));
    EXPECT_OK(mCamera->exclusiveUnlock());