Add rotate for video meta 48/119748/2
authorMinje Ahn <minje.ahn@samsung.com>
Mon, 20 Mar 2017 04:27:58 +0000 (13:27 +0900)
committerMinje Ahn <minje.ahn@samsung.com>
Mon, 20 Mar 2017 05:03:07 +0000 (14:03 +0900)
Change-Id: Ia7a21d6c8b97a7e4e98f9c608c74d98f6e2800af
Signed-off-by: Minje Ahn <minje.ahn@samsung.com>
src/common/media-svc-util.c

index 7321ccd..536f4a0 100755 (executable)
@@ -2111,6 +2111,15 @@ int _media_svc_extract_media_metadata(sqlite3 *handle, media_svc_content_info_s
                        }
 
                        media_svc_debug("CDIS : %d", cdis_value);
+
+                       mmf_error = mm_file_get_attrs(tag, &err_attr_name, MM_FILE_TAG_ROTATE, &p, &size, NULL);
+                       if ((mmf_error == FILEINFO_ERROR_NONE) && (size > 0)) {
+                               content_info->media_meta.orientation = atoi(p);
+                       } else {
+                               SAFE_FREE(err_attr_name);
+                               content_info->media_meta.orientation = 0;
+                               media_svc_debug("fail to get video orientation attr - err(%x)", mmf_error);
+                       }
                }
 
                mmf_error = mm_file_destroy_tag_attrs(tag);
@@ -2221,7 +2230,6 @@ int _media_svc_extract_media_metadata(sqlite3 *handle, media_svc_content_info_s
                        } else {
                                /*media_svc_debug("height : %d", content_info->media_meta.height); */
                        }
-
                } else {
                        media_svc_error("Not support type");
                        mmf_error = mm_file_destroy_content_attrs(content);