summaryrefslogtreecommitdiff
path: root/src/py/libcamera/py_enums.cpp
blob: 96d4beef48923e5a9b122d301a69c57269015087 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/* SPDX-License-Identifier: LGPL-2.1-or-later */
/*
 * Copyright (C) 2022, Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
 *
 * Python bindings - Enumerations
 */

#include <libcamera/libcamera.h>

#include <pybind11/smart_holder.h>

namespace py = pybind11;

using namespace libcamera;

void init_py_enums(py::module &m)
{
	py::enum_<StreamRole>(m, "StreamRole")
		.value("StillCapture", StreamRole::StillCapture)
		.value("Raw", StreamRole::Raw)
		.value("VideoRecording", StreamRole::VideoRecording)
		.value("Viewfinder", StreamRole::Viewfinder);

	py::enum_<ControlType>(m, "ControlType")
		.value("Null", ControlType::ControlTypeNone)
		.value("Bool", ControlType::ControlTypeBool)
		.value("Byte", ControlType::ControlTypeByte)
		.value("Integer32", ControlType::ControlTypeInteger32)
		.value("Integer64", ControlType::ControlTypeInteger64)
		.value("Float", ControlType::ControlTypeFloat)
		.value("String", ControlType::ControlTypeString)
		.value("Rectangle", ControlType::ControlTypeRectangle)
		.value("Size", ControlType::ControlTypeSize);
}