private List < TransportCandidate > obtainCandidatesList ( Jingle jingle ) { List < TransportCandidate > result = new ArrayList <> ( ) ; if ( jingle != null ) { // Get the list of candidates from the packet for ( JingleContent jingleContent : jingle . getContentsList ( ) ) { if ( jingleContent . getName ( ) . equals ( parentNegotiator . getName ( ) ) ) { for ( JingleTransport jingleTransport : jingleContent . getJingleTransportsList ( ) ) { for ( JingleTransportCandidate jingleTransportCandidate : jingleTransport . getCandidatesList ( ) ) { TransportCandidate transCand = jingleTransportCandidate . getMediaTransport ( ) ; result . add ( transCand ) ; } } } } } return result ; }
Parse the list of transport candidates from a Jingle packet .