Examples of RTMPMessage


Examples of org.red5.server.stream.message.RTMPMessage

//        if ( kt < 10 ) {
//            logger.debug( "+++ " + videoData );
//            System.out.println( "+++ " + videoData);
//        }

        RTMPMessage rtmpMsg = new RTMPMessage();
        rtmpMsg.setBody( videoData );
        publishStreamData( publishStreamId, rtmpMsg );
    }
View Full Code Here

Examples of org.red5.server.stream.message.RTMPMessage

//        if ( kt < 10 ) {
//            logger.debug( "+++ " + videoData );
//            System.out.println( "+++ " + videoData);
//        }

        RTMPMessage rtmpMsg = new RTMPMessage();
        rtmpMsg.setBody( videoData );
        publishStreamData( publishStreamId, rtmpMsg );
    }
View Full Code Here

Examples of org.red5.server.stream.message.RTMPMessage

  }
  */
 
  private void pushVideo(VideoData data, int ts) throws IOException {
    if (startPublish) {
      RTMPMessage rtmpMsg = RTMPMessage.build(data, ts);
      client.publishStreamData(streamId, rtmpMsg);
    }
  }
View Full Code Here

Examples of org.red5.server.stream.message.RTMPMessage

 
      // I can stream audio
      //packets successfully using linear PCM at 11025Hz. For those packets I
      //push one byte (0x06) which specifies the format of audio data in a
      //ByteBuffer, and then real audio data:
      RTMPMessage rtmpMsg = RTMPMessage.build(new AudioData(buffer), (int) ts);
      client.publishStreamData(streamId, rtmpMsg);
    }
  }
View Full Code Here

Examples of org.red5.server.stream.message.RTMPMessage

 
      buffer.clear();
      buffer.put(video);
      buffer.flip();
 
      RTMPMessage rtmpMsg = RTMPMessage.build(new VideoData(buffer), (int) ts);
      client.publishStreamData(streamId, rtmpMsg);
    }
  }
View Full Code Here

Examples of org.red5.server.stream.message.RTMPMessage

  }
  */
 
  private void pushVideo(VideoData data, int ts) throws IOException {
    if (startPublish) {
      RTMPMessage rtmpMsg = RTMPMessage.build(data, ts);
      client.publishStreamData(streamId, rtmpMsg);
    }
  }
View Full Code Here

Examples of org.red5.server.stream.message.RTMPMessage

    assertTrue("player buffer should be initialized", playBuffer != null);
  }

  public void testPutMessage() throws Exception {
    enqueue();
    RTMPMessage peek_message = playBuffer.peekMessage();
    assertNotNull("message shouldn't be null", peek_message);
    assertTrue(peek_message.equals(rtmpMessage));
    dequeue();
  }
View Full Code Here

Examples of org.red5.server.stream.message.RTMPMessage

            default:
              log.warn("Unexpected type? {}", tag.getDataType());
              msg = new Unknown(tag.getDataType(), tag.getBody());
          }
          msg.setTimestamp(timestamp);
          RTMPMessage rtmpMsg = RTMPMessage.build(msg);
          return rtmpMsg;
        } else {
          log.debug("Tag was null");
        }
      } else {
View Full Code Here

Examples of org.red5.server.stream.message.RTMPMessage

          // note this timestamp is set in event/body but not in the associated header
          try {
            // route to live
            if (livePipe != null) {
              // create new RTMP message, initialize it and push through pipe
              RTMPMessage msg = RTMPMessage.build(rtmpEvent, eventTime);
              livePipe.pushMessage(msg);
            } else {
              log.debug("Live pipe was null, message was not pushed");
            }
          } catch (IOException err) {
View Full Code Here

Examples of org.red5.server.stream.message.RTMPMessage

   * Take a message from this buffer. The message count decreases.
   *
   * @return <tt>null</tt> if buffer is empty.
   */
  public RTMPMessage takeMessage() {
    RTMPMessage message = messageQueue.poll();
    if (message != null) {
      IRTMPEvent body = message.getBody();
      if (!(body instanceof IStreamData)) {
        throw new RuntimeException("Expected IStreamData but got " + body);
      }
      messageSize -= ((IStreamData<?>) body).getData().limit();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.