src/net/java/sip/communicator/impl/protocol/jabber/CallPeerMediaHandlerJabberImpl.java
/**
     * Handles the specified <tt>answer</tt> by creating and initializing the
     * corresponding <tt>MediaStream</tt>s.
     *
     * @param answer the Jingle answer
     *
     * @throws OperationFailedException if we fail to handle <tt>answer</tt> for
     * reasons like failing to initialize media devices or streams.
     * @throws IllegalArgumentException if there's a problem with the syntax or
     * the semantics of <tt>answer</tt>. Method is synchronized in order to
     * avoid closing mediaHandler when we are currently in process of
     * initializing, configuring and starting streams and anybody interested
     * in this operation can synchronize to the mediaHandler instance to wait
     * processing to stop (method setState in CallPeer).
     */
Handles the specified answer by creating and initializing the
corresponding MediaStreams.

@param answer the Jingle answer

@throws OperationFailedException if we fail to handle answer for
reasons like failing to initialize media devices or streams.
@throws IllegalArgumentException if there's a problem with the syntax or
the semantics of answer. Method is synchronized in order to
avoid closing mediaHandler when we are currently in process of
initializing, configuring and starting streams and anybody interested
in this operation can synchronize to the mediaHandler instance to wait
processing to stop (method setState in CallPeer).
Handles the specified answer by creating and initializing the corresponding MediaStreams . @param answer the Jingle answer @throws OperationFailedException if we fail to handle answer for reasons like failing to initialize media devices or streams . @throws IllegalArgumentException if there ' s a problem with the syntax or the semantics of answer . Method is synchronized in order to avoid closing mediaHandler when we are currently in process of initializing configuring and starting streams and anybody interested in this operation can synchronize to the mediaHandler instance to wait processing to stop ( method setState in CallPeer ) .
public void processAnswer(List<ContentPacketExtension> answer)
        throws OperationFailedException,
               IllegalArgumentException
    {
        /*
         * The answer given in session-accept may contain transport-related
         * information compatible with that carried in transport-info.
         */
        processTransportInfo(answer);
        boolean masterStreamSet = false;
        for (ContentPacketExtension content : answer)
        {
            remoteContentMap.put(content.getName(), content);
            boolean masterStream = false;
            if(!masterStreamSet)
            {
                if(answer.size() > 1)
                {
                    RtpDescriptionPacketExtension description
                        = JingleUtils.getRtpDescription(content);
                    if(MediaType.AUDIO.toString().equals(
                            description.getMedia()))
                    {
                        masterStream = true;
                        masterStreamSet = true;
                    }
                }
                else
                {
                    masterStream = true;
                    masterStreamSet = true;
                }
            }
            processContent(content, false, masterStream);
        }
    }
public void processAnswer ( List < ContentPacketExtension > answer ) throws OperationFailedException , IllegalArgumentException { /*
         * The answer given in session-accept may contain transport-related
         * information compatible with that carried in transport-info.
         */ processTransportInfo ( answer ) ; boolean masterStreamSet = false ; for ( ContentPacketExtension content : answer ) { remoteContentMap . put ( content . getName ( ) , content ) ; boolean masterStream = false ; if ( ! masterStreamSet ) { if ( answer . size ( ) > 1 ) { RtpDescriptionPacketExtension description = JingleUtils . getRtpDescription ( content ) ; if ( MediaType . AUDIO . toString ( ) . equals ( description . getMedia ( ) ) ) { masterStream = true ; masterStreamSet = true ; } } else { masterStream = true ; masterStreamSet = true ; } } processContent ( content , false , masterStream ) ; } }
Handles the specified <tt>answer</tt> by creating and initializing the
 corresponding <tt>MediaStream</tt>s.
Handles the specified <tt > answer< / tt > by creating and initializing the corresponding <tt > MediaStream< / tt > s .
// if we have more than one stream, let the audio be the master