Merge "camera 3_4: Fix compilation errors"

This commit is contained in:
Treehugger Robot 2018-01-25 20:22:26 +00:00 committed by Gerrit Code Review
commit 7904e9c2d7
4 changed files with 5 additions and 4 deletions

View file

@ -499,7 +499,7 @@ void Camera::sendResult(std::shared_ptr<CaptureRequest> request) {
camera3_capture_result_t result {
request->frame_number,
request->settings.getAndLock(),
request->output_buffers.size(),
static_cast<uint32_t>(request->output_buffers.size()),
request->output_buffers.data(),
request->input_buffer.get(),
1 // Total result; only 1 part.

View file

@ -35,7 +35,7 @@ class RequestTrackerTest : public Test {
stream2_.max_buffers = 3;
dut_.reset(new RequestTracker());
streams_ = {&stream1_, &stream2_};
camera3_stream_configuration_t config{streams_.size(), streams_.data(), 0};
camera3_stream_configuration_t config{static_cast<uint32_t>(streams_.size()), streams_.data(), 0};
dut_->SetStreamConfiguration(config);
}

View file

@ -107,7 +107,7 @@ class StaticPropertiesTest : public Test {
stream_addresses.push_back(&streams[i]);
}
camera3_stream_configuration_t config = {
stream_addresses.size(),
static_cast<uint32_t>(stream_addresses.size()),
stream_addresses.data(),
CAMERA3_STREAM_CONFIGURATION_NORMAL_MODE};
PrepareDefaultDUT();
@ -443,7 +443,7 @@ TEST_F(StaticPropertiesTest, ConfigureEmptyStreams) {
TEST_F(StaticPropertiesTest, ConfigureNullStreams) {
std::vector<camera3_stream_t*> streams(2, nullptr);
camera3_stream_configuration_t config = {
streams.size(), streams.data(), CAMERA3_STREAM_CONFIGURATION_NORMAL_MODE};
static_cast<uint32_t>(streams.size()), streams.data(), CAMERA3_STREAM_CONFIGURATION_NORMAL_MODE};
PrepareDefaultDUT();
EXPECT_FALSE(dut_->StreamConfigurationSupported(&config));
}

View file

@ -18,6 +18,7 @@
#include <linux/videodev2.h>
#include <cerrno>
#include <cstdlib>
#include <hardware/camera3.h>