Package org.red5.server.net.rtmp.event

Examples of org.red5.server.net.rtmp.event.ChunkSize


      if (stream.getStreamListeners() != null) {
       
        for (Iterator<IStreamListener> iter = stream.getStreamListeners().iterator();iter.hasNext();) {
         
          IStreamListener iStreamListener = iter.next();
         
          ListenerAdapter listenerAdapter = (ListenerAdapter) iStreamListener;
         
          log.debug("Stream Closing ?? "+listenerAdapter.getFlvRecordingMetaDataId()+ " " +flvRecordingMetaDataId);
         
View Full Code Here


    final Header header = packet.getHeader();
    final int channelId = header.getChannelId();
    log.trace("Channel id: {}", channelId);
    final IRTMPEvent message = packet.getMessage();
    if (message instanceof ChunkSize) {
      ChunkSize chunkSizeMsg = (ChunkSize) message;
      ((RTMPConnection) Red5.getConnectionLocal()).getState().setWriteChunkSize(chunkSizeMsg.getSize());
    }
    // normally the message is expected not to be dropped
    if (!dropMessage(channelId, message)) {
      IoBuffer data = encodeMessage(header, message);
      if (data != null) {
View Full Code Here

  /**
   * Send the chunk size
   */
  private void sendChunkSize() {
    log.debug("Sending chunk size: {}", chunkSize);
    ChunkSize chunkSizeMsg = new ChunkSize(chunkSize);
    conn.getChannel((byte) 2).write(chunkSizeMsg);
    chunkSizeSent = true;
  }
View Full Code Here

        message.setTimestamp(header.getTimer());
      }
      rtmp.setLastReadPacketHeader(channelId, packet.getHeader());
      packet.setMessage(message);
      if (message instanceof ChunkSize) {
        ChunkSize chunkSizeMsg = (ChunkSize) message;
        rtmp.setReadChunkSize(chunkSizeMsg.getSize());
      } else if (message instanceof Abort) {
        log.debug("Abort packet detected");
        // The client is aborting a message; reset the packet
        // because the next chunk on that stream will start a new packet.
        Abort abort = (Abort) message;
View Full Code Here

  /** {@inheritDoc} */
  public ChunkSize decodeChunkSize(IoBuffer in) {
    int chunkSize = in.getInt();
    log.debug("Decoded chunk size: {}", chunkSize);
    return new ChunkSize(chunkSize);
  }
View Full Code Here

    } else if ("chunkSize".equals(oobCtrlMsg.getServiceName())) {
      int newSize = (Integer) oobCtrlMsg.getServiceParamMap().get(
          "chunkSize");
      if (newSize != chunkSize) {
        chunkSize = newSize;
        ChunkSize chunkSizeMsg = new ChunkSize(chunkSize);
        conn.getChannel((byte) 2).write(chunkSizeMsg);
      }
    }
  }
View Full Code Here

    final int channelId = header.getChannelId();
    final IRTMPEvent message = packet.getMessage();
    ByteBuffer data;

    if (message instanceof ChunkSize) {
      ChunkSize chunkSizeMsg = (ChunkSize) message;
      rtmp.setWriteChunkSize(chunkSizeMsg.getSize());
    }

    try {
      data = encodeMessage(rtmp, header, message);
    } finally {
View Full Code Here

    try {
      final IRTMPEvent message = decodeMessage(rtmp, packet.getHeader(), buf);
      packet.setMessage(message);

      if (message instanceof ChunkSize) {
        ChunkSize chunkSizeMsg = (ChunkSize) message;
        rtmp.setReadChunkSize(chunkSizeMsg.getSize());
      }
    } finally {
      rtmp.setLastReadPacket(channelId, null);
    }
    return packet;
View Full Code Here

    return new Unknown(dataType, in.asReadOnlyBuffer());
  }

  /** {@inheritDoc} */
  public ChunkSize decodeChunkSize(ByteBuffer in) {
    return new ChunkSize(in.getInt());
  }
View Full Code Here

            if ( !( event instanceof IRTMPEvent ) ) {
                logger.debug( "skipping non rtmp event: " + event );
                return;
            }

            IRTMPEvent rtmpEvent = (IRTMPEvent) event;

            if ( logger.isDebugEnabled() ) {
                // logger.debug("rtmp event: " + rtmpEvent.getHeader() + ", " +
                // rtmpEvent.getClass().getSimpleName());
            }

            if ( !( rtmpEvent instanceof IStreamData ) ) {
                logger.debug( "skipping non stream data" );
                return;
            }

            if ( rtmpEvent.getHeader().getSize() == 0 ) {
                logger.debug( "skipping event where size == 0" );
                return;
            }

            if ( rtmpEvent instanceof VideoData ) {
View Full Code Here

TOP

Related Classes of org.red5.server.net.rtmp.event.ChunkSize

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.