Package org.red5.server.net.rtmp.message

Examples of org.red5.server.net.rtmp.message.Packet


      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

        buffer.clear();
        buffer.put( video );
        buffer.flip();

        VideoData videoData = new VideoData( buffer );
        videoData.setTimestamp( (int) ts );

        kt++;

//        if ( kt < 10 ) {
//            logger.debug( "+++ " + videoData );
View Full Code Here

        buffer.clear();
        buffer.put( video );
        buffer.flip();

        VideoData videoData = new VideoData( buffer );
        videoData.setTimestamp( (int) ts );

        kt++;

//        if ( kt < 10 ) {
//            logger.debug( "+++ " + videoData );
View Full Code Here

   * @param streamId        Stream id
   */
  private void write(IRTMPEvent event, int streamId) {
    log.trace("write channel: {} stream id: {}", id, streamId);
    final Header header = new Header();
    final Packet packet = new Packet(header, event);
    header.setChannelId(id);
    int ts = event.getTimestamp();
    if (ts != 0) {
      header.setTimer(event.getTimestamp());     
    } else {
View Full Code Here

   * @param packet              Packet
   */
  public void setLastReadPacket(int channelId, Packet packet) {
    final ChannelInfo info = getChannelInfo(channelId);
    // grab last packet
    Packet prevPacket = info.getReadPacket();
    // set new one
    info.setReadPacket(packet);
    // free the previous packet
    freePacket(prevPacket);
  }
View Full Code Here

      if (in instanceof IoBuffer) {
        log.debug("Handskake");
        return;
      }
      try {
        final Packet packet = (Packet) in;
        final Object message = packet.getMessage();
        final Header source = packet.getHeader();

        log.debug("{}", source);
        log.debug("{}", message);
      } catch (RuntimeException e) {
        log.error("Exception", e);
View Full Code Here

            }
          }
          ReceivedMessageTask task = new ReceivedMessageTask(sessionId, message, handler, this);
          task.setMaxHandlingTimeout(maxHandlingTimeout);
          packetSequence.incrementAndGet();
          final Packet sentMessage = message;
          final Long startTime = System.nanoTime();
          ListenableFuture<Boolean> future = (ListenableFuture<Boolean>) executor.submitListenable(new ListenableFutureTask<Boolean>(task));
          currentQueueSize.incrementAndGet();
          future.addCallback(new ListenableFutureCallback<Boolean>() {
            private int getProcessingTime() {
View Full Code Here

    Status status = new Status(StatusCodes.NC_CONNECT_REJECTED, Status.ERROR, message);
    PendingCall call = new PendingCall(null, "onStatus", new Object[] { status });
    Invoke event = new Invoke();
    event.setCall(call);
    Header header = new Header();
    Packet packet = new Packet(header, event);
    header.setDataType(event.getDataType());
    // create dummy connection if local is empty
    RTMPConnection conn = (RTMPConnection) Red5.getConnectionLocal();
    if (conn == null) {
      try {
View Full Code Here

      LinkedList<PendingData> sendList = new LinkedList<PendingData>();
      pendingOutMessages.drainTo(sendList, Math.min(164, available));
      result = IoBuffer.allocate(targetSize).setAutoExpand(true);
      for (PendingData pendingMessage : sendList) {
        result.put(pendingMessage.getBuffer());
        Packet packet = pendingMessage.getPacket();
        if (packet != null) {
          try {
            handler.messageSent(this, packet);
            // mark packet as being written
            writingMessage(packet);
View Full Code Here

TOP

Related Classes of org.red5.server.net.rtmp.message.Packet

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.