[UTC][media-content][ACR-912] Add new TC
authorMinje Ahn <minje.ahn@samsung.com>
Fri, 14 Apr 2017 03:57:29 +0000 (12:57 +0900)
committerMinje Ahn <minje.ahn@samsung.com>
Tue, 18 Apr 2017 00:31:01 +0000 (09:31 +0900)
Add API to provide rotation of video

Change-Id: Ie84bd1c7710e1b655deffc2961b0b29cd6a11570
Signed-off-by: Minje Ahn <minje.ahn@samsung.com>
src/utc/media-content/public.list
src/utc/media-content/tct-media-content-core_common_iot.h
src/utc/media-content/tct-media-content-core_mobile.h
src/utc/media-content/tct-media-content-core_tv.h
src/utc/media-content/tct-media-content-core_wearable.h
src/utc/media-content/utc-media-video.c

index 3fc906e43a403a20958b6fd2e80fdb39a73d2e2e..e1bc049dcd4ee7294040d49e0148ea34bd9c5d22 100755 (executable)
@@ -261,3 +261,4 @@ video_meta_set_played_count
 video_meta_set_played_position
 video_meta_set_played_time
 video_meta_update_to_db
+video_meta_get_rotation
index c03e82794652500fb63648b959aedd57839205fb..75cf08053f9856b08da9e95b37b6dcdacbb726eb 100755 (executable)
@@ -551,6 +551,8 @@ extern int utc_video_meta_set_played_position_n(void);
 extern int utc_video_meta_set_played_position_p(void);
 extern int utc_video_meta_update_to_db_n(void);
 extern int utc_video_meta_update_to_db_p(void);
+extern int utc_video_meta_get_rotation_n(void);
+extern int utc_video_meta_get_rotation_p(void);
 
 testcase tc_array[] = {
     {"utc_media_filter_create_n", utc_media_filter_create_n, NULL, utc_media_filter_create_cleanup},
@@ -1053,6 +1055,8 @@ testcase tc_array[] = {
     {"utc_video_meta_set_played_position_p", utc_video_meta_set_played_position_p, utc_media_video_startup, utc_media_video_cleanup},
     {"utc_video_meta_update_to_db_n", utc_video_meta_update_to_db_n, utc_media_video_startup, utc_media_video_cleanup},
     {"utc_video_meta_update_to_db_p", utc_video_meta_update_to_db_p, utc_media_video_startup, utc_media_video_cleanup},
+    {"utc_video_meta_get_rotation_n", utc_video_meta_get_rotation_n, utc_media_video_startup, utc_media_video_cleanup},
+    {"utc_video_meta_get_rotation_p", utc_video_meta_get_rotation_p, utc_media_video_startup, utc_media_video_cleanup},
     {NULL, NULL}
 };
 
index 2b7a3e2cfc7d84b9fe1c616aea89e9015c11334e..cf8658e8918cc6185354017b0297c68bf37b7bf4 100755 (executable)
@@ -585,6 +585,8 @@ extern int utc_video_meta_set_played_position_n(void);
 extern int utc_video_meta_set_played_position_p(void);
 extern int utc_video_meta_update_to_db_n(void);
 extern int utc_video_meta_update_to_db_p(void);
+extern int utc_video_meta_get_rotation_n(void);
+extern int utc_video_meta_get_rotation_p(void);
 
 testcase tc_array[] = {
     {"utc_media_filter_create_n", utc_media_filter_create_n, NULL, utc_media_filter_create_cleanup},
@@ -1119,6 +1121,8 @@ testcase tc_array[] = {
     {"utc_video_meta_set_played_position_p", utc_video_meta_set_played_position_p, utc_media_video_startup, utc_media_video_cleanup},
     {"utc_video_meta_update_to_db_n", utc_video_meta_update_to_db_n, utc_media_video_startup, utc_media_video_cleanup},
     {"utc_video_meta_update_to_db_p", utc_video_meta_update_to_db_p, utc_media_video_startup, utc_media_video_cleanup},
+    {"utc_video_meta_get_rotation_n", utc_video_meta_get_rotation_n, utc_media_video_startup, utc_media_video_cleanup},
+    {"utc_video_meta_get_rotation_p", utc_video_meta_get_rotation_p, utc_media_video_startup, utc_media_video_cleanup},
     {NULL, NULL}
 };
 
index 2b7a3e2cfc7d84b9fe1c616aea89e9015c11334e..cf8658e8918cc6185354017b0297c68bf37b7bf4 100755 (executable)
@@ -585,6 +585,8 @@ extern int utc_video_meta_set_played_position_n(void);
 extern int utc_video_meta_set_played_position_p(void);
 extern int utc_video_meta_update_to_db_n(void);
 extern int utc_video_meta_update_to_db_p(void);
+extern int utc_video_meta_get_rotation_n(void);
+extern int utc_video_meta_get_rotation_p(void);
 
 testcase tc_array[] = {
     {"utc_media_filter_create_n", utc_media_filter_create_n, NULL, utc_media_filter_create_cleanup},
@@ -1119,6 +1121,8 @@ testcase tc_array[] = {
     {"utc_video_meta_set_played_position_p", utc_video_meta_set_played_position_p, utc_media_video_startup, utc_media_video_cleanup},
     {"utc_video_meta_update_to_db_n", utc_video_meta_update_to_db_n, utc_media_video_startup, utc_media_video_cleanup},
     {"utc_video_meta_update_to_db_p", utc_video_meta_update_to_db_p, utc_media_video_startup, utc_media_video_cleanup},
+    {"utc_video_meta_get_rotation_n", utc_video_meta_get_rotation_n, utc_media_video_startup, utc_media_video_cleanup},
+    {"utc_video_meta_get_rotation_p", utc_video_meta_get_rotation_p, utc_media_video_startup, utc_media_video_cleanup},
     {NULL, NULL}
 };
 
index 7b14e3d8e25a525f7b0f0837a2c1ab8dba98492a..8dd7a1badd44e5828118a10990ba777338386c4a 100755 (executable)
@@ -561,6 +561,8 @@ extern int utc_video_meta_set_played_position_n(void);
 extern int utc_video_meta_set_played_position_p(void);
 extern int utc_video_meta_update_to_db_n(void);
 extern int utc_video_meta_update_to_db_p(void);
+extern int utc_video_meta_get_rotation_n(void);
+extern int utc_video_meta_get_rotation_p(void);
 
 testcase tc_array[] = {
     {"utc_media_filter_create_n", utc_media_filter_create_n, NULL, utc_media_filter_create_cleanup},
@@ -1073,6 +1075,8 @@ testcase tc_array[] = {
     {"utc_video_meta_set_played_position_p", utc_video_meta_set_played_position_p, utc_media_video_startup, utc_media_video_cleanup},
     {"utc_video_meta_update_to_db_n", utc_video_meta_update_to_db_n, utc_media_video_startup, utc_media_video_cleanup},
     {"utc_video_meta_update_to_db_p", utc_video_meta_update_to_db_p, utc_media_video_startup, utc_media_video_cleanup},
+    {"utc_video_meta_get_rotation_n", utc_video_meta_get_rotation_n, utc_media_video_startup, utc_media_video_cleanup},
+    {"utc_video_meta_get_rotation_p", utc_video_meta_get_rotation_p, utc_media_video_startup, utc_media_video_cleanup},
     {NULL, NULL}
 };
 
index f6be030396f2ec80db0ea59fe29e0bc5cd6864a3..f7707ac20b22ad918a972ef3278bf1501d81efaf 100755 (executable)
@@ -1095,3 +1095,38 @@ int utc_video_meta_update_to_db_p(void)
 
        return 0;
 }
+
+/**
+ * @testcase           utc_video_meta_get_rotation_n
+ * @since_tizen                4.0
+ * @description                Negative test case of video_meta_get_rotation()
+ */
+int utc_video_meta_get_rotation_n(void)
+{
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       int val = 0;
+
+       ret = video_meta_get_rotation(NULL, &val);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+
+/**
+ * @testcase           utc_video_meta_get_rotation_p
+ * @since_tizen                4.0
+ * @description                Positive test case of video_meta_get_rotation()
+ */
+int utc_video_meta_get_rotation_p(void)
+{
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       int val = 0;
+
+       ret = video_meta_get_rotation(g_video, &val);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+       assert_eq(val, 90);
+
+       return 0;
+}
+