Jiyoung Shin | c15a6b0 | 2012-06-05 01:08:14 -0700 | [diff] [blame] | 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" |
Sungjoong Kang | be494d1 | 2012-08-04 15:36:56 -0700 | [diff] [blame^] | 38 | #include "fimc-is-metadata.h" |
Jiyoung Shin | c15a6b0 | 2012-06-05 01:08:14 -0700 | [diff] [blame] | 39 | |
| 40 | |
| 41 | namespace android { |
| 42 | |
| 43 | |
| 44 | class MetadataConverter { |
| 45 | public: |
| 46 | MetadataConverter(); |
| 47 | ~MetadataConverter(); |
| 48 | |
Sungjoong Kang | be494d1 | 2012-08-04 15:36:56 -0700 | [diff] [blame^] | 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); |
Jiyoung Shin | c15a6b0 | 2012-06-05 01:08:14 -0700 | [diff] [blame] | 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 | |
| 56 | }; |
| 57 | |
| 58 | }; // namespace android |
| 59 | |
| 60 | #endif |
| 61 | |