Style fixes.
Was previously running the clang-format command incorrectly;
was not using the .clang-format file, and so was formatting
in some different style.
Change-Id: I09e81b919d1e6d40a56eb4f3f519aaed281a0c86
TEST: unit tests pass
diff --git a/modules/camera/3_4/v4l2_wrapper.cpp b/modules/camera/3_4/v4l2_wrapper.cpp
index 7d8e38c..ca38168 100644
--- a/modules/camera/3_4/v4l2_wrapper.cpp
+++ b/modules/camera/3_4/v4l2_wrapper.cpp
@@ -60,7 +60,9 @@
HAL_LOG_ENTER();
}
-V4L2Wrapper::~V4L2Wrapper() { HAL_LOG_ENTER(); }
+V4L2Wrapper::~V4L2Wrapper() {
+ HAL_LOG_ENTER();
+}
int V4L2Wrapper::Connect() {
HAL_LOG_ENTER();
@@ -101,14 +103,16 @@
if (connection_count_ == 0) {
// Not connected.
HAL_LOGE("Camera device %s is not connected, cannot disconnect.",
- device_path_.c_str(), connection_count_);
+ device_path_.c_str(),
+ connection_count_);
return;
}
--connection_count_;
if (connection_count_ > 0) {
HAL_LOGV("Disconnected from camera device %s. %d connections remain.",
- device_path_.c_str(), connection_count_);
+ device_path_.c_str(),
+ connection_count_);
return;
}
@@ -247,7 +251,8 @@
return 0;
}
-int V4L2Wrapper::SetControl(uint32_t control_id, int32_t desired,
+int V4L2Wrapper::SetControl(uint32_t control_id,
+ int32_t desired,
int32_t* result) {
HAL_LOG_ENTER();
@@ -280,8 +285,8 @@
}
if (errno != EINVAL) {
- HAL_LOGE("ENUM_FMT fails at index %d: %s", format_query.index,
- strerror(errno));
+ HAL_LOGE(
+ "ENUM_FMT fails at index %d: %s", format_query.index, strerror(errno));
return -ENODEV;
}
return 0;
@@ -308,7 +313,8 @@
++size_query.index;
} while (IoctlLocked(VIDIOC_ENUM_FRAMESIZES, &size_query) >= 0);
if (errno != EINVAL) {
- HAL_LOGE("ENUM_FRAMESIZES fails at index %d: %s", size_query.index,
+ HAL_LOGE("ENUM_FRAMESIZES fails at index %d: %s",
+ size_query.index,
strerror(errno));
return -ENODEV;
}
@@ -326,12 +332,16 @@
if (desired_width < size_query.stepwise.min_width ||
desired_height < size_query.stepwise.min_height) {
HAL_LOGV("Standard size %u x %u is too small for format %d",
- desired_width, desired_height, v4l2_format);
+ desired_width,
+ desired_height,
+ v4l2_format);
continue;
} else if (desired_width > size_query.stepwise.max_width &&
desired_height > size_query.stepwise.max_height) {
HAL_LOGV("Standard size %u x %u is too big for format %d",
- desired_width, desired_height, v4l2_format);
+ desired_width,
+ desired_height,
+ v4l2_format);
continue;
}
@@ -359,7 +369,8 @@
}
int V4L2Wrapper::GetFormatFrameDurationRange(
- uint32_t v4l2_format, const std::array<int32_t, 2>& size,
+ uint32_t v4l2_format,
+ const std::array<int32_t, 2>& size,
std::array<int64_t, 2>* duration_range) {
// Potentially called so many times logging entry is a bad idea.
@@ -384,7 +395,8 @@
} while (IoctlLocked(VIDIOC_ENUM_FRAMEINTERVALS, &duration_query) >= 0);
if (errno != EINVAL) {
HAL_LOGE("ENUM_FRAMEINTERVALS fails at index %d: %s",
- duration_query.index, strerror(errno));
+ duration_query.index,
+ strerror(errno));
return -ENODEV;
}
} else {