tsrc/musenginestub/src/musenglivesession.cpp
branchRCL_3
changeset 33 bc78a40cd63c
parent 32 73a1feb507fb
--- a/tsrc/musenginestub/src/musenglivesession.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/tsrc/musenginestub/src/musenglivesession.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -18,49 +18,36 @@
 
 // USER
 #include "musenglivesession.h"
-#include "musengsessionobserver.h"
 #include "musenglivesessionobserver.h"
-#include "musunittesting.h"
-#include "musengmceutils.h"
-#include "musenglogger.h"
-#include "mussessionproperties.h"
+//#include "musunittesting.h"
+//#include "musengmceutils.h"
 
 // SYSTEM
-#include <mcemanager.h>
+/*
 #include <mcecamerasource.h>
 #include <mcevideostream.h>
 #include <mcertpsink.h>
 #include <mcedisplaysink.h>
-#include <mcefilesink.h>
 #include <mcesession.h>
 #include <mcevideocodec.h>
-#include <mceh263codec.h>
-#include <mceavccodec.h>
+*/
 
 
-// Names of AVC levels in string for config keys stored in CenRep 
-_LIT8( KMusAvcBitrateLevel1, "AvcBrL1=" );
-_LIT8( KMusAvcBitrateLevel1b, "AvcBrL1b=" );
-_LIT8( KMusAvcBitrateLevel1_1, "AvcBrL1_1=" );
-_LIT8( KMusAvcBitrateLevel1_2, "AvcBrL1_2=" );
-_LIT8( KMusAvcBitrateLevel1_3, "AvcBrL1_3=" );
-_LIT8( KMusAvcBitrateLevel2, "AvcBrL2=" );
-
-_LIT8( KMusEncoderInfoTokenizer, ";" );
-
-
-const TInt KMaxDispName = 512;
 
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //
-CMusEngLiveSession* CMusEngLiveSession::NewL(
-                        const TDesC& aFileName,
-                        const TRect& aRect )
+EXPORT_C CMusEngLiveSession* CMusEngLiveSession::NewL(
+                    const TDesC& /*aFileName*/,
+                    const TRect& aRect,
+                    MMusEngLiveSessionObserver* aSessionObserver,
+                    TUint aSipProfileId )
     {
-    CMusEngLiveSession* self = new( ELeave ) CMusEngLiveSession( aRect,
-                                                                 aFileName );
+    CMusEngLiveSession* self = new( ELeave ) CMusEngLiveSession(
+                                                    aSessionObserver,
+                                                    aRect,
+                                                    aSipProfileId );
     CleanupStack::PushL( self );
     self->ConstructL();
     CleanupStack::Pop( self );
@@ -72,10 +59,15 @@
 //
 // -----------------------------------------------------------------------------
 //
-CMusEngLiveSession* CMusEngLiveSession::NewL(
-                        const TRect& aRect )
+EXPORT_C CMusEngLiveSession* CMusEngLiveSession::NewL(
+                        const TRect& aRect,
+                        MMusEngLiveSessionObserver* aSessionObserver,
+                        TUint aSipProfileId )
     {
-    CMusEngLiveSession* self = new( ELeave ) CMusEngLiveSession( aRect );
+    CMusEngLiveSession* self = new( ELeave ) CMusEngLiveSession(
+                                                    aSessionObserver,
+                                                    aRect,
+                                                    aSipProfileId);
     CleanupStack::PushL( self );
     self->ConstructL();
     CleanupStack::Pop( self );
@@ -89,322 +81,15 @@
 //
 CMusEngLiveSession::~CMusEngLiveSession()
     {
-    delete iRemoteDisplayName;
-    }
-
-
-
-// -----------------------------------------------------------------------------
-// From MLcSession
-// -----------------------------------------------------------------------------
-//
-void CMusEngLiveSession::EstablishLcSessionL()
-    {
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcSession
-// -----------------------------------------------------------------------------
-//
-MLcVideoPlayer* CMusEngLiveSession::LocalVideoPlayer()
-    {
-    return this;
-    }
-    
- 
-    
-// -----------------------------------------------------------------------------
-// From MLcSession
-// -----------------------------------------------------------------------------
-//
- 
-const TDesC& CMusEngLiveSession::RemoteDisplayName()
- 	{
-    return *iRemoteDisplayName;
- 	}
-
-
-
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-MLcVideoPlayer::TLcVideoPlayerState CMusEngLiveSession::LcVideoPlayerState() const
-    {
-    TLcVideoPlayerState vidPlayerState = MLcVideoPlayer::EUnavailable;
-    return vidPlayerState;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-TBool CMusEngLiveSession::LcIsPlayingL()
-    {
-    return iPlaying;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-void CMusEngLiveSession::LcPlayL()
-    {
-    iPlaying = ETrue;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-void CMusEngLiveSession::LcPauseL()
-    {
-    iPlaying = EFalse;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-MLcWindow* CMusEngLiveSession::LcWindow()
-    {
-    return this;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-MLcCameraControl* CMusEngLiveSession::LcCameraControl()
-    {
-    return this;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-MLcFileControl* CMusEngLiveSession::LcSourceFile()
-    {
-    return NULL;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-MLcFileControl* CMusEngLiveSession::LcDestinationFile()
-    {
-    return this;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-MLcAudioControl* CMusEngLiveSession::LcAudioControl()
-    {
-    return this;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-MLcZoomControl* CMusEngLiveSession::LcZoomControl()
-    {
-    return this;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-MLcBrightnessControl* CMusEngLiveSession::LcBrightnessControl()
-    {
-    return this;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-RPointerArray< MLcValueControl >& CMusEngLiveSession::LcExtensionControls()
-    {
-    return iValueControls;
     }
 
-// -----------------------------------------------------------------------------
-// From MLcCameraControl
-// -----------------------------------------------------------------------------
-//
-TInt CMusEngLiveSession::LcCameraCountL()
-    {
-    return 1;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcCameraControl
-// -----------------------------------------------------------------------------
-//
-void CMusEngLiveSession::ToggleLcCameraL()
-    {
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcBrightnessControl
-// -----------------------------------------------------------------------------
-//
-TInt CMusEngLiveSession::MinLcBrightnessL()
-    {
-    return iCurrentBrighness;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcBrightnessControl
-// -----------------------------------------------------------------------------
-//
-TInt CMusEngLiveSession::MaxLcBrightnessL()
-    {
-    return iCurrentBrighness;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcBrightnessControl
-// -----------------------------------------------------------------------------
-//
-TInt CMusEngLiveSession::LcBrightnessL()
-    {
-    return iCurrentBrighness;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcBrightnessControl
-// -----------------------------------------------------------------------------
-//
-void CMusEngLiveSession::SetLcBrightnessL( TInt aValue )
-    {
-    iCurrentBrighness = aValue;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcBrightnessControl
-// -----------------------------------------------------------------------------
-//
-void CMusEngLiveSession::IncreaseLcBrightnessL()
-    {
-    iCurrentBrighness++;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcBrightnessControl
-// -----------------------------------------------------------------------------
-//
-void CMusEngLiveSession::DecreaseLcBrightnessL()
-    {
-    iCurrentBrighness--;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcZoomControl
-// -----------------------------------------------------------------------------
-//
-TInt CMusEngLiveSession::MinLcZoomL()
-    {
-    return iCurrentZoom;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcZoomControl
-// -----------------------------------------------------------------------------
-//
-TInt CMusEngLiveSession::MaxLcZoomL()
-    {
-    return iCurrentZoom;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcZoomControl
-// -----------------------------------------------------------------------------
-//
-TInt CMusEngLiveSession::LcZoomValueL()
-    {
-    return iCurrentZoom;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcZoomControl
-// -----------------------------------------------------------------------------
-//
-void CMusEngLiveSession::SetLcZoomValueL( TInt aValue )
-    {
-    iCurrentZoom = aValue;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcZoomControl
-// -----------------------------------------------------------------------------
-//
-void CMusEngLiveSession::LcZoomInL()
-    {
-    iCurrentZoom++;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcZoomControl
-// -----------------------------------------------------------------------------
-//
-void CMusEngLiveSession::LcZoomOutL()
-    {
-    iCurrentZoom--;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcFileControl
-// -----------------------------------------------------------------------------
-//
-void CMusEngLiveSession::EnableLcFileL( TBool aEnable )
-    {
-    iFileEnabled = aEnable;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcFileControl
-// -----------------------------------------------------------------------------
-//
-TBool CMusEngLiveSession::IsLcFileEnabled()
-    {
-    return iFileEnabled;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcFileControl
-// -----------------------------------------------------------------------------
-//
-void CMusEngLiveSession::SetLcFileNameL( const TFileName& aFileName )
-    {
-    iRecordedFile = aFileName;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcFileControl
-// -----------------------------------------------------------------------------
-//
-TFileName& CMusEngLiveSession::LcFileName()
-    {
-    return iRecordedFile;
-    }
 
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //
-CMusEngLiveSession::CMusEngLiveSession(
-                        const TRect& aRect, 
-                        const TDesC& aRecordedFile )
-    : CMusEngMceOutSession( aRect ),
-      iRecordedFile( aRecordedFile )
+EXPORT_C void CMusEngLiveSession::SetSessionObserver(
+                        MMusEngLiveSessionObserver* aSessionObserver )
     {
     }
 
@@ -413,13 +98,114 @@
 //
 // -----------------------------------------------------------------------------
 //
-void CMusEngLiveSession::ConstructL()
+EXPORT_C TInt CMusEngLiveSession::CurrentZoomL() const
+    {
+    return iCurrentZoom;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt CMusEngLiveSession::MaxZoomL() const
+    {
+    return iCurrentZoom;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt CMusEngLiveSession::MinZoomL() const
+    {
+    return iCurrentZoom;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMusEngLiveSession::ZoomInL()
+    {
+    iCurrentZoom++;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMusEngLiveSession::ZoomOutL()
+    {
+    iCurrentZoom--;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMusEngLiveSession::ZoomDefaultL()
     {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngLiveSession::ConstructL()" )
-    
-    CMusEngMceOutSession::ConstructL();
-        
-    iRemoteDisplayName = HBufC::NewL( KMaxDispName );
+    }
+
+
+// -----------------------------------------------------------------------------
+// Enable camera
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMusEngLiveSession::PlayL()
+    {
+    iPlaying = ETrue;
+    }
+
+
+// -----------------------------------------------------------------------------
+// Disable camera
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMusEngLiveSession::PauseL()
+    {
+    iPlaying = EFalse;
+    }
+
 
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngLiveSession::ConstructL()" )
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusEngLiveSession::CompleteSessionStructureL()
+    {
     }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusEngLiveSession::CMusEngLiveSession(
+                        MMusEngLiveSessionObserver* aSessionObserver,
+                        const TRect& aRect,
+                        TUint aSipProfileId )
+    :CMusEngMceOutSession( aRect, aSipProfileId ),
+     iDefaultZoomFactor( -1 )
+    {
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusEngLiveSession::ConstructL( /*const TDesC& aFileName*/ )
+    {
+    }
+
+
+
+
+
+