summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorRuben Brunk <rubenbrunk@google.com>2014-04-17 16:14:57 -0700
committerRuben Brunk <rubenbrunk@google.com>2014-05-02 20:33:45 -0700
commitf81648ec38ff63f1f35516fa27c1c24d846e9ba5 (patch)
tree826a0e862b52bbbe22586c08693569dee723f5ff /include
parentfa366b2a32294ea22bf7b6f237cdbbd715cbbeb9 (diff)
downloadframeworks_av-f81648ec38ff63f1f35516fa27c1c24d846e9ba5.zip
frameworks_av-f81648ec38ff63f1f35516fa27c1c24d846e9ba5.tar.gz
frameworks_av-f81648ec38ff63f1f35516fa27c1c24d846e9ba5.tar.bz2
camera3: Update CameraMetadata vendor tag handling.
Bug: 12134423 Change-Id: I97dc955ee9dd78ace93a7946296d6d9b0e407d43
Diffstat (limited to 'include')
-rw-r--r--include/camera/VendorTagDescriptor.h23
1 files changed, 22 insertions, 1 deletions
diff --git a/include/camera/VendorTagDescriptor.h b/include/camera/VendorTagDescriptor.h
index ea21d31..1758acf 100644
--- a/include/camera/VendorTagDescriptor.h
+++ b/include/camera/VendorTagDescriptor.h
@@ -16,6 +16,7 @@
#ifndef VENDOR_TAG_DESCRIPTOR_H
+#include <utils/Vector.h>
#include <utils/KeyedVector.h>
#include <utils/String8.h>
#include <utils/RefBase.h>
@@ -67,6 +68,24 @@ class VendorTagDescriptor
/*out*/
Parcel* parcel) const;
+ /**
+ * Convenience method to get a vector containing all vendor tag
+ * sections, or an empty vector if none are defined.
+ */
+ SortedVector<String8> getAllSectionNames() const;
+
+ /**
+ * Lookup the tag id for a given tag name and section.
+ *
+ * Returns OK on success, or a negative error code.
+ */
+ status_t lookupTag(String8 name, String8 section, /*out*/uint32_t* tag) const;
+
+ /**
+ * Dump the currently configured vendor tags to a file descriptor.
+ */
+ void dump(int fd, int verbosity, int indentation) const;
+
// Static methods:
/**
@@ -109,9 +128,11 @@ class VendorTagDescriptor
static sp<VendorTagDescriptor> getGlobalVendorTagDescriptor();
protected:
VendorTagDescriptor();
+ KeyedVector<String8, KeyedVector<String8, uint32_t>*> mReverseMapping;
KeyedVector<uint32_t, String8> mTagToNameMap;
- KeyedVector<uint32_t, String8> mTagToSectionMap;
+ KeyedVector<uint32_t, uint32_t> mTagToSectionMap; // Value is offset in mSections
KeyedVector<uint32_t, int32_t> mTagToTypeMap;
+ SortedVector<String8> mSections;
// must be int32_t to be compatible with Parcel::writeInt32
int32_t mTagCount;
private: