836 case ERTSPSetupVideoSent: |
836 case ERTSPSetupVideoSent: |
837 if ( !iSessionId.Ptr() ) |
837 if ( !iSessionId.Ptr() ) |
838 { |
838 { |
839 iResponses[iStage]->SessionId( iSessionId ); |
839 iResponses[iStage]->SessionId( iSessionId ); |
840 } |
840 } |
841 // If we see that we don't need to send further setups, |
841 // Check for sdp parser and send punch packets for UDP transport |
842 // do send punch packets now. |
842 // (TCP or multicast: session setup and PLAY in SendRTSPCommand) |
843 if ( iSdpParser && // if we have sdp parser |
843 if ( iSdpParser && iTransport == ERTPOverUDP ) |
844 ( iSdpParser->VideoControlAddr().Length() && // and it shows we have video |
|
845 iResponses[ERTSPSetupVideoSent] && // and we have video se tup |
|
846 iSdpParser->AudioControlAddr().Length() && // and it shows we have audio |
|
847 iResponses[ERTSPSetupAudioSent] ) || // and we have audio set up |
|
848 ( !iSdpParser->VideoControlAddr().Length() && // or it shows we have no video |
|
849 !iResponses[ERTSPSetupVideoSent] && // and we've video not set up |
|
850 iSdpParser->AudioControlAddr().Length() && // and it shows we have audio |
|
851 iResponses[ERTSPSetupAudioSent] ) || // and we've audio set up |
|
852 ( iSdpParser->VideoControlAddr().Length() && // or it shows we've video |
|
853 iResponses[ERTSPSetupVideoSent] && // and we have video set up |
|
854 !iSdpParser->AudioControlAddr().Length() && // and we have no audio |
|
855 !iResponses[ERTSPSetupAudioSent] ) )// and we have no audio set up |
|
856 { |
844 { |
857 // Only send punch packets for UDP transport |
845 // If we see that we don't need to send further setups, |
858 // TCP or multicast: session setup and PLAY in SendRTSPCommand |
846 // do send punch packets now. |
859 if ( iTransport == ERTPOverUDP ) |
847 if ( ( iSdpParser->VideoControlAddr().Length() && // if we have video |
|
848 iResponses[ERTSPSetupVideoSent] && // and we have video se tup |
|
849 iSdpParser->AudioControlAddr().Length() && // and we have audio |
|
850 iResponses[ERTSPSetupAudioSent] ) || // and we have audio set up or... |
|
851 ( !iSdpParser->VideoControlAddr().Length() && // if we have no video |
|
852 !iResponses[ERTSPSetupVideoSent] && // and we've video not set up |
|
853 iSdpParser->AudioControlAddr().Length() && // and it shows we have audio |
|
854 iResponses[ERTSPSetupAudioSent] ) || // and we've audio set up or... |
|
855 ( iSdpParser->VideoControlAddr().Length() && // if we have video |
|
856 iResponses[ERTSPSetupVideoSent] && // and we have video set up |
|
857 !iSdpParser->AudioControlAddr().Length() && // and we have no audio |
|
858 !iResponses[ERTSPSetupAudioSent] ) ) // and we have no audio set up |
860 { |
859 { |
861 SendPunchPacketsL(); |
860 SendPunchPacketsL(); |
862 } |
861 } |
863 } |
862 } |
864 |
863 |