Add Spherical Video Metadata V2 support
[platform/core/api/metadata-extractor.git] / include / metadata_extractor_private.h
1 /*
2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
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
18 #ifndef __TIZEN_MEDIA_METADATA_EXTRACTOR_PRIVATE_H__
19 #define __TIZEN_MEDIA_METADATA_EXTRACTOR_PRIVATE_H__
20
21 #include <stdbool.h>
22 #include <mm_types.h>
23 #include <dlog.h>
24
25 #ifdef __cplusplus
26 extern "C" {
27 #endif /* __cplusplus */
28
29 #ifdef LOG_TAG
30 #undef LOG_TAG
31 #endif
32 #define LOG_TAG "CAPI_MEDIA_METADATA_EXTRACTOR"
33
34 #define metadata_extractor_debug(fmt, arg...) do { \
35                 LOGD(""fmt"", ##arg);     \
36         } while (0)
37
38 #define metadata_extractor_info(fmt, arg...) do { \
39                 LOGI(""fmt"", ##arg);     \
40         } while (0)
41
42 #define metadata_extractor_error(fmt, arg...) do { \
43                 LOGE(""fmt"", ##arg);     \
44         } while (0)
45
46 #define metadata_extractor_debug_fenter() do { \
47                 LOGD("<Enter>");     \
48         } while (0)
49
50 #define metadata_extractor_debug_fleave() do { \
51                 LOGD("<Leave>");     \
52         } while (0)
53
54 #define metadata_extractor_sucure_info(fmt, arg...) do { \
55                 SECURE_LOGI(""fmt"", ##arg);     \
56         } while (0)
57
58 typedef struct {
59         char *path;
60         void *buffer;
61         int buffer_size;
62         bool extract_meta;
63
64         int audio_track_cnt;
65         int video_track_cnt;
66
67         MMHandleType attr_h;
68         MMHandleType tag_h;
69 } metadata_extractor_s;
70
71 /*TODO: Move attributes to metadata_extractor_type.h after ACR*/
72 #ifdef SUPPORT_GSPHERICAL_METADATA
73
74 #define METADATA_360_V1_STITCHED                                        35 /**< Flag indicating if the video is stitched. Spherical Video Metadata RFC v1 (Since 4.0) */
75 #define METADATA_360_V1_STITCHING_SOFTWARE                      36 /**< Software used to stitch the spherical video. Spherical Video Metadata RFC v1 (Since 4.0) */
76 #define METADATA_360_V1_PROJECTION_TYPE                         37 /**< Projection type used in the video frames. Spherical Video Metadata RFC v1 (Since 4.0) */
77 #define METADATA_360_V1_STEREO_MODE                                     38 /**< Description of stereoscopic 3D layout. Spherical Video Metadata RFC v1 (Since 4.0) */
78 #define METADATA_360_V1_SOURCE_COUNT                            39 /**< Number of cameras used to create the spherical video. Spherical Video Metadata RFC v1 (Since 4.0) */
79 #define METADATA_360_V1_INIT_VIEW_HEADING                       40 /**< The heading angle of the initial view in degrees. Spherical Video Metadata RFC v1 (Since 4.0) */
80 #define METADATA_360_V1_INIT_VIEW_PITCH                         41 /**< The pitch angle of the initial view in degrees. Spherical Video Metadata RFC v1 (Since 4.0) */
81 #define METADATA_360_V1_INIT_VIEW_ROLL                          42 /**< The roll angle of the initial view in degrees. Spherical Video Metadata RFC v1 (Since 4.0) */
82 #define METADATA_360_V1_TIMESTAMP                                       43 /**< Epoch timestamp of when the first frame in the video was recorded. Spherical Video Metadata RFC v1 (Since 4.0) */
83 #define METADATA_360_V1_FULL_PANO_WIDTH                         44 /**< Width of the encoded video frame in pixels. Spherical Video Metadata RFC v1 (Since 4.0) */
84 #define METADATA_360_V1_FULL_PANO_HEIGHT                        45 /**< Height of the encoded video frame in pixels. Spherical Video Metadata RFC v1 (Since 4.0) */
85 #define METADATA_360_V1_CROPPED_AREA_IMAGE_WIDTH        46 /**< Width of the video frame to display (e.g. cropping). Spherical Video Metadata RFC v1 (Since 4.0) */
86 #define METADATA_360_V1_CROPPED_AREA_IMAGE_HEIGHT       47 /**< Height of the video frame to display (e.g. cropping). Spherical Video Metadata RFC v1 (Since 4.0) */
87 #define METADATA_360_V1_CROPPED_AREA_LEFT                       48 /**< Column where the left edge of the image was cropped from the full sized panorama. Spherical Video Metadata RFC v1 (Since 4.0) */
88 #define METADATA_360_V1_CROPPED_AREA_TOP                        49 /**< Row where the top edge of the image was cropped from the full sized panorama. Spherical Video Metadata RFC v1 (Since 4.0) */
89 #define METADATA_360_V2_STEREO_MODE                                     50 /**< Stereo frame layout. Spherical Video Metadata RFC v2 (Since 4.0) */
90 #define METADATA_360_V2_METADATA_SOURCE                         51 /**< Tool used to create the Spherical Video Metadata V2 (Since 4.0) */
91 #define METADATA_360_V2_PROJ_TYPE                                       52 /**< Projection type. Spherical Video Metadata RFC v2 (Since 4.0) */
92 #define METADATA_360_V2_POSE_YAW                                        53 /**< Counter-clockwise rotation in degrees around the up vector. Spherical Video Metadata RFC v2 (Since 4.0) */
93 #define METADATA_360_V2_POSE_PITCH                                      54 /**< Counter-clockwise rotation in degrees around the right vector post yaw transform. Spherical Video Metadata RFC v2 (Since 4.0) */
94 #define METADATA_360_V2_POSE_ROLL                                       55 /**< Clockwise-rotation in degrees around the forward vector post yaw and pitch transform. Spherical Video Metadata RFC v2 (Since 4.0) */
95 #define METADATA_360_V2_CBMP_LAYOUT                                     56 /**< Layout of cube faces for the Cubemap Projection. Spherical Video Metadata RFC v2 (Since 4.0) */
96 #define METADATA_360_V2_CBMP_PADDING                            57 /**< Number of pixels to pad from the edge of each cube face for the Cubemap Projection. Spherical Video Metadata RFC v2 (Since 4.0) */
97 #define METADATA_360_V2_EQUI_BOUNDS_TOP                         58 /**< Amount from the top of the frame to crop. Spherical Video Metadata RFC v2 (Since 4.0) */
98 #define METADATA_360_V2_EQUI_BOUNDS_BOTTOM                      59 /**< Amount from the bottom of the frame to crop. Spherical Video Metadata RFC v2 (Since 4.0) */
99 #define METADATA_360_V2_EQUI_BOUNDS_LEFT                        60 /**< Amount from the left of the frame to crop. Spherical Video Metadata RFC v2 (Since 4.0) */
100 #define METADATA_360_V2_EQUI_BOUNDS_RIGHT                       61 /**< Amount from the right of the frame to crop. Spherical Video Metadata RFC v2 (Since 4.0) */
101 #define METADATA_AMBISONIC_TYPE                                         62 /**< Ambisonics type in User Data Information (Since 4.0) */
102 #define METADATA_AMBISONIC_FORMAT                                       63 /**< Ambisonics format in User Data Information (Since 4.0) */
103 #define METADATA_AMBISONIC_ORDER                                        64 /**< Ambisonics order in User Data Information (Since 4.0) */
104
105 #endif
106
107 #ifdef __cplusplus
108 }
109 #endif /* __cplusplus */
110 #endif /*__TIZEN_MEDIA_METADATA_EXTRACTOR_PRIVATE_H__*/
111
112
113