1 /* 2 * meta_data.h - meta data struct 3 * 4 * Copyright (c) 2017 Intel Corporation 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 * Author: Zong Wei <wei.zong@intel.com> 19 */ 20 21 #ifndef XCAM_META_DATA_H 22 #define XCAM_META_DATA_H 23 24 #include <xcam_std.h> 25 #include <list> 26 27 namespace XCam { 28 29 struct MetaBase 30 { MetaBaseMetaBase31 MetaBase () {} ~MetaBaseMetaBase32 virtual ~MetaBase() {}; 33 private: 34 XCAM_DEAD_COPY (MetaBase); 35 }; 36 37 struct MetaData 38 : MetaBase 39 { 40 int64_t timestamp; // in microseconds 41 MetaDataMetaData42 MetaData () { 43 timestamp = 0; 44 }; ~MetaDataMetaData45 virtual ~MetaData () {}; 46 private: 47 XCAM_DEAD_COPY (MetaData); 48 }; 49 50 struct DevicePose 51 : MetaData 52 { 53 double orientation[4]; 54 double translation[3]; 55 uint32_t confidence; 56 DevicePoseDevicePose57 DevicePose () 58 { 59 xcam_mem_clear (orientation); 60 xcam_mem_clear (translation); 61 confidence = 1; 62 } 63 }; 64 65 typedef std::list<SmartPtr<MetaBase>> MetaBaseList; 66 typedef std::list<SmartPtr<MetaData>> MetaDataList; 67 typedef std::list<SmartPtr<DevicePose>> DevicePoseList; 68 69 }; 70 71 #endif //XCAM_META_DATA_H 72