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

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


          }
          String scopeName = "hibernate";
          if (rcl.getRoom_id() != null) {
            scopeName = rcl.getRoom_id().toString();
          }
          IScope currentScope = this.scopeApplicationAdapter.getRoomScope(scopeName);
         
          HashMap<Integer,String> messageObj = new HashMap<Integer,String>();
          messageObj.put(0, "kick");
         
          this.scopeApplicationAdapter.sendMessageById(messageObj, rcl.getStreamid(), currentScope);
View Full Code Here


    // ------------------------------------------------------------------------

    private void createPlayStream( IPendingServiceCallback callback ) {

        logger.debug( "create play stream" );
        IPendingServiceCallback wrapper = new CreatePlayStreamCallBack( callback );
        invoke( "createStream", null, wrapper );
    }
View Full Code Here

      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

          send.setTimestamp(header.getTimer());
          data.write(send);
          break;
        case Constants.TYPE_BYTES_READ:
          log.trace("Bytes read");
          BytesRead bytesRead = new BytesRead(((BytesRead) msg).getBytesRead());
          bytesRead.setHeader(header);
          bytesRead.setTimestamp(header.getTimer());
          conn.getChannel((byte) 2).write(bytesRead);
          break;
        default:
          log.trace("Default: {}", dataType);
          data.write(msg);
View Full Code Here

  protected void updateBytesRead() {
    if (log.isTraceEnabled())
      log.trace("updateBytesRead");
    long bytesRead = getReadBytes();
    if (bytesRead >= nextBytesRead) {
      BytesRead sbr = new BytesRead((int) (bytesRead % Integer.MAX_VALUE));
      getChannel(2).write(sbr);
      nextBytesRead += bytesReadInterval;
    }
  }
View Full Code Here

    return ping;
  }

  /** {@inheritDoc} */
  public BytesRead decodeBytesRead(IoBuffer in) {
    return new BytesRead(in.getInt());
  }
View Full Code Here

          ping.setHeader(header);
          ping.setTimestamp(header.getTimer());
          conn.ping(ping);
          break;
        case Constants.TYPE_BYTES_READ:
          BytesRead bytesRead = new BytesRead(((BytesRead) msg)
              .getBytesRead());
          header.setTimerRelative(false);
          header.setTimer(0);
          bytesRead.setHeader(header);
          bytesRead.setTimestamp(header.getTimer());
          conn.getChannel((byte) 2).write(bytesRead);
          break;
        default:
          data.write(msg);
          break;
View Full Code Here

   * Update number of bytes to read next value.
   */
  protected void updateBytesRead() {
    long bytesRead = getReadBytes();
    if (bytesRead >= nextBytesRead) {
      BytesRead sbr = new BytesRead((int) bytesRead);
      getChannel((byte) 2).write(sbr);
      //@todo: what do we want to see printed here?
      //log.info(sbr);
      nextBytesRead += bytesReadInterval;
    }
View Full Code Here

    return ping;
  }

  /** {@inheritDoc} */
  public BytesRead decodeBytesRead(ByteBuffer in) {
    return new BytesRead(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.BytesRead

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.