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

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


          }
          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

        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

  private VideoData getData(byte[] data) {
    IoBuffer buf = IoBuffer.allocate(data.length);
    buf.clear();
    buf.put(data);
    buf.flip();
    return new VideoData(buf);
  }
View Full Code Here

          if (log.isTraceEnabled()) {
            log.trace(String.format("Image was captured in %s ms", System.currentTimeMillis() - start));
          }
          start = System.currentTimeMillis();
          try {
            VideoData data = se.encode(image);
            if (log.isTraceEnabled()) {
              log.trace(String.format("Image was encoded in %s ms", System.currentTimeMillis() - start));
            }
            frames.offer(data);
            se.createUnalteredFrame();
          } catch (IOException e) {
            log.error("Error while encoding: ", e);
          }
        }
      }, 0, timeBetweenFrames * NANO_MULTIPLIER, TimeUnit.NANOSECONDS);
      sendScheduler.scheduleWithFixedDelay(new Runnable() {
        public void run() {
          VideoData f = frames.poll();
          f = f == null ? se.getUnalteredFrame() : f;
          if (f != null) {
            try {
              timestamp += timeBetweenFrames;
              pushVideo(f, timestamp);
View Full Code Here

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

  private VideoData getData(byte[] data) {
    IoBuffer buf = IoBuffer.allocate(data.length);
    buf.clear();
    buf.put(data);
    buf.flip();
    return new VideoData(buf);
  }
View Full Code Here

TOP

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

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.