• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2 **
3 ** Copyright 2008, The Android Open Source Project
4 ** Copyright 2012, Samsung Electronics Co. LTD
5 **
6 ** Licensed under the Apache License, Version 2.0 (the "License");
7 ** you may not use this file except in compliance with the License.
8 ** You may obtain a copy of the License at
9 **
10 **     http://www.apache.org/licenses/LICENSE-2.0
11 **
12 ** Unless required by applicable law or agreed to in writing, software
13 ** distributed under the License is distributed on an "AS IS" BASIS,
14 ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 ** See the License for the specific language governing permissions and
16 ** limitations under the License.
17 */
18 
19 /*!
20  * \file      MetadataConverter.h
21  * \brief     header file for Metadata converter ( for camera hal2 implementation )
22  * \author    Sungjoong Kang(sj3.kang@samsung.com)
23  * \date      2012/05/31
24  *
25  * <b>Revision History: </b>
26  * - 2012/05/31 : Sungjoong Kang(sj3.kang@samsung.com) \n
27  *   Initial Release
28  */
29 
30 #ifndef METADATA_CONVERTER_H
31 #define METADATA_CONVERTER_H
32 
33 #include <hardware/camera2.h>
34 #include <camera/Camera.h>
35 #include <camera/CameraParameters.h>
36 
37 #include "system/camera_metadata.h"
38 #include "fimc-is-metadata.h"
39 
40 
41 namespace android {
42 
43 
44 class MetadataConverter  {
45 public:
46     MetadataConverter();
47     ~MetadataConverter();
48 
49     status_t ToInternalShot(camera_metadata_t * request, struct camera2_shot_ext * dst_ext);
50     status_t ToDynamicMetadata(struct camera2_shot_ext * metadata_ext, camera_metadata_t * dst);
51 
52 private:
53     status_t CheckEntryTypeMismatch(camera_metadata_entry_t * entry, uint8_t type);
54     status_t CheckEntryTypeMismatch(camera_metadata_entry_t * entry, uint8_t type, size_t count);
55     status_t ApplySceneModeParameters(camera_metadata_t * request, struct camera2_shot_ext * dst_ext);
56 
57     uint32_t    metaFaceRectangles[CAMERA2_MAX_FACES][4];
58     uint8_t      metaFaceScores[CAMERA2_MAX_FACES];
59     uint32_t    mataFaceLandmarks[CAMERA2_MAX_FACES][6];
60     uint32_t    mataFaceIds[CAMERA2_MAX_FACES];
61 };
62 
63 }; // namespace android
64 
65 #endif
66 
67