201021
authorhgs
Fri, 28 May 2010 16:08:43 +0300
changeset 23 a297cbce4e85
parent 22 b6d70b04aa2d
child 26 bcc434605a01
child 27 5be06b45e413
201021
ipappsrv_plat/media_control_api/inc/mmccinterfacedef.h
ipappsrv_plat/multimedia_comms_api/inc/mcefilesink.h
ipappsrv_plat/multimedia_comms_api/inc/mcertpsink.h
multimediacommscontroller/mmcccontroller/src/mcccamerahandler.cpp
multimediacommscontroller/mmcccontroller/tsrc/ut_controller/src/UT_CMccCameraHandler.cpp
multimediacommsengine/mmceshared/src/mcecomamrwbcodec.cpp
multimediacommsengine/mmceshared/src/mcecomdisplaysink.cpp
natfw/natfwconnectionmultiplexer/src/cncmconnectionobserverhandler.cpp
--- a/ipappsrv_plat/media_control_api/inc/mmccinterfacedef.h	Fri May 14 15:11:40 2010 +0300
+++ b/ipappsrv_plat/media_control_api/inc/mmccinterfacedef.h	Fri May 28 16:08:43 2010 +0300
@@ -104,6 +104,12 @@
 class TMccVideoSinkSetting
 {
 public:
+    TMccVideoSinkSetting() : iLocation(0,0), iSize(0,0), iVideoPayloadType(0), 
+        iAudioPayloadType(0), iIAPId(0), iDeviceIndex(0), iWindowOrdinalPosition(0),
+        iWindowOrdinalPriority(0), iRotation(EMccNone), iVideoFrameRate(0.0), iEnabled(ETrue)
+        {
+        }
+        
     TPoint iLocation;
     TSize iSize;
     TUint iVideoPayloadType;
@@ -115,6 +121,7 @@
 	TInt iWindowOrdinalPriority;
 	TMccVideoRotation iRotation;	
 	TReal iVideoFrameRate;
+	TBool iEnabled;
 };
 
 typedef TPckgBuf<TMccVideoSinkSetting> TMccVideoSinkSettingBuf;    
--- a/ipappsrv_plat/multimedia_comms_api/inc/mcefilesink.h	Fri May 14 15:11:40 2010 +0300
+++ b/ipappsrv_plat/multimedia_comms_api/inc/mcefilesink.h	Fri May 28 16:08:43 2010 +0300
@@ -23,7 +23,7 @@
 
 // INCLUDES
 #include <e32std.h>  
-#include <MceMediaSink.h>
+#include <mcemediasink.h>
 
 // FORWARD DECLARATIONS
 
--- a/ipappsrv_plat/multimedia_comms_api/inc/mcertpsink.h	Fri May 14 15:11:40 2010 +0300
+++ b/ipappsrv_plat/multimedia_comms_api/inc/mcertpsink.h	Fri May 28 16:08:43 2010 +0300
@@ -23,7 +23,7 @@
 
 // INCLUDES
 #include <e32std.h>  
-#include <MceMediaSink.h>
+#include <mcemediasink.h>
 
 // CONSTANTS
 const TMceSinkType KMceRTPSink = 1;
--- a/multimediacommscontroller/mmcccontroller/src/mcccamerahandler.cpp	Fri May 14 15:11:40 2010 +0300
+++ b/multimediacommscontroller/mmcccontroller/src/mcccamerahandler.cpp	Fri May 28 16:08:43 2010 +0300
@@ -150,6 +150,10 @@
     
     iViewFinderSettings = aSetting;
     
+    if ( !iViewFinderSettings.iEnabled ){
+        __CONTROLLER( "CMccCameraHandler::EnableViewFinderL, param update, exit" )
+        return;
+    }
     __CONTROLLER( "CMccCameraHandler::EnableViewFinderL, starting vf" )
 
     CCamera* cam = IsCameraReady() ? iCamera : NULL;
@@ -217,8 +221,9 @@
 	                       iViewFinderSettings.iSize.iWidth)
     __CONTROLLER_INT2( "CMccCameraHandler::GetViewFinderSettingsL, location",  
 	                       iViewFinderSettings.iLocation.iX, 
-	                       iViewFinderSettings.iLocation.iY)
-    aSetting = iViewFinderSettings;    
+	                       iViewFinderSettings.iLocation.iY)               
+    aSetting = iViewFinderSettings;  
+    aSetting.iEnabled = iViewFinderEnabled;
     __CONTROLLER( "CMccCameraHandler::GetViewFinderSettingsL,exit" )
     }
 
--- a/multimediacommscontroller/mmcccontroller/tsrc/ut_controller/src/UT_CMccCameraHandler.cpp	Fri May 14 15:11:40 2010 +0300
+++ b/multimediacommscontroller/mmcccontroller/tsrc/ut_controller/src/UT_CMccCameraHandler.cpp	Fri May 28 16:08:43 2010 +0300
@@ -286,6 +286,22 @@
     iCameraHandler->GetViewFinderSettingsL( settings2 );
     EUNIT_ASSERT_EQUALS( settings2.iSize.iWidth, 0 );
     EUNIT_ASSERT( iCameraHandler->iCamera->iVfStarted == EFalse )
+    
+    // Check that iEnabled in settings is handled correctly
+    iCameraHandler->iViewFinderEnabled = EFalse;
+    settings.iEnabled = EFalse;
+    iCameraHandler->EnableViewFinderL( settings );
+    EUNIT_ASSERT( iCameraHandler->iViewFinderEnabled == EFalse )
+    EUNIT_ASSERT( iCameraHandler->iCamera->iVfStarted == EFalse )
+    iCameraHandler->GetViewFinderSettingsL( settings2 );
+    EUNIT_ASSERT( settings2.iEnabled == EFalse )
+    
+    settings.iEnabled = ETrue;
+    iCameraHandler->EnableViewFinderL( settings );
+    EUNIT_ASSERT( iCameraHandler->iViewFinderEnabled == ETrue )
+    EUNIT_ASSERT( iCameraHandler->iCamera->iVfStarted == EFalse )
+    iCameraHandler->GetViewFinderSettingsL( settings2 );
+    EUNIT_ASSERT( settings2.iEnabled == ETrue )
     }
 
 void UT_CMccCameraHandler::UT_CMccCameraHandler_DisableViewFinderL()
--- a/multimediacommsengine/mmceshared/src/mcecomamrwbcodec.cpp	Fri May 14 15:11:40 2010 +0300
+++ b/multimediacommsengine/mmceshared/src/mcecomamrwbcodec.cpp	Fri May 28 16:08:43 2010 +0300
@@ -315,7 +315,6 @@
                   ( mceBitrates && mccBitrates == 0 ||
 	                mceBitrates < mccBitrates );
 	
-	User::LeaveIfError( notValid ? KErrNotSupported : KErrNone );
 	if ( aMccCodec.CodecMode() != (TCodecMode)iCodecMode )
 		{
 		// codec-mode was different, fail.
--- a/multimediacommsengine/mmceshared/src/mcecomdisplaysink.cpp	Fri May 14 15:11:40 2010 +0300
+++ b/multimediacommsengine/mmceshared/src/mcecomdisplaysink.cpp	Fri May 28 16:08:43 2010 +0300
@@ -347,6 +347,7 @@
     displaySetting.iWindowOrdinalPosition = 1;
     displaySetting.iWindowOrdinalPriority = iPriority;
     displaySetting.iRotation = EMccNone;
+    displaySetting.iEnabled = ETrue;
     
     if ( aCodec.Stream() && aCodec.Stream()->iType == KMceVideo )
         {
--- a/natfw/natfwconnectionmultiplexer/src/cncmconnectionobserverhandler.cpp	Fri May 14 15:11:40 2010 +0300
+++ b/natfw/natfwconnectionmultiplexer/src/cncmconnectionobserverhandler.cpp	Fri May 28 16:08:43 2010 +0300
@@ -260,20 +260,25 @@
         const TInt KRtpRtcpDiffByteOffset( 1 );
         const TInt KLowestAssignedRtcpMsgType = 200;
         const TInt KHighestAssignedRtcpMsgType = 209;
+        TInt rtcpType = aMessage[KRtpRtcpDiffByteOffset];
         TBool isRtcp = 
-           ( KLowestAssignedRtcpMsgType <= aMessage[KRtpRtcpDiffByteOffset] &&
-            aMessage[KRtpRtcpDiffByteOffset] <= KHighestAssignedRtcpMsgType );
+           ( KLowestAssignedRtcpMsgType <= rtcpType &&
+        		   rtcpType <= KHighestAssignedRtcpMsgType );
         
-        // This offset refers either to SR RTP timestamp or RR highest 
-        // sequence number received. These are unique for a distinct 
-        // RTCP packet.
-        const TInt KRtcpDiffByteOffset( 19 );
+        // This offset refers to RR highest sequence number received.
+        const TInt KRRtcpDiffByteOffset( 19 );
+        
+        // This offset refers either to SR RTP packet count received.
+        const TInt KSRtcpDiffByteOffset( 23 );
         
         // This offset refers to lower byte of unique RTP sequence number.
         const TInt KRtpDiffByteOffset( 3 );
         TInt diffByteOffset 
-            = isRtcp ? KRtcpDiffByteOffset : KRtpDiffByteOffset;
+            = isRtcp ? KRRtcpDiffByteOffset : KRtpDiffByteOffset;
 
+        diffByteOffset = (rtcpType == KLowestAssignedRtcpMsgType)?
+        		KSRtcpDiffByteOffset : diffByteOffset;
+        
         if ( diffByteOffset < aMessage.Size() )
             {
             hash = aMessage[diffByteOffset];
@@ -294,14 +299,12 @@
             }
         else
             {
-            isDuplicate = EFalse;
-            }
-        
-        iLatestHashes.Append( hash );
-        const TInt KMaxHashCount( 5 );
-        if ( KMaxHashCount <= iLatestHashes.Count() )
-            {
-            iLatestHashes.Remove( 0 );
+            iLatestHashes.Append( hash );
+            const TInt KMaxHashCount( 5 );
+            if ( KMaxHashCount <= iLatestHashes.Count() )
+                {
+                iLatestHashes.Remove( 0 );
+                }
             }
         }
     else