src/net/java/sip/communicator/impl/protocol/jabber/CallPeerMediaHandlerJabberImpl.java
/**
     * Reinitialize all media contents.
     *
     * @throws OperationFailedException if we fail to handle <tt>content</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>content</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).
     */
Reinitialize all media contents.
@throws OperationFailedException if we fail to handle content
for reasons like failing to initialize media devices or streams.
@throws IllegalArgumentException if there's a problem with the syntax or
the semantics of content. 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).
Reinitialize all media contents . @throws OperationFailedException if we fail to handle content for reasons like failing to initialize media devices or streams . @throws IllegalArgumentException if there ' s a problem with the syntax or the semantics of content . 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 reinitAllContents()
        throws OperationFailedException,
               IllegalArgumentException
    {
        boolean masterStreamSet = false;
        for(String key : remoteContentMap.keySet())
        {
            ContentPacketExtension ext = remoteContentMap.get(key);
            boolean masterStream = false;
            if(!masterStreamSet)
            {
                RtpDescriptionPacketExtension description
                    = JingleUtils.getRtpDescription(ext);
                MediaType mediaType
                    = MediaType.parseString( description.getMedia() );
                if(remoteContentMap.size() > 1)
                {
                    if(mediaType.equals(MediaType.AUDIO))
                    {
                        masterStream = true;
                        masterStreamSet = true;
                    }
                }
                else
                {
                    masterStream = true;
                    masterStreamSet = true;
                }
            }
            if(ext != null)
                processContent(ext, false, masterStream);
        }
    }
public void reinitAllContents ( ) throws OperationFailedException , IllegalArgumentException { boolean masterStreamSet = false ; for ( String key : remoteContentMap . keySet ( ) ) { ContentPacketExtension ext = remoteContentMap . get ( key ) ; boolean masterStream = false ; if ( ! masterStreamSet ) { RtpDescriptionPacketExtension description = JingleUtils . getRtpDescription ( ext ) ; MediaType mediaType = MediaType . parseString ( description . getMedia ( ) ) ; if ( remoteContentMap . size ( ) > 1 ) { if ( mediaType . equals ( MediaType . AUDIO ) ) { masterStream = true ; masterStreamSet = true ; } } else { masterStream = true ; masterStreamSet = true ; } } if ( ext != null ) processContent ( ext , false , masterStream ) ; } }
Reinitialize all media contents.
Reinitialize all media contents .
// if we have more than one stream, lets the audio be the master