80 const TText KVtEngCharacterSpace( ' ' ); |
80 const TText KVtEngCharacterSpace( ' ' ); |
81 // New line (\n) character constant. |
81 // New line (\n) character constant. |
82 const TInt KVtEngCharacterEndLine( 10 ); |
82 const TInt KVtEngCharacterEndLine( 10 ); |
83 |
83 |
84 // Multiplex delay in milliseconds |
84 // Multiplex delay in milliseconds |
85 const TInt KVtEngMultiplexingDelay = 150; |
85 //const TInt KVtEngMultiplexingDelay = 150; |
86 |
86 |
87 // TradeOff values |
87 // TradeOff values |
88 const TInt KVtEngTradeOffDetailMax = 9; |
88 const TInt KVtEngTradeOffDetailMax = 9; |
89 const TInt KVtEngTradeOffNormalMax = 19; |
89 const TInt KVtEngTradeOffNormalMax = 19; |
90 const TInt KVtEngTradeOffMotionMax = 31; |
90 const TInt KVtEngTradeOffMotionMax = 31; |
800 AssignPendingOp( aOperation ); |
800 AssignPendingOp( aOperation ); |
801 } |
801 } |
802 break; |
802 break; |
803 case KVtEngPrepareViewFinder: |
803 case KVtEngPrepareViewFinder: |
804 { |
804 { |
805 const TPckgC<TVtEngRenderingOptions>& pckg = |
805 const TPckgC<TVtEngRenderingOptionsNGA>& pckg = |
806 static_cast< const TPckgC<TVtEngRenderingOptions>& > |
806 static_cast< const TPckgC<TVtEngRenderingOptionsNGA>& > |
807 ( *aOperation.Parameters() ); |
807 ( *aOperation.Parameters() ); |
808 const TVtEngRenderingOptions& options = pckg(); |
808 const TVtEngRenderingOptionsNGA &options = pckg(); |
809 iLocalVideo->SetViewFinderParameters( options ); |
809 iLocalVideo->SetViewFinderParameters( options ); |
810 } |
810 } |
811 break; |
811 break; |
812 case KVtEngPrepareRemoteRenderNGA: |
812 case KVtEngPrepareRemoteRenderNGA: |
813 { |
813 { |
3889 // |
3889 // |
3890 void CVtEngMediaHandler::HandleVideoEncoderCommandCompletedL( |
3890 void CVtEngMediaHandler::HandleVideoEncoderCommandCompletedL( |
3891 const TVtCommandResponse& aResponse ) |
3891 const TVtCommandResponse& aResponse ) |
3892 { |
3892 { |
3893 __VTPRINTENTER( "MH.EncExtCommandCompleted" ) |
3893 __VTPRINTENTER( "MH.EncExtCommandCompleted" ) |
3894 const TInt type( aResponse.iCmdType ); |
3894 |
3895 const TInt protoCmdId( aResponse.iCmdId ); |
3895 __VTPRINT2( DEBUG_MEDIA, "MH.263 ComC type=%d", aResponse.iCmdType ) |
3896 const TInt protoResponse( aResponse.iCmdStatus ); |
|
3897 __VTPRINT2( DEBUG_MEDIA, "MH.263 ComC type=%d", type ) |
|
3898 __VTPRINT3( DEBUG_MEDIA, "MH.263 ComC cmdId=%d,response=%d", |
3896 __VTPRINT3( DEBUG_MEDIA, "MH.263 ComC cmdId=%d,response=%d", |
3899 protoCmdId, protoResponse ) |
3897 aResponse.iCmdId, aResponse.iCmdStatus ) |
3900 |
3898 |
3901 // Find correct entry in iPendingOps based on TOperation because there can |
3899 // Find correct entry in iPendingOps based on TOperation because there can |
3902 // be several entries with same Protocol cmd id since each Protocol interface has their |
3900 // be several entries with same Protocol cmd id since each Protocol interface has their |
3903 // own id allocation and ids may overlap. |
3901 // own id allocation and ids may overlap. |
3904 TInt index( KErrNotFound ); |
3902 TInt index( KErrNotFound ); |
3905 TOperation completedOp = ENone; |
3903 TOperation completedOp = ENone; |
3906 if ( MatchResponseToPendingOps( protoCmdId, ESendIntraframe, &index ) || |
3904 if ( MatchResponseToPendingOps( aResponse.iCmdId, ESendIntraframe, &index ) || |
3907 MatchResponseToPendingOps( protoCmdId, ESetIFrameInterval, &index ) || |
3905 MatchResponseToPendingOps( aResponse.iCmdId, ESetIFrameInterval, &index ) || |
3908 MatchResponseToPendingOps( protoCmdId, ESetVideoQuality, &index ) ) |
3906 MatchResponseToPendingOps( aResponse.iCmdId, ESetVideoQuality, &index ) ) |
3909 { |
3907 { |
3910 // TOperation entries in are unique in the array... |
3908 // TOperation entries in are unique in the array... |
3911 const TCmdOpPair pair = (*iPendingOps)[ index ]; |
3909 const TCmdOpPair pair = (*iPendingOps)[ index ]; |
3912 completedOp = pair.iOp; |
3910 completedOp = pair.iOp; |
3913 // ...so remove based on that instead of protoCmdId |
3911 // ...so remove based on that instead of protoCmdId |
3920 if ( completedOp == ESetVideoQuality ) |
3918 if ( completedOp == ESetVideoQuality ) |
3921 { |
3919 { |
3922 __VTPRINT( DEBUG_MEDIA, "MH.EECC ESetVideoQuality" ) |
3920 __VTPRINT( DEBUG_MEDIA, "MH.EECC ESetVideoQuality" ) |
3923 if( iPendingOp && ( iPendingOp->Command() == KVtEngSetVideoQuality ) ) |
3921 if( iPendingOp && ( iPendingOp->Command() == KVtEngSetVideoQuality ) ) |
3924 { |
3922 { |
3925 CompleteOp( protoResponse ); |
3923 CompleteOp( aResponse.iCmdStatus ); |
3926 } |
3924 } |
3927 if( protoResponse == KErrNone ) |
3925 if( aResponse.iCmdStatus == KErrNone ) |
3928 { |
3926 { |
3929 TVtEngVideoQuality::TVQSParams vqp; |
3927 TVtEngVideoQuality::TVQSParams vqp; |
3930 |
3928 |
3931 if ( iVideoQuality.SettingSucceeded( protoCmdId, vqp ) ) |
3929 if ( iVideoQuality.SettingSucceeded( aResponse.iCmdId, vqp ) ) |
3932 { |
3930 { |
3933 __VTPRINT( DEBUG_MEDIA, "MH.EECC sending vq indication" ) |
3931 __VTPRINT( DEBUG_MEDIA, "MH.EECC sending vq indication" ) |
3934 AddOperation( ESendVTSTO, |
3932 AddOperation( ESendVTSTO, |
3935 iH324Config->SendVideoTemporalSpatialTradeoffIndication( |
3933 iH324Config->SendVideoTemporalSpatialTradeoffIndication( |
3936 iVideoOutgoingLogicalChannel.iLogicalChannelId, |
3934 iVideoOutgoingLogicalChannel.iLogicalChannelId, |
3959 // ----------------------------------------------------------------------------- |
3957 // ----------------------------------------------------------------------------- |
3960 // |
3958 // |
3961 void CVtEngMediaHandler::HandleVideoEncoderInformationalEventL( |
3959 void CVtEngMediaHandler::HandleVideoEncoderInformationalEventL( |
3962 const TVtIndicationEvent& aEvent) |
3960 const TVtIndicationEvent& aEvent) |
3963 { |
3961 { |
3964 const TInt type( aEvent.iEventType ); |
3962 __VTPRINT2( DEBUG_MEDIA, "MH.263 infoevent=%d", aEvent.iEventType ) |
3965 __VTPRINT2( DEBUG_MEDIA, "MH.263 infoevent=%d", type ) |
|
3966 } |
3963 } |
3967 |
3964 |
3968 // ----------------------------------------------------------------------------- |
3965 // ----------------------------------------------------------------------------- |
3969 // CVtEngMediaHandler::HandleH324MConfigCommandCompletedL |
3966 // CVtEngMediaHandler::HandleH324MConfigCommandCompletedL |
3970 // |
3967 // |
3972 // |
3969 // |
3973 void CVtEngMediaHandler::HandleH324MConfigCommandCompletedL( |
3970 void CVtEngMediaHandler::HandleH324MConfigCommandCompletedL( |
3974 const TVtCommandResponse& aResponse ) |
3971 const TVtCommandResponse& aResponse ) |
3975 { |
3972 { |
3976 __VTPRINTENTER( "MH.HandleH324MConfigCommandCompletedL" ) |
3973 __VTPRINTENTER( "MH.HandleH324MConfigCommandCompletedL" ) |
3977 const TInt protoCmdId( aResponse.iCmdId ); |
3974 |
3978 const TInt protoResponse( aResponse.iCmdStatus ); |
3975 __VTPRINT2( DEBUG_MEDIA, "MH.HandleH324MConfigCommandCompletedL type=%d", aResponse.iCmdType ) |
3979 const TInt type( aResponse.iCmdType ); |
3976 __VTPRINT3( DEBUG_MEDIA, "MH.HandleH324MConfigCommandCompletedL cmdId=%d,response=%d", aResponse.iCmdId, aResponse.iCmdStatus ) |
3980 |
|
3981 __VTPRINT2( DEBUG_MEDIA, "MH.HandleH324MConfigCommandCompletedL type=%d", type ) |
|
3982 __VTPRINT3( DEBUG_MEDIA, "MH.HandleH324MConfigCommandCompletedL cmdId=%d,response=%d", protoCmdId, protoResponse ) |
|
3983 TInt index( KErrNotFound ); |
3977 TInt index( KErrNotFound ); |
3984 // Find correct entry in iPendingOps based on TOperation because there can |
3978 // Find correct entry in iPendingOps based on TOperation because there can |
3985 // be several entries with same Protocol cmd id since each Protocol interface has their |
3979 // be several entries with same Protocol cmd id since each Protocol interface has their |
3986 // own id allocation and ids may overlap. |
3980 // own id allocation and ids may overlap. |
3987 if ( MatchResponseToPendingOps( protoCmdId, ESetVendorId, &index ) || |
3981 if ( MatchResponseToPendingOps( aResponse.iCmdId, ESetVendorId, &index ) || |
3988 MatchResponseToPendingOps( protoCmdId, ESendVTSTO, &index ) || |
3982 MatchResponseToPendingOps( aResponse.iCmdId, ESendVTSTO, &index ) || |
3989 MatchResponseToPendingOps( protoCmdId, ESetSupportedResolutions, &index ) || |
3983 MatchResponseToPendingOps( aResponse.iCmdId, ESetSupportedResolutions, &index ) || |
3990 MatchResponseToPendingOps( protoCmdId, ESetFastCsupOptions, &index ) ) |
3984 MatchResponseToPendingOps( aResponse.iCmdId, ESetFastCsupOptions, &index ) ) |
3991 { |
3985 { |
3992 // TOperation entries in are unique in the array... |
3986 // TOperation entries in are unique in the array... |
3993 const TCmdOpPair pair = (*iPendingOps)[ index ]; |
3987 const TCmdOpPair pair = (*iPendingOps)[ index ]; |
3994 // ...so remove based on that instead of protoCmdId |
3988 // ...so remove based on that instead of protoCmdId |
3995 RemoveOperation( pair.iOp ); |
3989 RemoveOperation( pair.iOp ); |
4000 { |
3994 { |
4001 CVtEngStateManager* stateManager = CVtEngUtility::StateManager(); |
3995 CVtEngStateManager* stateManager = CVtEngUtility::StateManager(); |
4002 |
3996 |
4003 // Check does the received command ID match to command ID that was received |
3997 // Check does the received command ID match to command ID that was received |
4004 // from Protocol when DTMF was send. |
3998 // from Protocol when DTMF was send. |
4005 if( stateManager->Handlers().Dtmf().CheckCommandId( protoCmdId ) ) |
3999 if( stateManager->Handlers().Dtmf().CheckCommandId( aResponse.iCmdId ) ) |
4006 { |
4000 { |
4007 __VTPRINT( DEBUG_MEDIA, "MH.Complete DTMF" ) |
4001 __VTPRINT( DEBUG_MEDIA, "MH.Complete DTMF" ) |
4008 stateManager->Handlers().Dtmf().SendComplete( protoResponse ); |
4002 stateManager->Handlers().Dtmf().SendComplete( aResponse.iCmdStatus ); |
4009 } |
4003 } |
4010 } |
4004 } |
4011 break; |
4005 break; |
4012 case MVtProtocolCommand::EIdle: // extension command complete |
4006 case MVtProtocolCommand::EIdle: // extension command complete |
4013 NextUninitStepCallbackL(); |
4007 NextUninitStepCallbackL(); |