mmsharing/livecommsui/lcui/tsrc/ipvtengine/src/musengtwowaysession.cpp
branchRCL_3
changeset 33 bc78a40cd63c
parent 32 73a1feb507fb
child 35 6c57ef9392d2
equal deleted inserted replaced
32:73a1feb507fb 33:bc78a40cd63c
     1 /*
       
     2 * Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 // USER
       
    20 #include "musengtwowaysession.h"
       
    21 #include "lcsessionobserver.h"
       
    22 #include "musenglogger.h"
       
    23 #include "musengremotevideoplayer.h"
       
    24 #include "musenglivevideoplayer.h"
       
    25 #include "svptimer.h"
       
    26 
       
    27 
       
    28 const TInt KMusEngJitterBufferLength = 51; //Must be bigger than treshold
       
    29 // Using following value increases treshold buffer to 1 second from 
       
    30 // default 100 ms
       
    31 const TInt KMusEngJitterBufferTreshold = 50;
       
    32 
       
    33 const TUint32 KMusEngTwoWayReceivingActivityTimeout = 5000; // 5 seconds
       
    34 // 6 seconds keepalive timer, needs to be more than receiving timeout
       
    35 const TUint8 KMusEngTwoWayRtpKeepAliveTimer = 6;
       
    36 
       
    37 //Uncomment this for MT Simulation.
       
    38 //#define MT_Simulation
       
    39 
       
    40 // -----------------------------------------------------------------------------
       
    41 //
       
    42 // -----------------------------------------------------------------------------
       
    43 //
       
    44 CMusEngTwoWaySession* CMusEngTwoWaySession::NewL()
       
    45     {
       
    46     CMusEngTwoWaySession* self = new( ELeave )CMusEngTwoWaySession();
       
    47     CleanupStack::PushL( self );
       
    48     self->ConstructL();
       
    49     CleanupStack::Pop( self );
       
    50     return self;
       
    51     }
       
    52 
       
    53 // -----------------------------------------------------------------------------
       
    54 //
       
    55 // -----------------------------------------------------------------------------
       
    56 //
       
    57 CMusEngTwoWaySession::~CMusEngTwoWaySession()
       
    58     {
       
    59     MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWaySession::~CMusEngTwoWaySession()" )
       
    60     
       
    61     MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWaySession::~CMusEngTwoWaySession()" )
       
    62     }
       
    63 
       
    64 // -----------------------------------------------------------------------------
       
    65 // 
       
    66 // -----------------------------------------------------------------------------
       
    67 //
       
    68 void CMusEngTwoWaySession::EnableDisplayL( TBool aEnable )
       
    69     {
       
    70     MUS_LOG1( "mus: [ENGINE]     -> CMusEngTwoWaySession::EnableDisplayL() %d", 
       
    71               aEnable )
       
    72         
       
    73     MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWaySession::EnableDisplayL()")
       
    74     }
       
    75 
       
    76 // -----------------------------------------------------------------------------
       
    77 //
       
    78 // -----------------------------------------------------------------------------
       
    79 //        
       
    80 void CMusEngTwoWaySession::SetOrientationL( TDisplayOrientation aOrientation )
       
    81     {
       
    82     MUS_LOG1( "mus: [ENGINE]  -> CMusEngTwoWaySession::SetOrientationL() %d", 
       
    83               aOrientation )
       
    84                   
       
    85 
       
    86     MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWaySession::SetOrientationL()" )
       
    87     }
       
    88 
       
    89 
       
    90 // -----------------------------------------------------------------------------
       
    91 //
       
    92 // -----------------------------------------------------------------------------
       
    93 //
       
    94 void CMusEngTwoWaySession::SetRectsL( 
       
    95     const TRect& aRemoteRect,
       
    96     const TRect& aLocalRect )
       
    97     {
       
    98     MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWaySession::SetRectsL()" )  
       
    99          
       
   100     MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWaySession::SetRectsL()" )
       
   101     }
       
   102 
       
   103 
       
   104 // -----------------------------------------------------------------------------
       
   105 //
       
   106 // -----------------------------------------------------------------------------
       
   107 //
       
   108 CMusEngTwoWaySession::CMusEngTwoWaySession() 
       
   109     : CMusEngMceSession()
       
   110     {
       
   111     }
       
   112 
       
   113 // -----------------------------------------------------------------------------
       
   114 //
       
   115 // -----------------------------------------------------------------------------
       
   116 //
       
   117 void CMusEngTwoWaySession::ConstructL()
       
   118     {
       
   119     MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWaySession::ConstructL()" )
       
   120     
       
   121     CMusEngMceSession::ConstructL();
       
   122     
       
   123     MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWaySession::ConstructL()" )
       
   124     }
       
   125 
       
   126 // -----------------------------------------------------------------------------
       
   127 // 
       
   128 // -----------------------------------------------------------------------------
       
   129 //
       
   130 void CMusEngTwoWaySession::EstablishLcSessionL()
       
   131     {
       
   132     MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWaySession::EstablishLcSessionL" )
       
   133 
       
   134     #ifdef MT_Simulation
       
   135     if ( LcSessionState() != MLcSession::EReceived ) {
       
   136     iTimer->SetTime(2000, 14);
       
   137     } else {
       
   138     iTimer->SetTime(2000, 1);
       
   139     }
       
   140     #else
       
   141     
       
   142     iTimer->SetTime(2000, 1);
       
   143     #endif
       
   144     MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWaySession::EstablishLcSessionL" )
       
   145     }
       
   146 
       
   147 // -----------------------------------------------------------------------------
       
   148 // 
       
   149 // -----------------------------------------------------------------------------
       
   150 //
       
   151 void CMusEngTwoWaySession::TerminateLcSessionL()
       
   152     {
       
   153     MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWaySession::TerminateLcSessionL" )
       
   154     
       
   155     MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWaySession::TerminateLcSessionL" )
       
   156     }
       
   157 
       
   158 // -----------------------------------------------------------------------------
       
   159 // 
       
   160 // -----------------------------------------------------------------------------
       
   161 //
       
   162 void CMusEngTwoWaySession::UpdateLcSessionL()
       
   163     {     
       
   164     MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWaySession::UpdateLcSessionL" )
       
   165     
       
   166     MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWaySession::UpdateLcSessionL" )
       
   167     }
       
   168     
       
   169 // End of file