[libmm-camcorder] video camera orientation tag added tizen_2.1 2.1b_release accepted/tizen_2.1/20130425.034957 submit/tizen_2.1/20130424.232008
authorht1211.kim <ht1211.kim@samsung.com>
Thu, 11 Apr 2013 07:55:19 +0000 (16:55 +0900)
committerht1211.kim <ht1211.kim@samsung.com>
Thu, 11 Apr 2013 07:55:31 +0000 (16:55 +0900)
Change-Id: Id30b90de31a2c1058ad1e52664d906e17b96d4f9

packaging/libmm-camcorder.spec
src/include/mm_camcorder.h
src/include/mm_camcorder_attribute.h
src/mm_camcorder_attribute.c
src/mm_camcorder_util.c
src/mm_camcorder_videorec.c

index 07ef8b8..a11b3f2 100644 (file)
@@ -1,6 +1,6 @@
 Name:       libmm-camcorder
 Summary:    Camera and recorder library
-Version:    0.7.10
+Version:    0.7.11
 Release:    0
 Group:      libs
 License:    Apache-2.0
index e078aa2..6eb962b 100644 (file)
                <td>Orientation of captured image</td>
        </tr>
        <tr>
+               <td>#MMCAM_TAG_VIDEO_ORIENTATION</td>
+               <td>Orientation of encoded video</td>
+       </tr>
+       <tr>
                <td>#MMCAM_TAG_SOFTWARE</td>
                <td>software name and version</td>
        </tr>
@@ -1101,6 +1105,12 @@ extern "C" {
 #define MMCAM_TAG_ORIENTATION                   "tag-orientation"
 
 /**
+ * Orientation of captured video
+ * @see                MMCamcorderTagVideoOrientation
+ */
+#define MMCAM_TAG_VIDEO_ORIENTATION            "tag-video-orientation"
+
+/**
  * software name and version
  */
 #define MMCAM_TAG_SOFTWARE                      "tag-software"
@@ -1475,6 +1485,17 @@ enum MMCamcorderTagOrientation {
        MM_CAMCORDER_TAG_ORT_0R_VL_0C_VB,       /**< The 0th row is the visual left-hand side of the image, and the 0th column is the visual bottom.*/
 };
 
+/**
+ * An enumeration for captured video orientation values of tag .
+ */
+enum MMCamcorderTagVideoOrientation {
+       MM_CAMCORDER_TAG_VIDEO_ORT_NONE =0,     /**< No Orientation.*/
+       MM_CAMCORDER_TAG_VIDEO_ORT_90,          /**< 90 degree */
+       MM_CAMCORDER_TAG_VIDEO_ORT_180, /**< 180 degree */
+       MM_CAMCORDER_TAG_VIDEO_ORT_270, /**< 270 degree */
+};
+
+
 
 /**
  * An enumeration for Strobe mode.
index 30b4cd8..406dece 100644 (file)
@@ -171,6 +171,7 @@ typedef enum
        MM_CAM_CAMERA_FACING_DIRECTION,
        MM_CAM_DISPLAY_FLIP,
        MM_CAM_CAMERA_VIDEO_STABILIZATION,
+       MM_CAM_TAG_VIDEO_ORIENTATION,
        MM_CAM_NUM
 }MMCamcorderAttrsID;
 
index 15b9489..4dfeef6 100644 (file)
@@ -1460,6 +1460,18 @@ mm_cam_attr_construct_info cam_attrs_const_info[] ={
                0,
                0,
                _mmcamcorder_commit_camera_video_stabilization,
+       },
+       //118
+       {
+               MM_CAM_TAG_VIDEO_ORIENTATION,
+               "tag-video-orientation",
+               MMF_VALUE_TYPE_INT,
+               MM_ATTRS_FLAG_RW,
+               {(void*)MM_CAMCORDER_TAG_VIDEO_ORT_NONE},
+               MM_ATTRS_VALID_TYPE_INT_RANGE,
+               MM_CAMCORDER_TAG_VIDEO_ORT_NONE,
+               MM_CAMCORDER_TAG_VIDEO_ORT_270,
+               NULL,
        }
 };
 
index 25ce1f3..88381ba 100644 (file)
@@ -285,23 +285,23 @@ gboolean _mmcamcorder_update_composition_matrix(FILE *f, int orientation)
        guint32 d = 0x00010000;
 
        switch (orientation) {
-       case MM_CAMCORDER_TAG_ORT_0R_VR_0C_VT:/* 90 degree */
+       case MM_CAMCORDER_TAG_VIDEO_ORT_90:/* 90 degree */
                a = 0;
                b = 0x00010000;
                c = 0xffff0000;
                d = 0;
                break;
-       case MM_CAMCORDER_TAG_ORT_0R_VB_0C_VR:/* 180 degree */
+       case MM_CAMCORDER_TAG_VIDEO_ORT_180:/* 180 degree */
                a = 0xffff0000;
                d = 0xffff0000;
                break;
-       case MM_CAMCORDER_TAG_ORT_0R_VL_0C_VB:/* 270 degree */
+       case MM_CAMCORDER_TAG_VIDEO_ORT_270:/* 270 degree */
                a = 0;
                b = 0xffff0000;
                c = 0x00010000;
                d = 0;
                break;
-       case MM_CAMCORDER_TAG_ORT_0R_VT_0C_VL:/* 0 degree */
+       case MM_CAMCORDER_TAG_VIDEO_ORT_NONE:/* 0 degree */
        default:
                break;
        }
index ab1123a..0a04eab 100644 (file)
@@ -1475,7 +1475,7 @@ static gboolean __mmcamcorder_add_locationinfo_mp4(MMHandleType handle)
                                    MMCAM_TAG_LATITUDE, &latitude,
                                    MMCAM_TAG_LONGITUDE, &longitude,
                                    MMCAM_TAG_ALTITUDE, &altitude,
-                                   MMCAM_TAG_ORIENTATION, &orientation,
+                                   MMCAM_TAG_VIDEO_ORIENTATION, &orientation,
                                    NULL);
        if (err_name) {
                _mmcam_dbg_warn("Get tag attrs fail. (%s:%x)", err_name, err);