Ruben Brunk | 9c13e19 | 2014-02-14 16:40:56 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2014 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | #ifndef SYSTEM_MEDIA_PRIVATE_INCLUDE_CAMERA_METADATA_HIDDEN_H |
| 18 | #define SYSTEM_MEDIA_PRIVATE_INCLUDE_CAMERA_METADATA_HIDDEN_H |
| 19 | |
| 20 | #include <system/camera_vendor_tags.h> |
| 21 | |
| 22 | /** |
| 23 | * Error codes returned by vendor tags ops operations. These are intended |
| 24 | * to be used by all framework code that uses the return values from the |
| 25 | * vendor operations object. |
| 26 | */ |
| 27 | #define VENDOR_SECTION_NAME_ERR NULL |
| 28 | #define VENDOR_TAG_NAME_ERR NULL |
| 29 | #define VENDOR_TAG_COUNT_ERR (-1) |
| 30 | #define VENDOR_TAG_TYPE_ERR (-1) |
| 31 | |
| 32 | #ifdef __cplusplus |
| 33 | extern "C" { |
| 34 | #endif |
| 35 | /** **These are private functions for use only by the camera framework.** **/ |
| 36 | |
| 37 | /** |
| 38 | * Set the global vendor tag operations object used to define vendor tag |
| 39 | * structure when parsing camera metadata with functions defined in |
| 40 | * system/media/camera/include/camera_metadata.h. |
| 41 | */ |
| 42 | ANDROID_API |
| 43 | int set_camera_metadata_vendor_ops(const vendor_tag_ops_t *query_ops); |
| 44 | |
Emilian Peev | a269963 | 2017-03-21 18:14:19 +0000 | [diff] [blame] | 45 | /** |
| 46 | * Set the global vendor tag cache operations object used to define vendor tag |
| 47 | * structure when parsing camera metadata with functions defined in |
| 48 | * system/media/camera/include/camera_metadata.h. |
| 49 | */ |
| 50 | ANDROID_API |
| 51 | int set_camera_metadata_vendor_cache_ops( |
| 52 | const struct vendor_tag_cache_ops *query_cache_ops); |
| 53 | |
| 54 | /** |
| 55 | * Set the vendor id for a particular metadata buffer. |
| 56 | */ |
| 57 | ANDROID_API |
| 58 | void set_camera_metadata_vendor_id(camera_metadata_t *meta, |
| 59 | metadata_vendor_id_t id); |
| 60 | |
| 61 | /** |
| 62 | * Retrieve the vendor id for a particular metadata buffer. |
| 63 | */ |
| 64 | ANDROID_API |
| 65 | metadata_vendor_id_t get_camera_metadata_vendor_id( |
| 66 | const camera_metadata_t *meta); |
| 67 | |
| 68 | /** |
| 69 | * Retrieve the type of a tag. Returns -1 if no such tag is defined. |
| 70 | */ |
| 71 | ANDROID_API |
| 72 | int get_local_camera_metadata_tag_type_vendor_id(uint32_t tag, |
| 73 | metadata_vendor_id_t id); |
| 74 | |
| 75 | /** |
| 76 | * Retrieve the name of a tag. Returns NULL if no such tag is defined. |
| 77 | */ |
| 78 | ANDROID_API |
| 79 | const char *get_local_camera_metadata_tag_name_vendor_id(uint32_t tag, |
| 80 | metadata_vendor_id_t id); |
| 81 | |
| 82 | /** |
| 83 | * Retrieve the name of a tag section. Returns NULL if no such tag is defined. |
| 84 | */ |
| 85 | ANDROID_API |
| 86 | const char *get_local_camera_metadata_section_name_vendor_id(uint32_t tag, |
| 87 | metadata_vendor_id_t id); |
| 88 | |
| 89 | /** |
| 90 | * Retrieve the type of a tag. Returns -1 if no such tag is defined. |
| 91 | */ |
| 92 | ANDROID_API |
| 93 | int get_local_camera_metadata_tag_type_vendor_id(uint32_t tag, |
| 94 | metadata_vendor_id_t id); |
| 95 | |
Ruben Brunk | 9c13e19 | 2014-02-14 16:40:56 -0800 | [diff] [blame] | 96 | #ifdef __cplusplus |
| 97 | } /* extern "C" */ |
| 98 | #endif |
| 99 | |
| 100 | #endif /* SYSTEM_MEDIA_PRIVATE_INCLUDE_CAMERA_METADATA_HIDDEN_H */ |