multimediacommscontroller/mmccsubcontroller/inc/mccsymulstream.h
changeset 0 1bce908db942
child 49 64c62431ac08
equal deleted inserted replaced
-1:000000000000 0:1bce908db942
       
     1 /*
       
     2 * Copyright (c) 2004 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:    Provides a uplink stream for symmetric subthread
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef MCCSYMULSTREAM_H
       
    21 #define MCCSYMULSTREAM_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include "mccsymstreambase.h"
       
    25 
       
    26 // CONSTANTS
       
    27 
       
    28 // MACROS
       
    29 
       
    30 // DATA TYPES
       
    31 
       
    32 // FUNCTION PROTOTYPES
       
    33 
       
    34 // FORWARD DECLARATIONS
       
    35 class CMMFFormatEncode;
       
    36 class MMccResources;
       
    37 
       
    38 // CLASS DECLARATION
       
    39 
       
    40 /**
       
    41 *  Mcc Symmetric subthread uplink stream
       
    42 *
       
    43 *  @lib Mccsubthreads.lib
       
    44 *  @since Series 60 3.0
       
    45 */
       
    46 #ifdef EKA2
       
    47 NONSHARABLE_CLASS( CMccSymUlStream ) : public CMccSymStreamBase
       
    48 #else
       
    49 class CMccSymUlStream : public CMccSymStreamBase
       
    50 #endif
       
    51     {
       
    52     public:  // Constructors and destructor
       
    53         
       
    54         /**
       
    55         * Static constructor
       
    56         */
       
    57         static CMccSymUlStream* NewLC( TUint32 aMccStreamId, 
       
    58                                        MAsyncEventHandler* aEventhandler, 
       
    59                                        MMccResources* aMccResources,
       
    60                                        CMccRtpManager* aManager, 
       
    61                                        TFourCC aFourCC,
       
    62                                        TInt aStreamType,
       
    63                                        CMccRtpMediaClock& aClock );
       
    64         
       
    65         /**
       
    66         * Destructor.
       
    67         */
       
    68         virtual ~CMccSymUlStream();
       
    69 
       
    70     public: // New functions
       
    71 
       
    72     public: // Functions from base classes
       
    73 
       
    74         /**
       
    75         * From CMccSymStreamBase
       
    76         */
       
    77         void SetPrioritySettingsL( const TMMFPrioritySettings& aPriority );
       
    78         
       
    79         /**
       
    80         * From CMccSymStreamBase
       
    81         */
       
    82         void AddSinkAndSourceL( MDataSink* aDatasink, 
       
    83                 MDataSource* aDatasource );
       
    84                 
       
    85         /**
       
    86         * From CMccSymStreamBase
       
    87         */      
       
    88         void LoadCodecL( const TMccCodecInfo& aCodecInfo,
       
    89                          const TDesC8& aFmtp );
       
    90         
       
    91         void UpdateCodecInformationL( TMccCodecInfo& aCodecInfo );
       
    92         /**
       
    93         * From CMccSymStreamBase
       
    94         */
       
    95         void PrimeL( const TUint32 aEndpointId );
       
    96         
       
    97         /**
       
    98         * From CMccSymStreamBase
       
    99         */
       
   100         void PlayL( const TUint32 aEndpointId,
       
   101         			TBool aStreamPaused, 
       
   102                     TBool aEnableRtcp );
       
   103         
       
   104         /**
       
   105         * From CMccSymStreamBase
       
   106         */
       
   107         void PauseL( const TUint32 aEndpointId,
       
   108         			 TBool aEnableRtcp );
       
   109         
       
   110         /**
       
   111         * From CMccSymStreamBase
       
   112         */
       
   113         void ResumeL( const TUint32 aEndpointId,
       
   114         			  TBool aEnableRtcp );
       
   115         
       
   116         /**
       
   117         * From CMccSymStreamBase
       
   118         */
       
   119         void StopL( const TUint32 aEndpointId );
       
   120 
       
   121         /**
       
   122         * From CMccSymStreamBase
       
   123         */
       
   124         void SetBalanceL( TInt aLeftbal, TInt aRightbal );
       
   125         
       
   126         /**
       
   127         * From CMccSymStreamBase
       
   128         */
       
   129         void GetBalanceL( TInt& aLeftbal, TInt& aRightbal );
       
   130         
       
   131         /**
       
   132         * From CMccSymStreamBase
       
   133         */
       
   134         void SendMediaSignalL( const TMccEvent& aEvent );
       
   135         
       
   136         /**
       
   137         * From CMccSymStreamBase
       
   138         */
       
   139         void ResetCountersL();
       
   140 
       
   141         /**
       
   142         * Sends RTCP sender report.
       
   143         * @param none
       
   144         * @return One of the standard system-wide error codes.
       
   145         */
       
   146         void SendRTCPSenderReportL();
       
   147 
       
   148         /**
       
   149         * Sends Non-RTCP data to uplink if possible.
       
   150         * @param aData - [input] Data to send
       
   151         * @return One of the standard system-wide error codes.
       
   152         */
       
   153         void SendRTCPDataL( const TDesC8& aData );
       
   154         
       
   155         void GetSSRCL( TUint32& aSSRCValue );
       
   156         
       
   157         TBool IsUplink();
       
   158         
       
   159         void StandByL();
       
   160         
       
   161         /**
       
   162          * Bind context into stream..
       
   163          * @since Series 60 3.2
       
   164          * @param aEndpointId The endpoint id
       
   165          * @param aContextParams Crypto context
       
   166          * @return void
       
   167          */	    
       
   168         void BindContextIntoStreamL( TUint32 aEndpointId,
       
   169                                      const TMccCryptoContext& aContextParams );
       
   170 
       
   171     private:
       
   172         
       
   173         /**
       
   174         * C++ default constructor.
       
   175         */
       
   176         CMccSymUlStream( TUint32 aMccStreamId, 
       
   177                          MAsyncEventHandler* aEventhandler,
       
   178                          MMccResources* aMccResources,
       
   179                          CMccRtpManager* aManager, 
       
   180                          TFourCC aFourCC,
       
   181                          TInt aStreamType,
       
   182                          CMccRtpMediaClock& aClock );
       
   183         
       
   184         /**
       
   185         * 2nd phase constructor
       
   186         */
       
   187         void ConstructL();
       
   188 
       
   189     protected: // Functions from base classes
       
   190     
       
   191         MDataSink* MultiplexerSink();
       
   192 
       
   193         /**
       
   194          * From CMccSymStreamBase
       
   195          * @since Series 60 3.0
       
   196          * @param Desired bitrate
       
   197          */
       
   198         void DoChangeBitrateL( TInt aBitrate );
       
   199 
       
   200     protected:  // New functions
       
   201 
       
   202     private:    // New functions
       
   203     
       
   204         /**
       
   205         * Creates the payload format encoder
       
   206         * @since Series 60 3.0
       
   207         * @param None
       
   208         * @return void
       
   209         */
       
   210         void CreatePayloadFormatEncoderL();
       
   211 
       
   212     public:     // Data
       
   213 
       
   214     protected:  // Data
       
   215 
       
   216     private:    // Data
       
   217     
       
   218         // Payload format encoder
       
   219         CMMFFormatEncode* iFormatEncode;
       
   220         
       
   221         // Payload format encoder for redundancy format
       
   222         CMMFFormatEncode* iRedFormatEncode;
       
   223         
       
   224         TFourCC	iFourCC;
       
   225 
       
   226     public:     // Friend classes
       
   227 
       
   228     protected:  // Friend classes
       
   229 
       
   230     private:    // Friend classes
       
   231 
       
   232         #ifdef TEST_EUNIT
       
   233         
       
   234         friend class UT_CMccSymUlStream;
       
   235         
       
   236         #endif
       
   237 
       
   238     };
       
   239 
       
   240 #endif      // MCCSYMULSTREAM_H
       
   241 
       
   242 // End of File