@@ -9,6 +9,21 @@ libcamera_tracepoint_header = custom_target(
command: [gen_tracepoints_header, '@OUTPUT@', '@INPUT@'],
)
+# Generate the list of internal controls identifiers
+internal_control_source_files = ['control_ids']
+
+libcamera_internal_control_headers = []
+
+foreach header : internal_control_source_files
+ input_files = files('../../../src/libcamera/internal_' + header +'.yaml',\
+ '../' + header + '.h.in')
+ libcamera_internal_control_headers += custom_target(
+ 'internal_' + header + '_h',
+ input : input_files,
+ output : header + '.h',
+ command : [gen_controls, '--internal=True','-o', '@OUTPUT@', '@INPUT@'])
+endforeach
+
libcamera_internal_headers = files([
'bayer_format.h',
'byte_stream_buffer.h',
new file mode 100644
@@ -0,0 +1,54 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+#
+# Copyright (C) 2022, Google Inc.
+#
+%YAML 1.2
+---
+# Enumeration of internal libcamera controls
+# Not exposed to application, for library use only
+
+controls:
+
+ # ----------------------------------------------------------------------------
+ # Draft controls section
+
+ - VBlank:
+ type: int32_t
+ draft: true
+ description: |
+ Vertical blanking. The idle period after every frame during which no
+ image data is produced. The unit of vertical blanking is a line. Every
+ line has length of the image width plus horizontal blanking at the pixel
+ rate defined by V4L2_CID_PIXEL_RATE control in the same sub-device.
+
+ Currently identical to V4L2_CID_VBLANK.
+
+ - HBlank:
+ type: int32_t
+ draft: true
+ description: |
+ Horizontal blanking. The idle period after every line of image data
+ during which no image data is produced. The unit of horizontal blanking
+ is pixels.
+
+ Currently identical to V4L2_CID_HBLANK.
+
+ - SensorAnalogueGain:
+ type: int32_t
+ draft: true
+ description: |
+ Analogue gain is gain affecting all colour components in the pixel
+ matrix. The gain operation is performed in the analogue domain before
+ A/D conversion
+
+ Currently identical to V4L2_CID_ANALOGUE_GAIN.
+
+ - SensorExposure:
+ type: int32_t
+ draft: true
+ description: |
+ Exposure time, expressed in frame lines.
+
+ Currently identical to V4L2_CID_EXPOSURE.
+
+...
@@ -52,6 +52,7 @@ libcamera_sources = files([
libcamera_sources += libcamera_public_headers
libcamera_sources += libcamera_generated_ipa_headers
libcamera_sources += libcamera_tracepoint_header
+libcamera_sources += libcamera_internal_control_headers
includes = [
libcamera_includes,
@@ -99,6 +100,7 @@ if not libyaml.found()
libyaml = libyaml_wrap.dependency('yaml')
endif
+# Generate control_ids.cpp and property_ids.cpp
control_sources = []
foreach source : control_source_files
@@ -111,6 +113,21 @@ endforeach
libcamera_sources += control_sources
+# Generate internal_control_ids.cpp
+internal_control_source_files = ['control_ids']
+internal_control_sources = []
+
+foreach source : internal_control_source_files
+ input_files = files('internal_' + source +'.yaml', source + '.cpp.in')
+ internal_control_sources += custom_target('internal_' + source + '_cpp',
+ input : input_files,
+ output : 'internal_' + source + '.cpp',
+ command : [gen_controls, '--internal=True',\
+ '-o', '@OUTPUT@',\
+ '@INPUT@'])
+endforeach
+libcamera_sources += internal_control_sources
+
gen_version = meson.project_source_root() / 'utils' / 'gen-version.sh'
# Use vcs_tag() and not configure_file() or run_command(), to ensure that the