mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/inc/musengtwowayrecvsession.h
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 #ifndef MUSHENGTWOWAYRECVSESSION_H
       
    20 #define MUSHENGTWOWAYRECVSESSION_H
       
    21 
       
    22 // USER
       
    23 #include "musengreceivesession.h"
       
    24 #include "musunittesting.h"
       
    25 #include "mussettings.h"
       
    26 #include "musengcamerahandler.h"
       
    27 
       
    28 // SYSTEM
       
    29 #include <ecam.h>
       
    30 
       
    31 // FORWARD DECLARATIONS
       
    32 class CMceDisplaySink;
       
    33 class CMceStreamBundle;
       
    34 class CMusEngLiveVideoPlayer;
       
    35 
       
    36 
       
    37 class CMusEngTwoWayRecvSession : public CMusEngReceiveSession
       
    38     {
       
    39     MUS_UNITTEST( UT_CMusEngTwoWayRecvSession )
       
    40 
       
    41     
       
    42     public:
       
    43         /**
       
    44         * Creates new MultimediaSharing two-way receive session.
       
    45         * @return CMusEngTwoWayRecvSession* New instanse of specified class
       
    46         */
       
    47         static CMusEngTwoWayRecvSession* NewL();
       
    48 
       
    49     public:
       
    50 
       
    51         /**
       
    52         * Destructor
       
    53         */
       
    54         ~CMusEngTwoWayRecvSession();
       
    55 
       
    56     public:
       
    57         
       
    58         void EnableDisplayL( TBool aEnable );
       
    59 
       
    60         CMusEngMceSession::TDisplayOrientation OrientationL();
       
    61         
       
    62         void SetOrientationL( TDisplayOrientation aOrientation );
       
    63         
       
    64     public:
       
    65         
       
    66         /**
       
    67         * Sets both remote (receiving video) and local (viewfinder) rects.
       
    68         * 
       
    69         */
       
    70         void SetRectsL( const TRect& aRemoteRect,
       
    71                                  const TRect& aLocalRect );
       
    72    
       
    73         /**
       
    74         * Gets camera handler (can be used for zooming etc.) 
       
    75         */
       
    76         TMusEngCameraHandler& Camera();
       
    77  
       
    78     public: // from MLcSession
       
    79     
       
    80         MLcVideoPlayer* LocalVideoPlayer();        
       
    81         
       
    82     protected: // From CMusEngReceiveSession
       
    83         
       
    84         /**
       
    85         * Sets local rect (viewfinder).
       
    86         * 
       
    87         */
       
    88         void SetSecondaryRectL( const TRect& aSecondaryRect );
       
    89         
       
    90         /**
       
    91         * Gets local rect (viewfinder).
       
    92         * 
       
    93         */
       
    94         TRect SecondaryRect() const;
       
    95         
       
    96         void CompleteSessionStructureL();
       
    97         
       
    98         void RectChangedL();
       
    99    
       
   100     private:
       
   101 
       
   102         /**
       
   103         * Constructor
       
   104         */
       
   105         CMusEngTwoWayRecvSession();
       
   106 
       
   107         /**
       
   108         * Second-phase constructor
       
   109         */
       
   110         void ConstructL();
       
   111         
       
   112     private:
       
   113         
       
   114         void CompleteSessionStructureAudioPartL( 
       
   115                    const RPointerArray<CMceMediaStream>& aStreams, 
       
   116                    CMceStreamBundle& aLocalBundle, 
       
   117                    CMceMediaStream* aVideoInStream,
       
   118                    CMceMediaStream* aVideoOutStream );
       
   119           
       
   120         void CompleteSessionStructureInStreamL( CMceMediaStream& aVideoInStream, 
       
   121                                                 CMceStreamBundle& aLocalBundle );
       
   122           
       
   123         void CompleteSessionStructureOutStreamL( CMceMediaStream& aVideoOutStream );
       
   124         
       
   125 
       
   126     private:
       
   127         
       
   128         TRect iLocalRect;
       
   129         
       
   130         TMusEngCameraHandler iCameraHandler;
       
   131         
       
   132         /// The live video player implementing MLcVideoPlayer
       
   133         CMusEngLiveVideoPlayer* iLiveVideoPlayer;  
       
   134         
       
   135         TRect iSetRemoteRect;
       
   136         TRect iSetLocalRect;
       
   137        
       
   138     };
       
   139 
       
   140 #endif
       
   141