CpuConsumer::LockedBuffer buf;
status_t ret;
- EXPECT_OK(ret);
if (OK == (ret = consumer->lockNextBuffer(&buf))) {
dout << "Frame received on streamId = " << streamId <<
* 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);
EXPECT_OK(mCamera->exclusiveTryLock());
- uint8_t streams[] = { depthStreamId };
+ int32_t streams[] = { depthStreamId };
ASSERT_NO_FATAL_FAILURE(createSubmitRequestForStreams(
streams,
/*count*/1));
// 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;
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());
// 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);
// 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);
// 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);
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
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));
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));
EXPECT_OK(mCamera->exclusiveTryLock());
- uint8_t streams[] = { streamId };
+ int32_t streams[] = { streamId };
ASSERT_NO_FATAL_FAILURE(createSubmitRequestForStreams(streams, /*count*/1,
/*requests*/NUM_REQUESTS));
}
const int NUM_REQUESTS = 20 * TEST_CPU_FRAME_COUNT;
- const int CONSECUTIVE_FAILS_ASSUME_TIME_OUT = 5;
int streamId = -1;
sp<CpuConsumer> consumer;
EXPECT_OK(mCamera->exclusiveTryLock());
- uint8_t streams[] = { streamId };
+ int32_t streams[] = { streamId };
ASSERT_NO_FATAL_FAILURE(createSubmitRequestForStreams(streams, /*count*/1,
/*requests*/NUM_REQUESTS));
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);
StreamType mActiveRequest;
bool mPaused;
- Vector<uint8_t> mActiveStreamIds;
+ Vector<int32_t> mActiveStreamIds;
// Preview-related members
int32_t mPreviewRequestId;
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);
};