Revision: 201017 RCL_3
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 11 May 2010 16:15:55 +0300
branchRCL_3
changeset 16 4e9858fa9559
parent 14 856ae1b15d98
child 17 9ec13d39cc2e
Revision: 201017 Kit: 201019
vtengines/videoteleng/Inc/Base/CVtEngSATClient.h
vtengines/videoteleng/Src/Media/CVtEngDrawNGA.cpp
vtengines/videoteleng/Src/Media/CVtEngMediaHandler.cpp
vtprotocolplugins/VideoSource/src/cmultiframeprovider.cpp
vtuis/videotelui/inc/features/prefs/cvtuiprefsettinglistbase.h
vtuis/videotelui/src/CVtUiAppUi.cpp
vtuis/videotelui/src/features/dialer/cvtuidialercontainer.cpp
vtuis/videotelui/src/features/prefs/cvtuiprefsettinglistbase.cpp
vtuis/videotelui/src/features/toolbar/cvtuitoolbarbase.cpp
--- a/vtengines/videoteleng/Inc/Base/CVtEngSATClient.h	Tue Apr 27 16:40:55 2010 +0300
+++ b/vtengines/videoteleng/Inc/Base/CVtEngSATClient.h	Tue May 11 16:15:55 2010 +0300
@@ -23,8 +23,8 @@
 //  INCLUDES
 #include <e32base.h>
 #include <e32std.h>
-#include <RSatRefresh.h>
-#include <RSatSession.h>
+#include <rsatrefresh.h>
+#include <rsatsession.h>
 
 
 // CLASS DECLARATION
--- a/vtengines/videoteleng/Src/Media/CVtEngDrawNGA.cpp	Tue Apr 27 16:40:55 2010 +0300
+++ b/vtengines/videoteleng/Src/Media/CVtEngDrawNGA.cpp	Tue May 11 16:15:55 2010 +0300
@@ -27,6 +27,7 @@
 #include <tdisplaysinkparamsnga.h>
 #include <cvtlogger.h>
 #include <graphics/surfaceconfiguration.h>
+#include <graphics/suerror.h>
 
 // Reversed enumeration for the bitmaps.
 static const MDisplaySink::TBitmapNo KVtEngBitmapNoReversed[] =
@@ -525,7 +526,7 @@
         iCallBackTable[surfaceno]->SetActive();
         iSurfaceUpdateSession.NotifyWhenDisplayed(iCallBackTable[surfaceno]->iStatus, iTimeStamp);
         iSubmitPending = ETrue;
-        iSurfaceUpdateSession.SubmitUpdate(0, iSurfaceId, surfaceno, NULL); 
+        iSurfaceUpdateSession.SubmitUpdate( KAllScreens, iSurfaceId, surfaceno, NULL ); 
         buffer.UnSet();
         }
     if ( iSurfaceBuffers[ KVtEngBitmapNoReversed[ bitmapNo ] ].IsSet() )
@@ -886,7 +887,7 @@
         iCallBackTable[surfaceno]->SetActive();
         iSurfaceUpdateSession.NotifyWhenDisplayed(iCallBackTable[surfaceno]->iStatus, iTimeStamp);
         iSubmitPending = ETrue;
-        iSurfaceUpdateSession.SubmitUpdate(0, iSurfaceId, surfaceno, NULL); 
+        iSurfaceUpdateSession.SubmitUpdate( KAllScreens, iSurfaceId, surfaceno, NULL ); 
         iWaitingBuffers.Remove(*buffer);
         buffer->UnSet();
         }
@@ -919,7 +920,7 @@
         iCallBackTable[surfaceno]->SetActive();
         iSurfaceUpdateSession.NotifyWhenDisplayed(iCallBackTable[surfaceno]->iStatus, iTimeStamp);
         iSubmitPending = ETrue;
-        iSurfaceUpdateSession.SubmitUpdate(0, iSurfaceId, surfaceno, NULL); 
+        iSurfaceUpdateSession.SubmitUpdate( KAllScreens, iSurfaceId, surfaceno, NULL ); 
         iWaitingBuffers.Remove(*buffer);
         buffer->UnSet();
         }
--- a/vtengines/videoteleng/Src/Media/CVtEngMediaHandler.cpp	Tue Apr 27 16:40:55 2010 +0300
+++ b/vtengines/videoteleng/Src/Media/CVtEngMediaHandler.cpp	Tue May 11 16:15:55 2010 +0300
@@ -1498,7 +1498,7 @@
                     // Set default frame rate and send indication to peer
                     if ( !IsFlag( EVideoQualitySetByPeer ) )
                         {
-                        SetVideoQualityL( EVideoQualityNormal, EFalse );
+                        SetVideoQualityL( EVideoQualityNormal, ETrue );
                         }
 
                     __VTPRINT( DEBUG_MEDIA | DEBUG_DETAIL,
--- a/vtprotocolplugins/VideoSource/src/cmultiframeprovider.cpp	Tue Apr 27 16:40:55 2010 +0300
+++ b/vtprotocolplugins/VideoSource/src/cmultiframeprovider.cpp	Tue May 11 16:15:55 2010 +0300
@@ -579,12 +579,17 @@
         	}
     // Allways inform Decoding problems
     else
-       	{
+        {
         iObserver->NotifyImageHandlingError( aError );
         delete iTempBM;
-       	delete iMask;
-       	iMask = NULL;
-       	iTempBM = NULL;
+        delete iMask;
+        iMask = NULL;
+        iTempBM = NULL;
+        // GIF used when error happen
+        if ( iCount > 1 )
+            {
+            iCount = 1;
+            }
         }
     __IF_DEBUG(Print(_L("VideoSource[%d]: CMultiframeProvider::ConversionFinished() error %d <<"), RThread().Id().operator TUint(), aError));
     }
--- a/vtuis/videotelui/inc/features/prefs/cvtuiprefsettinglistbase.h	Tue Apr 27 16:40:55 2010 +0300
+++ b/vtuis/videotelui/inc/features/prefs/cvtuiprefsettinglistbase.h	Tue May 11 16:15:55 2010 +0300
@@ -153,6 +153,9 @@
     
     // Resizes backround bitmap
     void ResizeBackroundBitmapRect( );
+    
+    // Sort controls window position
+    void SortControlsWindowPoistion();
 
 protected:    
     
@@ -169,8 +172,8 @@
     // Contains currenltly supported items in setting page
     RArray< TInt> iActiveItems;
             
-     // whether or not has a pending command
-     TBool iPendingSettingChangeCmd;
+    // whether or not has a pending command
+    TBool iPendingSettingChangeCmd;
 
 private:
     
@@ -191,27 +194,6 @@
     
     // Reference to appui
     CVtUiAppUi& iAppUi;
-    
-    // Window priority for context control
-    TInt iContextControlWindowPriority;
-    
-    // Window position for context control
-    TInt iContextControlWindowPosition;
-    
-    // Window priority for remote video control
-    TInt iRemoteVideoControlWindowPriority;
-    
-    // Window position for remote video control
-    TInt iRemoteVideoControlWindowPosition;
-    
-    // Window priority for end call button pane
-    TInt iEndCallButtonPanePriority;
-    
-    // Window position for end call button pane
-    TInt iEndCallButtonPanePosition;
-    
-    // Window priority for main control
-    TInt iMainControlWindowPriority;
     };
 
 #endif // CVTUIPEFSETTINGLISTBASE_H
--- a/vtuis/videotelui/src/CVtUiAppUi.cpp	Tue Apr 27 16:40:55 2010 +0300
+++ b/vtuis/videotelui/src/CVtUiAppUi.cpp	Tue May 11 16:15:55 2010 +0300
@@ -158,7 +158,7 @@
 const TInt KVtUiRemoteVideoControlOrdinalPriNormal = 0;
 
 // Remote video control high priority
-const TInt KVtUiRemoteVideoControlOrdinalPriHigh = 2;
+const TInt KVtUiRemoteVideoControlOrdinalPriHigh = 1;
 
 // Name of the EIKON server window group.
 _LIT( KVtUiEikonServer, "EikonServer" );
@@ -1855,6 +1855,16 @@
     RefreshBlind();
     UpdateRenderingParametersL();
     
+    // Raise the menu priority, otherwise the remote video control may
+    // overlay the menu pane
+    CEikMenuBar* menuBar = iEikonEnv->AppUiFactory()->MenuBar();
+    if ( menuBar && menuBar->IsDisplayed() )
+        {
+        TInt mpPos = menuBar->MenuPane()->DrawableWindow()->OrdinalPosition();
+        menuBar->MenuPane()->DrawableWindow()->SetOrdinalPosition( mpPos, 
+                KVtUiRemoteVideoControlOrdinalPriHigh ); // Pri = 1
+        }
+    
     if ( aMode == ERenderingModeDialer )
         {
         // Remote video control has the highest priority in dialer
@@ -2494,7 +2504,8 @@
             {
             iInstance->iNaviPane->HandleResourceChange( aType );
             }
-        if ( layoutChange )
+        // Handle layout change only when type == DLVS
+        if ( aType == KEikDynamicLayoutVariantSwitch )
             {
             (void) HandleLayoutChanged();
             }
@@ -6516,9 +6527,31 @@
             // end the capture mode
             if( iAppUi.iUiStates->IsCaptureModeOn() )
                 {
+                __VTPRINT( DEBUG_GEN, "CVtUiAppUi.VolumeKeyPressedL cancel capture" )
                 iAppUi.CmdCancelCaptureL();
                 }
+            else if ( iAppUi.iUiStates->IsZoomModeOn() )
+                {
+                // If zoom feature is active, stop that
+                MVtUiFeature* zm = iAppUi.iFeatureManager->GetFeatureById( EVtUiFeatureIdZoom );
+                if ( zm )
+                    {
+                    if ( zm->State() ==  MVtUiFeature::EActive )
+                        {
+                        __VTPRINT( DEBUG_GEN, "CVtUiAppUi.VolumeKeyPressedL zm->STOP" )
+                        zm->Stop();
+                        }
+                    }
+                }
             volume->StartL();
+            
+            // Toolbar needs to be refreshed if zoom, contrat and brightness were dismissed
+            CVtUiToolbarBase* tb = static_cast< CVtUiToolbarBase* >(
+            iAppUi.iFeatureManager->GetFeatureById( EVtUiFeatureIdToolbar ) );
+            if ( tb )
+                {
+                tb->RefreshL();
+                }
             }
         }
     __VTPRINTEXIT( "CVtUiAppUi.VolumeKeyPressedL" )
--- a/vtuis/videotelui/src/features/dialer/cvtuidialercontainer.cpp	Tue Apr 27 16:40:55 2010 +0300
+++ b/vtuis/videotelui/src/features/dialer/cvtuidialercontainer.cpp	Tue May 11 16:15:55 2010 +0300
@@ -25,6 +25,7 @@
 #include    <layoutmetadata.cdl.h>
 #include    <featmgr.h>
 #include    <AknsBasicBackgroundControlContext.h>
+#include    <akntoolbar.h>
 
 #include    "VtUiUtility.h"
 #include    "VtUiLayout.h"
@@ -38,10 +39,16 @@
 #include    "CVtUiAppUi.h"
 #include    "mvtuicommandmanager.h"
 #include    "cvtuidtmfbuffer.h"
-
+#include    "CVtUiMainControl.h"
+#include    "CVtUiContextControl.h"
+#include    "CVtUiRemoteVideoControl.h"
+#include    "CVtUiEndCallButtonPane.h"
 // Index of white color.
 const TInt KVtUiColorWhite = 0;
 
+const TInt KVtUiActOrdinalPos = 2;
+const TInt KVtUiDeactOrdinalPos = 4;
+
 // Implementation of TVtUiMiniDialerComponentState
 
 // ---------------------------------------------------------------------------
@@ -143,6 +150,21 @@
     iUiStates.SetIsDialerActivating( EFalse );
     LayoutDialerContainer();
     Reset();
+    
+    // Sort control windows' ordinal pos
+    TInt ordinalPos = KVtUiActOrdinalPos;
+    CVtUiAppUi& appUi = iFeatureManager->AppUi();
+    appUi.MainControl().DrawableWindow()->SetOrdinalPosition(
+            ordinalPos--, 
+            appUi.MainControl().DrawableWindow()->OrdinalPriority() );
+    
+    appUi.CurrentFixedToolbar()->DrawableWindow()->SetOrdinalPosition(
+            ordinalPos--, 
+            appUi.CurrentFixedToolbar()->DrawableWindow()->OrdinalPriority() );
+    
+    iDialer->DrawableWindow()->SetOrdinalPosition(
+            ordinalPos--, iDialer->DrawableWindow()->OrdinalPriority() );
+    
     iVideoControl->MakeVisible( ETrue );
     iDialer->MakeVisible( ETrue );
     MakeVisible( ETrue );
@@ -172,6 +194,30 @@
     iFeatureManager->CommandManager().
         RemoveCommandModifier( *iSKModifier );
     iUiStates.SetIsDialerOpen( EFalse );
+
+    // Sort control windows' ordinal pos
+    TInt ordinalPos = KVtUiDeactOrdinalPos;
+    CVtUiAppUi& appUi = iFeatureManager->AppUi();
+    appUi.MainControl().DrawableWindow()->SetOrdinalPosition( 
+            ordinalPos--, 
+            appUi.MainControl().DrawableWindow()->OrdinalPriority() );
+    
+    appUi.CurrentFixedToolbar()->DrawableWindow()->SetOrdinalPosition(
+            ordinalPos--, 
+            appUi.CurrentFixedToolbar()->DrawableWindow()->OrdinalPriority() );
+      
+    appUi.EndCallButtonPane().DrawableWindow()->SetOrdinalPosition( 
+            ordinalPos--, 
+            appUi.EndCallButtonPane().DrawableWindow()->OrdinalPriority() );
+    
+    appUi.ContextControl().DrawableWindow()->SetOrdinalPosition( 
+            ordinalPos--, 
+            appUi.ContextControl().DrawableWindow()->OrdinalPriority() );
+    
+    appUi.RemoteVideoControl().DrawableWindow()->SetOrdinalPosition(
+            ordinalPos--, 
+            appUi.RemoteVideoControl().DrawableWindow()->OrdinalPriority() );
+    
     iVideoControl->MakeVisible( EFalse );
     iDialer->MakeVisible( EFalse );
     MakeVisible( EFalse );
@@ -318,11 +364,6 @@
     iVideoControl = CVtUiDialerVideoControl::NewL( aBitmapManager );
     iDialer = CVideoDTMFDialer::NewL( *this, *iVideoControl, DialerRect() );
     
-    // Dialer has the higher priority
-    iDialer->DrawableWindow()->SetOrdinalPosition( 
-            iDialer->DrawableWindow()->OrdinalPosition(),
-            iDialer->DrawableWindow()->OrdinalPriority() + 1 );
-    
     iSKModifier = CVtUiDialerSKModifier::NewL( *iFeatureManager );
     // Disable fading when using DP (eliminates nasty color error)
     if ( FeatureManager::FeatureSupported( KFeatureIdDisplayPost ) )
--- a/vtuis/videotelui/src/features/prefs/cvtuiprefsettinglistbase.cpp	Tue Apr 27 16:40:55 2010 +0300
+++ b/vtuis/videotelui/src/features/prefs/cvtuiprefsettinglistbase.cpp	Tue May 11 16:15:55 2010 +0300
@@ -21,6 +21,7 @@
 #include    <eikenv.h>
 #include    <cvtlogger.h>
 #include    <avkon.hrh>
+#include    <akntoolbar.h>
 
 #include    "cvtuiprefsettinglistbase.h"
 #include    "CVtUiAppUi.h"
@@ -37,7 +38,7 @@
 // constants
 static const TInt KMaxNumberOfArrayItems = 5;
 static const TInt KMaxNumberOfActiveItems = 5;
-static const TInt KOrdinalPositionBase = 3;
+static const TInt KOrdinalPositionBase = 4;
 
 // ---------------------------------------------------------------------------
 // CVtUiPrefSettingListBase::~CVtUiPrefSettingListBase
@@ -158,48 +159,12 @@
     // Swap image places if needed
     iAppUi.SwitchViewFinderToMainPaneL();
     
-    // Get context control's window priority and position
-    iContextControlWindowPriority = iAppUi.ContextControl().DrawableWindow()
-        ->OrdinalPriority();
-    iContextControlWindowPosition = iAppUi.ContextControl().DrawableWindow()
-        ->OrdinalPosition();
-    
-    // Get main control's window priority
-    iMainControlWindowPriority= iAppUi.MainControl().DrawableWindow()
-        ->OrdinalPriority();
-    
-    // Get remote video control's window priority and position
-    iRemoteVideoControlWindowPriority = 
-            iAppUi.RemoteVideoControl().DrawableWindow()->OrdinalPriority();
-    iRemoteVideoControlWindowPosition = 
-            iAppUi.RemoteVideoControl().DrawableWindow()->OrdinalPosition();
+    // Creates setting page first
+    CreateSettingPageL();
     
-    // Get end call button pane priority and position
-    iEndCallButtonPanePriority = 
-            iAppUi.EndCallButtonPane().DrawableWindow()->OrdinalPriority();
-    iEndCallButtonPanePosition = 
-            iAppUi.EndCallButtonPane().DrawableWindow()->OrdinalPosition();
-    
-    // Rise context control's window priority othwerwise setting page will be
-    // drawn partially over the context control window.
-    iAppUi.ContextControl().DrawableWindow()->SetOrdinalPosition( 
-        iContextControlWindowPosition, 
-        iContextControlWindowPriority + 1 );
-    
-    // Rise remote video control's window priority othwerwise setting page 
-    // will be drawn partially over the context control window.
-    iAppUi.RemoteVideoControl().DrawableWindow()->SetOrdinalPosition(
-        iRemoteVideoControlWindowPosition, 
-        iRemoteVideoControlWindowPriority + 2 );
-    
-    // Rise end call button pane priority othwerwise setting page 
-    // will be drawn partially over the context control window.
-    iAppUi.EndCallButtonPane().DrawableWindow()->SetOrdinalPosition(
-        iEndCallButtonPanePosition, 
-        iEndCallButtonPanePriority + 1 );
+    // Sort controls window position
+    SortControlsWindowPoistion();
 
-    // Creates setting page
-    CreateSettingPageL();
     // Launch setting page.
     iSettingPage->ExecuteLD( CAknSettingPage::EUpdateWhenAccepted, EFalse );
     iSettingPage = NULL;
@@ -213,8 +178,6 @@
 void CVtUiPrefSettingListBase::StopSettingPageL()
     {
     __VTPRINTENTER( "CVtUiPrefSettingListBase.StopSettingPageL" )
-    // Swap image places if needed  
-    iAppUi.RestoreViewFinderL();
     
     if ( iSettingPage)
         {
@@ -224,28 +187,11 @@
         iSettingPage->OfferKeyEventL( keyEvent, EEventKey );
         }
     
-    TInt ordinalPos = KOrdinalPositionBase;
+    // Sort controls window position
+    SortControlsWindowPoistion();
     
-    // Set main control priority and position back to 
-    // orginal value.
-    iAppUi.MainControl().DrawableWindow()->SetOrdinalPosition( 
-    		ordinalPos--, iMainControlWindowPriority );
-      
-    // Set end call button pane priority and position back to 
-    // orginal value.
-    iAppUi.EndCallButtonPane().DrawableWindow()->SetOrdinalPosition( 
-    		ordinalPos--, iEndCallButtonPanePriority );
-    
-    // Set context control's window priority and position back to 
-    // orginal value.
-    iAppUi.ContextControl().DrawableWindow()->SetOrdinalPosition( 
-    		ordinalPos--, iContextControlWindowPriority );
-    
-    // Set remote video control's window priority and position back to 
-    // orginal value.
-    iAppUi.RemoteVideoControl().DrawableWindow()->SetOrdinalPosition(
-    		ordinalPos--, 
-            iRemoteVideoControlWindowPriority );
+    // Swap image places if needed  
+    iAppUi.RestoreViewFinderL();
     
     __VTPRINTEXIT( "CVtUiPrefSettingListBase.StopSettingPageL" )
     }
@@ -411,3 +357,47 @@
     iBitmapTopLeftCorner = iStreamLayout.Rect().iTl;
     __VTPRINTEXIT( "CVtUiPrefSettingListBase.ResizeBackroundBitmapRect" )
     }
+
+// ---------------------------------------------------------------------------
+// CVtUiPrefSettingListBase::SortControlsWindowPoistion
+// ---------------------------------------------------------------------------
+//
+void CVtUiPrefSettingListBase::SortControlsWindowPoistion()
+    {
+    TInt ordinalPos = KOrdinalPositionBase;
+    
+    if ( iSettingPage )
+        {
+        ordinalPos++;
+        }
+    
+    // Re-sort control's window position
+    iAppUi.MainControl().DrawableWindow()->SetOrdinalPosition( 
+        ordinalPos--, 
+        iAppUi.MainControl().DrawableWindow()->OrdinalPriority() );
+    
+    if ( iSettingPage )
+        {
+        iSettingPage->DrawableWindow()->SetOrdinalPosition(
+            ordinalPos--,
+            iSettingPage->DrawableWindow()->OrdinalPriority() );
+        }
+    
+    iAppUi.CurrentFixedToolbar()->DrawableWindow()->SetOrdinalPosition(
+        ordinalPos--,
+        iAppUi.CurrentFixedToolbar()->DrawableWindow()->OrdinalPriority() );
+    
+    iAppUi.ContextControl().DrawableWindow()->SetOrdinalPosition( 
+        ordinalPos--, 
+        iAppUi.ContextControl().DrawableWindow()->OrdinalPriority() );
+    
+    iAppUi.RemoteVideoControl().DrawableWindow()->SetOrdinalPosition(
+        ordinalPos--, 
+        iAppUi.RemoteVideoControl().DrawableWindow()->OrdinalPriority() );
+    
+    iAppUi.EndCallButtonPane().DrawableWindow()->SetOrdinalPosition(
+        ordinalPos--, 
+        iAppUi.EndCallButtonPane().DrawableWindow()->OrdinalPriority() );
+    }
+
+// End of file
--- a/vtuis/videotelui/src/features/toolbar/cvtuitoolbarbase.cpp	Tue Apr 27 16:40:55 2010 +0300
+++ b/vtuis/videotelui/src/features/toolbar/cvtuitoolbarbase.cpp	Tue May 11 16:15:55 2010 +0300
@@ -1202,7 +1202,12 @@
     // toolbar must be hided
     if ( !isLandscape && IsDialerActive() )
         {
-        __VTPRINT(DEBUG_GEN, "CVtUiToolbarBase.LayoutChangeL.Stop" )
+        __VTPRINT( DEBUG_GEN, "ToolbarBase::HandleLayoutChangeL DialerActive." )
+        SetToolbarVisibilityAfterLayoutChangeL( EFalse );
+        }
+    else if ( !isLandscape && iFeatureManager.UiStates().IsCaptureModeOn() )
+        {
+        __VTPRINT( DEBUG_GEN, "ToolbarBase::HandleLayoutChangeL CaptureOn." )
         SetToolbarVisibilityAfterLayoutChangeL( EFalse );
         }
     else if ( iFeatureManager.UiStates().IsSelectingShare() )
@@ -1232,7 +1237,13 @@
         }
     // Transition from portrait to landsacpe
     // toolbar must be set to visible
-    else if ( isLandscape && IsDialerActive() )
+    else if ( isLandscape && ( 
+            IsDialerActive() ||
+            iFeatureManager.UiStates().IsCaptureModeOn() ||
+            iFeatureManager.UiStates().IsVideoQualityModeOn() ||
+            iFeatureManager.UiStates().IsWhiteBalanceModeOn() ||
+            iFeatureManager.UiStates().IsColorToneModeOn() ||
+            menuBar && menuBar->IsDisplayed() ) )
         {
         __VTPRINT(DEBUG_GEN, "CVtUiToolbarBase.LayoutChangeL.StartL" )
         SetToolbarVisibilityAfterLayoutChangeL( ETrue );