extern int utc_media_player_get_video_size_p(void);
extern int utc_media_player_get_video_size_n(void);
extern int utc_media_player_set_display_p(void);
+extern int utc_media_player_set_display_p2(void);
extern int utc_media_player_set_display_n(void);
extern int utc_media_player_capture_video_p(void);
extern int utc_media_player_capture_video_n(void);
{"utc_media_player_get_video_size_p", utc_media_player_get_video_size_p, utc_media_player_display_startup, utc_media_player_display_cleanup},
{"utc_media_player_get_video_size_n", utc_media_player_get_video_size_n, utc_media_player_display_startup, utc_media_player_display_cleanup},
{"utc_media_player_set_display_p", utc_media_player_set_display_p, utc_media_player_display_startup, utc_media_player_display_cleanup},
+ {"utc_media_player_set_display_p2", utc_media_player_set_display_p2, utc_media_player_display_startup, utc_media_player_display_cleanup},
{"utc_media_player_set_display_n", utc_media_player_set_display_n, utc_media_player_display_startup, utc_media_player_display_cleanup},
{"utc_media_player_capture_video_p", utc_media_player_capture_video_p, utc_media_player_display_startup, utc_media_player_display_cleanup},
{"utc_media_player_capture_video_n", utc_media_player_capture_video_n, utc_media_player_display_startup, utc_media_player_display_cleanup},
extern int utc_media_player_get_video_size_p(void);
extern int utc_media_player_get_video_size_n(void);
extern int utc_media_player_set_display_p(void);
+extern int utc_media_player_set_display_p2(void);
extern int utc_media_player_set_display_n(void);
extern int utc_media_player_capture_video_p(void);
extern int utc_media_player_capture_video_n(void);
{"utc_media_player_get_video_size_p", utc_media_player_get_video_size_p, utc_media_player_display_startup, utc_media_player_display_cleanup},
{"utc_media_player_get_video_size_n", utc_media_player_get_video_size_n, utc_media_player_display_startup, utc_media_player_display_cleanup},
{"utc_media_player_set_display_p", utc_media_player_set_display_p, utc_media_player_display_startup, utc_media_player_display_cleanup},
+ {"utc_media_player_set_display_p2", utc_media_player_set_display_p2, utc_media_player_display_startup, utc_media_player_display_cleanup},
{"utc_media_player_set_display_n", utc_media_player_set_display_n, utc_media_player_display_startup, utc_media_player_display_cleanup},
{"utc_media_player_capture_video_p", utc_media_player_capture_video_p, utc_media_player_display_startup, utc_media_player_display_cleanup},
{"utc_media_player_capture_video_n", utc_media_player_capture_video_n, utc_media_player_display_startup, utc_media_player_display_cleanup},
extern int utc_media_player_get_video_size_p(void);
extern int utc_media_player_get_video_size_n(void);
extern int utc_media_player_set_display_p(void);
+extern int utc_media_player_set_display_p2(void);
extern int utc_media_player_set_display_n(void);
extern int utc_media_player_set_display_n2(void);
extern int utc_media_player_capture_video_p(void);
{"utc_media_player_get_video_size_p", utc_media_player_get_video_size_p, utc_media_player_display_startup, utc_media_player_display_cleanup},
{"utc_media_player_get_video_size_n", utc_media_player_get_video_size_n, utc_media_player_display_startup, utc_media_player_display_cleanup},
{"utc_media_player_set_display_p", utc_media_player_set_display_p, utc_media_player_display_startup, utc_media_player_display_cleanup},
+ {"utc_media_player_set_display_p2", utc_media_player_set_display_p2, utc_media_player_display_startup, utc_media_player_display_cleanup},
{"utc_media_player_set_display_n", utc_media_player_set_display_n, utc_media_player_display_startup, utc_media_player_display_cleanup},
{"utc_media_player_set_display_n2", utc_media_player_set_display_n2, utc_media_player_display_startup, utc_media_player_display_cleanup},
{"utc_media_player_capture_video_p", utc_media_player_capture_video_p, utc_media_player_display_startup, utc_media_player_display_cleanup},
static GMainLoop *g_mainloop = NULL;
static Evas_Object *g_win = NULL;
+static Evas_Object *g_eo = NULL;
static gboolean timeout_func(gpointer data)
{
evas_object_del(g_win);
g_win = NULL;
}
+
+ if (g_eo) {
+ evas_object_del(g_eo);
+ g_eo = NULL;
+ }
+}
+
+void create_evas_window()
+{
+ destroy_window(); /* destroy window in case the clean_up is not called */
+
+ Evas *evas = NULL;
+ int w = 0;
+ int h = 0;
+
+ /* create window */
+ g_win = elm_win_util_standard_add("player_tc", "player_tc");
+ if (g_win)
+ {
+ elm_win_borderless_set(g_win, EINA_TRUE);
+ evas_object_smart_callback_add(g_win, "delete, request", win_del, NULL);
+ elm_win_screen_size_get(g_win, NULL, NULL, &w, &h);
+ evas_object_resize(g_win, w, h);
+ elm_win_autodel_set(g_win, EINA_TRUE);
+ } else {
+ PRINT_UTC_LOG("[Line : %d][%s] fail to create window\\n", __LINE__, API_NAMESPACE);
+ }
+
+ evas = evas_object_evas_get(g_win);
+ if (!evas)
+ {
+ FPRINTF("[Line: %d][%s] fail to get evas", __LINE__, API_NAMESPACE);
+ return;
+ }
+
+ g_eo = evas_object_image_add(evas);
+
+ evas_object_image_size_set(g_eo, 500, 500);
+ evas_object_image_fill_set(g_eo, 0, 0, 500, 500);
+ evas_object_resize(g_eo, 500, 500);
+
+ elm_win_activate(g_win);
+ evas_object_show(g_win);
}
static void create_window()
g_win = elm_win_util_standard_add("player_tc", "player_tc");
if (g_win) {
elm_win_borderless_set(g_win, EINA_TRUE);
- evas_object_smart_callback_add(g_win, "delete,request",win_del, NULL);
+ evas_object_smart_callback_add(g_win, "delete, request", win_del, NULL);
elm_win_screen_size_get(g_win, NULL, NULL, &w, &h);
evas_object_resize(g_win, w, h);
elm_win_autodel_set(g_win, EINA_TRUE);
void utc_media_player_display_startup(void)
{
elm_init(0, NULL);
- char pszValue[CONFIG_VALUE_LEN_MAX] = {0,};
- if ( true == GetValueForTCTSetting("DEVICE_SUITE_TARGET_30", pszValue, API_NAMESPACE ))
- {
- PRINT_UTC_LOG("[Line : %d][%s] 'DEVICE_SUITE_TARGET_30' Values Received = %s\\n", __LINE__, API_NAMESPACE, pszValue);
- unsigned int size_of_path = strlen(pszValue) + strlen(media) + 6;
- media_path = (char*)malloc(size_of_path);
- snprintf(media_path, size_of_path, "%s/res/%s", pszValue, media);
- }
- else
- {
- PRINT_UTC_LOG("[Line : %d][%s] GetValueForTCTSetting returned error for 'DEVICE_SUITE_TARGET_30'\\n", __LINE__, API_NAMESPACE);
- }
+ char pszValue[CONFIG_VALUE_LEN_MAX] = {0,};
+ if ( true == GetValueForTCTSetting("DEVICE_SUITE_TARGET_30", pszValue, API_NAMESPACE ))
+ {
+ PRINT_UTC_LOG("[Line : %d][%s] 'DEVICE_SUITE_TARGET_30' Values Received = %s\\n", __LINE__, API_NAMESPACE, pszValue);
+ unsigned int size_of_path = strlen(pszValue) + strlen(media) + 6;
+ media_path = (char*)malloc(size_of_path);
+ snprintf(media_path, size_of_path, "%s/res/%s", pszValue, media);
+ }
+ else
+ {
+ PRINT_UTC_LOG("[Line : %d][%s] GetValueForTCTSetting returned error for 'DEVICE_SUITE_TARGET_30'\\n", __LINE__, API_NAMESPACE);
+ }
_is_broken = false;
_is_pass = false;
/**
* @testcase utc_media_player_set_display_p
* @since_tizen 2.3.1
- * @description Positive test case to set display handle
+ * @description Positive test case to set overlay display handle
*/
int utc_media_player_set_display_p(void)
{
}
/**
+ * @testcase utc_media_player_set_display_p2
+ * @since_tizen 3.0
+ * @description Positive test case to set evas display handle
+ */
+int utc_media_player_set_display_p2(void)
+{
+ assert(!_is_broken);
+
+ player_state_e state;
+
+ player_get_state (player, &state);
+ if (state == PLAYER_STATE_READY)
+ player_unprepare(player);
+
+ create_evas_window();
+ int ret = player_set_display(player, PLAYER_DISPLAY_TYPE_EVAS, g_eo);
+ assert_eq(ret, PLAYER_ERROR_NONE);
+
+ ret = player_prepare(player);
+ if (PLAYER_ERROR_NONE != ret) {
+ PRINT_UTC_LOG("[Line : %d][%s] player isn't prepared\\n", __LINE__, API_NAMESPACE);
+ }
+
+ return 0;
+}
+
+/**
* @testcase utc_media_player_set_display_n
* @since_tizen 2.3.1
* @description Negative test case to set display handle