summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMinkyu Kang <mk7.kang@samsung.com>2015-12-29 02:28:09 (GMT)
committerMinkyu Kang <mk7.kang@samsung.com>2015-12-29 02:28:09 (GMT)
commit9c645c5852df3c5619fb1ccc79009cb637cf557a (patch)
tree5b64606dfbd538fd638aae98550f8b65a4902147
parent3ffaa53c90552d7fe311aa190ca07dc7d60b225f (diff)
downloadair_mediahub-9c645c5852df3c5619fb1ccc79009cb637cf557a.zip
air_mediahub-9c645c5852df3c5619fb1ccc79009cb637cf557a.tar.gz
air_mediahub-9c645c5852df3c5619fb1ccc79009cb637cf557a.tar.bz2
viewer: unload the image object and set background when playing video filesubmit/tizen/20151229.024340accepted/tizen/tv/20151229.072524refs/changes/23/55723/1
Change-Id: Ia3de121b1962a0e7cc54cd69102441cdd042303d Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
-rw-r--r--src/view/viewer.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/view/viewer.c b/src/view/viewer.c
index 13ac8ed..6c7a389 100644
--- a/src/view/viewer.c
+++ b/src/view/viewer.c
@@ -236,6 +236,23 @@ static void _set_bg_color(struct _priv *priv, int r, int g, int b, int a)
elm_object_part_content_set(priv->base, PART_VIEWER_BG, bg);
}
+static void _image_unload(struct _priv *priv)
+{
+ if (priv->photo_pre) {
+ evas_object_del(priv->photo_pre);
+ priv->photo_pre = NULL;
+ }
+
+ if (priv->photo) {
+ evas_object_del(priv->photo);
+ priv->photo = NULL;
+ }
+
+ _set_bg_color(priv, 0, 0, 0, 0);
+
+ elm_object_part_content_unset(priv->base, PART_VIEWER_CONTENT);
+}
+
static void _image_loaded(void *data, Evas_Object *obj, void *ev)
{
struct _priv *priv;
@@ -274,9 +291,11 @@ static void _draw_contents(struct _priv *priv, int id, app_media_info *mi)
Evas_Object *obj;
if (id == VIEWER_MOVIE) {
+ _image_unload(priv);
_player_play(priv);
return;
} else if (id == VIEWER_VIDEO) {
+ _image_unload(priv);
_player_play(priv);
if (!priv->slideshow.enable)