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

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


        String scopeName = "hibernate";
        if (rcl.getRoom_id() != null) {
          scopeName = rcl.getRoom_id().toString();
        }
        IScope currentScope = ScopeApplicationAdapter.getInstance()
            .getRoomScope(scopeName);
        ScopeApplicationAdapter.getInstance().roomLeaveByScope(rcl,
            currentScope);

        HashMap<Integer, String> messageObj = new HashMap<Integer, String>();
View Full Code Here


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

          }
          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

            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

    //whether or not the packet will be dropped
    boolean drop = false;
    //whether or not the packet is video data
    boolean isVideo = false;
    if (message instanceof Ping) {
      final Ping pingMessage = (Ping) message;
      if (pingMessage.getEventType() == Ping.STREAM_PLAYBUFFER_CLEAR) {
        // client buffer cleared, make sure to reset timestamps for this stream
        final int channel = (4 + ((pingMessage.getValue2() - 1) * 5));
        ((RTMPConnection) Red5.getConnectionLocal()).getState().clearLastTimestampMapping(channel, channel + 1, channel + 2);
      }
      // never drop pings
      return false;
    }
View Full Code Here

            log.warn("Video data was not found");
          }
          break;
        case Constants.TYPE_PING:
          log.trace("Ping");
          Ping ping = new Ping((Ping) msg);
          ping.setHeader(header);
          conn.ping(ping);
          break;
        case Constants.TYPE_STREAM_METADATA:
          log.trace("Meta data");
          Notify notify = new Notify(((Notify) msg).getData().asReadOnlyBuffer());
View Full Code Here

    if (log.isDebugEnabled())
      log.debug("Send Ping: session=[{}], currentTime=[{}], lastPingTime=[{}]", new Object[] { getSessionId(), newPingTime, lastPingSentOn.get() });
    if (lastPingSentOn.get() == 0) {
      lastPongReceivedOn.set(newPingTime);
    }
    Ping pingRequest = new Ping();
    pingRequest.setEventType(Ping.PING_CLIENT);
    lastPingSentOn.set(newPingTime);
    int now = (int) (newPingTime & 0xffffffff);
    pingRequest.setValue2(now);
    ping(pingRequest);
  }
View Full Code Here

  /**
   * Send clear ping. Lets client know that stream has no more data to
   * send.
   */
  private void sendClearPing() {
    Ping eof = new Ping();
    eof.setEventType(Ping.STREAM_PLAYBUFFER_CLEAR);
    eof.setValue2(streamId);
    // eos
    RTMPMessage eofMsg = RTMPMessage.build(eof);
    doPushMessage(eofMsg);
  }
View Full Code Here

TOP

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

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.