evas_object_show(g_pEvasWindow);
}
+/**
+* @function createWindow
+* @description Creates an elm window object
+* @parameter[IN] NA
+* @return NA
+*/
+void createWindow()
+{
+ int w = 0;
+ int h = 0;
+
+ if (g_pElmWindow) {
+ evas_object_del(g_pElmWindow);
+ g_pElmWindow = NULL;
+ }
+
+ g_pElmWindow = elm_win_util_standard_add("player_display_tc", "player_display_tc");
+ if (g_pElmWindow) {
+ elm_win_borderless_set(g_pElmWindow, EINA_TRUE);
+ evas_object_smart_callback_add(g_pElmWindow, "delete, request", WinDel, NULL);
+ elm_win_screen_size_get(g_pElmWindow, NULL, NULL, &w, &h);
+ evas_object_resize(g_pElmWindow, w, h);
+ elm_win_autodel_set(g_pElmWindow, EINA_TRUE);
+ } else {
+ FPRINTF("[Line: %d][%s] createWindow failed , g_pElmWindow created is NULL", __LINE__, API_NAMESPACE);
+ }
+}
+
/** @} */
#define PATH_LEN 1024
#define WIDTH 16
#define HEIGHT 9
-#define x 5
-#define y 5
+#define xVal 5
+#define yVal 5
#define API_NAMESPACE "PLAYER_DISPLAY_ITC"
#define MEDIA_360_PATH "test_360.mp4"
#define MEDIA_PATH_VIDEO "file.mp4"
bool g_bIsSupported;
Evas_Object *g_pEvasWindow;
+Evas_Object *g_pElmWindow;
Evas_Object *g_pEvasObject;
Evas *g_pEvasCore;
void PlayerGetState(player_state_e e);
void CreateEvasWindow();
+void createWindow();
void WinDel(void *data, Evas_Object *obj, void *event);
/** @} */
#include "ITs-player-display-common.h"
#include <curl/curl.h>
#include "net_connection.h"
+#include <Ecore_Wayland2.h>
+#include <Ecore_Evas.h>
/** @addtogroup itc-player-display
* @ingroup itc
PRINT_RESULT(PLAYER_ERROR_NONE, nRet, "player_set_display_mode", PlayerGetError(nRet));
usleep(2000);
- nRet = player_set_display_roi_area(g_player, x, y, WIDTH, HEIGHT);
+ nRet = player_set_display_roi_area(g_player, xVal, yVal, WIDTH, HEIGHT);
PRINT_RESULT(PLAYER_ERROR_NONE, nRet, "player_set_display_roi_area", PlayerGetError(nRet));
return 0;
return 0;
}
+
+//& purpose: Sets player display
+//& type: auto
+/**
+* @testcase ITc_player_set_display_p
+* @author SRID(nibha.sharma)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @since_tizen 6.5
+* @description Sets player display
+* @scenario Sets player display
+* @apicovered player_set_display
+* @passcase When player_set_display api passed
+* @failcase When player_set_display api failed
+* @precondition Evas window should be created
+* @postcondition N/A
+*/
+int ITc_player_set_display_p(void)
+{
+ START_TEST;
+ player_state_e state;
+ const char *pszExportedShellHandle = NULL;
+ Ecore_Evas *ecore_evas;
+ Ecore_Wl2_Window *ecore_wl2_win;
+ Ecore_Wl2_Subsurface *ecore_wl2_subsurface;
+ char pPath[PATH_LEN] = {0};
+
+ if ( false == PlayerAppendToAppDataPath(MEDIA_PATH_VIDEO, pPath))
+ {
+ FPRINTF("[Line : %d][%s] unable to get the app data path\\n", __LINE__, API_NAMESPACE);
+ return 1;
+ }
+
+ int nRet = player_get_state(g_player,&state);
+ PRINT_RESULT(PLAYER_ERROR_NONE, nRet, "player_get_state", PlayerGetError(nRet));
+ if ( state == PLAYER_STATE_READY )
+ {
+ nRet = player_unprepare(g_player);
+ PRINT_RESULT(PLAYER_ERROR_NONE, nRet, "player_unprepare", PlayerGetError(nRet));
+ }
+
+ createWindow();
+
+ ecore_evas = ecore_evas_ecore_evas_get(evas_object_evas_get(g_pElmWindow));
+ ecore_wl2_win = ecore_evas_wayland2_window_get(ecore_evas);
+ ecore_wl2_subsurface = ecore_wl2_subsurface_new(ecore_wl2_win);
+ ecore_wl2_subsurface_export(ecore_wl2_subsurface);
+ pszExportedShellHandle = ecore_wl2_subsurface_exported_surface_handle_get(ecore_wl2_subsurface);
+
+ nRet = player_set_uri(g_player, pPath);
+ PRINT_RESULT(PLAYER_ERROR_NONE, nRet, "player_set_uri", PlayerGetError(nRet));
+
+ nRet = player_set_display(g_player, PLAYER_DISPLAY_TYPE_OVERLAY_SYNC_UI, GET_DISPLAY(pszExportedShellHandle));
+ PRINT_RESULT(PLAYER_ERROR_NONE, nRet, "player_set_display", PlayerGetError(nRet));
+
+ return 0;
+}
/** @} */
/** @} */
extern int ITc_player_360_set_get_zoom_p(void);
extern int ITc_player_360_set_get_field_of_view(void);
extern int ITc_player_360_set_zoom_with_field_of_view_p(void);
+extern int ITc_player_set_display_p(void);
testcase tc_array[] = {
{"ITc_player_set_get_video_roi_area_p",ITc_player_set_get_video_roi_area_p,ITs_player_display_startup,ITs_player_display_cleanup},
+ {"ITc_player_set_display_p",ITc_player_set_display_p,ITs_player_display_startup,ITs_player_display_cleanup},
{"ITc_player_set_get_display_rotation_p",ITc_player_set_get_display_rotation_p,ITs_player_display_startup,ITs_player_display_cleanup},
{"ITc_player_set_display_visible_p",ITc_player_set_display_visible_p,ITs_player_display_startup,ITs_player_display_cleanup},
{"ITc_player_set_get_display_mode_p",ITc_player_set_get_display_mode_p,ITs_player_display_startup,ITs_player_display_cleanup},
extern int ITc_player_360_set_get_zoom_p(void);
extern int ITc_player_360_set_get_field_of_view(void);
extern int ITc_player_360_set_zoom_with_field_of_view_p(void);
+extern int ITc_player_set_display_p(void);
testcase tc_array[] = {
{"ITc_player_set_get_video_roi_area_p",ITc_player_set_get_video_roi_area_p,ITs_player_display_startup,ITs_player_display_cleanup},
+ {"ITc_player_set_display_p",ITc_player_set_display_p,ITs_player_display_startup,ITs_player_display_cleanup},
{"ITc_player_set_get_display_rotation_p",ITc_player_set_get_display_rotation_p,ITs_player_display_startup,ITs_player_display_cleanup},
{"ITc_player_set_display_visible_p",ITc_player_set_display_visible_p,ITs_player_display_startup,ITs_player_display_cleanup},
{"ITc_player_set_get_display_mode_p",ITc_player_set_get_display_mode_p,ITs_player_display_startup,ITs_player_display_cleanup},