OSDN Git Service

camera_metadata: Add partial flash state
authorZhijun He <zhijunhe@google.com>
Tue, 25 Mar 2014 18:33:29 +0000 (11:33 -0700)
committerZhijun He <zhijunhe@google.com>
Tue, 25 Mar 2014 20:36:25 +0000 (13:36 -0700)
Bug 13637334

Change-Id: Ife5d943851f3f47d33b05d7450765dd273eb1036

camera/docs/docs.html
camera/docs/metadata_properties.xml
camera/include/system/camera_metadata_tags.h
camera/src/camera_metadata_tag_info.c

index c7d6e6c..1693ba7 100644 (file)
@@ -5932,22 +5932,25 @@ for use cases such as preview,<wbr/> auto-focus assist,<wbr/> still capture,<wbr
                 <ul class="entry_type_enum">
                   <li>
                     <span class="entry_type_enum_name">UNAVAILABLE</span>
-                    <span class="entry_type_enum_notes"><p>No flash on camera</p></span>
+                    <span class="entry_type_enum_notes"><p>No flash on camera.<wbr/></p></span>
                   </li>
                   <li>
                     <span class="entry_type_enum_name">CHARGING</span>
-                    <span class="entry_type_enum_notes"><p>if <a href="#static_android.flash.info.available">android.<wbr/>flash.<wbr/>info.<wbr/>available</a> is true Flash is
-charging and cannot be fired</p></span>
+                    <span class="entry_type_enum_notes"><p>Flash is charging and cannot be fired.<wbr/></p></span>
                   </li>
                   <li>
                     <span class="entry_type_enum_name">READY</span>
-                    <span class="entry_type_enum_notes"><p>if <a href="#static_android.flash.info.available">android.<wbr/>flash.<wbr/>info.<wbr/>available</a> is true Flash is
-ready to fire</p></span>
+                    <span class="entry_type_enum_notes"><p>Flash is ready to fire.<wbr/></p></span>
                   </li>
                   <li>
                     <span class="entry_type_enum_name">FIRED</span>
-                    <span class="entry_type_enum_notes"><p>if <a href="#static_android.flash.info.available">android.<wbr/>flash.<wbr/>info.<wbr/>available</a> is true Flash fired
-for this capture</p></span>
+                    <span class="entry_type_enum_notes"><p>Flash fired for this capture.<wbr/></p></span>
+                  </li>
+                  <li>
+                    <span class="entry_type_enum_name">PARTIAL</span>
+                    <span class="entry_type_enum_notes"><p>Flash partially illuminated this frame.<wbr/> This is usually due to the next
+or previous frame having the flash fire,<wbr/> and the flash spilling into this capture
+due to hardware limitations.<wbr/></p></span>
                   </li>
                 </ul>
 
index be72baf..7f2be52 100644 (file)
@@ -1820,16 +1820,17 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
         <entry name="state" type="byte" visibility="public" enum="true">
           <enum>
             <value>UNAVAILABLE
-            <notes>No flash on camera</notes></value>
+            <notes>No flash on camera.</notes></value>
             <value>CHARGING
-            <notes>if android.flash.info.available is true Flash is
-            charging and cannot be fired</notes></value>
+            <notes>Flash is charging and cannot be fired.</notes></value>
             <value>READY
-            <notes>if android.flash.info.available is true Flash is
-            ready to fire</notes></value>
+            <notes>Flash is ready to fire.</notes></value>
             <value>FIRED
-            <notes>if android.flash.info.available is true Flash fired
-            for this capture</notes></value>
+            <notes>Flash fired for this capture.</notes></value>
+            <value>PARTIAL
+            <notes>Flash partially illuminated this frame. This is usually due to the next
+            or previous frame having the flash fire, and the flash spilling into this capture
+            due to hardware limitations.</notes></value>
           </enum>
           <description>Current state of the flash
           unit.</description>
index 3ae0cf6..863a362 100644 (file)
@@ -557,6 +557,7 @@ typedef enum camera_metadata_enum_android_flash_state {
     ANDROID_FLASH_STATE_CHARGING,
     ANDROID_FLASH_STATE_READY,
     ANDROID_FLASH_STATE_FIRED,
+    ANDROID_FLASH_STATE_PARTIAL,
 } camera_metadata_enum_android_flash_state_t;
 
 
index 5507443..63b0da4 100644 (file)
@@ -1256,6 +1256,10 @@ int camera_metadata_enum_snprint(uint32_t tag,
                     msg = "FIRED";
                     ret = 0;
                     break;
+                case ANDROID_FLASH_STATE_PARTIAL:
+                    msg = "PARTIAL";
+                    ret = 0;
+                    break;
                 default:
                     msg = "error: enum value out of range";
             }