summaryrefslogtreecommitdiff
path: root/.clang-tidy
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-10-03 19:47:17 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-10-04 17:58:00 +0300
commit2cc5654633c3a1c61f6899226c533308af858703 (patch)
treec601a9f9cd8d9f52d8a5ff0cb744bdc9db11c396 /.clang-tidy
parentdbd937e37500ea62e2967fd6669158aee92841c3 (diff)
test: v4l2_m2mdevice: Test control enumeration
Verify that the V4L2M2MDevice correctly enumerates controls supported by the device. The test currently fails, and will be fixed by a subsequent patch. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com> Reviewed-by: Xavier Roumegue <xavier.roumegue@oss.nxp.com>
Diffstat (limited to '.clang-tidy')
0 files changed, 0 insertions, 0 deletions
href='#n39'>39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
/* SPDX-License-Identifier: LGPL-2.1-or-later */
/*
 * Copyright (C) 2019, Google Inc.
 *
 * v4l2_controls.h - V4L2 Controls Support
 */

#ifndef __LIBCAMERA_V4L2_CONTROLS_H__
#define __LIBCAMERA_V4L2_CONTROLS_H__

#include <map>
#include <stdint.h>
#include <string>
#include <vector>

#include <linux/videodev2.h>

#include <libcamera/controls.h>

namespace libcamera {

class V4L2ControlId : public ControlId
{
public:
	V4L2ControlId(const struct v4l2_query_ext_ctrl &ctrl);
};

class V4L2ControlRange : public ControlRange
{
public:
	V4L2ControlRange(const struct v4l2_query_ext_ctrl &ctrl);
};

class V4L2ControlInfoMap : private ControlInfoMap
{
public:
	V4L2ControlInfoMap &operator=(ControlInfoMap &&info);

	using ControlInfoMap::key_type;
	using ControlInfoMap::mapped_type;
	using ControlInfoMap::value_type;
	using ControlInfoMap::size_type;
	using ControlInfoMap::iterator;
	using ControlInfoMap::const_iterator;

	using ControlInfoMap::begin;
	using ControlInfoMap::cbegin;
	using ControlInfoMap::end;
	using ControlInfoMap::cend;
	using ControlInfoMap::at;
	using ControlInfoMap::empty;
	using ControlInfoMap::size;
	using ControlInfoMap::count;
	using ControlInfoMap::find;

	mapped_type &at(unsigned int key);
	const mapped_type &at(unsigned int key) const;
	size_type count(unsigned int key) const;
	iterator find(unsigned int key);
	const_iterator find(unsigned int key) const;

	const ControlIdMap &idmap() const { return idmap_; }

private:
	ControlIdMap idmap_;
};

class V4L2ControlList : public ControlList
{
public:
	V4L2ControlList(const V4L2ControlInfoMap &info)
		: ControlList(info.idmap())
	{
	}
};

} /* namespace libcamera */

#endif /* __LIBCAMERA_V4L2_CONTROLS_H__ */