SdpComparator { public void compare(SessionDescription sdp1, SessionDescription sdp2) { audio.clean(); video.clean(); application.clean(); Collection<MediaDescriptorField> mds1 = sdp1.getMedia(); Collection<MediaDescriptorField> mds2 = sdp2.getMedia(); for (MediaDescriptorField md1 : mds1) { for (MediaDescriptorField md2 : mds2) { if (md1.getMediaType().equals(md2.getMediaType())) { compare(md1, md2); } } } }  @Deprecated void negotiate(SessionDescription sdp, RTPFormats audio, RTPFormats video); RTPFormats negotiateAudio(SessionDescription sdp, RTPFormats formats); RTPFormats negotiateVideo(SessionDescription sdp, RTPFormats formats); RTPFormats negotiateApplication(SessionDescription sdp, RTPFormats formats); void compare(SessionDescription sdp1, SessionDescription sdp2); RTPFormats getAudio(); RTPFormats getVideo(); RTPFormats getApplication(); final static Text AUDIO; final static Text VIDEO; final static Text APPLICATION; }
@Test public void testAudioTime() { long s = System.nanoTime(); for (int i = 0; i < 1000; i++) { comparator.compare(sd1, sd2); } long duration = System.nanoTime() - s; System.out.println("Duration " + duration); }