Fixed Prevent issues
authorchitta ranjan <chitta.rs@samsung.com>
Sat, 6 Apr 2013 09:56:32 +0000 (18:56 +0900)
committerchitta ranjan <chitta.rs@samsung.com>
Sat, 6 Apr 2013 09:56:32 +0000 (18:56 +0900)
Change-Id: I2c83e94f1fa0c5274d0abbc6668308db1575decc
Signed-off-by: chitta ranjan <chitta.rs@samsung.com>
src/VpVideoPlayerForm.cpp
src/VpVideoPlayerPresentationModel.cpp

index 61c1c95..eaf9045 100644 (file)
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
@@ -133,8 +133,6 @@ VideoPlayerForm::SetScreenMode(const ScreenMode mode, bool destroyOverlay)
        {
        case SCREEN_MODE_NORMAL:
                {
-                       bool modified = false;
-
                        Rectangle rect = Rectangle(X_NORMAL, Y_NORMAL, W_NORMAL, H_NORMAL);
 
                        if ((clientRect.width - rect.width) <= X_BASE)
@@ -178,9 +176,6 @@ VideoPlayerForm::SetScreenMode(const ScreenMode mode, bool destroyOverlay)
                                __pOverlayPanel->SetBounds(rect);
                        }
 
-                       OverlayRegion::EvaluateBounds(OVERLAY_REGION_EVALUATION_OPTION_GREATER_THAN, rect, modified);
-                       AppLogDebug("SCREEN_MODE_NORMAL : [%d][%d][%d][%d]", rect.x, rect.y, rect.width, rect.height);
-
                        SetControlAlwaysAtBottom(*__pOverlayPanel, true);
 
                        __screenMode = SCREEN_MODE_NORMAL;
@@ -189,8 +184,6 @@ VideoPlayerForm::SetScreenMode(const ScreenMode mode, bool destroyOverlay)
 
        case SCREEN_MODE_FULL:
                {
-                       bool modified = false;
-
                        Rectangle rect = Rectangle(0, 0, GetClientAreaBounds().width, GetClientAreaBounds().height);
                        AppLogDebug("SetScreenMode [%d] [%d]", rect.height, rect.width);
 
@@ -216,10 +209,6 @@ VideoPlayerForm::SetScreenMode(const ScreenMode mode, bool destroyOverlay)
                        {
                                __pOverlayPanel->SetBounds(rect);
                        }
-
-                       OverlayRegion::EvaluateBounds(OVERLAY_REGION_EVALUATION_OPTION_GREATER_THAN, rect, modified);
-                       AppLogDebug("SCREEN_MODE_FULL : [%d][%d][%d][%d]", rect.x, rect.y, rect.width, rect.height);
-
                        SetControlAlwaysAtBottom(*__pOverlayPanel, true);
 
                        __screenMode = SCREEN_MODE_FULL;
@@ -228,8 +217,6 @@ VideoPlayerForm::SetScreenMode(const ScreenMode mode, bool destroyOverlay)
 
        case SCREEN_MODE_FIT:
                {
-                       bool modified = false;
-
                        Rectangle rect = __pVideoPlayerPresentationModel->GetVideoInfoN(
                                        __pVideoPlayerPresentationModel->GetMediaPathName());
 
@@ -273,10 +260,6 @@ VideoPlayerForm::SetScreenMode(const ScreenMode mode, bool destroyOverlay)
                        {
                                __pOverlayPanel->SetBounds(rect);
                        }
-
-                       OverlayRegion::EvaluateBounds(OVERLAY_REGION_EVALUATION_OPTION_GREATER_THAN, rect, modified);
-                       AppLogDebug("SCREEN_MODE_FULL : [%d][%d][%d][%d]", rect.x, rect.y, rect.width, rect.height);
-
                        SetControlAlwaysAtBottom(*__pOverlayPanel, true);
 
                        __screenMode = SCREEN_MODE_FIT;
index 0ea84a4..9380682 100644 (file)
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
@@ -595,9 +595,12 @@ void
 VideoPlayerPresentationModel::SetRenderingBuffer(void)
 {
        BufferInfo bufferInfo;
-
-       __pOverlayPanel->GetBackgroundBufferInfo(bufferInfo);
-       __pPlayer->SetRenderingBuffer(bufferInfo);
+       result r = E_SUCCESS;
+       r = __pOverlayPanel->GetBackgroundBufferInfo(bufferInfo);
+       if (r == E_SUCCESS)
+       {
+               __pPlayer->SetRenderingBuffer(bufferInfo);
+       }
 }
 
 void
@@ -1102,14 +1105,18 @@ result
 VideoPlayerPresentationModel::InitializePlayer(void)
 {
        BufferInfo bufferInfo;
+       result r = E_SUCCESS;
 
        AppLogDebug("InitializePlayer");
        delete __pPlayer;
 
-       __pOverlayPanel->GetBackgroundBufferInfo(bufferInfo);
+       r = __pOverlayPanel->GetBackgroundBufferInfo(bufferInfo);
 
        __pPlayer = new (std::nothrow) Player();
-       result r = __pPlayer->Construct(*this, &bufferInfo);
+       if (r == E_SUCCESS)
+       {
+               r = __pPlayer->Construct(*this, &bufferInfo);
+       }
 
        AppLogDebug("__pPlayer [%x]", __pPlayer);