summaryrefslogtreecommitdiff
path: root/modules/camera/3_4/v4l2_camera.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/camera/3_4/v4l2_camera.cpp')
-rw-r--r--modules/camera/3_4/v4l2_camera.cpp21
1 files changed, 6 insertions, 15 deletions
diff --git a/modules/camera/3_4/v4l2_camera.cpp b/modules/camera/3_4/v4l2_camera.cpp
index 98b80622..558b4535 100644
--- a/modules/camera/3_4/v4l2_camera.cpp
+++ b/modules/camera/3_4/v4l2_camera.cpp
@@ -14,6 +14,9 @@
* limitations under the License.
*/
+//#define LOG_NDEBUG 0
+#define LOG_TAG "V4L2Camera"
+
#include "v4l2_camera.h"
#include <fcntl.h>
@@ -36,18 +39,6 @@
namespace v4l2_camera_hal {
-// Helper function for managing metadata.
-static std::vector<int32_t> getMetadataKeys(const camera_metadata_t* metadata) {
- std::vector<int32_t> keys;
- size_t num_entries = get_camera_metadata_entry_count(metadata);
- for (size_t i = 0; i < num_entries; ++i) {
- camera_metadata_ro_entry_t entry;
- get_camera_metadata_ro_entry(metadata, i, &entry);
- keys.push_back(entry.tag);
- }
- return keys;
-}
-
V4L2Camera* V4L2Camera::NewV4L2Camera(int id, const std::string path) {
HAL_LOG_ENTER();
@@ -73,12 +64,12 @@ V4L2Camera::V4L2Camera(int id,
: default_camera_hal::Camera(id),
device_(std::move(v4l2_wrapper)),
metadata_(std::move(metadata)),
- max_input_streams_(0),
- max_output_streams_({{0, 0, 0}}),
buffer_enqueuer_(new FunctionThread(
std::bind(&V4L2Camera::enqueueRequestBuffers, this))),
buffer_dequeuer_(new FunctionThread(
- std::bind(&V4L2Camera::dequeueRequestBuffers, this))) {
+ std::bind(&V4L2Camera::dequeueRequestBuffers, this))),
+ max_input_streams_(0),
+ max_output_streams_({{0, 0, 0}}) {
HAL_LOG_ENTER();
}