libtbm libwebsockets cynara-client libsmack capi-system-info libsoup-2.4 bundle capi-media-sound-manager mm-fileinfo")
IF(NOT TIZEN_PROFILE_TV)
SET(dependents "${dependents} mm-resource-manager")
+ IF(TIZEN_FEATURE_UI)
+ SET(dependents "${dependents} capi-system-sensor")
+ ENDIF()
ELSE()
ADD_DEFINITIONS("-DTIZEN_TV")
ENDIF()
IF(TIZEN_FEATURE_UI)
- SET(dependents "${dependents} elementary capi-system-sensor")
+ SET(dependents "${dependents} elementary")
ADD_DEFINITIONS("-DTIZEN_FEATURE_UI")
ENDIF()
Name: capi-media-webrtc
Summary: A WebRTC library in Tizen Native API
-Version: 0.3.229
+Version: 0.3.230
Release: 0
Group: Multimedia/API
License: Apache-2.0
BuildRequires: pkgconfig(cynara-client)
BuildRequires: pkgconfig(libsmack)
BuildRequires: pkgconfig(capi-system-info)
-BuildRequires: pkgconfig(capi-system-sensor)
BuildRequires: pkgconfig(capi-media-sound-manager)
BuildRequires: pkgconfig(bundle)
BuildRequires: pkgconfig(mm-fileinfo)
%if "%{tizen_profile_name}" != "tv"
BuildRequires: pkgconfig(mm-resource-manager)
+BuildRequires: pkgconfig(capi-system-sensor)
BuildRequires: pkgconfig(esplusplayer)
%endif
if (!__set_default_video_info(source, ini_source))
return WEBRTC_ERROR_INVALID_OPERATION;
-#ifdef TIZEN_FEATURE_UI
+#if !defined(TIZEN_TV) && defined(TIZEN_FEATURE_UI)
if (!webrtc->rotate_sensor_listener)
if ((ret = _set_screen_rotation_changed_cb(webrtc)) != WEBRTC_ERROR_NONE)
return ret;
#include "webrtc_private.h"
#include "webrtc_source_private.h"
#include <Elementary.h>
+#ifndef TIZEN_TV
#include <sensor.h>
#include <sensor-internal.h>
+#endif
//LCOV_EXCL_START
int _set_screen_source_crop(webrtc_s *webrtc, unsigned int source_id, int x, int y, int w, int h, int *width, int *height)
int _width, _height;
float rw, rh;
int left, right, top, bottom;
+#if !defined(TIZEN_TV) && defined(TIZEN_FEATURE_UI)
+ bool rotated = webrtc->screen_rotated;
+#else
+ bool rotated = false;
+#endif
bool portrait_mode = true;
int ret;
videocrop = gst_bin_get_by_name(source->bin, ELEMENT_NAME_VIDEOCROP);
RET_VAL_IF(videocrop == NULL, WEBRTC_ERROR_INVALID_OPERATION, "videocrop is NULL");
- if ((webrtc->screen_rotated) && (source->video_info.origin_width < source->video_info.origin_height))
+ if (rotated && (source->video_info.origin_width < source->video_info.origin_height))
portrait_mode = false;
- else if ((!webrtc->screen_rotated) && (source->video_info.origin_width > source->video_info.origin_height))
+ else if (!rotated && (source->video_info.origin_width > source->video_info.origin_height))
portrait_mode = false;
LOG_INFO("set source crop x:%d, y:%d, width:%d, height:%d, mode:%s", x, y, w, h, (portrait_mode) ? "portrait" : "landscape");
return WEBRTC_ERROR_NONE;
}
+#ifndef TIZEN_TV
static void __screen_rotation_changed_cb(sensor_h sensor, sensor_event_s events[], int events_count, void *user_data)
{
webrtc_s *webrtc = (webrtc_s *)user_data;
LOG_INFO("AUTO_ROTATION_SENSOR is destroyed");
}
+#endif
bool _is_screen_source_cropped(webrtc_gst_slot_s *source)
{