Package org.red5.server.api.stream

Examples of org.red5.server.api.stream.IStreamListener


        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

}
 
  public void start(IBroadcastStream broadcastStream, IScope scope) throws StreamException {
    if (log.isDebugEnabled())
      log.debug("startTranscodingStream({},{})", broadcastStream.getPublishedName(), scope.getName());
    mInputListener = new IStreamListener() {
      public void packetReceived(IBroadcastStream broadcastStream, IStreamPacket packet) {
          IoBuffer buf = packet.getData();
          if (buf != null)
            buf.rewind();
       
View Full Code Here

  public TalkStream(final Transcoder transcoder, final RtpStreamSender rtpSender) {
    this.transcoder = transcoder;
    this.rtpSender = rtpSender;
    talkStreamName = "microphone_" + System.currentTimeMillis();
   
    mInputListener = new IStreamListener() {
      public void packetReceived(IBroadcastStream broadcastStream, IStreamPacket packet) {
          IoBuffer buf = packet.getData();
          if (buf != null)
          buf.rewind();
       
View Full Code Here

           scopeName = conn.getScope().getName();
        } else {
           log.info("Connection local was null, using scope name from the stream: {}", stream);
           scopeName = stream.getScope().getName();
        }
        IStreamListener listener = streamListeners.remove(scopeName + "-" + stream.getPublishedName());
        if (listener != null) {
          stream.removeStreamListener(listener);
        }
       
        long publishDuration = (System.currentTimeMillis() - stream.getCreationTime()) / 1000;
View Full Code Here

        }
      });
          bsScope.subscribe(proxy, null);
          proxy.start(id, "live", null);
          streamingProxyMap.put(publishName, proxy);
          stream.addStreamListener(new IStreamListener() {
        public void packetReceived(IBroadcastStream stream, IStreamPacket packet) {
          try {
            RTMPMessage m = RTMPMessage.build((IRTMPEvent)packet, packet.getTimestamp());
                proxy.pushMessage(null, m);
          } catch (Exception e) {
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.api.stream.IStreamListener

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.