Remove unnecessary executable permissions
[platform/core/api/metadata-extractor.git] / include / metadata_extractor_private.h
old mode 100755 (executable)
new mode 100644 (file)
index 7847ea5..262a498
 */
 
 
-#ifndef __TIZEN_MEDIA_METADATA_EXTRACTOR_PRIVATE_H__
-#define __TIZEN_MEDIA_METADATA_EXTRACTOR_PRIVATE_H__
+#ifndef __TIZEN_MULTIMEDIA_METADATA_EXTRACTOR_PRIVATE_H__
+#define __TIZEN_MULTIMEDIA_METADATA_EXTRACTOR_PRIVATE_H__
 
+#include <stdlib.h>
 #include <stdbool.h>
+#include <string.h>
 #include <mm_types.h>
-
+#include <dlog.h>
 
 #ifdef __cplusplus
 extern "C" {
 #endif /* __cplusplus */
 
+#ifdef LOG_TAG
+#undef LOG_TAG
+#endif
+#define LOG_TAG "CAPI_MEDIA_METADATA_EXTRACTOR"
+
+#define SAFE_FREE(src)      { if (src) {free(src); src = NULL; } }
+#define ME_STRING_VALID(str)   (str != NULL && strlen(str) > 0)
+
+#define metadata_extractor_debug(fmt, arg...) do { \
+               LOGD(""fmt"", ##arg);     \
+       } while (0)
+
+#define metadata_extractor_info(fmt, arg...) do { \
+               LOGI(""fmt"", ##arg);     \
+       } while (0)
+
+#define metadata_extractor_error(fmt, arg...) do { \
+               LOGE(""fmt"", ##arg);     \
+       } while (0)
+
+#define metadata_extractor_debug_fenter() do { \
+               LOGD("<Enter>");     \
+       } while (0)
+
+#define metadata_extractor_debug_fleave() do { \
+               LOGD("<Leave>");     \
+       } while (0)
+
+#define metadata_extractor_secure_info(fmt, arg...) do { \
+               SECURE_LOGI(""fmt"", ##arg);     \
+       } while (0)
 
-typedef struct
-{
+#define metadata_extractor_retv_free_if(expr, val, p_str) do { \
+               if (expr) { \
+                       LOGE("Internal operation error"); \
+                       SAFE_FREE(p_str);       \
+                       return (val);   \
+               }       \
+       } while (0)
+
+#define metadata_extractor_retvm_if(expr, val, fmt, arg...) do {       \
+               if (expr) {     \
+                       LOGE(""fmt"", ##arg);   \
+                       return (val); \
+               }       \
+       } while (0)
+
+typedef struct {
        char *path;
-       char *buffer;
+       const void *buffer;
        int buffer_size;
        bool extract_meta;
 
@@ -39,13 +86,45 @@ typedef struct
 
        MMHandleType attr_h;
        MMHandleType tag_h;
-}metadata_extractor_s;
+} metadata_extractor_s;
+
+/*TODO: Move attributes to metadata_extractor_type.h after ACR*/
+#ifdef SUPPORT_GSPHERICAL_METADATA
+
+#define METADATA_360_V1_STITCHED                                       35 /**< Flag indicating if the video is stitched. Spherical Video Metadata RFC v1 (Since 4.0) */
+#define METADATA_360_V1_STITCHING_SOFTWARE                     36 /**< Software used to stitch the spherical video. Spherical Video Metadata RFC v1 (Since 4.0) */
+#define METADATA_360_V1_PROJECTION_TYPE                                37 /**< Projection type used in the video frames. Spherical Video Metadata RFC v1 (Since 4.0) */
+#define METADATA_360_V1_STEREO_MODE                                    38 /**< Description of stereoscopic 3D layout. Spherical Video Metadata RFC v1 (Since 4.0) */
+#define METADATA_360_V1_SOURCE_COUNT                           39 /**< Number of cameras used to create the spherical video. Spherical Video Metadata RFC v1 (Since 4.0) */
+#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) */
+#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) */
+#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) */
+#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) */
+#define METADATA_360_V1_FULL_PANO_WIDTH                                44 /**< Width of the encoded video frame in pixels. Spherical Video Metadata RFC v1 (Since 4.0) */
+#define METADATA_360_V1_FULL_PANO_HEIGHT                       45 /**< Height of the encoded video frame in pixels. Spherical Video Metadata RFC v1 (Since 4.0) */
+#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) */
+#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) */
+#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) */
+#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) */
+#define METADATA_360_V2_STEREO_MODE                                    50 /**< Stereo frame layout. Spherical Video Metadata RFC v2 (Since 4.0) */
+#define METADATA_360_V2_METADATA_SOURCE                                51 /**< Tool used to create the Spherical Video Metadata V2 (Since 4.0) */
+#define METADATA_360_V2_PROJ_TYPE                                      52 /**< Projection type. Spherical Video Metadata RFC v2 (Since 4.0) */
+#define METADATA_360_V2_POSE_YAW                                       53 /**< Counter-clockwise rotation in degrees around the up vector. Spherical Video Metadata RFC v2 (Since 4.0) */
+#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) */
+#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) */
+#define METADATA_360_V2_CBMP_LAYOUT                                    56 /**< Layout of cube faces for the Cubemap Projection. Spherical Video Metadata RFC v2 (Since 4.0) */
+#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) */
+#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) */
+#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) */
+#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) */
+#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) */
+#define METADATA_AMBISONIC_TYPE                                                62 /**< Ambisonics type in User Data Information (Since 4.0) */
+#define METADATA_AMBISONIC_FORMAT                                      63 /**< Ambisonics format in User Data Information (Since 4.0) */
+#define METADATA_AMBISONIC_ORDER                                       64 /**< Ambisonics order in User Data Information (Since 4.0) */
 
+#endif
 
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */
-#endif /*__TIZEN_MEDIA_METADATA_EXTRACTOR_PRIVATE_H__*/
-
-
-
+#endif /*__TIZEN_MULTIMEDIA_METADATA_EXTRACTOR_PRIVATE_H__*/