SET(dependents "dlog glib-2.0 gstreamer-1.0 gstreamer-webrtc-1.0 gstreamer-video-1.0 gstreamer-audio-1.0 \
gstreamer-allocators-1.0 libpulse json-glib-1.0 iniparser mm-common mm-display-interface capi-media-tool \
- libtbm libwebsockets cynara-client libsmack capi-system-info libsoup-2.4 bundle capi-media-sound-manager")
+ libtbm libwebsockets cynara-client libsmack capi-system-info libsoup-2.4 bundle capi-media-sound-manager elementary")
IF(NOT TIZEN_PROFILE_TV)
SET(dependents "${dependents} mm-resource-manager")
ELSE()
#include <tbm_surface_internal.h>
#include <media_packet_internal.h>
#include <gst/allocators/gsttizenmemory.h>
+#include <Elementary.h>
#define GST_KLASS_NAME_ENCODER_AUDIO "Codec/Encoder/Audio"
#define GST_KLASS_NAME_ENCODER_VIDEO "Codec/Encoder/Video"
source->video_info.width = ini_source->v_width;
source->video_info.height = ini_source->v_height;
+ if (source->type == WEBRTC_MEDIA_SOURCE_TYPE_SCREEN) {
+ Evas_Object *eo = NULL;
+ int width = 0;
+ int height = 0;
+
+ eo = elm_win_add(NULL, "screen_source", ELM_WIN_BASIC);
+ if (!eo) {
+ LOG_WARNING("failed to add window to get screen size. use values of ini");
+ return true;
+ }
+
+ elm_win_screen_size_get(eo, NULL, NULL, &width, &height);
+ LOG_DEBUG("window size: %d x %d", width, height);
+
+ if (width == 0 || height == 0) {
+ LOG_WARNING("failed to get screen size. use values of ini");
+ return true;
+ }
+
+ source->video_info.width = width;
+ source->video_info.height = height;
+ }
+
return true;
}