ADD_DEFINITIONS("-DTIZEN_TV")
ENDIF()
IF(TIZEN_FEATURE_UI)
- SET(dependents "${dependents} elementary")
ADD_DEFINITIONS("-DTIZEN_FEATURE_UI")
ENDIF()
LIST(REMOVE_ITEM SOURCES src/webrtc_source_screen.c)
ENDIF()
-
ADD_LIBRARY(${fw_name} SHARED ${SOURCES})
TARGET_LINK_LIBRARIES(${fw_name} ${${fw_name}_LDFLAGS})
PATTERN "${INC_DIR}/*.h"
)
-
SET(PC_NAME ${fw_name})
SET(PC_REQUIRED ${pc_dependents})
SET(PC_LDFLAGS -l${fw_name})
#include "webrtc_private.h"
#include "webrtc_source_private.h"
-#include <Elementary.h>
+#include <mm_error.h>
#ifndef TIZEN_TV
#include <sensor.h>
#include <sensor-internal.h>
int _get_screen_resolution(int *width, int *height)
{
- Evas_Object *eo;
- int _width;
- int _height;
+ int mm_ret;
+ mm_display_interface_h mm_display;
RET_VAL_IF(width == NULL, WEBRTC_ERROR_INVALID_PARAMETER, "width is NULL");
RET_VAL_IF(height == NULL, WEBRTC_ERROR_INVALID_PARAMETER, "height is NULL");
- /* This function returns the resolution when the device rotation angle is "0" regardless of the actual rotation direction of the device. */
+ mm_ret = mm_display_interface_init(&mm_display);
+ RET_VAL_IF(mm_ret != MM_ERROR_NONE, WEBRTC_ERROR_INVALID_OPERATION, "failed to mm_display_interface_init()");
- eo = elm_win_add(NULL, "screen_source", ELM_WIN_BASIC);
- if (!eo) {
- LOG_ERROR("failed to elm_win_add()");
+ mm_ret = mm_display_interface_get_screen_size(mm_display, width, height);
+ mm_display_interface_deinit(mm_display);
+ if (mm_ret != MM_ERROR_NONE) {
+ LOG_ERROR("failed to mm_display_interface_get_screen_size(), mm_ret[0x%x]", mm_ret);
return WEBRTC_ERROR_INVALID_OPERATION;
}
- elm_win_screen_size_get(eo, NULL, NULL, &_width, &_height);
- LOG_DEBUG("window size: %d x %d", _width, _height);
-
- *width = _width;
- *height = _height;
+ LOG_DEBUG("screen size: %d x %d", *width, *height);
return WEBRTC_ERROR_NONE;
}