camera_metadata: Automatically linkify tag names
Change-Id: I5f07a99765174f519e5d1187b38fd0e7ab355d3f
diff --git a/camera/docs/CameraMetadataEnums.mako b/camera/docs/CameraMetadataEnums.mako
index a4bc8c7..6678b92 100644
--- a/camera/docs/CameraMetadataEnums.mako
+++ b/camera/docs/CameraMetadataEnums.mako
@@ -32,7 +32,7 @@
% for value in entry.enum.values:
/**
% if value.notes:
-${value.notes | javadoc}\
+${value.notes | javadoc(metadata)}\
% endif
* @see ${target_class}#${entry.name | jkey_identifier}
% if entry.applied_visibility == 'hidden':
diff --git a/camera/docs/CameraMetadataKeys.mako b/camera/docs/CameraMetadataKeys.mako
index 51b314e..a1645db 100644
--- a/camera/docs/CameraMetadataKeys.mako
+++ b/camera/docs/CameraMetadataKeys.mako
@@ -24,33 +24,36 @@
* modify the comment blocks at the start or end.
*~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~*/
+<%!
+ ##
+ ## Generate extra text blocks for the details field
+ def generate_extra_detail(entry):
+ text = entry.details
+ if entry.optional:
+ text += '\n\n<b>Optional</b> - This value may be null on some devices.\n'
+ if any(tag.name == 'FULL' for tag in entry.tags):
+ text += \
+ '\n<b>Full capability</b> - \n' + \
+ 'Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the\n' + \
+ 'android.info.supportedHardwareLevel key\n'
+ return text
+%>
##
## Generate a single key and docs
<%def name="generate_key(entry)">\
/**
% if entry.description:
-${entry.description | javadoc}\
+${entry.description | javadoc(metadata)}\
% endif
% if entry.details:
-${entry.details | javadoc}\
+${generate_extra_detail(entry) | javadoc(metadata)}\
% endif
% if entry.enum and not (entry.typedef and entry.typedef.languages.get('java')):
% for value in entry.enum.values:
* @see #${jenum_value(entry, value)}
% endfor
% endif
- % if entry.optional:
- *
- * <b>Optional</b> - This value may be null on some devices.
- % endif
- % if any(tag.name == 'FULL' for tag in entry.tags):
- *
- * <b>{@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL}</b> -
- * Present on all devices that report being FULL level hardware devices in the
- * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL HARDWARE_LEVEL} key.
- % endif
% if entry.applied_visibility == 'hidden':
- *
* @hide
% endif
*/
diff --git a/camera/docs/docs.html b/camera/docs/docs.html
index e61f5d4..27b3ced 100644
--- a/camera/docs/docs.html
+++ b/camera/docs/docs.html
@@ -750,7 +750,7 @@
</tr>
<tr class="entry_cont">
<td class="entry_details" colspan="5">
- <p>When android.<wbr/>control.<wbr/>awb<wbr/>Mode is not OFF,<wbr/> TRANSFORM_<wbr/>MATRIX
+ <p>When <a href="#controls_android.control.awbMode">android.<wbr/>control.<wbr/>awb<wbr/>Mode</a> is not OFF,<wbr/> TRANSFORM_<wbr/>MATRIX
should be ignored.<wbr/></p>
</td>
</tr>
@@ -786,8 +786,8 @@
</td>
<td class="entry_range">
- Output values are expected to be in the range
- (0,<wbr/>1)
+ <p>Output values are expected to be in the range
+(0,<wbr/>1)</p>
</td>
<td class="entry_tags">
@@ -800,9 +800,9 @@
<tr class="entry_cont">
<td class="entry_details" colspan="5">
<p>This matrix is either set by HAL when the request
-android.<wbr/>color<wbr/>Correction.<wbr/>mode is not TRANSFORM_<wbr/>MATRIX,<wbr/> or
+<a href="#controls_android.colorCorrection.mode">android.<wbr/>color<wbr/>Correction.<wbr/>mode</a> is not TRANSFORM_<wbr/>MATRIX,<wbr/> or
directly by the application in the request when the
-android.<wbr/>color<wbr/>Correction.<wbr/>mode is TRANSFORM_<wbr/>MATRIX.<wbr/></p>
+<a href="#controls_android.colorCorrection.mode">android.<wbr/>color<wbr/>Correction.<wbr/>mode</a> is TRANSFORM_<wbr/>MATRIX.<wbr/></p>
<p>In the latter case,<wbr/> the HAL may round the matrix to account
for precision issues; the final rounded matrix should be
reported back in this matrix result metadata.<wbr/></p>
@@ -859,9 +859,9 @@
it should use the G_<wbr/>even value,<wbr/>and write G_<wbr/>odd equal to
G_<wbr/>even in the output result metadata.<wbr/></p>
<p>This array is either set by HAL when the request
-android.<wbr/>color<wbr/>Correction.<wbr/>mode is not TRANSFORM_<wbr/>MATRIX,<wbr/> or
+<a href="#controls_android.colorCorrection.mode">android.<wbr/>color<wbr/>Correction.<wbr/>mode</a> is not TRANSFORM_<wbr/>MATRIX,<wbr/> or
directly by the application in the request when the
-android.<wbr/>color<wbr/>Correction.<wbr/>mode is TRANSFORM_<wbr/>MATRIX.<wbr/></p>
+<a href="#controls_android.colorCorrection.mode">android.<wbr/>color<wbr/>Correction.<wbr/>mode</a> is TRANSFORM_<wbr/>MATRIX.<wbr/></p>
<p>The ouput should be the gains actually applied by the HAL to
the current frame.<wbr/></p>
</td>
@@ -925,8 +925,8 @@
</td>
<td class="entry_range">
- Output values are expected to be in the range
- (0,<wbr/>1)
+ <p>Output values are expected to be in the range
+(0,<wbr/>1)</p>
</td>
<td class="entry_tags">
@@ -939,9 +939,9 @@
<tr class="entry_cont">
<td class="entry_details" colspan="5">
<p>This matrix is either set by HAL when the request
-android.<wbr/>color<wbr/>Correction.<wbr/>mode is not TRANSFORM_<wbr/>MATRIX,<wbr/> or
+<a href="#controls_android.colorCorrection.mode">android.<wbr/>color<wbr/>Correction.<wbr/>mode</a> is not TRANSFORM_<wbr/>MATRIX,<wbr/> or
directly by the application in the request when the
-android.<wbr/>color<wbr/>Correction.<wbr/>mode is TRANSFORM_<wbr/>MATRIX.<wbr/></p>
+<a href="#controls_android.colorCorrection.mode">android.<wbr/>color<wbr/>Correction.<wbr/>mode</a> is TRANSFORM_<wbr/>MATRIX.<wbr/></p>
<p>In the latter case,<wbr/> the HAL may round the matrix to account
for precision issues; the final rounded matrix should be
reported back in this matrix result metadata.<wbr/></p>
@@ -998,9 +998,9 @@
it should use the G_<wbr/>even value,<wbr/>and write G_<wbr/>odd equal to
G_<wbr/>even in the output result metadata.<wbr/></p>
<p>This array is either set by HAL when the request
-android.<wbr/>color<wbr/>Correction.<wbr/>mode is not TRANSFORM_<wbr/>MATRIX,<wbr/> or
+<a href="#controls_android.colorCorrection.mode">android.<wbr/>color<wbr/>Correction.<wbr/>mode</a> is not TRANSFORM_<wbr/>MATRIX,<wbr/> or
directly by the application in the request when the
-android.<wbr/>color<wbr/>Correction.<wbr/>mode is TRANSFORM_<wbr/>MATRIX.<wbr/></p>
+<a href="#controls_android.colorCorrection.mode">android.<wbr/>color<wbr/>Correction.<wbr/>mode</a> is TRANSFORM_<wbr/>MATRIX.<wbr/></p>
<p>The ouput should be the gains actually applied by the HAL to
the current frame.<wbr/></p>
</td>
@@ -1078,8 +1078,7 @@
</td>
<td class="entry_range">
-
- android.<wbr/>control.<wbr/>ae<wbr/>Available<wbr/>Antibanding<wbr/>Modes
+ <p><a href="#static_android.control.aeAvailableAntibandingModes">android.<wbr/>control.<wbr/>ae<wbr/>Available<wbr/>Antibanding<wbr/>Modes</a></p>
</td>
<td class="entry_tags">
@@ -1252,7 +1251,7 @@
</td>
<td class="entry_range">
- android.<wbr/>control.<wbr/>ae<wbr/>Available<wbr/>Modes
+ <p><a href="#static_android.control.aeAvailableModes">android.<wbr/>control.<wbr/>ae<wbr/>Available<wbr/>Modes</a></p>
</td>
<td class="entry_tags">
@@ -1267,7 +1266,7 @@
</tr>
<tr class="entry_cont">
<td class="entry_details" colspan="5">
- <p>Only effective if android.<wbr/>control.<wbr/>mode = AUTO.<wbr/></p>
+ <p>Only effective if <a href="#controls_android.control.mode">android.<wbr/>control.<wbr/>mode</a> = AUTO.<wbr/></p>
<p>If auto-exposure is active,<wbr/> HAL auto-focus routine is enabled,<wbr/>
then HAL auto-exposure routine overrides the control variables
that relate to auto-exposure routine,<wbr/> and these override values
@@ -1328,13 +1327,13 @@
specified coordinates.<wbr/></p>
<p>The coordinate system is based on the active pixel array,<wbr/>
with (0,<wbr/>0) being the top-left pixel in the active pixel array,<wbr/> and
-(android.<wbr/>sensor.<wbr/>info.<wbr/>active<wbr/>Array<wbr/>Size.<wbr/>width - 1,<wbr/>
-android.<wbr/>sensor.<wbr/>info.<wbr/>active<wbr/>Array<wbr/>Size.<wbr/>height - 1) being the
+(<a href="#static_android.sensor.info.activeArraySize">android.<wbr/>sensor.<wbr/>info.<wbr/>active<wbr/>Array<wbr/>Size</a>.<wbr/>width - 1,<wbr/>
+<a href="#static_android.sensor.info.activeArraySize">android.<wbr/>sensor.<wbr/>info.<wbr/>active<wbr/>Array<wbr/>Size</a>.<wbr/>height - 1) being the
bottom-right pixel in the active pixel array.<wbr/> The weight
should be nonnegative.<wbr/></p>
<p>If all regions have 0 weight,<wbr/> then no specific metering area
needs to be used by the HAL.<wbr/> If the metering region is
-outside the current android.<wbr/>scaler.<wbr/>crop<wbr/>Region,<wbr/> the HAL
+outside the current <a href="#controls_android.scaler.cropRegion">android.<wbr/>scaler.<wbr/>crop<wbr/>Region</a>,<wbr/> the HAL
should ignore the sections outside the region and output the
used sections in the frame metadata</p>
</td>
@@ -1370,7 +1369,7 @@
</td>
<td class="entry_range">
- android.<wbr/>control.<wbr/>ae<wbr/>Available<wbr/>Target<wbr/>Fps<wbr/>Ranges
+ <p><a href="#static_android.control.aeAvailableTargetFpsRanges">android.<wbr/>control.<wbr/>ae<wbr/>Available<wbr/>Target<wbr/>Fps<wbr/>Ranges</a></p>
</td>
<td class="entry_tags">
@@ -1386,7 +1385,7 @@
<tr class="entry_cont">
<td class="entry_details" colspan="5">
<p>Only constrains AE algorithm,<wbr/> not manual control
-of android.<wbr/>sensor.<wbr/>exposure<wbr/>Time</p>
+of <a href="#controls_android.sensor.exposureTime">android.<wbr/>sensor.<wbr/>exposure<wbr/>Time</a></p>
</td>
</tr>
@@ -1575,9 +1574,9 @@
</tr>
<tr class="entry_cont">
<td class="entry_details" colspan="5">
- <p>Only effective if android.<wbr/>control.<wbr/>mode = AUTO.<wbr/></p>
+ <p>Only effective if <a href="#controls_android.control.mode">android.<wbr/>control.<wbr/>mode</a> = AUTO.<wbr/></p>
<p>If lens is controlled by HAL auto-focus algorithm,<wbr/> the HAL should
-report the current AF status in android.<wbr/>control.<wbr/>af<wbr/>State in
+report the current AF status in <a href="#dynamic_android.control.afState">android.<wbr/>control.<wbr/>af<wbr/>State</a> in
result metadata.<wbr/></p>
</td>
</tr>
@@ -1631,13 +1630,13 @@
specified coordinates.<wbr/></p>
<p>The coordinate system is based on the active pixel array,<wbr/>
with (0,<wbr/>0) being the top-left pixel in the active pixel array,<wbr/> and
-(android.<wbr/>sensor.<wbr/>info.<wbr/>active<wbr/>Array<wbr/>Size.<wbr/>width - 1,<wbr/>
-android.<wbr/>sensor.<wbr/>info.<wbr/>active<wbr/>Array<wbr/>Size.<wbr/>height - 1) being the
+(<a href="#static_android.sensor.info.activeArraySize">android.<wbr/>sensor.<wbr/>info.<wbr/>active<wbr/>Array<wbr/>Size</a>.<wbr/>width - 1,<wbr/>
+<a href="#static_android.sensor.info.activeArraySize">android.<wbr/>sensor.<wbr/>info.<wbr/>active<wbr/>Array<wbr/>Size</a>.<wbr/>height - 1) being the
bottom-right pixel in the active pixel array.<wbr/> The weight
should be nonnegative.<wbr/></p>
<p>If all regions have 0 weight,<wbr/> then no specific focus area
needs to be used by the HAL.<wbr/> If the focusing region is
-outside the current android.<wbr/>scaler.<wbr/>crop<wbr/>Region,<wbr/> the HAL
+outside the current <a href="#controls_android.scaler.cropRegion">android.<wbr/>scaler.<wbr/>crop<wbr/>Region</a>,<wbr/> the HAL
should ignore the sections outside the region and output the
used sections in the frame metadata</p>
</td>
@@ -1839,7 +1838,7 @@
<tr class="entry_cont">
<td class="entry_details" colspan="5">
<p>[BC - AWB lock,<wbr/>AWB modes]</p>
-<p>Only effective if android.<wbr/>control.<wbr/>mode = AUTO.<wbr/></p>
+<p>Only effective if <a href="#controls_android.control.mode">android.<wbr/>control.<wbr/>mode</a> = AUTO.<wbr/></p>
</td>
</tr>
@@ -1893,13 +1892,13 @@
specified coordinates.<wbr/></p>
<p>The coordinate system is based on the active pixel array,<wbr/>
with (0,<wbr/>0) being the top-left pixel in the active pixel array,<wbr/> and
-(android.<wbr/>sensor.<wbr/>info.<wbr/>active<wbr/>Array<wbr/>Size.<wbr/>width - 1,<wbr/>
-android.<wbr/>sensor.<wbr/>info.<wbr/>active<wbr/>Array<wbr/>Size.<wbr/>height - 1) being the
+(<a href="#static_android.sensor.info.activeArraySize">android.<wbr/>sensor.<wbr/>info.<wbr/>active<wbr/>Array<wbr/>Size</a>.<wbr/>width - 1,<wbr/>
+<a href="#static_android.sensor.info.activeArraySize">android.<wbr/>sensor.<wbr/>info.<wbr/>active<wbr/>Array<wbr/>Size</a>.<wbr/>height - 1) being the
bottom-right pixel in the active pixel array.<wbr/> The weight
should be nonnegative.<wbr/></p>
<p>If all regions have 0 weight,<wbr/> then no specific metering area
needs to be used by the HAL.<wbr/> If the metering region is
-outside the current android.<wbr/>scaler.<wbr/>crop<wbr/>Region,<wbr/> the HAL
+outside the current <a href="#controls_android.scaler.cropRegion">android.<wbr/>scaler.<wbr/>crop<wbr/>Region</a>,<wbr/> the HAL
should ignore the sections outside the region and output the
used sections in the frame metadata</p>
</td>
@@ -1968,7 +1967,7 @@
</td>
<td class="entry_range">
- all must be supported
+ <p>all must be supported</p>
</td>
<td class="entry_tags">
@@ -1983,7 +1982,7 @@
</tr>
<tr class="entry_cont">
<td class="entry_details" colspan="5">
- <p>Only used if android.<wbr/>control.<wbr/>mode != OFF.<wbr/></p>
+ <p>Only used if <a href="#controls_android.control.mode">android.<wbr/>control.<wbr/>mode</a> != OFF.<wbr/></p>
</td>
</tr>
@@ -2043,14 +2042,14 @@
<td class="entry_description">
<p>Whether any special color effect is in use.<wbr/>
-Only used if android.<wbr/>control.<wbr/>mode != OFF</p>
+Only used if <a href="#controls_android.control.mode">android.<wbr/>control.<wbr/>mode</a> != OFF</p>
</td>
<td class="entry_units">
</td>
<td class="entry_range">
- android.<wbr/>control.<wbr/>available<wbr/>Effects
+ <p><a href="#static_android.control.availableEffects">android.<wbr/>control.<wbr/>available<wbr/>Effects</a></p>
</td>
<td class="entry_tags">
@@ -2112,7 +2111,7 @@
</td>
<td class="entry_range">
- all must be supported
+ <p>all must be supported</p>
</td>
<td class="entry_tags">
@@ -2131,12 +2130,12 @@
by the HAL is disabled.<wbr/> The application must set the fields for
capture parameters itself.<wbr/></p>
<p>When set to AUTO,<wbr/> the individual algorithm controls in
-android.<wbr/>control.<wbr/>* are in effect,<wbr/> such as android.<wbr/>control.<wbr/>af<wbr/>Mode.<wbr/></p>
+android.<wbr/>control.<wbr/>* are in effect,<wbr/> such as <a href="#controls_android.control.afMode">android.<wbr/>control.<wbr/>af<wbr/>Mode</a>.<wbr/></p>
<p>When set to USE_<wbr/>SCENE_<wbr/>MODE,<wbr/> the individual controls in
android.<wbr/>control.<wbr/>* are mostly disabled,<wbr/> and the HAL implements
one of the scene mode settings (such as ACTION,<wbr/> SUNSET,<wbr/> or PARTY)
as it wishes.<wbr/> The HAL scene mode 3A settings are provided by
-android.<wbr/>control.<wbr/>scene<wbr/>Mode<wbr/>Overrides.<wbr/></p>
+<a href="#static_android.control.sceneModeOverrides">android.<wbr/>control.<wbr/>scene<wbr/>Mode<wbr/>Overrides</a>.<wbr/></p>
</td>
</tr>
@@ -2238,14 +2237,14 @@
<td class="entry_description">
<p>Which scene mode is active when
-android.<wbr/>control.<wbr/>mode = SCENE_<wbr/>MODE</p>
+<a href="#controls_android.control.mode">android.<wbr/>control.<wbr/>mode</a> = SCENE_<wbr/>MODE</p>
</td>
<td class="entry_units">
</td>
<td class="entry_range">
- android.<wbr/>control.<wbr/>available<wbr/>Scene<wbr/>Modes
+ <p><a href="#static_android.control.availableSceneModes">android.<wbr/>control.<wbr/>available<wbr/>Scene<wbr/>Modes</a></p>
</td>
<td class="entry_tags">
@@ -2305,7 +2304,7 @@
<tr class="entry_cont">
<td class="entry_details" colspan="5">
<p>If enabled,<wbr/> video stabilization can modify the
-android.<wbr/>scaler.<wbr/>crop<wbr/>Region to keep the video stream
+<a href="#controls_android.scaler.cropRegion">android.<wbr/>scaler.<wbr/>crop<wbr/>Region</a> to keep the video stream
stabilized</p>
</td>
</tr>
@@ -2406,9 +2405,9 @@
</td>
<td class="entry_range">
- OFF,<wbr/> ON must be supported.<wbr/>
- ON_<wbr/>AUTO_<wbr/>FLASH/<wbr/>ON_<wbr/>ALWAYS_<wbr/>FLASH must be supported if flash
- unit is available
+ <p>OFF,<wbr/> ON must be supported.<wbr/>
+ON_<wbr/>AUTO_<wbr/>FLASH/<wbr/>ON_<wbr/>ALWAYS_<wbr/>FLASH must be supported if flash
+unit is available</p>
</td>
<td class="entry_tags">
@@ -2485,8 +2484,8 @@
</td>
<td class="entry_range">
- At least (-2,<wbr/>2)/<wbr/>(exp compensation step
- size)
+ <p>At least (-2,<wbr/>2)/<wbr/>(exp compensation step
+size)</p>
</td>
<td class="entry_tags">
@@ -2523,7 +2522,7 @@
</td>
<td class="entry_range">
- <= 1/<wbr/>2
+ <p><= 1/<wbr/>2</p>
</td>
<td class="entry_tags">
@@ -2565,8 +2564,8 @@
</td>
<td class="entry_range">
- OFF must be included.<wbr/> AUTO must be supported if
- lens allows for changing focus
+ <p>OFF must be included.<wbr/> AUTO must be supported if
+lens allows for changing focus</p>
</td>
<td class="entry_tags">
@@ -2608,7 +2607,7 @@
</td>
<td class="entry_range">
- OFF must be listed
+ <p>OFF must be listed</p>
</td>
<td class="entry_tags">
@@ -2650,8 +2649,8 @@
</td>
<td class="entry_range">
- SCENE_<wbr/>MODE_<wbr/>FACE_<wbr/>PRIORITY must be supported if face
- detection is supported
+ <p>SCENE_<wbr/>MODE_<wbr/>FACE_<wbr/>PRIORITY must be supported if face
+detection is supported</p>
</td>
<td class="entry_tags">
@@ -2693,7 +2692,7 @@
</td>
<td class="entry_range">
- OFF must be included
+ <p>OFF must be included</p>
</td>
<td class="entry_tags">
@@ -2733,7 +2732,7 @@
</td>
<td class="entry_range">
- OFF,<wbr/> AUTO must be included
+ <p>OFF,<wbr/> AUTO must be included</p>
</td>
<td class="entry_tags">
@@ -2770,7 +2769,9 @@
</td>
<td class="entry_range">
- >= 1
+ <blockquote>
+<p>= 1</p>
+</blockquote>
</td>
<td class="entry_tags">
@@ -2811,12 +2812,11 @@
</td>
<td class="entry_range">
- For each listed scene mode,<wbr/> lists the aeMode,<wbr/>
- awbMode,<wbr/> and afMode that the HAL wants to use for that
- scene mode.<wbr/>
-
- For each entry,<wbr/> the order is {aeMode,<wbr/> awbMode,<wbr/> afMode} in
- order of increasing index
+ <p>For each listed scene mode,<wbr/> lists the aeMode,<wbr/>
+awbMode,<wbr/> and afMode that the HAL wants to use for that
+scene mode.<wbr/></p>
+<p>For each entry,<wbr/> the order is {aeMode,<wbr/> awbMode,<wbr/> afMode} in
+order of increasing index</p>
</td>
<td class="entry_tags">
@@ -2840,7 +2840,7 @@
with 3 entires for each scene mode.<wbr/> The overrides listed
for SCENE_<wbr/>MODE_<wbr/>FACE_<wbr/>PRIORITY are ignored,<wbr/> since for that
mode,<wbr/> the application-set aeMode,<wbr/> awbMode,<wbr/> and afMode are
-used instead,<wbr/> like they are when android.<wbr/>control.<wbr/>mode is
+used instead,<wbr/> like they are when <a href="#controls_android.control.mode">android.<wbr/>control.<wbr/>mode</a> is
AUTO.<wbr/></p>
<p>It is recommended that for FACE_<wbr/>PRIORITY,<wbr/> the overrides
should be set to 0.<wbr/> As an example,<wbr/> if availableSceneModes is
@@ -2971,13 +2971,13 @@
specified coordinates.<wbr/></p>
<p>The coordinate system is based on the active pixel array,<wbr/>
with (0,<wbr/>0) being the top-left pixel in the active pixel array,<wbr/> and
-(android.<wbr/>sensor.<wbr/>info.<wbr/>active<wbr/>Array<wbr/>Size.<wbr/>width - 1,<wbr/>
-android.<wbr/>sensor.<wbr/>info.<wbr/>active<wbr/>Array<wbr/>Size.<wbr/>height - 1) being the
+(<a href="#static_android.sensor.info.activeArraySize">android.<wbr/>sensor.<wbr/>info.<wbr/>active<wbr/>Array<wbr/>Size</a>.<wbr/>width - 1,<wbr/>
+<a href="#static_android.sensor.info.activeArraySize">android.<wbr/>sensor.<wbr/>info.<wbr/>active<wbr/>Array<wbr/>Size</a>.<wbr/>height - 1) being the
bottom-right pixel in the active pixel array.<wbr/> The weight
should be nonnegative.<wbr/></p>
<p>If all regions have 0 weight,<wbr/> then no specific metering area
needs to be used by the HAL.<wbr/> If the metering region is
-outside the current android.<wbr/>scaler.<wbr/>crop<wbr/>Region,<wbr/> the HAL
+outside the current <a href="#controls_android.scaler.cropRegion">android.<wbr/>scaler.<wbr/>crop<wbr/>Region</a>,<wbr/> the HAL
should ignore the sections outside the region and output the
used sections in the frame metadata</p>
</td>
@@ -3184,9 +3184,9 @@
</tr>
<tr class="entry_cont">
<td class="entry_details" colspan="5">
- <p>Only effective if android.<wbr/>control.<wbr/>mode = AUTO.<wbr/></p>
+ <p>Only effective if <a href="#controls_android.control.mode">android.<wbr/>control.<wbr/>mode</a> = AUTO.<wbr/></p>
<p>If lens is controlled by HAL auto-focus algorithm,<wbr/> the HAL should
-report the current AF status in android.<wbr/>control.<wbr/>af<wbr/>State in
+report the current AF status in <a href="#dynamic_android.control.afState">android.<wbr/>control.<wbr/>af<wbr/>State</a> in
result metadata.<wbr/></p>
</td>
</tr>
@@ -3240,13 +3240,13 @@
specified coordinates.<wbr/></p>
<p>The coordinate system is based on the active pixel array,<wbr/>
with (0,<wbr/>0) being the top-left pixel in the active pixel array,<wbr/> and
-(android.<wbr/>sensor.<wbr/>info.<wbr/>active<wbr/>Array<wbr/>Size.<wbr/>width - 1,<wbr/>
-android.<wbr/>sensor.<wbr/>info.<wbr/>active<wbr/>Array<wbr/>Size.<wbr/>height - 1) being the
+(<a href="#static_android.sensor.info.activeArraySize">android.<wbr/>sensor.<wbr/>info.<wbr/>active<wbr/>Array<wbr/>Size</a>.<wbr/>width - 1,<wbr/>
+<a href="#static_android.sensor.info.activeArraySize">android.<wbr/>sensor.<wbr/>info.<wbr/>active<wbr/>Array<wbr/>Size</a>.<wbr/>height - 1) being the
bottom-right pixel in the active pixel array.<wbr/> The weight
should be nonnegative.<wbr/></p>
<p>If all regions have 0 weight,<wbr/> then no specific focus area
needs to be used by the HAL.<wbr/> If the focusing region is
-outside the current android.<wbr/>scaler.<wbr/>crop<wbr/>Region,<wbr/> the HAL
+outside the current <a href="#controls_android.scaler.cropRegion">android.<wbr/>scaler.<wbr/>crop<wbr/>Region</a>,<wbr/> the HAL
should ignore the sections outside the region and output the
used sections in the frame metadata</p>
</td>
@@ -3453,7 +3453,7 @@
<tr class="entry_cont">
<td class="entry_details" colspan="5">
<p>[BC - AWB lock,<wbr/>AWB modes]</p>
-<p>Only effective if android.<wbr/>control.<wbr/>mode = AUTO.<wbr/></p>
+<p>Only effective if <a href="#controls_android.control.mode">android.<wbr/>control.<wbr/>mode</a> = AUTO.<wbr/></p>
</td>
</tr>
@@ -3507,13 +3507,13 @@
specified coordinates.<wbr/></p>
<p>The coordinate system is based on the active pixel array,<wbr/>
with (0,<wbr/>0) being the top-left pixel in the active pixel array,<wbr/> and
-(android.<wbr/>sensor.<wbr/>info.<wbr/>active<wbr/>Array<wbr/>Size.<wbr/>width - 1,<wbr/>
-android.<wbr/>sensor.<wbr/>info.<wbr/>active<wbr/>Array<wbr/>Size.<wbr/>height - 1) being the
+(<a href="#static_android.sensor.info.activeArraySize">android.<wbr/>sensor.<wbr/>info.<wbr/>active<wbr/>Array<wbr/>Size</a>.<wbr/>width - 1,<wbr/>
+<a href="#static_android.sensor.info.activeArraySize">android.<wbr/>sensor.<wbr/>info.<wbr/>active<wbr/>Array<wbr/>Size</a>.<wbr/>height - 1) being the
bottom-right pixel in the active pixel array.<wbr/> The weight
should be nonnegative.<wbr/></p>
<p>If all regions have 0 weight,<wbr/> then no specific metering area
needs to be used by the HAL.<wbr/> If the metering region is
-outside the current android.<wbr/>scaler.<wbr/>crop<wbr/>Region,<wbr/> the HAL
+outside the current <a href="#controls_android.scaler.cropRegion">android.<wbr/>scaler.<wbr/>crop<wbr/>Region</a>,<wbr/> the HAL
should ignore the sections outside the region and output the
used sections in the frame metadata</p>
</td>
@@ -3634,7 +3634,7 @@
</td>
<td class="entry_range">
- all must be supported
+ <p>all must be supported</p>
</td>
<td class="entry_tags">
@@ -3653,12 +3653,12 @@
by the HAL is disabled.<wbr/> The application must set the fields for
capture parameters itself.<wbr/></p>
<p>When set to AUTO,<wbr/> the individual algorithm controls in
-android.<wbr/>control.<wbr/>* are in effect,<wbr/> such as android.<wbr/>control.<wbr/>af<wbr/>Mode.<wbr/></p>
+android.<wbr/>control.<wbr/>* are in effect,<wbr/> such as <a href="#controls_android.control.afMode">android.<wbr/>control.<wbr/>af<wbr/>Mode</a>.<wbr/></p>
<p>When set to USE_<wbr/>SCENE_<wbr/>MODE,<wbr/> the individual controls in
android.<wbr/>control.<wbr/>* are mostly disabled,<wbr/> and the HAL implements
one of the scene mode settings (such as ACTION,<wbr/> SUNSET,<wbr/> or PARTY)
as it wishes.<wbr/> The HAL scene mode 3A settings are provided by
-android.<wbr/>control.<wbr/>scene<wbr/>Mode<wbr/>Overrides.<wbr/></p>
+<a href="#static_android.control.sceneModeOverrides">android.<wbr/>control.<wbr/>scene<wbr/>Mode<wbr/>Overrides</a>.<wbr/></p>
</td>
</tr>
@@ -4019,7 +4019,7 @@
</td>
<td class="entry_range">
- 0 - 10
+ <p>0 - 10</p>
</td>
<td class="entry_tags">
@@ -4067,7 +4067,7 @@
</td>
<td class="entry_range">
- 0-(exposure time-flash duration)
+ <p>0-(exposure time-flash duration)</p>
</td>
<td class="entry_tags">
@@ -4243,7 +4243,7 @@
</td>
<td class="entry_range">
- 0-1e9
+ <p>0-1e9</p>
</td>
<td class="entry_tags">
@@ -4293,7 +4293,7 @@
</td>
<td class="entry_range">
- 0-1 for both
+ <p>0-1 for both</p>
</td>
<td class="entry_tags">
@@ -4331,7 +4331,9 @@
</td>
<td class="entry_range">
- >= 0
+ <blockquote>
+<p>= 0</p>
+</blockquote>
</td>
<td class="entry_tags">
@@ -4395,7 +4397,7 @@
</td>
<td class="entry_range">
- 0 - 10
+ <p>0 - 10</p>
</td>
<td class="entry_tags">
@@ -4443,7 +4445,7 @@
</td>
<td class="entry_range">
- 0-(exposure time-flash duration)
+ <p>0-(exposure time-flash duration)</p>
</td>
<td class="entry_tags">
@@ -4992,7 +4994,7 @@
</td>
<td class="entry_range">
- (-180 - 180],<wbr/> [-90,<wbr/>90],<wbr/> [-inf,<wbr/> inf]
+ <p>(-180 - 180],<wbr/> [-90,<wbr/>90],<wbr/> [-inf,<wbr/> inf]</p>
</td>
<td class="entry_tags">
@@ -5104,7 +5106,7 @@
</td>
<td class="entry_range">
- 0,<wbr/> 90,<wbr/> 180,<wbr/> 270
+ <p>0,<wbr/> 90,<wbr/> 180,<wbr/> 270</p>
</td>
<td class="entry_tags">
@@ -5141,7 +5143,7 @@
</td>
<td class="entry_range">
- 1-100; larger is higher quality
+ <p>1-100; larger is higher quality</p>
</td>
<td class="entry_tags">
@@ -5186,7 +5188,7 @@
</td>
<td class="entry_range">
- 1-100; larger is higher quality
+ <p>1-100; larger is higher quality</p>
</td>
<td class="entry_tags">
@@ -5226,7 +5228,7 @@
</td>
<td class="entry_range">
- Size must be one of the size from android.<wbr/>jpeg.<wbr/>available<wbr/>Thumbnail<wbr/>Sizes
+ <p>Size must be one of the size from <a href="#static_android.jpeg.availableThumbnailSizes">android.<wbr/>jpeg.<wbr/>available<wbr/>Thumbnail<wbr/>Sizes</a></p>
</td>
<td class="entry_tags">
@@ -5304,8 +5306,8 @@
</td>
<td class="entry_range">
- Must include at least one valid resolution,<wbr/> plus
- (0,<wbr/>0) for no thumbnail generation,<wbr/> and each size must be distinct.<wbr/>
+ <p>Must include at least one valid resolution,<wbr/> plus
+(0,<wbr/>0) for no thumbnail generation,<wbr/> and each size must be distinct.<wbr/></p>
</td>
<td class="entry_tags">
@@ -5325,10 +5327,10 @@
<li>The sizes must be sorted by increasing pixel area (width x height).<wbr/>
If several resolutions have the same area,<wbr/> they must be sorted by increasing width.<wbr/></li>
<li>The aspect ratio of the largest thumbnail size must be same as the
-aspect ratio of largest size in android.<wbr/>scaler.<wbr/>available<wbr/>Jpeg<wbr/>Sizes.<wbr/>
+aspect ratio of largest size in <a href="#static_android.scaler.availableJpegSizes">android.<wbr/>scaler.<wbr/>available<wbr/>Jpeg<wbr/>Sizes</a>.<wbr/>
The largest size is defined as the size that has the largest pixel area
in a given size list.<wbr/></li>
-<li>Each size in android.<wbr/>scaler.<wbr/>available<wbr/>Jpeg<wbr/>Sizes must have at least
+<li>Each size in <a href="#static_android.scaler.availableJpegSizes">android.<wbr/>scaler.<wbr/>available<wbr/>Jpeg<wbr/>Sizes</a> must have at least
one corresponding size that has the same aspect ratio in availableThumbnailSizes,<wbr/>
and vice versa.<wbr/></li>
<li>All non (0,<wbr/> 0) sizes must have non-zero widths and heights.<wbr/></li>
@@ -5362,8 +5364,8 @@
</td>
<td class="entry_range">
- Must be large enough to fit any JPEG produced by
- the camera
+ <p>Must be large enough to fit any JPEG produced by
+the camera</p>
</td>
<td class="entry_tags">
@@ -5438,7 +5440,7 @@
</td>
<td class="entry_range">
- (-180 - 180],<wbr/> [-90,<wbr/>90],<wbr/> [-inf,<wbr/> inf]
+ <p>(-180 - 180],<wbr/> [-90,<wbr/>90],<wbr/> [-inf,<wbr/> inf]</p>
</td>
<td class="entry_tags">
@@ -5550,7 +5552,7 @@
</td>
<td class="entry_range">
- 0,<wbr/> 90,<wbr/> 180,<wbr/> 270
+ <p>0,<wbr/> 90,<wbr/> 180,<wbr/> 270</p>
</td>
<td class="entry_tags">
@@ -5587,7 +5589,7 @@
</td>
<td class="entry_range">
- 1-100; larger is higher quality
+ <p>1-100; larger is higher quality</p>
</td>
<td class="entry_tags">
@@ -5632,7 +5634,9 @@
</td>
<td class="entry_range">
- >= 0
+ <blockquote>
+<p>= 0</p>
+</blockquote>
</td>
<td class="entry_tags">
@@ -5648,8 +5652,8 @@
this must be 0.<wbr/></p>
<p>Otherwise,<wbr/> this describes the real size of the compressed
JPEG image placed in the output stream.<wbr/> More specifically,<wbr/>
-if android.<wbr/>jpeg.<wbr/>max<wbr/>Size = 1000000,<wbr/> and a specific capture
-has android.<wbr/>jpeg.<wbr/>size = 500000,<wbr/> then the output buffer from
+if <a href="#static_android.jpeg.maxSize">android.<wbr/>jpeg.<wbr/>max<wbr/>Size</a> = 1000000,<wbr/> and a specific capture
+has <a href="#dynamic_android.jpeg.size">android.<wbr/>jpeg.<wbr/>size</a> = 500000,<wbr/> then the output buffer from
the JPEG stream will be 1000000 bytes,<wbr/> of which the first
500000 make up the real data.<wbr/></p>
</td>
@@ -5681,7 +5685,7 @@
</td>
<td class="entry_range">
- 1-100; larger is higher quality
+ <p>1-100; larger is higher quality</p>
</td>
<td class="entry_tags">
@@ -5721,7 +5725,7 @@
</td>
<td class="entry_range">
- Size must be one of the size from android.<wbr/>jpeg.<wbr/>available<wbr/>Thumbnail<wbr/>Sizes
+ <p>Size must be one of the size from <a href="#static_android.jpeg.availableThumbnailSizes">android.<wbr/>jpeg.<wbr/>available<wbr/>Thumbnail<wbr/>Sizes</a></p>
</td>
<td class="entry_tags">
@@ -5801,7 +5805,7 @@
</td>
<td class="entry_range">
- android.<wbr/>lens.<wbr/>info.<wbr/>available<wbr/>Apertures
+ <p><a href="#static_android.lens.info.availableApertures">android.<wbr/>lens.<wbr/>info.<wbr/>available<wbr/>Apertures</a></p>
</td>
<td class="entry_tags">
@@ -5848,7 +5852,7 @@
</td>
<td class="entry_range">
- android.<wbr/>lens.<wbr/>info.<wbr/>available<wbr/>Filter<wbr/>Densities
+ <p><a href="#static_android.lens.info.availableFilterDensities">android.<wbr/>lens.<wbr/>info.<wbr/>available<wbr/>Filter<wbr/>Densities</a></p>
</td>
<td class="entry_tags">
@@ -5894,7 +5898,9 @@
</td>
<td class="entry_range">
- > 0
+ <blockquote>
+<p>0</p>
+</blockquote>
</td>
<td class="entry_tags">
@@ -5940,7 +5946,9 @@
</td>
<td class="entry_range">
- >= 0
+ <blockquote>
+<p>= 0</p>
+</blockquote>
</td>
<td class="entry_tags">
@@ -5996,7 +6004,7 @@
</td>
<td class="entry_range">
- android.<wbr/>lens.<wbr/>available<wbr/>Optical<wbr/>Stabilization
+ <p>android.<wbr/>lens.<wbr/>available<wbr/>Optical<wbr/>Stabilization</p>
</td>
<td class="entry_tags">
@@ -6074,7 +6082,7 @@
</td>
<td class="entry_range">
- one entry required,<wbr/> > 0
+ <p>one entry required,<wbr/> > 0</p>
</td>
<td class="entry_tags">
@@ -6124,7 +6132,7 @@
</td>
<td class="entry_range">
- one entry required,<wbr/> >= 0
+ <p>one entry required,<wbr/> >= 0</p>
</td>
<td class="entry_tags">
@@ -6178,7 +6186,9 @@
</td>
<td class="entry_range">
- > 0
+ <blockquote>
+<p>0</p>
+</blockquote>
</td>
<td class="entry_tags">
@@ -6272,7 +6282,7 @@
</td>
<td class="entry_range">
- N,<wbr/> M >= 2
+ <p>N,<wbr/> M >= 2</p>
</td>
<td class="entry_tags">
@@ -6326,7 +6336,7 @@
</td>
<td class="entry_range">
- Both values >= 2
+ <p>Both values >= 2</p>
</td>
<td class="entry_tags">
@@ -6364,7 +6374,9 @@
</td>
<td class="entry_range">
- >= 0
+ <blockquote>
+<p>= 0</p>
+</blockquote>
</td>
<td class="entry_tags">
@@ -6411,7 +6423,9 @@
</td>
<td class="entry_range">
- >= 0
+ <blockquote>
+<p>= 0</p>
+</blockquote>
</td>
<td class="entry_tags">
@@ -6461,7 +6475,7 @@
</td>
<td class="entry_range">
- Both values >= 1
+ <p>Both values >= 1</p>
</td>
<td class="entry_tags">
@@ -6556,7 +6570,7 @@
</td>
<td class="entry_range">
- [0-90) for first angle,<wbr/> [0-360) for second
+ <p>[0-90) for first angle,<wbr/> [0-360) for second</p>
</td>
<td class="entry_tags">
@@ -6677,7 +6691,7 @@
</td>
<td class="entry_range">
- android.<wbr/>lens.<wbr/>info.<wbr/>available<wbr/>Apertures
+ <p><a href="#static_android.lens.info.availableApertures">android.<wbr/>lens.<wbr/>info.<wbr/>available<wbr/>Apertures</a></p>
</td>
<td class="entry_tags">
@@ -6724,7 +6738,7 @@
</td>
<td class="entry_range">
- android.<wbr/>lens.<wbr/>info.<wbr/>available<wbr/>Filter<wbr/>Densities
+ <p><a href="#static_android.lens.info.availableFilterDensities">android.<wbr/>lens.<wbr/>info.<wbr/>available<wbr/>Filter<wbr/>Densities</a></p>
</td>
<td class="entry_tags">
@@ -6770,7 +6784,9 @@
</td>
<td class="entry_range">
- > 0
+ <blockquote>
+<p>0</p>
+</blockquote>
</td>
<td class="entry_tags">
@@ -6816,7 +6832,9 @@
</td>
<td class="entry_range">
- >= 0
+ <blockquote>
+<p>= 0</p>
+</blockquote>
</td>
<td class="entry_tags">
@@ -6868,7 +6886,9 @@
</td>
<td class="entry_range">
- >=0
+ <blockquote>
+<p>=0</p>
+</blockquote>
</td>
<td class="entry_tags">
@@ -6923,7 +6943,7 @@
</td>
<td class="entry_range">
- android.<wbr/>lens.<wbr/>available<wbr/>Optical<wbr/>Stabilization
+ <p>android.<wbr/>lens.<wbr/>available<wbr/>Optical<wbr/>Stabilization</p>
</td>
<td class="entry_tags">
@@ -7059,7 +7079,7 @@
</td>
<td class="entry_range">
- android.<wbr/>noise<wbr/>Reduction.<wbr/>available<wbr/>Modes
+ <p>android.<wbr/>noise<wbr/>Reduction.<wbr/>available<wbr/>Modes</p>
</td>
<td class="entry_tags">
@@ -7111,7 +7131,7 @@
</td>
<td class="entry_range">
- 1 - 10
+ <p>1 - 10</p>
</td>
<td class="entry_tags">
@@ -7188,7 +7208,7 @@
</td>
<td class="entry_range">
- android.<wbr/>noise<wbr/>Reduction.<wbr/>available<wbr/>Modes
+ <p>android.<wbr/>noise<wbr/>Reduction.<wbr/>available<wbr/>Modes</p>
</td>
<td class="entry_tags">
@@ -7503,7 +7523,7 @@
</td>
<td class="entry_range">
- Optional.<wbr/> Default value is FINAL.<wbr/>
+ <p>Optional.<wbr/> Default value is FINAL.<wbr/></p>
</td>
<td class="entry_tags">
@@ -7588,7 +7608,7 @@
</td>
<td class="entry_range">
- Any int
+ <p>Any int</p>
</td>
<td class="entry_tags">
@@ -7624,7 +7644,7 @@
</td>
<td class="entry_range">
- Any int
+ <p>Any int</p>
</td>
<td class="entry_tags">
@@ -7666,12 +7686,11 @@
</td>
<td class="entry_range">
- Typically,<wbr/> only one entry allowed,<wbr/> must be a valid
- reprocess stream ID.<wbr/>
-
- If android.<wbr/>jpeg.<wbr/>needs<wbr/>Thumbnail is set,<wbr/> then multiple
- reprocess streams may be included in a single request; they
- must be different scaled versions of the same image.<wbr/>
+ <p>Typically,<wbr/> only one entry allowed,<wbr/> must be a valid
+reprocess stream ID.<wbr/></p>
+<p>If android.<wbr/>jpeg.<wbr/>needs<wbr/>Thumbnail is set,<wbr/> then multiple
+reprocess streams may be included in a single request; they
+must be different scaled versions of the same image.<wbr/></p>
</td>
<td class="entry_tags">
@@ -7686,7 +7705,7 @@
</tr>
<tr class="entry_cont">
<td class="entry_details" colspan="5">
- <p>Only meaningful when android.<wbr/>request.<wbr/>type ==
+ <p>Only meaningful when <a href="#controls_android.request.type">android.<wbr/>request.<wbr/>type</a> ==
REPROCESS.<wbr/> Ignored otherwise</p>
</td>
</tr>
@@ -7774,8 +7793,8 @@
</td>
<td class="entry_range">
- List must only include streams that have been
- created
+ <p>List must only include streams that have been
+created</p>
</td>
<td class="entry_tags">
@@ -7908,8 +7927,10 @@
</td>
<td class="entry_range">
- >=1 for Raw and JPEG-compressed stream.<wbr/> >= 3
- for processed,<wbr/> uncompressed streams
+ <blockquote>
+<p>=1 for Raw and JPEG-compressed stream.<wbr/> >= 3
+for processed,<wbr/> uncompressed streams</p>
+</blockquote>
</td>
<td class="entry_tags">
@@ -7960,7 +7981,9 @@
</td>
<td class="entry_range">
- >= 1
+ <blockquote>
+<p>= 1</p>
+</blockquote>
</td>
<td class="entry_tags">
@@ -8023,7 +8046,9 @@
</td>
<td class="entry_range">
- > 0
+ <blockquote>
+<p>0</p>
+</blockquote>
</td>
<td class="entry_tags">
@@ -8067,7 +8092,7 @@
</td>
<td class="entry_range">
- Any int
+ <p>Any int</p>
</td>
<td class="entry_tags">
@@ -8161,8 +8186,8 @@
</td>
<td class="entry_range">
- List must only include streams that have been
- created
+ <p>List must only include streams that have been
+created</p>
</td>
<td class="entry_tags">
@@ -8474,8 +8499,8 @@
</td>
<td class="entry_range">
- Must include: - sensor maximum resolution Should
- include: - half/<wbr/>quarter max resolution
+ <p>Must include: - sensor maximum resolution Should
+include: - half/<wbr/>quarter max resolution</p>
</td>
<td class="entry_tags">
@@ -8514,7 +8539,9 @@
</td>
<td class="entry_range">
- >=1
+ <blockquote>
+<p>=1</p>
+</blockquote>
</td>
<td class="entry_tags">
@@ -8610,9 +8637,9 @@
</td>
<td class="entry_range">
- Must include: - sensor maximum resolution -
- standard QCIF,<wbr/> 240p,<wbr/> 480p,<wbr/> 720p,<wbr/> and 1080p
- resolutions
+ <p>Must include: - sensor maximum resolution -
+standard QCIF,<wbr/> 240p,<wbr/> 480p,<wbr/> 720p,<wbr/> and 1080p
+resolutions</p>
</td>
<td class="entry_tags">
@@ -8719,7 +8746,7 @@
</td>
<td class="entry_range">
- Must include: - sensor maximum resolution
+ <p>Must include: - sensor maximum resolution</p>
</td>
<td class="entry_tags">
@@ -8892,7 +8919,7 @@
</td>
<td class="entry_range">
- android.<wbr/>sensor.<wbr/>info.<wbr/>exposure<wbr/>Time<wbr/>Range
+ <p><a href="#static_android.sensor.info.exposureTimeRange">android.<wbr/>sensor.<wbr/>info.<wbr/>exposure<wbr/>Time<wbr/>Range</a></p>
</td>
<td class="entry_tags">
@@ -8938,8 +8965,8 @@
</td>
<td class="entry_range">
- see android.<wbr/>sensor.<wbr/>info.<wbr/>max<wbr/>Frame<wbr/>Duration,<wbr/>
- android.<wbr/>scaler.<wbr/>info.<wbr/>available<wbr/>Min<wbr/>Frame<wbr/>Durations
+ <p>see <a href="#static_android.sensor.info.maxFrameDuration">android.<wbr/>sensor.<wbr/>info.<wbr/>max<wbr/>Frame<wbr/>Duration</a>,<wbr/>
+android.<wbr/>scaler.<wbr/>info.<wbr/>available<wbr/>Min<wbr/>Frame<wbr/>Durations</p>
</td>
<td class="entry_tags">
@@ -8990,7 +9017,7 @@
</td>
<td class="entry_range">
- android.<wbr/>sensor.<wbr/>info.<wbr/>sensitivity<wbr/>Range
+ <p><a href="#static_android.sensor.info.sensitivityRange">android.<wbr/>sensor.<wbr/>info.<wbr/>sensitivity<wbr/>Range</a></p>
</td>
<td class="entry_tags">
@@ -9112,7 +9139,7 @@
</td>
<td class="entry_range">
- Min <= 100,<wbr/> Max >= 1600
+ <p>Min <= 100,<wbr/> Max >= 1600</p>
</td>
<td class="entry_tags">
@@ -9212,8 +9239,8 @@
</td>
<td class="entry_range">
- Min <= 100e3 (100 us),<wbr/> Max >= 30e9 (30
- sec)
+ <p>Min <= 100e3 (100 us),<wbr/> Max >= 30e9 (30
+sec)</p>
</td>
<td class="entry_tags">
@@ -9251,7 +9278,9 @@
</td>
<td class="entry_range">
- >= 30e9
+ <blockquote>
+<p>= 30e9</p>
+</blockquote>
</td>
<td class="entry_tags">
@@ -9271,7 +9300,7 @@
processing settings.<wbr/> See
android.<wbr/>scaler.<wbr/>available<wbr/>Processed<wbr/>Min<wbr/>Durations
android.<wbr/>scaler.<wbr/>available<wbr/>Jpeg<wbr/>Min<wbr/>Durations
-android.<wbr/>scaler.<wbr/>available<wbr/>Raw<wbr/>Min<wbr/>Durations</p>
+<a href="#static_android.scaler.availableRawMinDurations">android.<wbr/>scaler.<wbr/>available<wbr/>Raw<wbr/>Min<wbr/>Durations</a></p>
</td>
</tr>
@@ -9402,7 +9431,9 @@
</td>
<td class="entry_range">
- > 1024 (10-bit output)
+ <blockquote>
+<p>1024 (10-bit output)</p>
+</blockquote>
</td>
<td class="entry_tags">
@@ -9493,7 +9524,9 @@
</td>
<td class="entry_range">
- >= 0 each
+ <blockquote>
+<p>= 0 each</p>
+</blockquote>
</td>
<td class="entry_tags">
@@ -9812,7 +9845,7 @@
</tr>
<tr class="entry_cont">
<td class="entry_details" colspan="5">
- <p>For android.<wbr/>sensor.<wbr/>sensitivity values less than or
+ <p>For <a href="#controls_android.sensor.sensitivity">android.<wbr/>sensor.<wbr/>sensitivity</a> values less than or
equal to this,<wbr/> all applied gain must be analog.<wbr/> For
values above this,<wbr/> it can be a mix of analog and
digital</p>
@@ -9906,7 +9939,7 @@
</td>
<td class="entry_range">
- 0,<wbr/>90,<wbr/>180,<wbr/>270
+ <p>0,<wbr/>90,<wbr/>180,<wbr/>270</p>
</td>
<td class="entry_tags">
@@ -10136,7 +10169,7 @@
</td>
<td class="entry_range">
- android.<wbr/>sensor.<wbr/>info.<wbr/>exposure<wbr/>Time<wbr/>Range
+ <p><a href="#static_android.sensor.info.exposureTimeRange">android.<wbr/>sensor.<wbr/>info.<wbr/>exposure<wbr/>Time<wbr/>Range</a></p>
</td>
<td class="entry_tags">
@@ -10182,8 +10215,8 @@
</td>
<td class="entry_range">
- see android.<wbr/>sensor.<wbr/>info.<wbr/>max<wbr/>Frame<wbr/>Duration,<wbr/>
- android.<wbr/>scaler.<wbr/>info.<wbr/>available<wbr/>Min<wbr/>Frame<wbr/>Durations
+ <p>see <a href="#static_android.sensor.info.maxFrameDuration">android.<wbr/>sensor.<wbr/>info.<wbr/>max<wbr/>Frame<wbr/>Duration</a>,<wbr/>
+android.<wbr/>scaler.<wbr/>info.<wbr/>available<wbr/>Min<wbr/>Frame<wbr/>Durations</p>
</td>
<td class="entry_tags">
@@ -10234,7 +10267,7 @@
</td>
<td class="entry_range">
- android.<wbr/>sensor.<wbr/>info.<wbr/>sensitivity<wbr/>Range
+ <p><a href="#static_android.sensor.info.sensitivityRange">android.<wbr/>sensor.<wbr/>info.<wbr/>sensitivity<wbr/>Range</a></p>
</td>
<td class="entry_tags">
@@ -10280,7 +10313,9 @@
</td>
<td class="entry_range">
- > 0
+ <blockquote>
+<p>0</p>
+</blockquote>
</td>
<td class="entry_tags">
@@ -10329,7 +10364,7 @@
</td>
<td class="entry_range">
- Optional.<wbr/> This value is missing if no temperature is available.<wbr/>
+ <p>Optional.<wbr/> This value is missing if no temperature is available.<wbr/></p>
</td>
<td class="entry_tags">
@@ -10608,8 +10643,7 @@
</td>
<td class="entry_range">
-
- android.<wbr/>statistics.<wbr/>info.<wbr/>available<wbr/>Face<wbr/>Detect<wbr/>Modes
+ <p><a href="#static_android.statistics.info.availableFaceDetectModes">android.<wbr/>statistics.<wbr/>info.<wbr/>available<wbr/>Face<wbr/>Detect<wbr/>Modes</a></p>
</td>
<td class="entry_tags">
@@ -10627,7 +10661,7 @@
<p>Whether face detection is enabled,<wbr/> and whether it
should output just the basic fields or the full set of
fields.<wbr/> Value must be one of the
-android.<wbr/>statistics.<wbr/>info.<wbr/>available<wbr/>Face<wbr/>Detect<wbr/>Modes.<wbr/></p>
+<a href="#static_android.statistics.info.availableFaceDetectModes">android.<wbr/>statistics.<wbr/>info.<wbr/>available<wbr/>Face<wbr/>Detect<wbr/>Modes</a>.<wbr/></p>
</td>
</tr>
@@ -10765,7 +10799,7 @@
<tr class="entry_cont">
<td class="entry_details" colspan="5">
<p>When set to ON,<wbr/>
-android.<wbr/>statistics.<wbr/>lens<wbr/>Shading<wbr/>Map must be provided in
+<a href="#dynamic_android.statistics.lensShadingMap">android.<wbr/>statistics.<wbr/>lens<wbr/>Shading<wbr/>Map</a> must be provided in
the output result metadata.<wbr/></p>
</td>
</tr>
@@ -10848,11 +10882,11 @@
<p>OFF means face detection is disabled,<wbr/> it must
be included in the list.<wbr/></p>
<p>SIMPLE means the device supports the
-android.<wbr/>statistics.<wbr/>face<wbr/>Rectangles and
-android.<wbr/>statistics.<wbr/>face<wbr/>Scores outputs.<wbr/></p>
+<a href="#dynamic_android.statistics.faceRectangles">android.<wbr/>statistics.<wbr/>face<wbr/>Rectangles</a> and
+<a href="#dynamic_android.statistics.faceScores">android.<wbr/>statistics.<wbr/>face<wbr/>Scores</a> outputs.<wbr/></p>
<p>FULL means the device additionally supports the
-android.<wbr/>statistics.<wbr/>face<wbr/>Ids and
-android.<wbr/>statistics.<wbr/>face<wbr/>Landmarks outputs.<wbr/></p>
+<a href="#dynamic_android.statistics.faceIds">android.<wbr/>statistics.<wbr/>face<wbr/>Ids</a> and
+<a href="#dynamic_android.statistics.faceLandmarks">android.<wbr/>statistics.<wbr/>face<wbr/>Landmarks</a> outputs.<wbr/></p>
</td>
</tr>
@@ -10882,7 +10916,9 @@
</td>
<td class="entry_range">
- >= 64
+ <blockquote>
+<p>= 64</p>
+</blockquote>
</td>
<td class="entry_tags">
@@ -10916,8 +10952,10 @@
</td>
<td class="entry_range">
- >= 4 if availableFaceDetectionModes lists
- modes besides OFF,<wbr/> otherwise 0
+ <blockquote>
+<p>= 4 if availableFaceDetectionModes lists
+modes besides OFF,<wbr/> otherwise 0</p>
+</blockquote>
</td>
<td class="entry_tags">
@@ -11022,7 +11060,7 @@
</td>
<td class="entry_range">
- Must be at least 32 x 32
+ <p>Must be at least 32 x 32</p>
</td>
<td class="entry_tags">
@@ -11101,8 +11139,7 @@
</td>
<td class="entry_range">
-
- android.<wbr/>statistics.<wbr/>info.<wbr/>available<wbr/>Face<wbr/>Detect<wbr/>Modes
+ <p><a href="#static_android.statistics.info.availableFaceDetectModes">android.<wbr/>statistics.<wbr/>info.<wbr/>available<wbr/>Face<wbr/>Detect<wbr/>Modes</a></p>
</td>
<td class="entry_tags">
@@ -11120,7 +11157,7 @@
<p>Whether face detection is enabled,<wbr/> and whether it
should output just the basic fields or the full set of
fields.<wbr/> Value must be one of the
-android.<wbr/>statistics.<wbr/>info.<wbr/>available<wbr/>Face<wbr/>Detect<wbr/>Modes.<wbr/></p>
+<a href="#static_android.statistics.info.availableFaceDetectModes">android.<wbr/>statistics.<wbr/>info.<wbr/>available<wbr/>Face<wbr/>Detect<wbr/>Modes</a>.<wbr/></p>
</td>
</tr>
@@ -11300,7 +11337,7 @@
</td>
<td class="entry_range">
- 1-100
+ <p>1-100</p>
</td>
<td class="entry_tags">
@@ -11366,7 +11403,7 @@
<tr class="entry_cont">
<td class="entry_details" colspan="5">
<p>The k'th bucket (0-based) covers the input range
-(with w = android.<wbr/>sensor.<wbr/>info.<wbr/>white<wbr/>Level) of [ k * w/<wbr/>N,<wbr/>
+(with w = <a href="#static_android.sensor.info.whiteLevel">android.<wbr/>sensor.<wbr/>info.<wbr/>white<wbr/>Level</a>) of [ k * w/<wbr/>N,<wbr/>
(k + 1) * w /<wbr/> N ).<wbr/> If only a monochrome sharpness map is
supported,<wbr/> all channels should have the same data</p>
</td>
@@ -11542,7 +11579,7 @@
</td>
<td class="entry_range">
- Each gain factor is >= 1
+ <p>Each gain factor is >= 1</p>
</td>
<td class="entry_tags">
@@ -11556,7 +11593,7 @@
<td class="entry_details" colspan="5">
<p>The least shaded section of the image should have a gain factor
of 1; all other sections should have gains above 1.<wbr/></p>
-<p>When android.<wbr/>color<wbr/>Correction.<wbr/>mode = TRANSFORM_<wbr/>MATRIX,<wbr/> the map
+<p>When <a href="#controls_android.colorCorrection.mode">android.<wbr/>color<wbr/>Correction.<wbr/>mode</a> = TRANSFORM_<wbr/>MATRIX,<wbr/> the map
must take into account the colorCorrection settings.<wbr/></p>
<p>The shading map is for the entire active pixel array,<wbr/> and is not
affected by the crop region specified in the request.<wbr/> Each shading map
@@ -11569,12 +11606,12 @@
<p>The channel order is [R,<wbr/> Geven,<wbr/> Godd,<wbr/> B],<wbr/> where Geven is the green
channel for the even rows of a Bayer pattern,<wbr/> and Godd is the odd rows.<wbr/>
The shading map is stored in a fully interleaved format,<wbr/> and its size
-is provided in the camera static metadata by android.<wbr/>lens.<wbr/>info.<wbr/>shading<wbr/>Map<wbr/>Size.<wbr/></p>
+is provided in the camera static metadata by <a href="#static_android.lens.info.shadingMapSize">android.<wbr/>lens.<wbr/>info.<wbr/>shading<wbr/>Map<wbr/>Size</a>.<wbr/></p>
<p>The shading map should have on the order of 30-40 rows and columns,<wbr/>
and must be smaller than 64x64.<wbr/></p>
<p>As an example,<wbr/> given a very small map defined as:</p>
-<pre><code>android.<wbr/>lens.<wbr/>info.<wbr/>shading<wbr/>Map<wbr/>Size = [ 4,<wbr/> 3 ]
-android.<wbr/>statistics.<wbr/>lens<wbr/>Shading<wbr/>Map =
+<pre><code><a href="#static_android.lens.info.shadingMapSize">android.<wbr/>lens.<wbr/>info.<wbr/>shading<wbr/>Map<wbr/>Size</a> = [ 4,<wbr/> 3 ]
+<a href="#dynamic_android.statistics.lensShadingMap">android.<wbr/>statistics.<wbr/>lens<wbr/>Shading<wbr/>Map</a> =
[ 1.<wbr/>3,<wbr/> 1.<wbr/>2,<wbr/> 1.<wbr/>15,<wbr/> 1.<wbr/>2,<wbr/> 1.<wbr/>2,<wbr/> 1.<wbr/>2,<wbr/> 1.<wbr/>15,<wbr/> 1.<wbr/>2,<wbr/>
1.<wbr/>1,<wbr/> 1.<wbr/>2,<wbr/> 1.<wbr/>2,<wbr/> 1.<wbr/>2,<wbr/> 1.<wbr/>3,<wbr/> 1.<wbr/>2,<wbr/> 1.<wbr/>3,<wbr/> 1.<wbr/>3,<wbr/>
1.<wbr/>2,<wbr/> 1.<wbr/>2,<wbr/> 1.<wbr/>25,<wbr/> 1.<wbr/>1,<wbr/> 1.<wbr/>1,<wbr/> 1.<wbr/>1,<wbr/> 1.<wbr/>1,<wbr/> 1.<wbr/>0,<wbr/>
@@ -11641,7 +11678,7 @@
typically completes after the transform has already been
applied to that frame.<wbr/></p>
<p>The 4 channel gains are defined in Bayer domain,<wbr/>
-see android.<wbr/>color<wbr/>Correction.<wbr/>gains for details.<wbr/></p>
+see <a href="#controls_android.colorCorrection.gains">android.<wbr/>color<wbr/>Correction.<wbr/>gains</a> for details.<wbr/></p>
<p>This value should always be calculated by the AWB block,<wbr/>
regardless of the android.<wbr/>control.<wbr/>* current values.<wbr/></p>
</td>
@@ -11822,7 +11859,7 @@
</td>
<td class="entry_range">
- same as android.<wbr/>tonemap.<wbr/>curve<wbr/>Red
+ <p>same as <a href="#controls_android.tonemap.curveRed">android.<wbr/>tonemap.<wbr/>curve<wbr/>Red</a></p>
</td>
<td class="entry_tags">
@@ -11835,8 +11872,8 @@
<tr class="entry_cont">
<td class="entry_details" colspan="5">
<p>Tonemapping /<wbr/> contrast /<wbr/> gamma curve for the blue
-channel,<wbr/> to use when android.<wbr/>tonemap.<wbr/>mode is CONTRAST_<wbr/>CURVE.<wbr/></p>
-<p>See android.<wbr/>tonemap.<wbr/>curve<wbr/>Red for more details.<wbr/></p>
+channel,<wbr/> to use when <a href="#controls_android.tonemap.mode">android.<wbr/>tonemap.<wbr/>mode</a> is CONTRAST_<wbr/>CURVE.<wbr/></p>
+<p>See <a href="#controls_android.tonemap.curveRed">android.<wbr/>tonemap.<wbr/>curve<wbr/>Red</a> for more details.<wbr/></p>
</td>
</tr>
@@ -11872,7 +11909,7 @@
</td>
<td class="entry_range">
- same as android.<wbr/>tonemap.<wbr/>curve<wbr/>Red
+ <p>same as <a href="#controls_android.tonemap.curveRed">android.<wbr/>tonemap.<wbr/>curve<wbr/>Red</a></p>
</td>
<td class="entry_tags">
@@ -11885,8 +11922,8 @@
<tr class="entry_cont">
<td class="entry_details" colspan="5">
<p>Tonemapping /<wbr/> contrast /<wbr/> gamma curve for the green
-channel,<wbr/> to use when android.<wbr/>tonemap.<wbr/>mode is CONTRAST_<wbr/>CURVE.<wbr/></p>
-<p>See android.<wbr/>tonemap.<wbr/>curve<wbr/>Red for more details.<wbr/></p>
+channel,<wbr/> to use when <a href="#controls_android.tonemap.mode">android.<wbr/>tonemap.<wbr/>mode</a> is CONTRAST_<wbr/>CURVE.<wbr/></p>
+<p>See <a href="#controls_android.tonemap.curveRed">android.<wbr/>tonemap.<wbr/>curve<wbr/>Red</a> for more details.<wbr/></p>
</td>
</tr>
@@ -11921,7 +11958,7 @@
</td>
<td class="entry_range">
- 0-1 on input and output coordinates.<wbr/>
+ <p>0-1 on input and output coordinates.<wbr/></p>
</td>
<td class="entry_tags">
@@ -11937,7 +11974,7 @@
<tr class="entry_cont">
<td class="entry_details" colspan="5">
<p>Tonemapping /<wbr/> contrast /<wbr/> gamma curve for the red
-channel,<wbr/> to use when android.<wbr/>tonemap.<wbr/>mode is CONTRAST_<wbr/>CURVE.<wbr/></p>
+channel,<wbr/> to use when <a href="#controls_android.tonemap.mode">android.<wbr/>tonemap.<wbr/>mode</a> is CONTRAST_<wbr/>CURVE.<wbr/></p>
<p>Since the input and output ranges may vary depending on
the camera pipeline,<wbr/> the input and output pixel values
are represented by normalized floating-point values
@@ -12052,7 +12089,9 @@
</td>
<td class="entry_range">
- >= 128
+ <blockquote>
+<p>= 128</p>
+</blockquote>
</td>
<td class="entry_tags">
@@ -12119,7 +12158,7 @@
</td>
<td class="entry_range">
- same as android.<wbr/>tonemap.<wbr/>curve<wbr/>Red
+ <p>same as <a href="#controls_android.tonemap.curveRed">android.<wbr/>tonemap.<wbr/>curve<wbr/>Red</a></p>
</td>
<td class="entry_tags">
@@ -12132,8 +12171,8 @@
<tr class="entry_cont">
<td class="entry_details" colspan="5">
<p>Tonemapping /<wbr/> contrast /<wbr/> gamma curve for the blue
-channel,<wbr/> to use when android.<wbr/>tonemap.<wbr/>mode is CONTRAST_<wbr/>CURVE.<wbr/></p>
-<p>See android.<wbr/>tonemap.<wbr/>curve<wbr/>Red for more details.<wbr/></p>
+channel,<wbr/> to use when <a href="#controls_android.tonemap.mode">android.<wbr/>tonemap.<wbr/>mode</a> is CONTRAST_<wbr/>CURVE.<wbr/></p>
+<p>See <a href="#controls_android.tonemap.curveRed">android.<wbr/>tonemap.<wbr/>curve<wbr/>Red</a> for more details.<wbr/></p>
</td>
</tr>
@@ -12169,7 +12208,7 @@
</td>
<td class="entry_range">
- same as android.<wbr/>tonemap.<wbr/>curve<wbr/>Red
+ <p>same as <a href="#controls_android.tonemap.curveRed">android.<wbr/>tonemap.<wbr/>curve<wbr/>Red</a></p>
</td>
<td class="entry_tags">
@@ -12182,8 +12221,8 @@
<tr class="entry_cont">
<td class="entry_details" colspan="5">
<p>Tonemapping /<wbr/> contrast /<wbr/> gamma curve for the green
-channel,<wbr/> to use when android.<wbr/>tonemap.<wbr/>mode is CONTRAST_<wbr/>CURVE.<wbr/></p>
-<p>See android.<wbr/>tonemap.<wbr/>curve<wbr/>Red for more details.<wbr/></p>
+channel,<wbr/> to use when <a href="#controls_android.tonemap.mode">android.<wbr/>tonemap.<wbr/>mode</a> is CONTRAST_<wbr/>CURVE.<wbr/></p>
+<p>See <a href="#controls_android.tonemap.curveRed">android.<wbr/>tonemap.<wbr/>curve<wbr/>Red</a> for more details.<wbr/></p>
</td>
</tr>
@@ -12218,7 +12257,7 @@
</td>
<td class="entry_range">
- 0-1 on input and output coordinates.<wbr/>
+ <p>0-1 on input and output coordinates.<wbr/></p>
</td>
<td class="entry_tags">
@@ -12234,7 +12273,7 @@
<tr class="entry_cont">
<td class="entry_details" colspan="5">
<p>Tonemapping /<wbr/> contrast /<wbr/> gamma curve for the red
-channel,<wbr/> to use when android.<wbr/>tonemap.<wbr/>mode is CONTRAST_<wbr/>CURVE.<wbr/></p>
+channel,<wbr/> to use when <a href="#controls_android.tonemap.mode">android.<wbr/>tonemap.<wbr/>mode</a> is CONTRAST_<wbr/>CURVE.<wbr/></p>
<p>Since the input and output ranges may vary depending on
the camera pipeline,<wbr/> the input and output pixel values
are represented by normalized floating-point values
@@ -12594,7 +12633,7 @@
</td>
<td class="entry_range">
- Optional.<wbr/> Default value is LIMITED.<wbr/>
+ <p>Optional.<wbr/> Default value is LIMITED.<wbr/></p>
</td>
<td class="entry_tags">
@@ -12809,7 +12848,7 @@
<tr class="entry_cont">
<td class="entry_details" colspan="5">
<p>Whether the black level offset was locked for this frame.<wbr/> Should be
-ON if android.<wbr/>black<wbr/>Level.<wbr/>lock was ON in the capture request,<wbr/> unless
+ON if <a href="#controls_android.blackLevel.lock">android.<wbr/>black<wbr/>Level.<wbr/>lock</a> was ON in the capture request,<wbr/> unless
a change in other capture settings forced the camera device to
perform a black level reset.<wbr/></p>
</td>
diff --git a/camera/docs/html.mako b/camera/docs/html.mako
index 7556242..4a67168 100644
--- a/camera/docs/html.mako
+++ b/camera/docs/html.mako
@@ -97,17 +97,28 @@
import re
from metadata_helpers import md
from metadata_helpers import IMAGE_SRC_METADATA
+ from metadata_helpers import filter_tags
from metadata_helpers import wbr
# insert line breaks after every two \n\n
def br(text):
return re.sub(r"(\r?\n)(\r?\n)", r"\1<br>\2<br>", text)
+ # Convert node name "x.y.z" of kind w to an HTML anchor of form
+ # <a href="#w_x.y.z">x.y.z</a>
+ def html_anchor(node):
+ return '<a href="#%s_%s">%s</a>' % (node.kind, node.name, node.name)
+
# Render as markdown, and do HTML-doc-specific rewrites
def md_html(text):
- # prepend the image directory path to each <img src="...">
return md(text, IMAGE_SRC_METADATA)
+ # linkify tag names such as "android.x.y.z" into html anchors
+ def linkify_tags(metadata):
+ def linkify_filter(text):
+ return filter_tags(text, metadata, html_anchor)
+ return linkify_filter
+
# Number of rows an entry will span
def entry_cols(prop):
cols = 1
@@ -124,7 +135,7 @@
${ insert_toc_body(nested)}
% endfor
% for entry in node.merged_entries:
- <li><a href="#${entry.kind}_${entry.name}">${entry.name}</a></li>
+ <li>${html_anchor(entry)}</li>
% endfor
</%def>
@@ -258,7 +269,7 @@
<td class="entry_description">
% if prop.description is not None:
- ${prop.description | md_html, wbr}
+ ${prop.description | md_html, linkify_tags(metadata), wbr}
% endif
</td>
@@ -270,7 +281,7 @@
<td class="entry_range">
% if prop.range is not None:
- ${prop.range | wbr}
+ ${prop.range | md_html, linkify_tags(metadata), wbr}
% endif
</td>
@@ -291,7 +302,7 @@
</tr>
<tr class="entry_cont">
<td class="entry_details" colspan="5">
- ${prop.details | md_html, wbr}
+ ${prop.details | md_html, linkify_tags(metadata), wbr}
</td>
</tr>
% endif
@@ -302,7 +313,7 @@
</tr>
<tr class="entry_cont">
<td class="entry_details" colspan="5">
- ${prop.hal_details | md_html, wbr}
+ ${prop.hal_details | md_html, linkify_tags(metadata), wbr}
</td>
</tr>
% endif
@@ -330,7 +341,7 @@
<li id="tag_${tag.id}">${tag.id} - ${tag.description}
<ul class="tags_entries">
% for prop in tag.entries:
- <li><a href="#${prop.kind}_${prop.name}">${prop.name}</a> (${prop.kind})</li>
+ <li>${html_anchor(prop)} (${prop.kind})</li>
% endfor
</ul>
</li> <!-- tag_${tag.id} -->
diff --git a/camera/docs/metadata_helpers.py b/camera/docs/metadata_helpers.py
index 6c16b82..e5fa4cd 100644
--- a/camera/docs/metadata_helpers.py
+++ b/camera/docs/metadata_helpers.py
@@ -22,6 +22,7 @@
import re
import markdown
import textwrap
+import sys
import bs4
# Monkey-patch BS4. WBR element must not have an end tag.
bs4.builder.HTMLTreeBuilder.empty_element_tags.add("wbr")
@@ -620,18 +621,22 @@
cname = csym(enum_entry.name)
return cname[cname.find('_') + 1:] + '_' + enum_value.name
-def javadoc(text, indent = 4):
+def javadoc(metadata, indent = 4):
"""
- Format markdown syntax text block as a javadoc comment section
+ Returns a function to format a markdown syntax text block as a
+ javadoc comment section, given a set of metadata
Args:
- text: A multi-line string to format
+ metadata: A Metadata instance, representing the the top-level root
+ of the metadata for cross-referencing
indent: baseline level of indentation for javadoc block
Returns:
- String with:
+ A function that transforms a String text block as follows:
- Indent and * for insertion into a Javadoc comment block
- Trailing whitespace removed
- Entire body rendered via markdown to generate HTML
+ - All tag names converted to appropriate Javadoc {@link} with @see
+ for each tag
Example:
"This is a comment for Javadoc\n" +
@@ -639,28 +644,65 @@
" formatted better\n" +
"\n" +
" That covers multiple lines as well\n"
+ " And references android.control.mode\n"
transforms to
" * <p>This is a comment for Javadoc\n" +
" * with multiple lines, that should be\n" +
" * formatted better</p>\n" +
" * <p>That covers multiple lines as well</p>\n" +
+ " * and references {@link CaptureRequest#CONTROL_MODE android.control.mode}\n" +
+ " *\n" +
+ " * @see CaptureRequest#CONTROL_MODE\n"
"""
- comment_prefix = " " * indent + " * ";
+ def javadoc_formatter(text):
+ comment_prefix = " " * indent + " * ";
- # render with markdown => HTML
- javatext = md(text, JAVADOC_IMAGE_SRC_METADATA)
+ # render with markdown => HTML
+ javatext = md(text, JAVADOC_IMAGE_SRC_METADATA)
- def line_filter(line):
- # Indent each line
- # Add ' * ' to it for stylistic reasons
- # Strip right side of trailing whitespace
- return (comment_prefix + line).rstrip()
+ # Crossref tag names
+ kind_mapping = {
+ 'static': 'CameraCharacteristics',
+ 'dynamic': 'CaptureResult',
+ 'controls': 'CaptureRequest' }
- # Process each line with above filter
- javatext = "\n".join(line_filter(i) for i in javatext.split("\n")) + "\n"
+ # Convert metadata entry "android.x.y.z" to form
+ # "{@link CaptureRequest#X_Y_Z android.x.y.z}"
+ def javadoc_crossref_filter(node):
+ if node.applied_visibility == 'public':
+ return '{@link %s#%s %s}' % (kind_mapping[node.kind],
+ jkey_identifier(node.name),
+ node.name)
+ else:
+ return node.name
- return javatext
+ # For each public tag "android.x.y.z" referenced, add a
+ # "@see CaptureRequest#X_Y_Z"
+ def javadoc_see_filter(node_set):
+ node_set = (x for x in node_set if x.applied_visibility == 'public')
+
+ text = '\n'
+ for node in node_set:
+ text = text + '\n@see %s#%s' % (kind_mapping[node.kind],
+ jkey_identifier(node.name))
+
+ return text if text != '\n' else ''
+
+ javatext = filter_tags(javatext, metadata, javadoc_crossref_filter, javadoc_see_filter)
+
+ def line_filter(line):
+ # Indent each line
+ # Add ' * ' to it for stylistic reasons
+ # Strip right side of trailing whitespace
+ return (comment_prefix + line.lstrip()).rstrip()
+
+ # Process each line with above filter
+ javatext = "\n".join(line_filter(i) for i in javatext.split("\n")) + "\n"
+
+ return javatext
+
+ return javadoc_formatter
def md(text, img_src_prefix=""):
"""
@@ -716,6 +758,70 @@
text = re.sub(r'src="([^"]*)"', 'src="' + img_src_prefix + r'\1"', text)
return text
+def filter_tags(text, metadata, filter_function, summary_function = None):
+ """
+ Find all references to tags in the form outer_namespace.xxx.yyy[.zzz] in
+ the provided text, and pass them through filter_function and summary_function.
+
+ Used to linkify entry names in HMTL, javadoc output.
+
+ Args:
+ text: A string representing a block of text destined for output
+ metadata: A Metadata instance, the root of the metadata properties tree
+ filter_function: A Node->string function to apply to each node
+ when found in text; the string returned replaces the tag name in text.
+ summary_function: A Node set->string function that is provided the set of
+ tag nodes found in text, and which must return a string that is then appended
+ to the end of the text.
+ """
+
+ tag_set = set()
+ def name_match(name):
+ return lambda node: node.name == name
+
+ # Match outer_namespace.x.y or outer_namespace.x.y.z, making sure
+ # to grab .z and not just outer_namespace.x.y. (sloppy, but since we
+ # check for validity, a few false positives don't hurt)
+ for outer_namespace in metadata.outer_namespaces:
+
+ tag_match = outer_namespace.name + \
+ r"\.([a-zA-Z0-9\n]+)\.([a-zA-Z0-9\n]+)(\.[a-zA-Z0-9\n]+)?[^/]"
+
+ def filter_sub(match):
+ whole_match = match.group(0)
+ section1 = match.group(1)
+ section2 = match.group(2)
+ section3 = match.group(3)
+
+ # First try a two-level match
+ candidate = "%s.%s.%s" % (outer_namespace.name, section1, section2)
+ got_two_level = False
+
+ node = metadata.find_first(name_match(candidate.replace('\n','')))
+
+ if node:
+ got_two_level = True
+
+ # Then a three-level match
+ if not got_two_level and section3:
+ candidate = "%s%s" % (candidate, section3)
+ node = metadata.find_first(name_match(candidate.replace('\n','')))
+
+ if node:
+ tag_set.add(node)
+ return whole_match.replace(candidate,filter_function(node))
+ else:
+ print >> sys.stderr,\
+ " WARNING: Could not crossref likely reference {%s}" % (match.group(0))
+ return whole_match
+
+ text = re.sub(tag_match, filter_sub, text)
+
+ if summary_function is not None:
+ return text + summary_function(tag_set)
+ else:
+ return text
+
def any_visible(section, kind_name, visibilities):
"""
Determine if entries in this section have an applied visibility that's in
diff --git a/camera/docs/metadata_helpers_test.py b/camera/docs/metadata_helpers_test.py
index 0e309d3..c18be9a 100644
--- a/camera/docs/metadata_helpers_test.py
+++ b/camera/docs/metadata_helpers_test.py
@@ -3,6 +3,68 @@
from unittest import TestCase
from metadata_model import *
from metadata_helpers import *
+from metadata_parser_xml import *
+
+# Simple test metadata block used by the tests below
+test_metadata_xml = \
+'''
+<?xml version="1.0" encoding="utf-8"?>
+<metadata xmlns="http://schemas.android.com/service/camera/metadata/"
+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata_properties.xsd">
+
+<namespace name="testOuter1">
+ <section name="testSection1">
+ <controls>
+ <entry name="control1" type="byte" visibility="public">
+ </entry>
+ <entry name="control2" type="byte" visibility="public">
+ </entry>
+ </controls>
+ <dynamic>
+ <entry name="dynamic1" type="byte" visibility="public">
+ </entry>
+ <entry name="dynamic2" type="byte" visibility="public">
+ </entry>
+ <clone entry="testOuter1.testSection1.control1" kind="controls">
+ </clone>
+ </dynamic>
+ <static>
+ <entry name="static1" type="byte" visibility="public">
+ </entry>
+ <entry name="static2" type="byte" visibility="public">
+ </entry>
+ </static>
+ </section>
+</namespace>
+<namespace name="testOuter2">
+ <section name="testSection2">
+ <controls>
+ <entry name="control1" type="byte" visibility="public">
+ </entry>
+ <entry name="control2" type="byte" visibility="public">
+ </entry>
+ </controls>
+ <dynamic>
+ <entry name="dynamic1" type="byte" visibility="public">
+ </entry>
+ <entry name="dynamic2" type="byte" visibility="public">
+ </entry>
+ <clone entry="testOuter1.testSection1.control1" kind="controls">
+ </clone>
+ </dynamic>
+ <static>
+ <namespace name="testInner2">
+ <entry name="static1" type="byte" visibility="public">
+ </entry>
+ <entry name="static2" type="byte" visibility="public">
+ </entry>
+ </namespace>
+ </static>
+ </section>
+</namespace>
+</metadata>
+'''
class TestHelpers(TestCase):
@@ -57,6 +119,40 @@
lst = list(enumerate_with_last(multiple_values))
self.assertListEqual([(4, False), (5, False), (6, True)], lst)
+ def test_filter_tags(self):
+ metadata = MetadataParserXml(test_metadata_xml, 'metadata_helpers_test.py').metadata
+
+ test_text = \
+'''
+In the unlikely event of a
+water landing, testOuter1.testSection1.control1 will deploy.
+If testOuter2.testSection2.testInner2.static1,
+then testOuter1.testSection1.
+dynamic1 will ensue. That should be avoided if testOuter2.testSection2.
+Barring issues, testOuter1.testSection1.dynamic1, and testOuter2.testSection2.control1.
+If the path foo/android.testOuter1.testSection1.control1/bar.txt exists, then oh well.
+'''
+ def filter_test(node):
+ return '*'
+
+ def summary_test(node_set):
+ text = "*" * len(node_set) + "\n"
+ return text
+
+ expected_text = \
+'''
+In the unlikely event of a
+water landing, * will deploy.
+If *,
+then * will ensue. That should be avoided if testOuter2.testSection2.
+Barring issues, *, and *.
+If the path foo/android.testOuter1.testSection1.control1/bar.txt exists, then oh well.
+****
+'''
+ result_text = filter_tags(test_text, metadata, filter_test, summary_test)
+
+ self.assertEqual(result_text, expected_text)
+
def test_wbr(self):
wbr_string = "<wbr/>"
wbr_gen = itertools.repeat(wbr_string)
diff --git a/camera/docs/metadata_model.py b/camera/docs/metadata_model.py
index 9a920ab..1f615e6 100644
--- a/camera/docs/metadata_model.py
+++ b/camera/docs/metadata_model.py
@@ -204,7 +204,6 @@
Initialize with no children. Use insert_* functions and then
construct_graph() to build up the Metadata from some source.
"""
-
# Private
self._entries = []
# kind => { name => entry }
@@ -213,6 +212,7 @@
self._clones = []
# Public (Read Only)
+ self._name = None
self._parent = None
self._outer_namespaces = None
self._tags = []
diff --git a/camera/docs/metadata_parser_xml.py b/camera/docs/metadata_parser_xml.py
index dd53131..ff5b1cc 100755
--- a/camera/docs/metadata_parser_xml.py
+++ b/camera/docs/metadata_parser_xml.py
@@ -53,7 +53,7 @@
class MetadataParserXml:
"""
- A class to parse any XML file that passes validation with metadata-validate.
+ A class to parse any XML block that passes validation with metadata-validate.
It builds a metadata_model.Metadata graph and then renders it over a
Mako template.
@@ -61,26 +61,43 @@
soup: an instance of BeautifulSoup corresponding to the XML contents
metadata: a constructed instance of metadata_model.Metadata
"""
- def __init__(self, file_name):
+ def __init__(self, xml, file_name):
"""
Construct a new MetadataParserXml, immediately try to parse it into a
metadata model.
Args:
- file_name: path to an XML file that passes metadata-validate
+ xml: The XML block to use for the metadata
+ file_name: Source of the XML block, only for debugging/errors
Raises:
- ValueError: if the XML file failed to pass metadata_validate.py
+ ValueError: if the XML block failed to pass metadata_validate.py
"""
- self._soup = validate_xml(file_name)
+ self._soup = validate_xml(xml)
if self._soup is None:
- raise ValueError("%s has an invalid XML file" %(file_name))
+ raise ValueError("%s has an invalid XML file" % (file_name))
self._metadata = Metadata()
self._parse()
self._metadata.construct_graph()
+ @staticmethod
+ def create_from_file(file_name):
+ """
+ Construct a new MetadataParserXml by loading and parsing an XML file.
+
+ Args:
+ file_name: Name of the XML file to load and parse.
+
+ Raises:
+ ValueError: if the XML file failed to pass metadata_validate.py
+
+ Returns:
+ MetadataParserXml instance representing the XML file.
+ """
+ return MetadataParserXml(file(file_name).read(), file_name)
+
@property
def soup(self):
return self._soup
@@ -288,7 +305,7 @@
file_name = sys.argv[1]
template_name = sys.argv[2]
output_name = sys.argv[3] if len(sys.argv) > 3 else None
- parser = MetadataParserXml(file_name)
+ parser = MetadataParserXml.create_from_file(file_name)
parser.render(template_name, output_name)
sys.exit(0)
diff --git a/camera/docs/metadata_validate.py b/camera/docs/metadata_validate.py
index 0dc4ae9..9df50bb 100755
--- a/camera/docs/metadata_validate.py
+++ b/camera/docs/metadata_validate.py
@@ -265,19 +265,18 @@
return success
-def validate_xml(file_name):
+def validate_xml(xml):
"""
Validate all XML nodes according to the rules in validate_clones and
validate_entries.
Args:
- file_name - a string path to an XML file we wish to validate
+ xml - A string containing a block of XML to validate
Returns:
a BeautifulSoup instance if validation succeeds, None otherwise
"""
- xml = file(file_name).read()
soup = BeautifulSoup(xml, features='xml')
succ = validate_clones(soup)