From f5ddc62c616e04f58248ffe0c6171578d70905a2 Mon Sep 17 00:00:00 2001 From: Sung-jae Park Date: Wed, 5 Sep 2012 17:20:22 +0900 Subject: [PATCH] Update sample and Change depth to 24 from 32. Change-Id: Ie06e44a7a9e7bc6f6de739e618f80b733cad298e --- debian/changelog | 7 +++++++ live-viewer/src/CLiveBox.cpp | 23 +++++++++++------------ live-viewer/src/CLiveBoxMgr.cpp | 1 - packaging/liblivebox-viewer.spec | 2 +- src/fb.c | 6 +++++- 5 files changed, 24 insertions(+), 15 deletions(-) diff --git a/debian/changelog b/debian/changelog index 507faf7..0abb397 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +livebox-viewer (0.5.1) unstable; urgency=low + + * Git: slp/pkgs/l/livebox-viewer + * Tag: livebox-viewer_0.5.1 + + -- Sung-jae Park Wed, 05 Sep 2012 17:51:47 +0900 + livebox-viewer (0.5.0) unstable; urgency=low * Git: slp/pkgs/l/livebox-viewer diff --git a/live-viewer/src/CLiveBox.cpp b/live-viewer/src/CLiveBox.cpp index 593a802..dd7b949 100644 --- a/live-viewer/src/CLiveBox.cpp +++ b/live-viewer/src/CLiveBox.cpp @@ -391,6 +391,7 @@ void CLiveBox::OnUpdateLB(void) if (livebox_get_size(m_pHandler, &w, &h) < 0) return; + /* snprintf(buffer, sizeof(buffer), "LB Updated (%dx%d)", w, h); CMain::GetInstance()->AppendLog(buffer); @@ -401,6 +402,7 @@ void CLiveBox::OnUpdateLB(void) tmp = livebox_content(m_pHandler); snprintf(buffer, sizeof(buffer), "Content: %s", tmp); CMain::GetInstance()->AppendLog(buffer); + */ if (w < 0 || h < 0) return; @@ -412,8 +414,8 @@ void CLiveBox::OnUpdateLB(void) return; type = livebox_lb_type(m_pHandler); -#if 0 - if (type == LB_TYPE_PIXMAP) { + + if (!!getenv("UPDATE_USING_PIXMAP") && type == LB_TYPE_PIXMAP) { if ((int)evas_object_data_get(m_pLBImage, "pixmap") != livebox_lb_pixmap(m_pHandler)) { Evas_Native_Surface surf; @@ -432,10 +434,8 @@ void CLiveBox::OnUpdateLB(void) evas_object_image_pixels_dirty_set(m_pLBImage, 1); evas_object_image_fill_set(m_pLBImage, 0, 0, w, h); evas_object_image_data_update_add(m_pLBImage, 0, 0, w, h); - evas_object_resize(m_pLBImage, w, h); - } else -#endif - if (type == LB_TYPE_BUFFER || type == LB_TYPE_PIXMAP) { + // evas_object_resize(m_pLBImage, w, h); + } else if (type == LB_TYPE_BUFFER || type == LB_TYPE_PIXMAP) { void *data; data = livebox_acquire_fb(m_pHandler); @@ -456,10 +456,8 @@ void CLiveBox::OnUpdateLB(void) } if (sscanf(m_sSize, "resize,to,%dx%d", &ow, &oh) == 2) { - if (ow == w && oh == h) { - DbgPrint("No changes\n"); + if (ow == w && oh == h) return; - } } snprintf(m_sSize, sizeof(m_sSize), "resize,to,%dx%d", w, h); @@ -530,9 +528,10 @@ void CLiveBox::OnUpdatePD(void) if (livebox_get_pdsize(m_pHandler, &w, &h) < 0) return; + /* snprintf(buffer, sizeof(buffer), "PD Updated (%dx%d)", w, h); CMain::GetInstance()->AppendLog(buffer); - DbgPrint("Buffer: [%s]\n", buffer); + */ if (w < 0 || h < 0) return; @@ -544,7 +543,7 @@ void CLiveBox::OnUpdatePD(void) return; type = livebox_pd_type(m_pHandler); - if (type == PD_TYPE_PIXMAP) { + if (!!getenv("UPDATE_USING_PIXMAP") && type == PD_TYPE_PIXMAP) { if ((int)evas_object_data_get(m_pPDImage, "pixmap") != livebox_lb_pixmap(m_pHandler)) { Evas_Native_Surface surf; @@ -564,7 +563,7 @@ void CLiveBox::OnUpdatePD(void) evas_object_image_fill_set(m_pPDImage, 0, 0, w, h); evas_object_image_data_update_add(m_pPDImage, 0, 0, w, h); evas_object_resize(m_pPDImage, w, h); - } else if (type == PD_TYPE_BUFFER) { + } else if (type == PD_TYPE_BUFFER || type == PD_TYPE_PIXMAP) { void *data; data = livebox_acquire_pdfb(m_pHandler); if (!data) diff --git a/live-viewer/src/CLiveBoxMgr.cpp b/live-viewer/src/CLiveBoxMgr.cpp index 3fc6019..9390307 100644 --- a/live-viewer/src/CLiveBoxMgr.cpp +++ b/live-viewer/src/CLiveBoxMgr.cpp @@ -58,7 +58,6 @@ int CLiveBoxMgr::OnEvent(struct livebox *handler, enum livebox_event_type event) CLiveBox *box; int ret = 0; - DbgPrint("Event: 0x%X\n", event); if (event == LB_EVENT_CREATED) { try { box = new CLiveBox(handler); diff --git a/packaging/liblivebox-viewer.spec b/packaging/liblivebox-viewer.spec index 339db77..75a61f8 100644 --- a/packaging/liblivebox-viewer.spec +++ b/packaging/liblivebox-viewer.spec @@ -1,6 +1,6 @@ Name: liblivebox-viewer Summary: Library for the development of a livebox viewer -Version: 0.5.0 +Version: 0.5.1 Release: 1 Group: main/app License: Samsung Proprietary License diff --git a/src/fb.c b/src/fb.c index 30f9377..474a4d0 100644 --- a/src/fb.c +++ b/src/fb.c @@ -189,8 +189,12 @@ static inline int sync_for_pixmap(struct fb_info *info) return -EFAULT; } + /*! + * \NOTE + * Use the 24 bits Pixmap for Video player + */ xim = XShmCreateImage(s_info.disp, s_info.visual, - (s_info.depth << 3), ZPixmap, NULL, + 24 /* (s_info.depth << 3) */, ZPixmap, NULL, &si, info->w, info->h); if (xim == NULL) { -- 2.7.4