multimediacommscontroller/mmccsubcontroller/src/mccsymdlstream.cpp
branchRCL_3
changeset 42 817c922b90eb
parent 0 1bce908db942
child 59 b0e4b01681c5
equal deleted inserted replaced
41:b9d283c5c7b5 42:817c922b90eb
    47 CMccSymDlStream::CMccSymDlStream( 
    47 CMccSymDlStream::CMccSymDlStream( 
    48     TUint32 aMccStreamId, 
    48     TUint32 aMccStreamId, 
    49     MAsyncEventHandler* aEventhandler, 
    49     MAsyncEventHandler* aEventhandler, 
    50     MMccResources* aMccResources, 
    50     MMccResources* aMccResources, 
    51     CMccRtpManager* aManager, 
    51     CMccRtpManager* aManager, 
    52     TInt aStreamType ) : 
    52     TInt aStreamType,
       
    53     CMccRtpMediaClock& aClock ) : 
    53     CMccSymStreamBase( aMccStreamId, 
    54     CMccSymStreamBase( aMccStreamId, 
    54                        aEventhandler, 
    55                        aEventhandler, 
    55                        aMccResources, 
    56                        aMccResources, 
    56                        aManager, 
    57                        aManager, 
    57                        aStreamType ), 
    58                        aStreamType ), 
    58     iJitterBuffer( NULL ), 
    59     iJitterBuffer( NULL ), 
    59     iFormatDecode( NULL )
    60     iFormatDecode( NULL )
    60     {
    61     {
       
    62     iRtpMediaClock = &aClock;
    61     }
    63     }
    62 
    64 
    63 // -----------------------------------------------------------------------------
    65 // -----------------------------------------------------------------------------
    64 // CMccSymDlStream::NewL
    66 // CMccSymDlStream::NewL
    65 // Two-phased constructor.
    67 // Two-phased constructor.
    68 CMccSymDlStream* CMccSymDlStream::NewLC( 
    70 CMccSymDlStream* CMccSymDlStream::NewLC( 
    69     TUint32 aMccStreamId, 
    71     TUint32 aMccStreamId, 
    70     MAsyncEventHandler* aEventhandler, 
    72     MAsyncEventHandler* aEventhandler, 
    71     MMccResources* aMccResources,
    73     MMccResources* aMccResources,
    72     CMccRtpManager* aManager, 
    74     CMccRtpManager* aManager, 
    73     TInt aStreamType ) 
    75     TInt aStreamType,
       
    76     CMccRtpMediaClock& aClock ) 
    74     {
    77     {
    75     CMccSymDlStream* s = 
    78     CMccSymDlStream* s = 
    76             new ( ELeave ) CMccSymDlStream( aMccStreamId, 
    79             new ( ELeave ) CMccSymDlStream( aMccStreamId, 
    77                                             aEventhandler, 
    80                                             aEventhandler, 
    78                                             aMccResources,
    81                                             aMccResources,
    79                                             aManager, 
    82                                             aManager, 
    80                                             aStreamType );
    83                                             aStreamType,
       
    84                                             aClock );
    81     CleanupStack::PushL( s );
    85     CleanupStack::PushL( s );
    82     s->ConstructL();
    86     s->ConstructL();
    83     return s;
    87     return s;
    84     }
    88     }
    85 
    89 
   259             }
   263             }
   260         }
   264         }
   261     else if ( CurrentCodecState() == EStateCodecLoaded ||
   265     else if ( CurrentCodecState() == EStateCodecLoaded ||
   262               CurrentCodecState() == EStateCodecLoadedAndUpdating )
   266               CurrentCodecState() == EStateCodecLoadedAndUpdating )
   263         {
   267         {
       
   268         iJitterBuffer->SetupL( iCodecInfo.iMaxPtime, 
       
   269                        		   iCodecInfo.iJitterBufThreshold, 
       
   270                        		   iCodecInfo );
       
   271         
   264         // Update codec info
   272         // Update codec info
   265         if ( iDatasource->DataSourceType() == KMccRtpSourceUid )
   273         if ( iDatasource->DataSourceType() == KMccRtpSourceUid )
   266        	    {
   274        	    {
   267             CMccRtpDataSource* dataSource = 
   275             CMccRtpDataSource* dataSource = 
   268                 static_cast<CMccRtpDataSource*>( iDatasource );
   276                 static_cast<CMccRtpDataSource*>( iDatasource );
   269             
   277             
   270             // For updating keep alive parameters
   278             // For updating keep alive parameters
   271             TMccCodecInfoBuffer infoBuffer( iCodecInfo );     
   279             TMccCodecInfoBuffer infoBuffer( iCodecInfo );     
   272             dataSource->ConfigureL( infoBuffer );
   280             dataSource->ConfigureL( infoBuffer, iRtpMediaClock );
   273        	    }
   281        	    }
   274         SetCodecState( EStateCodecLoadedAndUpdating );
   282         SetCodecState( EStateCodecLoadedAndUpdating );
   275     	UpdateCodecInformationL( orig, iCodecInfo );
   283     	UpdateCodecInformationL( orig, iCodecInfo );
   276         }
   284         }
   277     else
   285     else