ipAddr = InetAddress.getByName(remoteIpAddress); localAddr = new SessionAddress(InetAddress.getByName(this.localIpAddress), localPort); destAddr = new SessionAddress(ipAddr, port); SessionAddress sessAddr = new SessionAddress(); localAddr = new SessionAddress(sessAddr.getDataAddress(), localPort); rtpMgrs[i].initialize(localAddr);
InetAddress ctrlAddr = streamTarget.getControlAddress(); int ctrlPort = streamTarget.getControlPort(); boolean accept; streamTarget.setControlHostAddress(p.getAddress()); streamTarget.setControlPort(p.getPort()); InetAddress dataAddr = streamTarget.getDataAddress(); int dataPort = streamTarget.getDataPort(); ctrlAddr = streamTarget.getControlAddress(); ctrlPort = streamTarget.getControlPort();
/** * Removes a target from our session. If a target is removed, there will be * no data sent to that address. * * @param target Destination target to be removed */ public void removeTarget(SessionAddress target) { if (controlOutputStream != null) controlOutputStream .removeTarget( target.getControlAddress(), target.getControlPort()); if (dataOutputStream != null) dataOutputStream .removeTarget( target.getDataAddress(), target.getDataPort()); }
String addr = "239.192.1.1"; int port = 22224; int ttl = 32; SessionAddress multiAddress = new SessionAddress(InetAddress.getByName(addr), port, ttl); SessionAddress localAddress = new SessionAddress(InetAddress.getLocalHost(), SessionAddress.ANY_PORT, ttl); SessionAddress multiAny = new SessionAddress(InetAddress.getByName(addr), port, ttl);
/** * Sets the direction of the <tt>MediaStream</tt> of this <tt>Channel</tt>. * <p> * <b>Warning</b>: The method does nothing if latching has not finished. * </p> * * @param direction the <tt>MediaDirection</tt> to set on the * <tt>MediaStream</tt> of this <tt>Channel</tt> */ public void setDirection(MediaDirection direction) { // XXX We modify the stream direction only after latching has finished. if (streamTarget.getDataAddress() != null) { stream.setDirection(direction); } touch(); // It seems this Channel is still active. }
this.streamTarget.setDataHostAddress(dataAddr.getAddress()); this.streamTarget.setDataPort(dataAddr.getPort()); this.streamTarget.setControlHostAddress(ctrlAddr.getAddress()); this.streamTarget.setControlPort(ctrlAddr.getPort());
/** * Add a stream target. A stream target is the destination address which * this RTP session will send its data to. For a single session, we can add * multiple SessionAddresses, and for each address, one copy of data will be * sent to. * * @param target Destination target address * @throws IOException if there was a socket-related error while adding the * specified target */ public void addTarget(SessionAddress target) throws IOException { InetAddress controlAddress = target.getControlAddress(); if (controlAddress != null) { getControlOutputStream().addTarget( controlAddress, target.getControlPort()); } getDataOutputStream().addTarget( target.getDataAddress(), target.getDataPort()); }
SessionAddress localaddr = new SessionAddress(); try{ InetAddress destaddr = InetAddress.getByName(address); SessionAddress sessaddr = new SessionAddress(destaddr, port, destaddr,
ipAddr = InetAddress.getByName(remoteIpAddress); localAddr = new SessionAddress(InetAddress.getByName(this.localIpAddress), localPort); destAddr = new SessionAddress(ipAddr, port); SessionAddress sessAddr = new SessionAddress(); localAddr = new SessionAddress(sessAddr.getDataAddress(), localPort); rtpMgrs[i].initialize(localAddr);
new SessionAddress( newDataAddr.getAddress(), newDataAddr.getPort(), controlInetAddr, controlPort));
ipAddr = InetAddress.getByName(remoteIpAddress); localAddr = new SessionAddress(InetAddress.getByName(this.localIpAddress), localPort); destAddr = new SessionAddress(ipAddr, port); SessionAddress sessAddr = new SessionAddress(); localAddr = new SessionAddress(sessAddr.getDataAddress(), localPort); rtpMgrs[i].initialize(localAddr);