multimediacommscontroller/mmccsubcontroller/src/mccsymulstream.cpp
branchRCL_3
changeset 18 817c922b90eb
parent 17 b9d283c5c7b5
equal deleted inserted replaced
17:b9d283c5c7b5 18:817c922b90eb
   251         
   251         
   252         iCodecInfo.iFmtpLength = iFmtpAttr->Length();
   252         iCodecInfo.iFmtpLength = iFmtpAttr->Length();
   253         
   253         
   254         CreatePayloadFormatEncoderL();
   254         CreatePayloadFormatEncoderL();
   255         
   255         
   256        	if ( iDatasink->DataSinkType() == KMccRtpSinkUid )
       
   257        	    {
       
   258             CMccRtpDataSink* dataSink = static_cast<CMccRtpDataSink*>( iDatasink );        
       
   259             dataSink->SetMediaClock( *iRtpMediaClock ); 
       
   260        	    }
       
   261         
       
   262         // Just negotiate the codec, load it later
   256         // Just negotiate the codec, load it later
   263         static_cast<CMccUlDataPath*>( iDatapath )->NegotiateL( *iFormatEncode );
   257         static_cast<CMccUlDataPath*>( iDatapath )->NegotiateL( *iFormatEncode );
   264         
   258         
   265         SetCodecState( EStateCodecNegotiated );        	
   259         SetCodecState( EStateCodecNegotiated );        	
   266         }
   260         }
   276                                                 
   270                                                 
   277         SetCodecState( EStateCodecPrepared );
   271         SetCodecState( EStateCodecPrepared );
   278         }
   272         }
   279     else if ( CurrentCodecState() == EStateCodecPrepared )
   273     else if ( CurrentCodecState() == EStateCodecPrepared )
   280         {
   274         {
       
   275         if ( iDatasink->DataSinkType() == KMccRtpSinkUid )
       
   276        	    {
       
   277 	        CMccRtpDataSink* dataSink = 
       
   278 	                static_cast<CMccRtpDataSink*>( iDatasink );
       
   279 	            
       
   280 	        // For updating keep alive parameters
       
   281 	        TMccCodecInfoBuffer infoBuffer( iCodecInfo ); 
       
   282 	    	dataSink->ConfigureL( infoBuffer, iRtpMediaClock );
       
   283        	    }
   281         if ( CodecLoadingAllowed() )
   284         if ( CodecLoadingAllowed() )
   282             {
   285             {
   283             // Load the codec
   286             // Load the codec
   284             static_cast<CMccUlDataPath*>( iDatapath )->LoadL( *iFormatEncode );
   287             static_cast<CMccUlDataPath*>( iDatapath )->LoadL( *iFormatEncode );
   285             
   288             
   286             // Set state before updating as the state affects to update functionality
   289             // Set state before updating as the state affects to update functionality
   287             SetCodecState( EStateCodecLoaded );
   290             SetCodecState( EStateCodecLoaded );
   288                                                
   291                                                
   289             UpdateCodecInformationL( iCodecInfo );
   292             UpdateCodecInformationL( iCodecInfo );
   290             }
   293             }
   291         else if ( iDatasink->DataSinkType() == KMccRtpSinkUid )
       
   292        	    {
       
   293             CMccRtpDataSink* dataSink = 
       
   294                 static_cast<CMccRtpDataSink*>( iDatasink );
       
   295             
       
   296             // For updating keep alive parameters
       
   297             TMccCodecInfoBuffer infoBuffer( iCodecInfo );     
       
   298             dataSink->ConfigureL( infoBuffer );
       
   299        	    }
       
   300         }
   294         }
   301     else if ( CurrentCodecState() == EStateCodecLoaded ||
   295     else if ( CurrentCodecState() == EStateCodecLoaded ||
   302               CurrentCodecState() == EStateCodecLoadedAndUpdating )
   296               CurrentCodecState() == EStateCodecLoadedAndUpdating )
   303         {
   297         {
   304         if ( iDatasink->DataSinkType() == KMccRtpSinkUid )
   298         if ( iDatasink->DataSinkType() == KMccRtpSinkUid )
   306             CMccRtpDataSink* dataSink = 
   300             CMccRtpDataSink* dataSink = 
   307                 static_cast<CMccRtpDataSink*>( iDatasink );
   301                 static_cast<CMccRtpDataSink*>( iDatasink );
   308             
   302             
   309             // For updating keep alive parameters
   303             // For updating keep alive parameters
   310             TMccCodecInfoBuffer infoBuffer( iCodecInfo );     
   304             TMccCodecInfoBuffer infoBuffer( iCodecInfo );     
   311             dataSink->ConfigureL( infoBuffer );
   305             dataSink->ConfigureL( infoBuffer, iRtpMediaClock );
   312        	    }
   306        	    }
   313         // Update codec info
   307         // Update codec info
   314         SetCodecState( EStateCodecLoadedAndUpdating );
   308         SetCodecState( EStateCodecLoadedAndUpdating );
   315     	UpdateCodecInformationL( iCodecInfo );
   309     	UpdateCodecInformationL( iCodecInfo );
   316         }
   310         }