Package org.ice4j.ice

Examples of org.ice4j.ice.Component


        IceMediaStream stream = iceAgent.getAgent().getStream(name);
        MediaFormat format = streamNameToMediaFormats.get(name);
        Byte payloadTypeId = streamNameToPayloadTypeId.get(name);
        if( stream == null || format == null || payloadTypeId == null )
          throw new IOException("Stream \"" + name + "\" not found.");
        Component rtpComponent = stream.getComponent(org.ice4j.ice.Component.RTP);
        Component rtcpComponent = stream.getComponent(org.ice4j.ice.Component.RTCP);
       
        if( rtpComponent == null )
          throw new IOException("RTP component not found.");
        if( rtcpComponent == null )
          throw new IOException("RTCP Component not found.");

        CandidatePair rtpPair = rtpComponent.getSelectedPair();
        CandidatePair rtcpPair = rtcpComponent.getSelectedPair();

//        System.out.println( "RTP : L " + rtpPair.getLocalCandidate().getDatagramSocket().getLocalPort() + " <-> " + rtpPair.getRemoteCandidate().getTransportAddress() + " R " );
//        System.out.println( "RTCP: L " + rtcpPair.getLocalCandidate().getDatagramSocket().getLocalPort() + " <-> " + rtcpPair.getRemoteCandidate().getTransportAddress() + " R " );
       
        return startStream( name,
View Full Code Here


              TransportAddress relatedAddr = null;
              if (cpe.getRelAddr() != null && cpe.getRelPort() != -1) {
                relatedAddr = new TransportAddress(cpe.getRelAddr(), cpe.getRelPort(), Transport.parse(cpe.getProtocol().toLowerCase()));
              }

              Component component = ims.getComponent(cpe.getComponent());
              if (component != null) {
                // we should always be able to find this if there is one b/c of the sorting we did.
                RemoteCandidate relatedCandidate = relatedAddr != null ? component.findRemoteCandidate(relatedAddr) : null;
                TransportAddress ta = new TransportAddress(ia, cpe.getPort(), Transport.parse(cpe.getProtocol().toLowerCase()));
                RemoteCandidate rc = new RemoteCandidate( ta,
                    component,
                    convertType(cpe.getType()),
                    Integer.toString(cpe.getFoundation()),
                    cpe.getPriority(),
                    relatedCandidate);
                component.addRemoteCandidate(rc);
              }
            }
          }
        }
      }
View Full Code Here

TOP

Related Classes of org.ice4j.ice.Component

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.