Package org.bigbluebutton.voiceconf.red5

Examples of org.bigbluebutton.voiceconf.red5.Service


    /* (non-Javadoc)
     * @see org.apache.woden.wsdl20.Description#getService(javax.xml.namespace.QName)
     */
    public Service getService(QName name)
    {
        Service service = null;
       
        if(name != null)
        {
            Service[] services = getServices();
           
View Full Code Here


                }
                return null;   // can't go any further without the wsdl
            }
            Service[] services = description.getServices();
            for (int i = 0; i < services.length; i++) {
                Service service = services[i];
                // set the serviceName on the parent to setup call to populateService
                serviceName = service.getName();
                Endpoint[] endpoints = service.getEndpoints();
                for (int j = 0; j < endpoints.length; j++) {
                    interfaceName = endpoints[j].getName().toString();
                    // start with a fresh axisService
                    this.axisService = new AxisService();
                    // now that serviceName and interfaceName are set, call up to the
View Full Code Here

public class CallStreamFactory {
  private IScope scope;
 
  public CallStream createCallStream(Codec sipCodec, SipConnectInfo connInfo) {
    return new CallStream(sipCodec, connInfo, scope);
  }
View Full Code Here

   
    public void sendAudio(byte[] audioData, long timestamp) {
      byte[] transcodedAudioDataBuffer = new byte[audioData.length + RTP_HEADER_SIZE];
      System.arraycopy(audioData, 0, transcodedAudioDataBuffer, RTP_HEADER_SIZE, audioData.length);
      RtpPacket rtpPacket = new RtpPacket(transcodedAudioDataBuffer, transcodedAudioDataBuffer.length);
      if (!marked) {
        rtpPacket.setMarker(true);
        marked = true;
        startTimestamp = System.currentTimeMillis();
      }
      rtpPacket.setPadding(false);
      rtpPacket.setExtension(false);
        rtpPacket.setPayloadType(codecId);
      rtpPacket.setSeqNum(sequenceNum++);  
      rtpPacket.setTimestamp(timestamp);
        rtpPacket.setPayloadLength(audioData.length);
        try {
    rtpSocketSend(rtpPacket);
  } catch (StreamException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
View Full Code Here

   
    public void receiveRtpPackets() {   
        int packetReceivedCounter = 0;
        int internalBufferLength = payloadLength + RTP_HEADER_SIZE;
        byte[] internalBuffer = new byte[internalBufferLength];
        RtpPacket rtpPacket = new RtpPacket(internalBuffer, internalBufferLength);;
       
        while (receivePackets) {
          try {            
            rtpSocket.receive(rtpPacket);           
            packetReceivedCounter++; 
            if (shouldDropDelayedPacket(rtpPacket)) {
              continue;
            }
            if (rtpPacket.isRtcpPacket()) {
              /**
               * Asterisk (1.6.2.5) send RTCP packets. We just ignore them (for now).
               * It could be for KeepAlive (http://tools.ietf.org/html/draft-ietf-avt-app-rtp-keepalive-09)
               */
              if (log.isDebugEnabled())
                log.debug("RTCP packet [" + rtpPacket.getRtcpPayloadType() + ", length=" + rtpPacket.getPayloadLength() + "] seqNum[rtpSeqNum=" + rtpPacket.getSeqNum() + ",lastSeqNum=" + lastSequenceNumber
                  + "][rtpTS=" + rtpPacket.getTimestamp() + ",lastTS=" + lastPacketTimestamp + "][port=" + rtpSocket.getDatagramSocket().getLocalPort() + "]");               
            } else {
                if (shouldHandlePacket(rtpPacket)) {                               
                  lastSequenceNumber = rtpPacket.getSeqNum();
                  lastPacketTimestamp = rtpPacket.getTimestamp();
                  processRtpPacket(internalBuffer, RTP_HEADER_SIZE, rtpPacket.getPayloadLength());
                } else {
                  if (log.isDebugEnabled())
                    log.debug("Corrupt packet [" + rtpPacket.getRtcpPayloadType() + "," + rtpPacket.getPayloadType() + ", length=" + rtpPacket.getPayloadLength() + "] seqNum[rtpSeqNum=" + rtpPacket.getSeqNum() + ",lastSeqNum=" + lastSequenceNumber
                      + "][rtpTS=" + rtpPacket.getTimestamp() + ",lastTS=" + lastPacketTimestamp + "][port=" + rtpSocket.getDatagramSocket().getLocalPort() + "]");                            

                  if (lastPacketDropped) successivePacketDroppedCount++;
                  else lastPacketDropped = true;                
                }
              }
View Full Code Here

    }
   
    public void sendAudio(byte[] audioData, int codecId, long timestamp) {
      byte[] transcodedAudioDataBuffer = new byte[audioData.length + RTP_HEADER_SIZE];
      System.arraycopy(audioData, 0, transcodedAudioDataBuffer, RTP_HEADER_SIZE, audioData.length);
      RtpPacket rtpPacket = new RtpPacket(transcodedAudioDataBuffer, transcodedAudioDataBuffer.length);
      if (!marked) {
        rtpPacket.setMarker(true);
        marked = true;
        startTimestamp = System.currentTimeMillis();
      }
      rtpPacket.setPadding(false);
      rtpPacket.setExtension(false);
        rtpPacket.setPayloadType(codecId);
      rtpPacket.setSeqNum(sequenceNum++);  
      rtpPacket.setTimestamp(timestamp);
        rtpPacket.setPayloadLength(audioData.length);
        try {
      rtpSocketSend(rtpPacket);
    } catch (StreamException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
View Full Code Here

  connect();
    }

    public void connect() {
        try {
      rtpSocket = new RtpSocket(srcSocket, InetAddress.getByName(connInfo.getRemoteAddr()), connInfo.getRemotePort());
            Random rgen = new Random();
      sequenceNum = rgen.nextInt();   
    } catch (UnknownHostException e) {
      log.error("Failed to connect to {}", connInfo.getRemoteAddr());
      log.error(StackTraceUtil.getStackTrace(e));
View Full Code Here

   
    private long lastPacketReceived = 0;
   
    public RtpStreamReceiver(DatagramSocket socket, int expectedPayloadLength) {
      this.payloadLength = expectedPayloadLength;
        rtpSocket = new RtpSocket(socket);

        initializeSocket();
    }
View Full Code Here

        this.connInfo = connInfo;
    }

    public void connect() throws StreamException {
      try {
      rtpSocket = new RtpSocket(srcSocket, InetAddress.getByName(connInfo.getRemoteAddr()), connInfo.getRemotePort());
          Random rgen = new Random();
      sequenceNum = rgen.nextInt(1000);   
    } catch (UnknownHostException e) {
      log.error("Failed to connect to {}", connInfo.getRemoteAddr());
      log.error(StackTraceUtil.getStackTrace(e));
View Full Code Here

      callStreamObserver = observer;
    }
   
    public void start() {       
      SipToFlashTranscoder sipToFlashTranscoder = new SpeexSipToFlashTranscoderImp(sipCodec);
      FlashToSipTranscoder flashToSipTranscoder = new SpeexFlashToSipTranscoderImp(sipCodec);

    if (sipCodec.getCodecId() != SpeexCodec.codecId) {     
      flashToSipTranscoder = new NellyFlashToSipTranscoderImp(sipCodec);
      sipToFlashTranscoder = new NellySipToFlashTranscoderImp(sipCodec);
    }
View Full Code Here

TOP

Related Classes of org.bigbluebutton.voiceconf.red5.Service

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.