From 4764324d2704f1b08bb7407014bf203924ff2363 Mon Sep 17 00:00:00 2001 From: Ruben Brunk Date: Thu, 17 Apr 2014 16:14:57 -0700 Subject: camera3: Update CameraMetadata vendor tag handling. Bug: 12134423 Change-Id: I1d1be6792b6a4c9f08e042a8b2c89146bde5665e --- include/camera/VendorTagDescriptor.h | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'include') 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 #include #include #include @@ -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 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 getGlobalVendorTagDescriptor(); protected: VendorTagDescriptor(); + KeyedVector*> mReverseMapping; KeyedVector mTagToNameMap; - KeyedVector mTagToSectionMap; + KeyedVector mTagToSectionMap; // Value is offset in mSections KeyedVector mTagToTypeMap; + SortedVector mSections; // must be int32_t to be compatible with Parcel::writeInt32 int32_t mTagCount; private: -- cgit v1.1