summaryrefslogtreecommitdiff
path: root/test/v4l2_videodevice/meson.build
diff options
context:
space:
mode:
authorJean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>2021-08-18 17:54:02 +0200
committerJean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>2021-08-20 12:11:29 +0200
commitb145ae42428b9f21fff01d7353a655e07e818c33 (patch)
treec88399ecf4cd1d5f2725324f98f849a41ddfc689 /test/v4l2_videodevice/meson.build
parent16266def40cda947aaa1a50009e89f639c26e7cf (diff)
ipa: ipu3: Move IPU3 awb into algorithms
Now that the interface is properly used by the AWB class, move it into ipa::ipu3::algorithms and let the loops do the calls. Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'test/v4l2_videodevice/meson.build')
0 files changed, 0 insertions, 0 deletions
href='#n121'>121 122 123 124 125 126 127 128 129
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
 * Copyright (C) 2020, Raspberry Pi (Trading) Ltd.
 *
 * stream_options.cpp - Helper to parse options for streams
 */
#include "stream_options.h"

#include <iostream>

using namespace libcamera;

StreamKeyValueParser::StreamKeyValueParser()
{
	addOption("role", OptionString,
		  "Role for the stream (viewfinder, video, still, stillraw)",
		  ArgumentRequired);
	addOption("width", OptionInteger, "Width in pixels",
		  ArgumentRequired);
	addOption("height", OptionInteger, "Height in pixels",
		  ArgumentRequired);
	addOption("pixelformat", OptionInteger, "Pixel format",
		  ArgumentRequired);
}

KeyValueParser::Options StreamKeyValueParser::parse(const char *arguments)
{
	KeyValueParser::Options options = KeyValueParser::parse(arguments);
	StreamRole role;

	if (options.valid() && options.isSet("role") &&
	    !parseRole(&role, options)) {
		std::cerr << "Unknown stream role "
			  << options["role"].toString() << std::endl;
		options.invalidate();
	}

	return options;
}

StreamRoles StreamKeyValueParser::roles(const OptionValue &values)
{
	const std::vector<OptionValue> &streamParameters = values.toArray();

	/* If no configuration values to examine default to viewfinder. */
	if (streamParameters.empty())
		return { StreamRole::Viewfinder };

	StreamRoles roles;
	for (auto const &value : streamParameters) {
		KeyValueParser::Options opts = value.toKeyValues();
		StreamRole role;