Loading camera/tests/ProCameraTests.cpp +12 −14 Original line number Diff line number Diff line Loading @@ -271,7 +271,6 @@ protected: CpuConsumer::LockedBuffer buf; status_t ret; EXPECT_OK(ret); if (OK == (ret = consumer->lockNextBuffer(&buf))) { dout << "Frame received on streamId = " << streamId << Loading Loading @@ -482,7 +481,7 @@ protected: * Creating a streaming request for these output streams from a template, * and submit it */ void createSubmitRequestForStreams(uint8_t* streamIds, size_t count, int requestCount=-1) { void createSubmitRequestForStreams(int32_t* streamIds, size_t count, int requestCount=-1) { ASSERT_NE((void*)NULL, streamIds); ASSERT_LT(0u, count); Loading Loading @@ -629,7 +628,7 @@ TEST_F(ProCameraTest, DISABLED_StreamingImageSingle) { EXPECT_OK(mCamera->exclusiveTryLock()); uint8_t streams[] = { depthStreamId }; int32_t streams[] = { depthStreamId }; ASSERT_NO_FATAL_FAILURE(createSubmitRequestForStreams( streams, /*count*/1)); Loading Loading @@ -706,7 +705,7 @@ TEST_F(ProCameraTest, DISABLED_StreamingImageDual) { // set the output streams to just this stream ID // wow what a verbose API. uint8_t allStreams[] = { streamId, depthStreamId }; int32_t allStreams[] = { streamId, depthStreamId }; // IMPORTANT. bad things will happen if its not a uint8. size_t streamCount = sizeof(allStreams) / sizeof(allStreams[0]); camera_metadata_entry_t entry; Loading Loading @@ -735,7 +734,7 @@ TEST_F(ProCameraTest, DISABLED_StreamingImageDual) { free_camera_metadata(request); for (int i = 0; i < streamCount; ++i) { for (size_t i = 0; i < streamCount; ++i) { EXPECT_OK(mCamera->deleteStream(allStreams[i])); } EXPECT_OK(mCamera->exclusiveUnlock()); Loading Loading @@ -777,7 +776,7 @@ TEST_F(ProCameraTest, CpuConsumerSingle) { // set the output streams to just this stream ID uint8_t allStreams[] = { streamId }; int32_t allStreams[] = { streamId }; camera_metadata_entry_t entry; uint32_t tag = static_cast<uint32_t>(ANDROID_REQUEST_OUTPUT_STREAMS); int find = find_camera_metadata_entry(request, tag, &entry); Loading Loading @@ -848,7 +847,7 @@ TEST_F(ProCameraTest, CpuConsumerDual) { // set the output streams to just this stream ID // wow what a verbose API. uint8_t allStreams[] = { streamId, depthStreamId }; int32_t allStreams[] = { streamId, depthStreamId }; size_t streamCount = 2; camera_metadata_entry_t entry; uint32_t tag = static_cast<uint32_t>(ANDROID_REQUEST_OUTPUT_STREAMS); Loading Loading @@ -923,7 +922,7 @@ TEST_F(ProCameraTest, ResultReceiver) { // set the output streams to just this stream ID uint8_t allStreams[] = { streamId }; int32_t allStreams[] = { streamId }; size_t streamCount = 1; camera_metadata_entry_t entry; uint32_t tag = static_cast<uint32_t>(ANDROID_REQUEST_OUTPUT_STREAMS); Loading Loading @@ -974,7 +973,7 @@ TEST_F(ProCameraTest, DISABLED_WaitForResult) { EXPECT_OK(mCamera->exclusiveTryLock()); uint8_t streams[] = { streamId }; int32_t streams[] = { streamId }; ASSERT_NO_FATAL_FAILURE(createSubmitRequestForStreams(streams, /*count*/1)); // Consume a couple of results Loading Loading @@ -1002,7 +1001,7 @@ TEST_F(ProCameraTest, WaitForSingleStreamBuffer) { EXPECT_OK(mCamera->exclusiveTryLock()); uint8_t streams[] = { streamId }; int32_t streams[] = { streamId }; ASSERT_NO_FATAL_FAILURE(createSubmitRequestForStreams(streams, /*count*/1, /*requests*/TEST_CPU_FRAME_COUNT)); Loading Loading @@ -1049,7 +1048,7 @@ TEST_F(ProCameraTest, DISABLED_WaitForDualStreamBuffer) { EXPECT_OK(mCamera->exclusiveTryLock()); uint8_t streams[] = { streamId, depthStreamId }; int32_t streams[] = { streamId, depthStreamId }; ASSERT_NO_FATAL_FAILURE(createSubmitRequestForStreams(streams, /*count*/2, /*requests*/REQUEST_COUNT)); Loading Loading @@ -1128,7 +1127,7 @@ TEST_F(ProCameraTest, WaitForSingleStreamBufferAndDropFramesSync) { EXPECT_OK(mCamera->exclusiveTryLock()); uint8_t streams[] = { streamId }; int32_t streams[] = { streamId }; ASSERT_NO_FATAL_FAILURE(createSubmitRequestForStreams(streams, /*count*/1, /*requests*/NUM_REQUESTS)); Loading Loading @@ -1172,7 +1171,6 @@ TEST_F(ProCameraTest, WaitForSingleStreamBufferAndDropFramesAsync) { } const int NUM_REQUESTS = 20 * TEST_CPU_FRAME_COUNT; const int CONSECUTIVE_FAILS_ASSUME_TIME_OUT = 5; int streamId = -1; sp<CpuConsumer> consumer; Loading @@ -1183,7 +1181,7 @@ TEST_F(ProCameraTest, WaitForSingleStreamBufferAndDropFramesAsync) { EXPECT_OK(mCamera->exclusiveTryLock()); uint8_t streams[] = { streamId }; int32_t streams[] = { streamId }; ASSERT_NO_FATAL_FAILURE(createSubmitRequestForStreams(streams, /*count*/1, /*requests*/NUM_REQUESTS)); Loading services/camera/libcameraservice/api1/Camera2Client.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -743,7 +743,7 @@ status_t Camera2Client::startPreviewL(Parameters ¶ms, bool restart) { return res; } Vector<uint8_t> outputStreams; Vector<int32_t> outputStreams; bool callbacksEnabled = (params.previewCallbackFlags & CAMERA_FRAME_CALLBACK_FLAG_ENABLE_MASK) || params.previewCallbackSurface; Loading Loading @@ -999,7 +999,7 @@ status_t Camera2Client::startRecordingL(Parameters ¶ms, bool restart) { return res; } Vector<uint8_t> outputStreams; Vector<int32_t> outputStreams; outputStreams.push(getPreviewStreamId()); outputStreams.push(getRecordingStreamId()); Loading services/camera/libcameraservice/api1/client2/CaptureSequencer.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -437,7 +437,7 @@ CaptureSequencer::CaptureState CaptureSequencer::manageStandardCapture( status_t res; ATRACE_CALL(); SharedParameters::Lock l(client->getParameters()); Vector<uint8_t> outputStreams; Vector<int32_t> outputStreams; uint8_t captureIntent = static_cast<uint8_t>(ANDROID_CONTROL_CAPTURE_INTENT_STILL_CAPTURE); /** Loading services/camera/libcameraservice/api1/client2/StreamingProcessor.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -412,7 +412,7 @@ int StreamingProcessor::getRecordingStreamId() const { } status_t StreamingProcessor::startStream(StreamType type, const Vector<uint8_t> &outputStreams) { const Vector<int32_t> &outputStreams) { ATRACE_CALL(); status_t res; Loading Loading @@ -830,8 +830,8 @@ void StreamingProcessor::releaseAllRecordingFramesLocked() { mRecordingHeapFree = mRecordingHeapCount; } bool StreamingProcessor::isStreamActive(const Vector<uint8_t> &streams, uint8_t recordingStreamId) { bool StreamingProcessor::isStreamActive(const Vector<int32_t> &streams, int32_t recordingStreamId) { for (size_t i = 0; i < streams.size(); i++) { if (streams[i] == recordingStreamId) { return true; Loading services/camera/libcameraservice/api1/client2/StreamingProcessor.h +4 −4 Original line number Diff line number Diff line Loading @@ -64,7 +64,7 @@ class StreamingProcessor: RECORD }; status_t startStream(StreamType type, const Vector<uint8_t> &outputStreams); const Vector<int32_t> &outputStreams); // Toggle between paused and unpaused. Stream must be started first. status_t togglePauseStream(bool pause); Loading Loading @@ -97,7 +97,7 @@ class StreamingProcessor: StreamType mActiveRequest; bool mPaused; Vector<uint8_t> mActiveStreamIds; Vector<int32_t> mActiveStreamIds; // Preview-related members int32_t mPreviewRequestId; Loading Loading @@ -132,8 +132,8 @@ class StreamingProcessor: void releaseAllRecordingFramesLocked(); // Determine if the specified stream is currently in use static bool isStreamActive(const Vector<uint8_t> &streams, uint8_t recordingStreamId); static bool isStreamActive(const Vector<int32_t> &streams, int32_t recordingStreamId); }; Loading Loading
camera/tests/ProCameraTests.cpp +12 −14 Original line number Diff line number Diff line Loading @@ -271,7 +271,6 @@ protected: CpuConsumer::LockedBuffer buf; status_t ret; EXPECT_OK(ret); if (OK == (ret = consumer->lockNextBuffer(&buf))) { dout << "Frame received on streamId = " << streamId << Loading Loading @@ -482,7 +481,7 @@ protected: * Creating a streaming request for these output streams from a template, * and submit it */ void createSubmitRequestForStreams(uint8_t* streamIds, size_t count, int requestCount=-1) { void createSubmitRequestForStreams(int32_t* streamIds, size_t count, int requestCount=-1) { ASSERT_NE((void*)NULL, streamIds); ASSERT_LT(0u, count); Loading Loading @@ -629,7 +628,7 @@ TEST_F(ProCameraTest, DISABLED_StreamingImageSingle) { EXPECT_OK(mCamera->exclusiveTryLock()); uint8_t streams[] = { depthStreamId }; int32_t streams[] = { depthStreamId }; ASSERT_NO_FATAL_FAILURE(createSubmitRequestForStreams( streams, /*count*/1)); Loading Loading @@ -706,7 +705,7 @@ TEST_F(ProCameraTest, DISABLED_StreamingImageDual) { // set the output streams to just this stream ID // wow what a verbose API. uint8_t allStreams[] = { streamId, depthStreamId }; int32_t allStreams[] = { streamId, depthStreamId }; // IMPORTANT. bad things will happen if its not a uint8. size_t streamCount = sizeof(allStreams) / sizeof(allStreams[0]); camera_metadata_entry_t entry; Loading Loading @@ -735,7 +734,7 @@ TEST_F(ProCameraTest, DISABLED_StreamingImageDual) { free_camera_metadata(request); for (int i = 0; i < streamCount; ++i) { for (size_t i = 0; i < streamCount; ++i) { EXPECT_OK(mCamera->deleteStream(allStreams[i])); } EXPECT_OK(mCamera->exclusiveUnlock()); Loading Loading @@ -777,7 +776,7 @@ TEST_F(ProCameraTest, CpuConsumerSingle) { // set the output streams to just this stream ID uint8_t allStreams[] = { streamId }; int32_t allStreams[] = { streamId }; camera_metadata_entry_t entry; uint32_t tag = static_cast<uint32_t>(ANDROID_REQUEST_OUTPUT_STREAMS); int find = find_camera_metadata_entry(request, tag, &entry); Loading Loading @@ -848,7 +847,7 @@ TEST_F(ProCameraTest, CpuConsumerDual) { // set the output streams to just this stream ID // wow what a verbose API. uint8_t allStreams[] = { streamId, depthStreamId }; int32_t allStreams[] = { streamId, depthStreamId }; size_t streamCount = 2; camera_metadata_entry_t entry; uint32_t tag = static_cast<uint32_t>(ANDROID_REQUEST_OUTPUT_STREAMS); Loading Loading @@ -923,7 +922,7 @@ TEST_F(ProCameraTest, ResultReceiver) { // set the output streams to just this stream ID uint8_t allStreams[] = { streamId }; int32_t allStreams[] = { streamId }; size_t streamCount = 1; camera_metadata_entry_t entry; uint32_t tag = static_cast<uint32_t>(ANDROID_REQUEST_OUTPUT_STREAMS); Loading Loading @@ -974,7 +973,7 @@ TEST_F(ProCameraTest, DISABLED_WaitForResult) { EXPECT_OK(mCamera->exclusiveTryLock()); uint8_t streams[] = { streamId }; int32_t streams[] = { streamId }; ASSERT_NO_FATAL_FAILURE(createSubmitRequestForStreams(streams, /*count*/1)); // Consume a couple of results Loading Loading @@ -1002,7 +1001,7 @@ TEST_F(ProCameraTest, WaitForSingleStreamBuffer) { EXPECT_OK(mCamera->exclusiveTryLock()); uint8_t streams[] = { streamId }; int32_t streams[] = { streamId }; ASSERT_NO_FATAL_FAILURE(createSubmitRequestForStreams(streams, /*count*/1, /*requests*/TEST_CPU_FRAME_COUNT)); Loading Loading @@ -1049,7 +1048,7 @@ TEST_F(ProCameraTest, DISABLED_WaitForDualStreamBuffer) { EXPECT_OK(mCamera->exclusiveTryLock()); uint8_t streams[] = { streamId, depthStreamId }; int32_t streams[] = { streamId, depthStreamId }; ASSERT_NO_FATAL_FAILURE(createSubmitRequestForStreams(streams, /*count*/2, /*requests*/REQUEST_COUNT)); Loading Loading @@ -1128,7 +1127,7 @@ TEST_F(ProCameraTest, WaitForSingleStreamBufferAndDropFramesSync) { EXPECT_OK(mCamera->exclusiveTryLock()); uint8_t streams[] = { streamId }; int32_t streams[] = { streamId }; ASSERT_NO_FATAL_FAILURE(createSubmitRequestForStreams(streams, /*count*/1, /*requests*/NUM_REQUESTS)); Loading Loading @@ -1172,7 +1171,6 @@ TEST_F(ProCameraTest, WaitForSingleStreamBufferAndDropFramesAsync) { } const int NUM_REQUESTS = 20 * TEST_CPU_FRAME_COUNT; const int CONSECUTIVE_FAILS_ASSUME_TIME_OUT = 5; int streamId = -1; sp<CpuConsumer> consumer; Loading @@ -1183,7 +1181,7 @@ TEST_F(ProCameraTest, WaitForSingleStreamBufferAndDropFramesAsync) { EXPECT_OK(mCamera->exclusiveTryLock()); uint8_t streams[] = { streamId }; int32_t streams[] = { streamId }; ASSERT_NO_FATAL_FAILURE(createSubmitRequestForStreams(streams, /*count*/1, /*requests*/NUM_REQUESTS)); Loading
services/camera/libcameraservice/api1/Camera2Client.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -743,7 +743,7 @@ status_t Camera2Client::startPreviewL(Parameters ¶ms, bool restart) { return res; } Vector<uint8_t> outputStreams; Vector<int32_t> outputStreams; bool callbacksEnabled = (params.previewCallbackFlags & CAMERA_FRAME_CALLBACK_FLAG_ENABLE_MASK) || params.previewCallbackSurface; Loading Loading @@ -999,7 +999,7 @@ status_t Camera2Client::startRecordingL(Parameters ¶ms, bool restart) { return res; } Vector<uint8_t> outputStreams; Vector<int32_t> outputStreams; outputStreams.push(getPreviewStreamId()); outputStreams.push(getRecordingStreamId()); Loading
services/camera/libcameraservice/api1/client2/CaptureSequencer.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -437,7 +437,7 @@ CaptureSequencer::CaptureState CaptureSequencer::manageStandardCapture( status_t res; ATRACE_CALL(); SharedParameters::Lock l(client->getParameters()); Vector<uint8_t> outputStreams; Vector<int32_t> outputStreams; uint8_t captureIntent = static_cast<uint8_t>(ANDROID_CONTROL_CAPTURE_INTENT_STILL_CAPTURE); /** Loading
services/camera/libcameraservice/api1/client2/StreamingProcessor.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -412,7 +412,7 @@ int StreamingProcessor::getRecordingStreamId() const { } status_t StreamingProcessor::startStream(StreamType type, const Vector<uint8_t> &outputStreams) { const Vector<int32_t> &outputStreams) { ATRACE_CALL(); status_t res; Loading Loading @@ -830,8 +830,8 @@ void StreamingProcessor::releaseAllRecordingFramesLocked() { mRecordingHeapFree = mRecordingHeapCount; } bool StreamingProcessor::isStreamActive(const Vector<uint8_t> &streams, uint8_t recordingStreamId) { bool StreamingProcessor::isStreamActive(const Vector<int32_t> &streams, int32_t recordingStreamId) { for (size_t i = 0; i < streams.size(); i++) { if (streams[i] == recordingStreamId) { return true; Loading
services/camera/libcameraservice/api1/client2/StreamingProcessor.h +4 −4 Original line number Diff line number Diff line Loading @@ -64,7 +64,7 @@ class StreamingProcessor: RECORD }; status_t startStream(StreamType type, const Vector<uint8_t> &outputStreams); const Vector<int32_t> &outputStreams); // Toggle between paused and unpaused. Stream must be started first. status_t togglePauseStream(bool pause); Loading Loading @@ -97,7 +97,7 @@ class StreamingProcessor: StreamType mActiveRequest; bool mPaused; Vector<uint8_t> mActiveStreamIds; Vector<int32_t> mActiveStreamIds; // Preview-related members int32_t mPreviewRequestId; Loading Loading @@ -132,8 +132,8 @@ class StreamingProcessor: void releaseAllRecordingFramesLocked(); // Determine if the specified stream is currently in use static bool isStreamActive(const Vector<uint8_t> &streams, uint8_t recordingStreamId); static bool isStreamActive(const Vector<int32_t> &streams, int32_t recordingStreamId); }; Loading