py: Rename pyxyz to py_xyz
Having the underscore makes the names more readable, especially when there are multiple words in the name. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
parent
2bb6c9fbd2
commit
b2ada6f3ec
5 changed files with 14 additions and 14 deletions
|
@ -13,21 +13,21 @@ pybind11_proj = subproject('pybind11')
|
||||||
pybind11_dep = pybind11_proj.get_variable('pybind11_dep')
|
pybind11_dep = pybind11_proj.get_variable('pybind11_dep')
|
||||||
|
|
||||||
pycamera_sources = files([
|
pycamera_sources = files([
|
||||||
'pyenums.cpp',
|
'py_enums.cpp',
|
||||||
'pygeometry.cpp',
|
'py_geometry.cpp',
|
||||||
'pymain.cpp',
|
'py_main.cpp',
|
||||||
])
|
])
|
||||||
|
|
||||||
gen_input_files = files([
|
gen_input_files = files([
|
||||||
'../../libcamera/control_ids.yaml',
|
'../../libcamera/control_ids.yaml',
|
||||||
'pyenums_generated.cpp.in',
|
'py_enums_generated.cpp.in',
|
||||||
])
|
])
|
||||||
|
|
||||||
gen_py_control_enums = files('gen-py-control-enums.py')
|
gen_py_control_enums = files('gen-py-control-enums.py')
|
||||||
|
|
||||||
generated_sources = custom_target('py_gen_controls',
|
generated_sources = custom_target('py_gen_controls',
|
||||||
input : gen_input_files,
|
input : gen_input_files,
|
||||||
output : ['pyenums_generated.cpp'],
|
output : ['py_enums_generated.cpp'],
|
||||||
command : [gen_py_control_enums, '-o', '@OUTPUT@', '@INPUT@'])
|
command : [gen_py_control_enums, '-o', '@OUTPUT@', '@INPUT@'])
|
||||||
|
|
||||||
pycamera_sources += generated_sources
|
pycamera_sources += generated_sources
|
||||||
|
|
|
@ -13,7 +13,7 @@ namespace py = pybind11;
|
||||||
|
|
||||||
using namespace libcamera;
|
using namespace libcamera;
|
||||||
|
|
||||||
void init_pyenums(py::module &m)
|
void init_py_enums(py::module &m)
|
||||||
{
|
{
|
||||||
py::enum_<StreamRole>(m, "StreamRole")
|
py::enum_<StreamRole>(m, "StreamRole")
|
||||||
.value("StillCapture", StreamRole::StillCapture)
|
.value("StillCapture", StreamRole::StillCapture)
|
|
@ -15,7 +15,7 @@ namespace py = pybind11;
|
||||||
|
|
||||||
using namespace libcamera;
|
using namespace libcamera;
|
||||||
|
|
||||||
void init_pyenums_generated(py::module& m)
|
void init_py_enums_generated(py::module& m)
|
||||||
{
|
{
|
||||||
${enums}
|
${enums}
|
||||||
}
|
}
|
|
@ -18,7 +18,7 @@ namespace py = pybind11;
|
||||||
|
|
||||||
using namespace libcamera;
|
using namespace libcamera;
|
||||||
|
|
||||||
void init_pygeometry(py::module &m)
|
void init_py_geometry(py::module &m)
|
||||||
{
|
{
|
||||||
auto pyPoint = py::class_<Point>(m, "Point");
|
auto pyPoint = py::class_<Point>(m, "Point");
|
||||||
auto pySize = py::class_<Size>(m, "Size");
|
auto pySize = py::class_<Size>(m, "Size");
|
|
@ -130,15 +130,15 @@ static void handleRequestCompleted(Request *req)
|
||||||
LOG(Fatal) << "Unable to write to eventfd";
|
LOG(Fatal) << "Unable to write to eventfd";
|
||||||
}
|
}
|
||||||
|
|
||||||
void init_pyenums(py::module &m);
|
void init_py_enums(py::module &m);
|
||||||
void init_pyenums_generated(py::module &m);
|
void init_py_enums_generated(py::module &m);
|
||||||
void init_pygeometry(py::module &m);
|
void init_py_geometry(py::module &m);
|
||||||
|
|
||||||
PYBIND11_MODULE(_libcamera, m)
|
PYBIND11_MODULE(_libcamera, m)
|
||||||
{
|
{
|
||||||
init_pyenums(m);
|
init_py_enums(m);
|
||||||
init_pyenums_generated(m);
|
init_py_enums_generated(m);
|
||||||
init_pygeometry(m);
|
init_py_geometry(m);
|
||||||
|
|
||||||
/* Forward declarations */
|
/* Forward declarations */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue