Loading camera/CameraMetadata.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ #include <binder/Parcel.h> #include <camera/CameraMetadata.h> #include <camera_metadata_hidden.h> namespace android { Loading Loading @@ -872,5 +873,8 @@ status_t CameraMetadata::getTagFromName(const char *name, return OK; } metadata_vendor_id_t CameraMetadata::getVendorId() { return get_camera_metadata_vendor_id(mBuffer); } }; // namespace android camera/VendorTagDescriptor.cpp +10 −0 Original line number Diff line number Diff line Loading @@ -660,6 +660,16 @@ sp<VendorTagDescriptorCache> VendorTagDescriptorCache::getGlobalVendorTagCache() return sGlobalVendorTagDescriptorCache; } bool VendorTagDescriptorCache::isVendorCachePresent(metadata_vendor_id_t vendorId) { Mutex::Autolock al(sLock); if ((sGlobalVendorTagDescriptorCache.get() != nullptr) && (sGlobalVendorTagDescriptorCache->getVendorIdsAndTagDescriptors().find(vendorId) != sGlobalVendorTagDescriptorCache->getVendorIdsAndTagDescriptors().end())) { return true; } return false; } extern "C" { int vendor_tag_descriptor_get_tag_count(const vendor_tag_ops_t* /*v*/) { Loading camera/include/camera/CameraMetadata.h +5 −0 Original line number Diff line number Diff line Loading @@ -237,6 +237,11 @@ class CameraMetadata: public Parcelable { static status_t getTagFromName(const char *name, const VendorTagDescriptor* vTags, uint32_t *tag); /** * Return the current vendor tag id associated with this metadata. */ metadata_vendor_id_t getVendorId(); private: camera_metadata_t *mBuffer; mutable bool mLocked; Loading camera/include/camera/VendorTagDescriptor.h +6 −0 Original line number Diff line number Diff line Loading @@ -249,6 +249,12 @@ class VendorTagDescriptorCache : */ static void clearGlobalVendorTagCache(); /** * Return true if given vendor id is present in the vendor tag caches, return * false otherwise. */ static bool isVendorCachePresent(metadata_vendor_id_t vendorId); }; } /* namespace android */ Loading Loading
camera/CameraMetadata.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ #include <binder/Parcel.h> #include <camera/CameraMetadata.h> #include <camera_metadata_hidden.h> namespace android { Loading Loading @@ -872,5 +873,8 @@ status_t CameraMetadata::getTagFromName(const char *name, return OK; } metadata_vendor_id_t CameraMetadata::getVendorId() { return get_camera_metadata_vendor_id(mBuffer); } }; // namespace android
camera/VendorTagDescriptor.cpp +10 −0 Original line number Diff line number Diff line Loading @@ -660,6 +660,16 @@ sp<VendorTagDescriptorCache> VendorTagDescriptorCache::getGlobalVendorTagCache() return sGlobalVendorTagDescriptorCache; } bool VendorTagDescriptorCache::isVendorCachePresent(metadata_vendor_id_t vendorId) { Mutex::Autolock al(sLock); if ((sGlobalVendorTagDescriptorCache.get() != nullptr) && (sGlobalVendorTagDescriptorCache->getVendorIdsAndTagDescriptors().find(vendorId) != sGlobalVendorTagDescriptorCache->getVendorIdsAndTagDescriptors().end())) { return true; } return false; } extern "C" { int vendor_tag_descriptor_get_tag_count(const vendor_tag_ops_t* /*v*/) { Loading
camera/include/camera/CameraMetadata.h +5 −0 Original line number Diff line number Diff line Loading @@ -237,6 +237,11 @@ class CameraMetadata: public Parcelable { static status_t getTagFromName(const char *name, const VendorTagDescriptor* vTags, uint32_t *tag); /** * Return the current vendor tag id associated with this metadata. */ metadata_vendor_id_t getVendorId(); private: camera_metadata_t *mBuffer; mutable bool mLocked; Loading
camera/include/camera/VendorTagDescriptor.h +6 −0 Original line number Diff line number Diff line Loading @@ -249,6 +249,12 @@ class VendorTagDescriptorCache : */ static void clearGlobalVendorTagCache(); /** * Return true if given vendor id is present in the vendor tag caches, return * false otherwise. */ static bool isVendorCachePresent(metadata_vendor_id_t vendorId); }; } /* namespace android */ Loading