summaryrefslogtreecommitdiff
path: root/v3/VendorTags.h (plain)
blob: 93ad8cd8ce58687e4dad1184a1d7a5118b6b5746
1/*
2 * Copyright (C) 2013 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 VENDOR_TAGS_H_
18#define VENDOR_TAGS_H_
19
20#include <hardware/camera_common.h>
21#include <system/camera_metadata.h>
22
23namespace default_camera_hal {
24
25// VendorTags contains all vendor-specific metadata tag functionality
26class VendorTags {
27 public:
28 VendorTags();
29 ~VendorTags();
30
31 // Vendor Tags Operations (see <hardware/camera_common.h>)
32 int getTagCount(const vendor_tag_ops_t* ops);
33 void getAllTags(const vendor_tag_ops_t* ops, uint32_t* tag_array);
34 const char* getSectionName(const vendor_tag_ops_t* ops, uint32_t tag);
35 const char* getTagName(const vendor_tag_ops_t* ops, uint32_t tag);
36 int getTagType(const vendor_tag_ops_t* ops, uint32_t tag);
37
38 private:
39 // Total number of vendor tags
40 int mTagCount;
41};
42
43// Tag sections start at the beginning of vendor tags (0x8000_0000)
44// See <system/camera_metadata.h>
45
46typedef struct vendor_tag_info {
47 const char *tag_name;
48 uint8_t tag_type;
49} vendor_tag_info_t;
50
51} // namespace default_camera_hal
52
53#endif // VENDOR_TAGS_H_
54