From: minje.ahn Date: Fri, 26 Jan 2024 02:39:53 +0000 (+0900) Subject: [UTC][media-content][ACR-1820] Deprecate low usability fields X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=15ec703b482ffe99dea9554ad35b2d77a41496a8;p=test%2Ftct%2Fnative%2Fapi.git [UTC][media-content][ACR-1820] Deprecate low usability fields Change-Id: I2565bc91b0df5601ea2299fc571f0d15874ac8cb Signed-off-by: minje.ahn --- diff --git a/src/utc/media-content/CMakeLists.txt b/src/utc/media-content/CMakeLists.txt index ba1fb2995..e7f52384b 100755 --- a/src/utc/media-content/CMakeLists.txt +++ b/src/utc/media-content/CMakeLists.txt @@ -15,7 +15,6 @@ utc-media-group.c utc-media-image.c utc-media-info.c utc-media-playlist.c -utc-media-video.c ) PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED diff --git a/src/utc/media-content/public.list b/src/utc/media-content/public.list index 305f80fa1..b6435a7ec 100755 --- a/src/utc/media-content/public.list +++ b/src/utc/media-content/public.list @@ -94,7 +94,6 @@ media_info_get_mime_type media_info_get_size media_info_get_thumbnail_path media_info_get_title -media_info_get_video media_info_insert_batch_to_db media_info_insert_to_db media_info_move_to_db @@ -120,8 +119,3 @@ media_playlist_set_thumbnail_path media_playlist_update_to_db media_playlist_import_from_file media_playlist_export_to_file -video_meta_clone -video_meta_destroy -video_meta_get_height -video_meta_get_media_id -video_meta_get_width diff --git a/src/utc/media-content/tct-media-content-core_mobile.h b/src/utc/media-content/tct-media-content-core_mobile.h index 336dfc926..83d4b5aeb 100755 --- a/src/utc/media-content/tct-media-content-core_mobile.h +++ b/src/utc/media-content/tct-media-content-core_mobile.h @@ -39,8 +39,6 @@ extern void utc_media_info_startup(void); extern void utc_media_info_cleanup(void); extern void utc_media_playlist_startup(void); extern void utc_media_playlist_cleanup(void); -extern void utc_media_video_startup(void); -extern void utc_media_video_cleanup(void); extern int utc_media_audio_meta_destroy_n(void); extern int utc_media_audio_meta_destroy_p(void); @@ -230,8 +228,6 @@ extern int utc_media_info_get_media_from_db_by_path_n(void); extern int utc_media_info_get_media_from_db_by_path_p(void); extern int utc_media_info_get_image_n(void); extern int utc_media_info_get_image_p(void); -extern int utc_media_info_get_video_n(void); -extern int utc_media_info_get_video_p(void); extern int utc_media_info_get_audio_n(void); extern int utc_media_info_get_audio_p(void); extern int utc_media_info_get_book_n(void); @@ -288,16 +284,6 @@ extern int utc_media_playlist_import_from_file_n(void); extern int utc_media_playlist_import_from_file_p(void); extern int utc_media_playlist_export_to_file_n(void); extern int utc_media_playlist_export_to_file_p(void); -extern int utc_video_meta_destroy_n(void); -extern int utc_video_meta_destroy_p(void); -extern int utc_video_meta_clone_n(void); -extern int utc_video_meta_clone_p(void); -extern int utc_video_meta_get_media_id_n(void); -extern int utc_video_meta_get_media_id_p(void); -extern int utc_video_meta_get_width_n(void); -extern int utc_video_meta_get_width_p(void); -extern int utc_video_meta_get_height_n(void); -extern int utc_video_meta_get_height_p(void); testcase tc_array[] = { {"utc_media_audio_meta_destroy_n",utc_media_audio_meta_destroy_n,utc_media_audio_startup,utc_media_audio_cleanup}, @@ -488,8 +474,6 @@ testcase tc_array[] = { {"utc_media_info_get_media_from_db_by_path_p",utc_media_info_get_media_from_db_by_path_p,utc_media_info_startup,utc_media_info_cleanup}, {"utc_media_info_get_image_n",utc_media_info_get_image_n,utc_media_info_startup,utc_media_info_cleanup}, {"utc_media_info_get_image_p",utc_media_info_get_image_p,utc_media_info_startup,utc_media_info_cleanup}, - {"utc_media_info_get_video_n",utc_media_info_get_video_n,utc_media_info_startup,utc_media_info_cleanup}, - {"utc_media_info_get_video_p",utc_media_info_get_video_p,utc_media_info_startup,utc_media_info_cleanup}, {"utc_media_info_get_audio_n",utc_media_info_get_audio_n,utc_media_info_startup,utc_media_info_cleanup}, {"utc_media_info_get_audio_p",utc_media_info_get_audio_p,utc_media_info_startup,utc_media_info_cleanup}, {"utc_media_info_get_book_n",utc_media_info_get_book_n,utc_media_info_startup,utc_media_info_cleanup}, @@ -546,16 +530,6 @@ testcase tc_array[] = { {"utc_media_playlist_import_from_file_p",utc_media_playlist_import_from_file_p,utc_media_playlist_startup,utc_media_playlist_cleanup}, {"utc_media_playlist_export_to_file_n",utc_media_playlist_export_to_file_n,utc_media_playlist_startup,utc_media_playlist_cleanup}, {"utc_media_playlist_export_to_file_p",utc_media_playlist_export_to_file_p,utc_media_playlist_startup,utc_media_playlist_cleanup}, - {"utc_video_meta_destroy_n",utc_video_meta_destroy_n,utc_media_video_startup,utc_media_video_cleanup}, - {"utc_video_meta_destroy_p",utc_video_meta_destroy_p,utc_media_video_startup,utc_media_video_cleanup}, - {"utc_video_meta_clone_n",utc_video_meta_clone_n,utc_media_video_startup,utc_media_video_cleanup}, - {"utc_video_meta_clone_p",utc_video_meta_clone_p,utc_media_video_startup,utc_media_video_cleanup}, - {"utc_video_meta_get_media_id_n",utc_video_meta_get_media_id_n,utc_media_video_startup,utc_media_video_cleanup}, - {"utc_video_meta_get_media_id_p",utc_video_meta_get_media_id_p,utc_media_video_startup,utc_media_video_cleanup}, - {"utc_video_meta_get_width_n",utc_video_meta_get_width_n,utc_media_video_startup,utc_media_video_cleanup}, - {"utc_video_meta_get_width_p",utc_video_meta_get_width_p,utc_media_video_startup,utc_media_video_cleanup}, - {"utc_video_meta_get_height_n",utc_video_meta_get_height_n,utc_media_video_startup,utc_media_video_cleanup}, - {"utc_video_meta_get_height_p",utc_video_meta_get_height_p,utc_media_video_startup,utc_media_video_cleanup}, {NULL, NULL} }; diff --git a/src/utc/media-content/tct-media-content-core_tizeniot.h b/src/utc/media-content/tct-media-content-core_tizeniot.h index 336dfc926..83d4b5aeb 100755 --- a/src/utc/media-content/tct-media-content-core_tizeniot.h +++ b/src/utc/media-content/tct-media-content-core_tizeniot.h @@ -39,8 +39,6 @@ extern void utc_media_info_startup(void); extern void utc_media_info_cleanup(void); extern void utc_media_playlist_startup(void); extern void utc_media_playlist_cleanup(void); -extern void utc_media_video_startup(void); -extern void utc_media_video_cleanup(void); extern int utc_media_audio_meta_destroy_n(void); extern int utc_media_audio_meta_destroy_p(void); @@ -230,8 +228,6 @@ extern int utc_media_info_get_media_from_db_by_path_n(void); extern int utc_media_info_get_media_from_db_by_path_p(void); extern int utc_media_info_get_image_n(void); extern int utc_media_info_get_image_p(void); -extern int utc_media_info_get_video_n(void); -extern int utc_media_info_get_video_p(void); extern int utc_media_info_get_audio_n(void); extern int utc_media_info_get_audio_p(void); extern int utc_media_info_get_book_n(void); @@ -288,16 +284,6 @@ extern int utc_media_playlist_import_from_file_n(void); extern int utc_media_playlist_import_from_file_p(void); extern int utc_media_playlist_export_to_file_n(void); extern int utc_media_playlist_export_to_file_p(void); -extern int utc_video_meta_destroy_n(void); -extern int utc_video_meta_destroy_p(void); -extern int utc_video_meta_clone_n(void); -extern int utc_video_meta_clone_p(void); -extern int utc_video_meta_get_media_id_n(void); -extern int utc_video_meta_get_media_id_p(void); -extern int utc_video_meta_get_width_n(void); -extern int utc_video_meta_get_width_p(void); -extern int utc_video_meta_get_height_n(void); -extern int utc_video_meta_get_height_p(void); testcase tc_array[] = { {"utc_media_audio_meta_destroy_n",utc_media_audio_meta_destroy_n,utc_media_audio_startup,utc_media_audio_cleanup}, @@ -488,8 +474,6 @@ testcase tc_array[] = { {"utc_media_info_get_media_from_db_by_path_p",utc_media_info_get_media_from_db_by_path_p,utc_media_info_startup,utc_media_info_cleanup}, {"utc_media_info_get_image_n",utc_media_info_get_image_n,utc_media_info_startup,utc_media_info_cleanup}, {"utc_media_info_get_image_p",utc_media_info_get_image_p,utc_media_info_startup,utc_media_info_cleanup}, - {"utc_media_info_get_video_n",utc_media_info_get_video_n,utc_media_info_startup,utc_media_info_cleanup}, - {"utc_media_info_get_video_p",utc_media_info_get_video_p,utc_media_info_startup,utc_media_info_cleanup}, {"utc_media_info_get_audio_n",utc_media_info_get_audio_n,utc_media_info_startup,utc_media_info_cleanup}, {"utc_media_info_get_audio_p",utc_media_info_get_audio_p,utc_media_info_startup,utc_media_info_cleanup}, {"utc_media_info_get_book_n",utc_media_info_get_book_n,utc_media_info_startup,utc_media_info_cleanup}, @@ -546,16 +530,6 @@ testcase tc_array[] = { {"utc_media_playlist_import_from_file_p",utc_media_playlist_import_from_file_p,utc_media_playlist_startup,utc_media_playlist_cleanup}, {"utc_media_playlist_export_to_file_n",utc_media_playlist_export_to_file_n,utc_media_playlist_startup,utc_media_playlist_cleanup}, {"utc_media_playlist_export_to_file_p",utc_media_playlist_export_to_file_p,utc_media_playlist_startup,utc_media_playlist_cleanup}, - {"utc_video_meta_destroy_n",utc_video_meta_destroy_n,utc_media_video_startup,utc_media_video_cleanup}, - {"utc_video_meta_destroy_p",utc_video_meta_destroy_p,utc_media_video_startup,utc_media_video_cleanup}, - {"utc_video_meta_clone_n",utc_video_meta_clone_n,utc_media_video_startup,utc_media_video_cleanup}, - {"utc_video_meta_clone_p",utc_video_meta_clone_p,utc_media_video_startup,utc_media_video_cleanup}, - {"utc_video_meta_get_media_id_n",utc_video_meta_get_media_id_n,utc_media_video_startup,utc_media_video_cleanup}, - {"utc_video_meta_get_media_id_p",utc_video_meta_get_media_id_p,utc_media_video_startup,utc_media_video_cleanup}, - {"utc_video_meta_get_width_n",utc_video_meta_get_width_n,utc_media_video_startup,utc_media_video_cleanup}, - {"utc_video_meta_get_width_p",utc_video_meta_get_width_p,utc_media_video_startup,utc_media_video_cleanup}, - {"utc_video_meta_get_height_n",utc_video_meta_get_height_n,utc_media_video_startup,utc_media_video_cleanup}, - {"utc_video_meta_get_height_p",utc_video_meta_get_height_p,utc_media_video_startup,utc_media_video_cleanup}, {NULL, NULL} }; diff --git a/src/utc/media-content/tct-media-content-core_tv.h b/src/utc/media-content/tct-media-content-core_tv.h index 336dfc926..83d4b5aeb 100755 --- a/src/utc/media-content/tct-media-content-core_tv.h +++ b/src/utc/media-content/tct-media-content-core_tv.h @@ -39,8 +39,6 @@ extern void utc_media_info_startup(void); extern void utc_media_info_cleanup(void); extern void utc_media_playlist_startup(void); extern void utc_media_playlist_cleanup(void); -extern void utc_media_video_startup(void); -extern void utc_media_video_cleanup(void); extern int utc_media_audio_meta_destroy_n(void); extern int utc_media_audio_meta_destroy_p(void); @@ -230,8 +228,6 @@ extern int utc_media_info_get_media_from_db_by_path_n(void); extern int utc_media_info_get_media_from_db_by_path_p(void); extern int utc_media_info_get_image_n(void); extern int utc_media_info_get_image_p(void); -extern int utc_media_info_get_video_n(void); -extern int utc_media_info_get_video_p(void); extern int utc_media_info_get_audio_n(void); extern int utc_media_info_get_audio_p(void); extern int utc_media_info_get_book_n(void); @@ -288,16 +284,6 @@ extern int utc_media_playlist_import_from_file_n(void); extern int utc_media_playlist_import_from_file_p(void); extern int utc_media_playlist_export_to_file_n(void); extern int utc_media_playlist_export_to_file_p(void); -extern int utc_video_meta_destroy_n(void); -extern int utc_video_meta_destroy_p(void); -extern int utc_video_meta_clone_n(void); -extern int utc_video_meta_clone_p(void); -extern int utc_video_meta_get_media_id_n(void); -extern int utc_video_meta_get_media_id_p(void); -extern int utc_video_meta_get_width_n(void); -extern int utc_video_meta_get_width_p(void); -extern int utc_video_meta_get_height_n(void); -extern int utc_video_meta_get_height_p(void); testcase tc_array[] = { {"utc_media_audio_meta_destroy_n",utc_media_audio_meta_destroy_n,utc_media_audio_startup,utc_media_audio_cleanup}, @@ -488,8 +474,6 @@ testcase tc_array[] = { {"utc_media_info_get_media_from_db_by_path_p",utc_media_info_get_media_from_db_by_path_p,utc_media_info_startup,utc_media_info_cleanup}, {"utc_media_info_get_image_n",utc_media_info_get_image_n,utc_media_info_startup,utc_media_info_cleanup}, {"utc_media_info_get_image_p",utc_media_info_get_image_p,utc_media_info_startup,utc_media_info_cleanup}, - {"utc_media_info_get_video_n",utc_media_info_get_video_n,utc_media_info_startup,utc_media_info_cleanup}, - {"utc_media_info_get_video_p",utc_media_info_get_video_p,utc_media_info_startup,utc_media_info_cleanup}, {"utc_media_info_get_audio_n",utc_media_info_get_audio_n,utc_media_info_startup,utc_media_info_cleanup}, {"utc_media_info_get_audio_p",utc_media_info_get_audio_p,utc_media_info_startup,utc_media_info_cleanup}, {"utc_media_info_get_book_n",utc_media_info_get_book_n,utc_media_info_startup,utc_media_info_cleanup}, @@ -546,16 +530,6 @@ testcase tc_array[] = { {"utc_media_playlist_import_from_file_p",utc_media_playlist_import_from_file_p,utc_media_playlist_startup,utc_media_playlist_cleanup}, {"utc_media_playlist_export_to_file_n",utc_media_playlist_export_to_file_n,utc_media_playlist_startup,utc_media_playlist_cleanup}, {"utc_media_playlist_export_to_file_p",utc_media_playlist_export_to_file_p,utc_media_playlist_startup,utc_media_playlist_cleanup}, - {"utc_video_meta_destroy_n",utc_video_meta_destroy_n,utc_media_video_startup,utc_media_video_cleanup}, - {"utc_video_meta_destroy_p",utc_video_meta_destroy_p,utc_media_video_startup,utc_media_video_cleanup}, - {"utc_video_meta_clone_n",utc_video_meta_clone_n,utc_media_video_startup,utc_media_video_cleanup}, - {"utc_video_meta_clone_p",utc_video_meta_clone_p,utc_media_video_startup,utc_media_video_cleanup}, - {"utc_video_meta_get_media_id_n",utc_video_meta_get_media_id_n,utc_media_video_startup,utc_media_video_cleanup}, - {"utc_video_meta_get_media_id_p",utc_video_meta_get_media_id_p,utc_media_video_startup,utc_media_video_cleanup}, - {"utc_video_meta_get_width_n",utc_video_meta_get_width_n,utc_media_video_startup,utc_media_video_cleanup}, - {"utc_video_meta_get_width_p",utc_video_meta_get_width_p,utc_media_video_startup,utc_media_video_cleanup}, - {"utc_video_meta_get_height_n",utc_video_meta_get_height_n,utc_media_video_startup,utc_media_video_cleanup}, - {"utc_video_meta_get_height_p",utc_video_meta_get_height_p,utc_media_video_startup,utc_media_video_cleanup}, {NULL, NULL} }; diff --git a/src/utc/media-content/tct-media-content-core_wearable.h b/src/utc/media-content/tct-media-content-core_wearable.h index 336dfc926..83d4b5aeb 100755 --- a/src/utc/media-content/tct-media-content-core_wearable.h +++ b/src/utc/media-content/tct-media-content-core_wearable.h @@ -39,8 +39,6 @@ extern void utc_media_info_startup(void); extern void utc_media_info_cleanup(void); extern void utc_media_playlist_startup(void); extern void utc_media_playlist_cleanup(void); -extern void utc_media_video_startup(void); -extern void utc_media_video_cleanup(void); extern int utc_media_audio_meta_destroy_n(void); extern int utc_media_audio_meta_destroy_p(void); @@ -230,8 +228,6 @@ extern int utc_media_info_get_media_from_db_by_path_n(void); extern int utc_media_info_get_media_from_db_by_path_p(void); extern int utc_media_info_get_image_n(void); extern int utc_media_info_get_image_p(void); -extern int utc_media_info_get_video_n(void); -extern int utc_media_info_get_video_p(void); extern int utc_media_info_get_audio_n(void); extern int utc_media_info_get_audio_p(void); extern int utc_media_info_get_book_n(void); @@ -288,16 +284,6 @@ extern int utc_media_playlist_import_from_file_n(void); extern int utc_media_playlist_import_from_file_p(void); extern int utc_media_playlist_export_to_file_n(void); extern int utc_media_playlist_export_to_file_p(void); -extern int utc_video_meta_destroy_n(void); -extern int utc_video_meta_destroy_p(void); -extern int utc_video_meta_clone_n(void); -extern int utc_video_meta_clone_p(void); -extern int utc_video_meta_get_media_id_n(void); -extern int utc_video_meta_get_media_id_p(void); -extern int utc_video_meta_get_width_n(void); -extern int utc_video_meta_get_width_p(void); -extern int utc_video_meta_get_height_n(void); -extern int utc_video_meta_get_height_p(void); testcase tc_array[] = { {"utc_media_audio_meta_destroy_n",utc_media_audio_meta_destroy_n,utc_media_audio_startup,utc_media_audio_cleanup}, @@ -488,8 +474,6 @@ testcase tc_array[] = { {"utc_media_info_get_media_from_db_by_path_p",utc_media_info_get_media_from_db_by_path_p,utc_media_info_startup,utc_media_info_cleanup}, {"utc_media_info_get_image_n",utc_media_info_get_image_n,utc_media_info_startup,utc_media_info_cleanup}, {"utc_media_info_get_image_p",utc_media_info_get_image_p,utc_media_info_startup,utc_media_info_cleanup}, - {"utc_media_info_get_video_n",utc_media_info_get_video_n,utc_media_info_startup,utc_media_info_cleanup}, - {"utc_media_info_get_video_p",utc_media_info_get_video_p,utc_media_info_startup,utc_media_info_cleanup}, {"utc_media_info_get_audio_n",utc_media_info_get_audio_n,utc_media_info_startup,utc_media_info_cleanup}, {"utc_media_info_get_audio_p",utc_media_info_get_audio_p,utc_media_info_startup,utc_media_info_cleanup}, {"utc_media_info_get_book_n",utc_media_info_get_book_n,utc_media_info_startup,utc_media_info_cleanup}, @@ -546,16 +530,6 @@ testcase tc_array[] = { {"utc_media_playlist_import_from_file_p",utc_media_playlist_import_from_file_p,utc_media_playlist_startup,utc_media_playlist_cleanup}, {"utc_media_playlist_export_to_file_n",utc_media_playlist_export_to_file_n,utc_media_playlist_startup,utc_media_playlist_cleanup}, {"utc_media_playlist_export_to_file_p",utc_media_playlist_export_to_file_p,utc_media_playlist_startup,utc_media_playlist_cleanup}, - {"utc_video_meta_destroy_n",utc_video_meta_destroy_n,utc_media_video_startup,utc_media_video_cleanup}, - {"utc_video_meta_destroy_p",utc_video_meta_destroy_p,utc_media_video_startup,utc_media_video_cleanup}, - {"utc_video_meta_clone_n",utc_video_meta_clone_n,utc_media_video_startup,utc_media_video_cleanup}, - {"utc_video_meta_clone_p",utc_video_meta_clone_p,utc_media_video_startup,utc_media_video_cleanup}, - {"utc_video_meta_get_media_id_n",utc_video_meta_get_media_id_n,utc_media_video_startup,utc_media_video_cleanup}, - {"utc_video_meta_get_media_id_p",utc_video_meta_get_media_id_p,utc_media_video_startup,utc_media_video_cleanup}, - {"utc_video_meta_get_width_n",utc_video_meta_get_width_n,utc_media_video_startup,utc_media_video_cleanup}, - {"utc_video_meta_get_width_p",utc_video_meta_get_width_p,utc_media_video_startup,utc_media_video_cleanup}, - {"utc_video_meta_get_height_n",utc_video_meta_get_height_n,utc_media_video_startup,utc_media_video_cleanup}, - {"utc_video_meta_get_height_p",utc_video_meta_get_height_p,utc_media_video_startup,utc_media_video_cleanup}, {NULL, NULL} }; diff --git a/src/utc/media-content/utc-media-info.c b/src/utc/media-content/utc-media-info.c index 39aabedbf..5fe2a6da8 100755 --- a/src/utc/media-content/utc-media-info.c +++ b/src/utc/media-content/utc-media-info.c @@ -800,42 +800,6 @@ int utc_media_info_get_image_p(void) return 0; } -/** - * @testcase utc_media_info_get_video_n - * @since_tizen 2.3 - * @description Negative test case of media_info_get_video() - */ -int utc_media_info_get_video_n(void) -{ - assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE); - - video_meta_h video = NULL; - - assert_eq(media_info_get_video(NULL, &video), MEDIA_CONTENT_ERROR_INVALID_PARAMETER); - - assert_eq(media_info_get_video(g_video, NULL), MEDIA_CONTENT_ERROR_INVALID_PARAMETER); - - return 0; -} - -/** - * @testcase utc_media_info_get_video_p - * @since_tizen 2.3 - * @description Positive test case of media_info_get_video() - */ -int utc_media_info_get_video_p(void) -{ - assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE); - - video_meta_h video = NULL; - - assert_eq(media_info_get_video(g_video, &video), MEDIA_CONTENT_ERROR_NONE); - - assert_eq(video_meta_destroy(video), MEDIA_CONTENT_ERROR_NONE); - - return 0; -} - /** * @testcase utc_media_info_get_audio_n * @since_tizen 2.3 diff --git a/src/utc/media-content/utc-media-video.c b/src/utc/media-content/utc-media-video.c deleted file mode 100755 index bef65a02f..000000000 --- a/src/utc/media-content/utc-media-video.c +++ /dev/null @@ -1,237 +0,0 @@ -// -// Copyright (c) 2014 Samsung Electronics Co., Ltd. -// -// Licensed under the Apache License, Version 2.0 (the License); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -#include -#include -#include -#include - -//& set: MediaVideo - -static video_meta_h g_video; -static char *g_val_str = NULL; -static int g_val_int = 0; -static int startup_ret = MEDIA_CONTENT_ERROR_NONE; - -/** - * @function utc_media_video_startup - * @description Called before each test - * @parameter NA - * @return NA - */ -void utc_media_video_startup(void) -{ - char *root_path = NULL; - char video_path[PATH_MAX + 1] = { 0, }; - media_info_h media = NULL; - - if (storage_get_root_directory(0, &root_path) == STORAGE_ERROR_NONE) { - snprintf(video_path, PATH_MAX, "%s/res/movie.mp4", root_path); - FREE_MEMORY(root_path); - } - - startup_ret = media_content_connect(); - if (startup_ret != MEDIA_CONTENT_ERROR_NONE) { - FPRINTF("[Line : %d] media_content_connect failed.\\n", __LINE__); - return; - } - - startup_ret = media_info_get_media_from_db_by_path(video_path, &media); - if (startup_ret != MEDIA_CONTENT_ERROR_NONE) { - startup_ret = media_info_insert_to_db(video_path, &media); - if (startup_ret != MEDIA_CONTENT_ERROR_NONE) { - FPRINTF("[Line : %d] media_info_insert_to_db failed.\\n", __LINE__); - return; - } - } - - startup_ret = media_info_get_video(media, &g_video); - media_info_destroy(media); - if (startup_ret != MEDIA_CONTENT_ERROR_NONE) { - FPRINTF("[Line : %d] media_info_get_video failed.\\n", __LINE__); - return; - } -} - -/** - * @function utc_media_video_cleanup - * @description Called after each test - * @parameter NA - * @return NA - */ -void utc_media_video_cleanup(void) -{ - if (g_video) { - video_meta_destroy(g_video); - g_video = NULL; - } - - FREE_MEMORY(g_val_str); - - media_content_disconnect(); -} - -/** - * @testcase utc_video_meta_destroy_n - * @since_tizen 2.3 - * @description Negative test case of video_meta_destroy() - */ -int utc_video_meta_destroy_n(void) -{ - assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE); - - assert_eq(video_meta_destroy(NULL), MEDIA_CONTENT_ERROR_INVALID_PARAMETER); - - return 0; -} - -/** - * @testcase utc_video_meta_destroy_p - * @since_tizen 2.3 - * @description Positive test case of video_meta_destroy() - */ -int utc_video_meta_destroy_p(void) -{ - assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE); - - assert_eq(video_meta_destroy(g_video), MEDIA_CONTENT_ERROR_NONE); - g_video = NULL; - - return 0; -} - -/** - * @testcase utc_video_meta_clone_n - * @since_tizen 2.3 - * @description Negative test case of video_meta_clone() - */ -int utc_video_meta_clone_n(void) -{ - assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE); - video_meta_h video = NULL; - - assert_eq(video_meta_clone(&video, NULL), MEDIA_CONTENT_ERROR_INVALID_PARAMETER); - - assert_eq(video_meta_clone(NULL, g_video), MEDIA_CONTENT_ERROR_INVALID_PARAMETER); - - return 0; -} - -/** - * @testcase utc_video_meta_clone_p - * @since_tizen 2.3 - * @description Positive test case of video_meta_clone() - */ -int utc_video_meta_clone_p(void) -{ - assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE); - video_meta_h video = NULL; - - assert_eq(video_meta_clone(&video, g_video), MEDIA_CONTENT_ERROR_NONE); - - assert_eq(video_meta_destroy(video), MEDIA_CONTENT_ERROR_NONE); - - return 0; -} - -/** - * @testcase utc_video_meta_get_media_id_n - * @since_tizen 2.3 - * @description Negative test case of video_meta_get_media_id() - */ -int utc_video_meta_get_media_id_n(void) -{ - assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE); - - assert_eq(video_meta_get_media_id(NULL, &g_val_str), MEDIA_CONTENT_ERROR_INVALID_PARAMETER); - - assert_eq(video_meta_get_media_id(g_video, NULL), MEDIA_CONTENT_ERROR_INVALID_PARAMETER); - - return 0; -} - -/** - * @testcase utc_video_meta_get_media_id_p - * @since_tizen 2.3 - * @description Positive test case of video_meta_get_media_id() - */ -int utc_video_meta_get_media_id_p(void) -{ - assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE); - - assert_eq(video_meta_get_media_id(g_video, &g_val_str), MEDIA_CONTENT_ERROR_NONE); - - return 0; -} - -/** - * @testcase utc_video_meta_get_width_n - * @since_tizen 2.3 - * @description Negative test case of video_meta_get_width() - */ -int utc_video_meta_get_width_n(void) -{ - assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE); - - assert_eq(video_meta_get_width(NULL, &g_val_int), MEDIA_CONTENT_ERROR_INVALID_PARAMETER); - - assert_eq(video_meta_get_width(g_video, NULL), MEDIA_CONTENT_ERROR_INVALID_PARAMETER); - - return 0; -} - -/** - * @testcase utc_video_meta_get_width_p - * @since_tizen 2.3 - * @description Positive test case of video_meta_get_width() - */ -int utc_video_meta_get_width_p(void) -{ - assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE); - - assert_eq(video_meta_get_width(g_video, &g_val_int), MEDIA_CONTENT_ERROR_NONE); - - return 0; -} - -/** - * @testcase utc_video_meta_get_height_n - * @since_tizen 2.3 - * @description Negative test case of video_meta_get_height() - */ -int utc_video_meta_get_height_n(void) -{ - assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE); - - assert_eq(video_meta_get_height(NULL, &g_val_int), MEDIA_CONTENT_ERROR_INVALID_PARAMETER); - - assert_eq(video_meta_get_height(g_video, NULL), MEDIA_CONTENT_ERROR_INVALID_PARAMETER); - - return 0; -} - -/** - * @testcase utc_video_meta_get_height_p - * @since_tizen 2.3 - * @description Positive test case of video_meta_get_height() - */ -int utc_video_meta_get_height_p(void) -{ - assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE); - - assert_eq(video_meta_get_height(g_video, &g_val_int), MEDIA_CONTENT_ERROR_NONE); - - return 0; -}