mmsharing/mmshengine/src/musenglivesession.cpp
branchRCL_3
changeset 21 ce86b6d44a6d
parent 6 c47a75a8cd72
child 32 73a1feb507fb
equal deleted inserted replaced
19:95754dcd27ad 21:ce86b6d44a6d
    22 #include "musenglivesessionobserver.h"
    22 #include "musenglivesessionobserver.h"
    23 #include "musunittesting.h"
    23 #include "musunittesting.h"
    24 #include "musengmceutils.h"
    24 #include "musengmceutils.h"
    25 #include "musenglogger.h"
    25 #include "musenglogger.h"
    26 #include "mussettings.h"
    26 #include "mussettings.h"
       
    27 #include "musengorientationhandler.h"
    27 
    28 
    28 // SYSTEM
    29 // SYSTEM
    29 #include <mcemanager.h>
    30 #include <mcemanager.h>
    30 #include <mcecamerasource.h>
    31 #include <mcecamerasource.h>
    31 #include <mcevideostream.h>
    32 #include <mcevideostream.h>
   111 // -----------------------------------------------------------------------------
   112 // -----------------------------------------------------------------------------
   112 //
   113 //
   113 CMusEngLiveSession::~CMusEngLiveSession()
   114 CMusEngLiveSession::~CMusEngLiveSession()
   114     {
   115     {
   115     MUS_LOG( "mus: [ENGINE]  -> CMusEngLiveSession::~CMusEngLiveSession()" )
   116     MUS_LOG( "mus: [ENGINE]  -> CMusEngLiveSession::~CMusEngLiveSession()" )
       
   117         
       
   118     delete iOrientationHandler;
       
   119     
   116     MUS_LOG( "mus: [ENGINE]  <- CMusEngLiveSession::~CMusEngLiveSession()" )
   120     MUS_LOG( "mus: [ENGINE]  <- CMusEngLiveSession::~CMusEngLiveSession()" )
   117     }
   121     }
   118 
   122 
   119 
   123 
   120 // -----------------------------------------------------------------------------
   124 // -----------------------------------------------------------------------------
   567         }
   571         }
   568     else
   572     else
   569         {
   573         {
   570         MUS_LOG( "mus: [ENGINE]    Camera already enabled, ignore request" )
   574         MUS_LOG( "mus: [ENGINE]    Camera already enabled, ignore request" )
   571         }
   575         }
       
   576     
       
   577     iOrientationHandler->UpdateL();
   572         
   578         
   573     MUS_LOG( "mus: [ENGINE]  <- CMusEngLiveSession::PlayL()" )
   579     MUS_LOG( "mus: [ENGINE]  <- CMusEngLiveSession::PlayL()" )
   574     }
   580     }
   575 
   581 
   576 
   582 
   593     else
   599     else
   594         {
   600         {
   595         MUS_LOG( "mus: [ENGINE]    Camera already disabled, ignore request" )
   601         MUS_LOG( "mus: [ENGINE]    Camera already disabled, ignore request" )
   596         }
   602         }
   597 
   603 
       
   604     iOrientationHandler->UpdateL();
       
   605     
   598     MUS_LOG( "mus: [ENGINE]  <- CMusEngLiveSession::PauseL()" )
   606     MUS_LOG( "mus: [ENGINE]  <- CMusEngLiveSession::PauseL()" )
   599     }
   607     }
   600 
   608 
   601 
   609 
   602 // -----------------------------------------------------------------------------
   610 // -----------------------------------------------------------------------------
   607     {
   615     {
   608     __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
   616     __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
   609     
   617     
   610     return ( MusEngMceUtils::GetCameraL( *iSession )->IsEnabled() );
   618     return ( MusEngMceUtils::GetCameraL( *iSession )->IsEnabled() );
   611     }
   619     }
   612     
   620 
       
   621 // -----------------------------------------------------------------------------
       
   622 //
       
   623 // -----------------------------------------------------------------------------
       
   624 //
       
   625 void CMusEngLiveSession::EnableDisplayL( TBool aEnable )
       
   626 {
       
   627     CMusEngMceSession::EnableDisplayL( aEnable );
       
   628     iOrientationHandler->UpdateL();
       
   629 }
       
   630     
       
   631 // -----------------------------------------------------------------------------
       
   632 //
       
   633 // -----------------------------------------------------------------------------
       
   634 //
       
   635 void CMusEngLiveSession::RefreshOrientationL()
       
   636     {
       
   637     MUS_LOG( "mus: [ENGINE]  -> CMusEngLiveSession::RefreshOrientationL()" )
       
   638         
       
   639     iOrientationHandler->RefreshOrientationL();
       
   640         
       
   641     MUS_LOG( "mus: [ENGINE]  <- CMusEngLiveSession::RefreshOrientationL()" )
       
   642     }
   613 
   643 
   614 // -----------------------------------------------------------------------------
   644 // -----------------------------------------------------------------------------
   615 //
   645 //
   616 // -----------------------------------------------------------------------------
   646 // -----------------------------------------------------------------------------
   617 //
   647 //
   886     {
   916     {
   887     MUS_LOG( "mus: [ENGINE]  -> CMusEngLiveSession::ConstructL()" )
   917     MUS_LOG( "mus: [ENGINE]  -> CMusEngLiveSession::ConstructL()" )
   888 
   918 
   889     CMusEngMceOutSession::ConstructL( aSipProfileId );
   919     CMusEngMceOutSession::ConstructL( aSipProfileId );
   890 
   920 
       
   921     iOrientationHandler = CMusEngOrientationHandler::NewL( *this, iLiveSessionObserver );
       
   922     
   891     MUS_LOG( "mus: [ENGINE]  <- CMusEngLiveSession::ConstructL()" )
   923     MUS_LOG( "mus: [ENGINE]  <- CMusEngLiveSession::ConstructL()" )
   892     }
   924     }
   893 
   925 
   894 
   926 
   895 // -----------------------------------------------------------------------------
   927 // -----------------------------------------------------------------------------