From: Amlan Chowdhury Date: Wed, 29 Jun 2016 11:42:13 +0000 (+0600) Subject: [TBT][Video & Recorder][TSAM-4917 & TSAM-5474][TBT Video and Recoder Scenerio updated... X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F66%2F77366%2F1;p=test%2Ftct%2Fnative%2Fbehavior.git [TBT][Video & Recorder][TSAM-4917 & TSAM-5474][TBT Video and Recoder Scenerio updated for wearable devices] Signed-off-by: Amlan Chowdhury Change-Id: I1398b70134155bbda1c2c231563465064fcaba1d --- diff --git a/release/binary-arm/org.tizen.tbtcoreapp-1.0.0-arm.tpk b/release/binary-arm/org.tizen.tbtcoreapp-1.0.0-arm.tpk index 7598d09..f5ee953 100644 Binary files a/release/binary-arm/org.tizen.tbtcoreapp-1.0.0-arm.tpk and b/release/binary-arm/org.tizen.tbtcoreapp-1.0.0-arm.tpk differ diff --git a/release/binary-x86/org.tizen.tbtcoreapp-1.0.0-i386.tpk b/release/binary-x86/org.tizen.tbtcoreapp-1.0.0-i386.tpk index 9ae79b8..3eb5cc3 100644 Binary files a/release/binary-x86/org.tizen.tbtcoreapp-1.0.0-i386.tpk and b/release/binary-x86/org.tizen.tbtcoreapp-1.0.0-i386.tpk differ diff --git a/tbtcoreapp/inc/view/tbt-camera-view.h b/tbtcoreapp/inc/view/tbt-camera-view.h index e1801f6..a5f5fb7 100644 --- a/tbtcoreapp/inc/view/tbt-camera-view.h +++ b/tbtcoreapp/inc/view/tbt-camera-view.h @@ -50,7 +50,7 @@ typedef struct _camera_view camera_view; * @param[in] item of the main tbt menu * @return Pointer of camera on success, otherwise NULL */ -camera_view *camera_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item); +camera_view *camera_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item, Evas_Object *win); #endif #endif // __TBT_CAMERA_VIEW_H__ diff --git a/tbtcoreapp/inc/view/tbt-genlist-view.h b/tbtcoreapp/inc/view/tbt-genlist-view.h index aefca3a..e092d26 100644 --- a/tbtcoreapp/inc/view/tbt-genlist-view.h +++ b/tbtcoreapp/inc/view/tbt-genlist-view.h @@ -37,6 +37,6 @@ * @param[in] navi Parent naviframe * @return Pointer of genlist on success, otherwise NULL */ -Evas_Object *tbt_genlist_view_create(Evas_Object *navi); +Evas_Object *tbt_genlist_view_create(Evas_Object *navi, Evas_Object *win); #endif /* __TBT_GENLIST_VIEW_H__ */ diff --git a/tbtcoreapp/inc/view/tbt-local-view.h b/tbtcoreapp/inc/view/tbt-local-view.h index 62e4104..945074a 100644 --- a/tbtcoreapp/inc/view/tbt-local-view.h +++ b/tbtcoreapp/inc/view/tbt-local-view.h @@ -49,7 +49,7 @@ typedef struct _local_view local_view; * @param[in] item Is the selected item of the Application home genlist * @return Pointer of local_view on success, otherwise NULL */ -local_view *local_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item); +local_view *local_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item, Evas_Object *win); #endif #endif // __TBT_LOCAL_VIEW_H__ diff --git a/tbtcoreapp/inc/window.h b/tbtcoreapp/inc/window.h index 8dc1f4b..cf5d8f6 100644 --- a/tbtcoreapp/inc/window.h +++ b/tbtcoreapp/inc/window.h @@ -30,6 +30,14 @@ #include +struct _window +{ + Evas_Object *win; + Evas_Object *bg; + Evas_Object *layout; + Evas_Object *conform; +}; + typedef struct _window window; /* diff --git a/tbtcoreapp/src/main-app.c b/tbtcoreapp/src/main-app.c index 630ca4a..a93994a 100644 --- a/tbtcoreapp/src/main-app.c +++ b/tbtcoreapp/src/main-app.c @@ -250,7 +250,7 @@ static bool _app_create_cb(void *user_data) // #endif - ad->genlist = tbt_genlist_view_create(ad->navi); + ad->genlist = tbt_genlist_view_create(ad->navi, ad->win->win); RETVM_IF(NULL == ad->genlist, false, "getlist creation is failed"); return true; diff --git a/tbtcoreapp/src/view/tbt-camera-view.c b/tbtcoreapp/src/view/tbt-camera-view.c index 1c5e8bd..c3836ab 100644 --- a/tbtcoreapp/src/view/tbt-camera-view.c +++ b/tbtcoreapp/src/view/tbt-camera-view.c @@ -56,12 +56,15 @@ struct _camera_view recorder_h recorder; Eina_Bool recording; + Eina_Bool playing; Evas_Object *image; Evas_Object *cam_label; Evas_Object *image_label; + Evas_Object *rect; + Evas_Object *win; Evas_Object *video_rect; Evas_Object *camera_rect; Evas_Object *capture_btn; @@ -109,6 +112,47 @@ static void _camera_face_detected_cb(camera_detected_face_s *faces, int count, v char* get_camera_error(int error_code); char* get_recorder_error(int error_code); +static void create_render_rect_and_bg(camera_view *this); +static void destroy_render_rect_and_bg(camera_view *this); + + +static void create_render_rect_and_bg(camera_view *this) +{ + RETM_IF(!this, "View is empty"); + + if(this->rect == NULL) + { + this->rect = evas_object_rectangle_add(evas_object_evas_get(this->win)); + RETM_IF(!this, "evas_object_rectangle_add"); + + evas_object_color_set(this->rect, 0, 0, 0, 0); + evas_object_render_op_set(this->rect, EVAS_RENDER_COPY); + + elm_win_resize_object_add(this->win, this->rect); + evas_object_size_hint_weight_set(this->rect, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + evas_object_show(this->rect); + evas_object_show(this->win); + this->video_rect = this->win; + + __is_efl_test_running = true; + eext_object_event_callback_add(this->rect, EEXT_CALLBACK_BACK, _capture_button_pressed_cb, this); + } +} + +static void destroy_render_rect_and_bg(camera_view *this) +{ + + __is_efl_test_running = false; + eext_object_event_callback_del(this->rect, EEXT_CALLBACK_BACK, _capture_button_pressed_cb); + + if(this->rect) + { + RETM_IF(!this, "View is empty"); + elm_win_resize_object_del(this->win, this->rect); + evas_object_del(this->rect); + this->rect = NULL; + } +} /** * @function camera_view_add @@ -117,7 +161,7 @@ char* get_recorder_error(int error_code); * @parameter Evas_Object*: Evas Object Pointer, tbt_info*: Tbt Info Pointer, Elm_Object_Item*: Elm Object Item Pointer * @return camera_view* */ -camera_view *camera_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item) +camera_view *camera_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item, Evas_Object *win) { RETVM_IF(NULL == navi, NULL, "navi is null"); RETVM_IF(NULL == tbt_info, NULL, "tbt_info is null"); @@ -126,11 +170,14 @@ camera_view *camera_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_I this = calloc(1, sizeof(camera_view)); RETVM_IF(NULL == this, NULL, "calloc failed"); + this->win = win; + this->rect = NULL; this->camera = NULL; this->player = NULL; this->recorder = NULL; this->file_path = NULL; this->recording = EINA_FALSE; + this->playing = EINA_FALSE; this->view = calloc(1, sizeof(common_view)); RETVM_IF(!this->view, NULL, "calloc failed"); @@ -189,41 +236,41 @@ camera_view *camera_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_I int width, height; system_info_get_platform_int("tizen.org/feature/screen.width", &width); system_info_get_platform_int("tizen.org/feature/screen.height", &height); - this->video_rect = elm_win_util_standard_add("Video", "Video"); - - Evas_Coord x, y, w, h; - Evas_Object *edje= elm_layout_edje_get(this->view->layout); - int title_height = 0; - if(edje_object_part_geometry_get(edje,"1txt_2cnt",&x,&y,&w,&h)) - { - DBG("edje_object_part_geometry_get %d %d %d %d", x,y,w,h); - if(get_device_type() == DEVICE_WEARABLE_360_360) - { - title_height = device_height-(h/0.50); - } - } - if(get_device_type() == DEVICE_WEARABLE_320_320) - { - evas_object_resize(this->video_rect, (4/3)*(height*0.16), (height*0.16)); - evas_object_move(this->video_rect, width*0.75-((4/3)*(height*0.16)*0.5), height*0.26); - } - else if(get_device_type() == DEVICE_WEARABLE_360_360) - { - evas_object_resize(this->video_rect, (4/3)*(height*0.40), (height*0.22)); - evas_object_move(this->video_rect, width*0.75-((4/3)*(height*0.40)*0.5), height*0.39); - } - else - { - evas_object_resize(this->video_rect, 110, 83); - evas_object_move(this->video_rect, width*0.5-55, height*0.44); - } +// this->video_rect = elm_win_util_standard_add("Video", "Video"); - Evas *evas_canvas = evas_object_evas_get(this->video_rect); - Evas_Object *bg = evas_object_rectangle_add(evas_canvas); - evas_object_render_op_set(bg, EVAS_RENDER_COPY); - evas_object_color_set(bg, 0, 0, 0, 0); - evas_object_resize(bg, width*0.20, height*0.20); // covers full canvas - evas_object_show(bg); +// Evas_Coord x, y, w, h; +// Evas_Object *edje= elm_layout_edje_get(this->view->layout); +// int title_height = 0; +// if(edje_object_part_geometry_get(edje,"1txt_2cnt",&x,&y,&w,&h)) +// { +// DBG("edje_object_part_geometry_get %d %d %d %d", x,y,w,h); +// if(get_device_type() == DEVICE_WEARABLE_360_360) +// { +// title_height = device_height-(h/0.50); +// } +// } +// if(get_device_type() == DEVICE_WEARABLE_320_320) +// { +// evas_object_resize(this->video_rect, (4/3)*(height*0.16), (height*0.16)); +// evas_object_move(this->video_rect, width*0.75-((4/3)*(height*0.16)*0.5), height*0.26); +// } +// else if(get_device_type() == DEVICE_WEARABLE_360_360) +// { +// evas_object_resize(this->video_rect, (4/3)*(height*0.40), (height*0.22)); +// evas_object_move(this->video_rect, width*0.75-((4/3)*(height*0.40)*0.5), height*0.39); +// } +// else +// { +// evas_object_resize(this->video_rect, 110, 83); +// evas_object_move(this->video_rect, width*0.5-55, height*0.44); +// } +// +// Evas *evas_canvas = evas_object_evas_get(this->video_rect); +// Evas_Object *bg = evas_object_rectangle_add(evas_canvas); +// evas_object_render_op_set(bg, EVAS_RENDER_COPY); +// evas_object_color_set(bg, 0, 0, 0, 0); +// evas_object_resize(bg, width*0.20, height*0.20); // covers full canvas +// evas_object_show(bg); #endif evas_object_show(this->video_rect); @@ -860,20 +907,30 @@ static void _capture_button_pressed_cb(void *data, Evas_Object *obj, void *event } else if (view->view->tbt_info->apptype == TBT_APP_CAMERA_RECORD) { - if (view->recording) + if (view->playing) + { + view->playing = EINA_FALSE; + + destroy_player(view); + destroy_render_rect_and_bg(view); + + elm_object_text_set(view->capture_btn, format_string("

Record

", font_size)); + + } + else if (view->recording) { view->recording = EINA_FALSE; + view->playing = EINA_TRUE; stop_video_recorder(view); + create_render_rect_and_bg(view); start_player(view); elm_object_text_set(view->capture_btn, format_string("

Record

", font_size)); } else { - RETM_IF(NULL == view->camera, "view is NULL"); - view->recording = EINA_TRUE; start_video_recorder(view); @@ -968,17 +1025,20 @@ static void _limit_reached_cb(recorder_recording_limit_type_e type, void *user_d if (view) { view->recording = EINA_FALSE; + view->playing = EINA_TRUE; stop_video_recorder(view); - destroy_video_recorder(view); - destroy_camera(view); - destroy_player(view); + //destroy_video_recorder(view); + //destroy_camera(view); + //destroy_player(view); - start_camera(view); + //start_camera(view); + create_render_rect_and_bg(view); start_player(view); - elm_object_text_set(view->capture_btn, "Record"); + elm_object_text_set(view->capture_btn, format_string("

Record

", font_size)); evas_object_size_hint_expand_set(view->capture_btn, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + } } @@ -1094,7 +1154,7 @@ static void _app_destroy_cb(void* this) if (view->view->tbt_info->apptype == TBT_APP_CAMERA_RECORD) { - evas_object_del(view->video_rect); + //evas_object_del(view->video_rect); } if (view->view->tbt_info->apptype == TBT_APP_CAMERA_FACE_DETECT) { @@ -1138,12 +1198,12 @@ static void _app_destroy_cb(void* this) destroy_player(view); destroy_video_recorder(view); - #ifdef DEVICE_TYPE_WEARABLE - if(get_device_type() == DEVICE_WEARABLE_320_320 || (get_device_type() == DEVICE_WEARABLE_360_360)) - { - elm_theme_overlay_del(NULL, get_edje_path("custom_button.edj")); - } - #endif +// #ifdef DEVICE_TYPE_WEARABLE +// if(get_device_type() == DEVICE_WEARABLE_320_320 || (get_device_type() == DEVICE_WEARABLE_360_360)) +// { +// elm_theme_overlay_del(NULL, get_edje_path("custom_button.edj")); +// } +// #endif SAFE_DELETE(view->view); SAFE_DELETE(view); diff --git a/tbtcoreapp/src/view/tbt-genlist-view.c b/tbtcoreapp/src/view/tbt-genlist-view.c index 047085b..309abbf 100644 --- a/tbtcoreapp/src/view/tbt-genlist-view.c +++ b/tbtcoreapp/src/view/tbt-genlist-view.c @@ -94,6 +94,7 @@ typedef struct { Evas_Object *navi; + Evas_Object *win; Evas_Object *genlist; Elm_Object_Item *navi_item; }genlist_view; @@ -128,7 +129,7 @@ static bool is_sensor_supported(tbt_info *info); * @parameter Evas_Object*: Evas Object Pointer * @return Evas_Object* */ -Evas_Object *tbt_genlist_view_create(Evas_Object *navi) +Evas_Object *tbt_genlist_view_create(Evas_Object *navi, Evas_Object *win) { RETVM_IF(NULL == navi, NULL, "navi is null"); @@ -143,6 +144,7 @@ Evas_Object *tbt_genlist_view_create(Evas_Object *navi) #endif view->navi = navi; + view->win = win; view->genlist = elm_genlist_add(view->navi); if(!view->genlist) { @@ -656,16 +658,16 @@ static void _gl_item_selected_cb(void *data, Evas_Object *obj EINA_UNUSED, void { #ifdef TBT_MODULE_CAMERA case TBT_APP_CAMERA_CAPTURE: - camera_view_add(view->navi, info, it); + camera_view_add(view->navi, info, it, view->win); break; case TBT_APP_CAMERA_RECORD: - camera_view_add(view->navi, info, it); + camera_view_add(view->navi, info, it, view->win); break; case TBT_APP_CAMERA_FACE_DETECT: - camera_view_add(view->navi, info, it); + camera_view_add(view->navi, info, it, view->win); break; case TBT_APP_CAMERA_HDR_CAPTURE: - camera_view_add(view->navi, info, it); + camera_view_add(view->navi, info, it, view->win); break; #endif @@ -837,13 +839,13 @@ static void _gl_item_selected_cb(void *data, Evas_Object *obj EINA_UNUSED, void #ifdef TBT_MODULE_LOCAL case TBT_APP_LOCAL_MPEG4: - local_view_add(view->navi, info, it); + local_view_add(view->navi, info, it, view->win); break; case TBT_APP_LOCAL_H263: - local_view_add(view->navi, info, it); + local_view_add(view->navi, info, it, view->win); break; case TBT_APP_LOCAL_H264: - local_view_add(view->navi, info, it); + local_view_add(view->navi, info, it, view->win); break; #endif diff --git a/tbtcoreapp/src/view/tbt-local-view.c b/tbtcoreapp/src/view/tbt-local-view.c index 6abb8b7..b4969a4 100644 --- a/tbtcoreapp/src/view/tbt-local-view.c +++ b/tbtcoreapp/src/view/tbt-local-view.c @@ -48,6 +48,9 @@ struct _local_view bool play; player_h player; + + Evas_Object *rect; + Evas_Object *win; Evas_Object *video_rect; Evas_Object *play_btn; @@ -78,6 +81,10 @@ static void _start_player_cb(void *data, Evas_Object *obj, void *event_info); static void _stop_player_cb(void *data, Evas_Object *obj, void *event_info); static void _pause_player_cb(void *data, Evas_Object *obj, void *event_info); static void _on_app_pause_resume_cb(bool resume); + +static void create_render_rect_and_bg(local_view *this); +static void destroy_render_rect_and_bg(local_view *this); + static bool was_playing; static local_view *view; @@ -152,6 +159,46 @@ static void _on_app_pause_resume_cb(bool resume ) } +static void create_render_rect_and_bg(local_view *this) +{ + RETM_IF(!this, "View is empty"); + + if(this->rect == NULL) + { + this->rect = evas_object_rectangle_add(evas_object_evas_get(this->win)); + RETM_IF(!this, "evas_object_rectangle_add"); + + evas_object_color_set(this->rect, 0, 0, 0, 0); + evas_object_render_op_set(this->rect, EVAS_RENDER_COPY); + + elm_win_resize_object_add(this->win, this->rect); + evas_object_size_hint_weight_set(this->rect, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + evas_object_show(this->rect); + evas_object_show(this->win); + this->video_rect = this->win; + + __is_efl_test_running = true; + eext_object_event_callback_add(this->rect, EEXT_CALLBACK_BACK, _stop_player_cb, this); + evas_object_event_callback_add(this->rect, EVAS_CALLBACK_MOUSE_DOWN, _pause_player_cb, this); + } +} + +static void destroy_render_rect_and_bg(local_view *this) +{ + + __is_efl_test_running = false; + eext_object_event_callback_del(this->rect, EEXT_CALLBACK_BACK, _stop_player_cb); + evas_object_event_callback_del(this->rect, EVAS_CALLBACK_MOUSE_DOWN, _pause_player_cb); + + if(this->rect) + { + RETM_IF(!this, "View is empty"); + elm_win_resize_object_del(this->win, this->rect); + evas_object_del(this->rect); + this->rect = NULL; + } +} + /** * @function local_view_add @@ -160,7 +207,7 @@ static void _on_app_pause_resume_cb(bool resume ) * @parameter Evas_Object*: Evas Object Pointer, tbt_info*: Tbt Info Pointer, Elm_Object_Item*: Elm Object Item Pointer * @return local_view* */ -local_view *local_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item) +local_view *local_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item, Evas_Object *win) { RETVM_IF(NULL == navi, NULL, "navi is null"); local_view *this = NULL; @@ -180,15 +227,10 @@ local_view *local_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Ite common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this); RETVM_IF(NULL == this->view, NULL, "navi is null"); + this->win = win; + this->rect = NULL; this->is_feature_supported = true; -// #ifdef DEVICE_TYPE_WEARABLE -// if(get_device_type() == DEVICE_WEARABLE_320_320 || (get_device_type() == DEVICE_WEARABLE_360_360)) -// { -// elm_theme_overlay_add(NULL, get_edje_path("custom_button.edj")); -// } -// #endif - #ifdef DEVICE_TYPE_MOBILE Evas *evas = evas_object_evas_get(this->view->navi); this->video_rect = evas_object_image_filled_add(evas); @@ -202,34 +244,7 @@ local_view *local_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Ite RETVM_IF(SYSTEM_INFO_ERROR_NONE!=ret, NULL, "system_info_get_platform_int failed %s", get_system_error(ret)); RETVM_IF(height <= 0, NULL, "height is zero or negative"); - this->video_rect = elm_win_util_standard_add("Video", "Video"); - - - if(get_device_type() == DEVICE_WEARABLE_320_320) - { - evas_object_resize(this->video_rect, (4/3)*(height*0.21), (height*0.21)); - evas_object_move(this->video_rect, width*0.50-((4/3)*(height*0.22)*0.5), height*0.20); - } - else if(get_device_type() == DEVICE_WEARABLE_360_360) - { - evas_object_resize(this->video_rect, (4/3)*(height*0.45), (height*0.25)); - evas_object_move(this->video_rect, width*0.5-((4/3)*(height*0.45)*0.5), height*0.35); - } - else - { - evas_object_resize(this->video_rect, 110, 83); - evas_object_move(this->video_rect, width*0.5-55, height*0.20); - } - - - - //Evas *evas_canvas = evas_object_evas_get(this->video_rect); - //Evas_Object *bg = evas_object_rectangle_add(evas_canvas); - //evas_object_render_op_set(bg, EVAS_RENDER_COPY); - //evas_object_color_set(bg, 0, 0, 0, 0); - //evas_object_resize(bg, width*0.23, height*0.23); // covers full canvas - //evas_object_show(bg); - + //this->video_rect = elm_win_util_standard_add("Video", "Video"); #endif evas_object_show(this->video_rect); @@ -270,6 +285,7 @@ static void start_player(local_view *this) { RETM_IF(NULL == this, "this is NULL"); int result; + create_render_rect_and_bg(this); if(!this->player) { this->player = create_player(this); @@ -282,7 +298,7 @@ static void start_player(local_view *this) DBG( "player_get_state fail > Error = %s", get_local_view_error(result)); if(state != PLAYER_STATE_PLAYING) { - result = player_set_display_mode(this->player, PLAYER_DISPLAY_MODE_ORIGIN_SIZE); + result = player_set_display_mode(this->player, PLAYER_DISPLAY_MODE_FULL_SCREEN); RETM_IF(result != PLAYER_ERROR_NONE, "player_set_display_mode fail > Error = %s", get_local_view_error(result)); result = player_set_display_visible(this->player, true); RETM_IF(result != PLAYER_ERROR_NONE, "player_set_display_visible fail > Error = %s", get_local_view_error(result)); @@ -341,6 +357,11 @@ static void pause_player(local_view *this) result = player_pause(this->player); RETM_IF(result != PLAYER_ERROR_NONE, "player_pause fail > Error = %s", get_local_view_error(result)); } + else if(state == PLAYER_STATE_PAUSED) + { + result = player_start(this->player); + RETM_IF(result != PLAYER_ERROR_NONE, "player_start fail > Error = %s", get_local_view_error(result)); + } } } @@ -445,11 +466,11 @@ static Evas_Object *add_control_layout(local_view *this, Evas_Object *parent) this->play_btn = ui_utils_push_button_add(this, table, "Play", _start_player_cb); elm_table_pack(table, this->play_btn, 0, 0, 1, 1); - this->pause_btn = ui_utils_push_button_add(this, table, "Pause", _pause_player_cb); - elm_table_pack(table, this->pause_btn, 1, 0, 1, 1); + //this->pause_btn = ui_utils_push_button_add(this, table, "Pause", _pause_player_cb); + //elm_table_pack(table, this->pause_btn, 1, 0, 1, 1); - this->stop_btn = ui_utils_push_button_add(this, table, "Stop", _stop_player_cb); - elm_table_pack(table, this->stop_btn, 2, 0, 1, 1); + //this->stop_btn = ui_utils_push_button_add(this, table, "Stop", _stop_player_cb); + //elm_table_pack(table, this->stop_btn, 2, 0, 1, 1); disable_control_button(this, false, true, true); @@ -468,9 +489,9 @@ static void disable_control_button(local_view *this, bool play, bool pause, bool { RETM_IF(NULL == this, "view is NULL"); - elm_object_disabled_set(this->play_btn, play); - elm_object_disabled_set(this->pause_btn, pause); - elm_object_disabled_set(this->stop_btn, stop); + //elm_object_disabled_set(this->play_btn, play); + //elm_object_disabled_set(this->pause_btn, pause); + //elm_object_disabled_set(this->stop_btn, stop); } @@ -495,19 +516,20 @@ static void _app_destroy_cb(void* this) elm_genlist_item_update(view->view->item); } - #ifdef DEVICE_TYPE_WEARABLE - if(get_device_type() == DEVICE_WEARABLE_320_320 || (get_device_type() == DEVICE_WEARABLE_360_360)) - { - elm_theme_overlay_del(NULL, get_edje_path("custom_button.edj")); - } - #endif +// #ifdef DEVICE_TYPE_WEARABLE +// if(get_device_type() == DEVICE_WEARABLE_320_320 || (get_device_type() == DEVICE_WEARABLE_360_360)) +// { +// elm_theme_overlay_del(NULL, get_edje_path("custom_button.edj")); +// } +// #endif _tbt_pause_resume_cb = NULL; _tbt_app_terminate_cb = NULL; - #ifndef DEVICE_TYPE_MOBILE - evas_object_del(view->video_rect); - #endif +// #ifndef DEVICE_TYPE_MOBILE +// evas_object_del(view->video_rect); +// #endif destroy_player(view); + destroy_render_rect_and_bg(view); SAFE_DELETE(view->view); SAFE_DELETE(view); } @@ -545,7 +567,8 @@ static void _stop_player_cb(void *data, Evas_Object *obj, void *event_info) local_view *view = NULL; view = (local_view*)data; RETM_IF(NULL == view, "view is NULL"); - stop_player(view); + destroy_player(view); + destroy_render_rect_and_bg(view); disable_control_button(view, false, true, true); } diff --git a/tbtcoreapp/src/window.c b/tbtcoreapp/src/window.c index 576a33e..ac21c78 100644 --- a/tbtcoreapp/src/window.c +++ b/tbtcoreapp/src/window.c @@ -25,14 +25,6 @@ #define APP_NAME "tbtcoreapp" -struct _window -{ - Evas_Object *win; - Evas_Object *bg; - Evas_Object *layout; - Evas_Object *conform; -}; - /** * @function win_get_win_handle