Examples of RTMPDecodeState


Examples of org.red5.server.net.protocol.RTMPDecodeState

      log.trace("Decoding for connection - session id: {}", conn.getSessionId());
      try {
        // instance list to hold results
        result = new LinkedList<Object>();
        // get the local decode state
        RTMPDecodeState state = conn.getDecoderState();
        log.trace("{}", state);
        if (!conn.getSessionId().equals(state.getSessionId())) {
          log.warn("Session decode overlap: {} != {}", conn.getSessionId(), state.getSessionId());
        }
        while (buffer.hasRemaining()) {
          final int remaining = buffer.remaining();
          if (state.canStartDecoding(remaining)) {
            log.trace("Can start decoding");
            state.startDecoding();
          } else {
            log.trace("Cannot start decoding");
            break;
          }
          final Object decodedObject = decode(conn, state, buffer);
          if (state.hasDecodedObject()) {
            log.trace("Has decoded object");
            if (decodedObject != null) {
              result.add(decodedObject);
            }
          } else if (state.canContinueDecoding()) {
            log.trace("Can continue decoding");
            continue;
          } else {
            log.trace("Cannot continue decoding");
            break;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.