From 562642c51972ecc4cf7c5d0b09f39d7357a3deba Mon Sep 17 00:00:00 2001 From: Gilbok Lee Date: Fri, 15 Feb 2019 15:57:46 +0900 Subject: [PATCH] [0.3.111] Set video_frame_rate to match default fps/pts in es_push_test Change-Id: Ieda662e711afced77f36bd78c14c62e797d65362 --- packaging/capi-media-player.spec | 2 +- test/player_es_push_test.c | 26 +++++++++++++++++++++++--- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/packaging/capi-media-player.spec b/packaging/capi-media-player.spec index e38c452..766a464 100644 --- a/packaging/capi-media-player.spec +++ b/packaging/capi-media-player.spec @@ -1,6 +1,6 @@ Name: capi-media-player Summary: A Media Player API -Version: 0.3.110 +Version: 0.3.111 Release: 0 Group: Multimedia/API License: Apache-2.0 diff --git a/test/player_es_push_test.c b/test/player_es_push_test.c index 8057706..7ad8226 100644 --- a/test/player_es_push_test.c +++ b/test/player_es_push_test.c @@ -31,8 +31,10 @@ #define ES_DEFAULT_VIDEO_FORMAT_TYPE MEDIA_FORMAT_H264_SP #define ES_DEFAULT_VIDEO_FORMAT_WIDTH 1280 #define ES_DEFAULT_VIDEO_FORMAT_HEIGHT 544 -#define ES_DEFAULT_VIDEO_PTS_OFFSET 20000000 +#define ES_DEFAULT_VIDEO_PTS_OFFSET 33000000 +#define ES_DEFAULT_VIDEO_FPS 30 #define ES_DEFAULT_NUMBER_OF_FEED 2000 +#define USE_EVAS_DISPLAY 0 #ifdef PACKAGE #undef PACKAGE @@ -139,9 +141,13 @@ static Evas_Object *create_render_rect(Evas_Object *pParent) { if (!pParent) return NULL; - + Evas_Object *pObj = NULL; Evas *pEvas = evas_object_evas_get(pParent); - Evas_Object *pObj = evas_object_rectangle_add(pEvas); +#if USE_EVAS_DISPLAY + return evas_object_image_add(pEvas); +#else + pObj = evas_object_rectangle_add(pEvas); +#endif if (pObj == NULL) return NULL; @@ -154,6 +160,7 @@ static Evas_Object *create_render_rect(Evas_Object *pParent) return pObj; } + static void create_base_gui(appdata_s *ad) { /* Enable GLES Backened */ @@ -163,6 +170,14 @@ static void create_base_gui(appdata_s *ad) /* elm_win_util_standard_add(PACKAGE, PACKAGE); */ ad->win = create_win(PACKAGE); ad->rect = create_render_rect(ad->win); +#if USE_EVAS_DISPLAY + evas_object_image_size_set(ad->rect, 500, 500); + evas_object_image_fill_set(ad->rect, 0, 0, 500, 500); + evas_object_resize(ad->rect, 500, 500); + + elm_win_activate(ad->win); + evas_object_show(ad->win); +#endif /* This is not supported in 3.0 elm_win_wm_desktop_layout_support_set(ad->win, EINA_TRUE); */ elm_win_autodel_set(ad->win, EINA_TRUE); @@ -496,7 +511,11 @@ static int app_reset(bundle *b, void *data) return -1; } +#if USE_EVAS_DISPLAY + ret = player_set_display(ad->player_handle, PLAYER_DISPLAY_TYPE_EVAS, GET_DISPLAY(ad->rect)); +#else ret = player_set_display(ad->player_handle, PLAYER_DISPLAY_TYPE_OVERLAY, GET_DISPLAY(ad->win)); +#endif if (ret != PLAYER_ERROR_NONE) { LOGE("player_set_display failed : 0x%x", ret); goto FAILED; @@ -513,6 +532,7 @@ static int app_reset(bundle *b, void *data) media_format_set_video_mime(ad->video_fmt, ES_DEFAULT_VIDEO_FORMAT_TYPE); media_format_set_video_width(ad->video_fmt, ES_DEFAULT_VIDEO_FORMAT_WIDTH); media_format_set_video_height(ad->video_fmt, ES_DEFAULT_VIDEO_FORMAT_HEIGHT); + media_format_set_video_frame_rate(ad->video_fmt, ES_DEFAULT_VIDEO_FPS); player_set_media_stream_buffer_max_size(ad->player_handle, PLAYER_STREAM_TYPE_VIDEO, (unsigned long long)3 * 1024 * 1024); player_set_media_stream_buffer_min_threshold(ad->player_handle, PLAYER_STREAM_TYPE_VIDEO, 50); -- 2.7.4