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