Package org.red5.server.stream.message

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


     
      if (streamToClose == null) {
        log.debug("Could not aquire Stream, maybe already closed");
      }
     
      ClientBroadcastStream stream = (ClientBroadcastStream) streamToClose;
      // Stop recording.
      stream.stopRecording();
     
    } catch (Exception err) {
      log.error("[stopRecordingShow]",err);
    }
  }
View Full Code Here


     
      if (streamToClose == null) {
        log.debug("Could not aquire Stream, maybe already closed");
      }
     
      ClientBroadcastStream stream = (ClientBroadcastStream) streamToClose;

      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);
         
          if (listenerAdapter.getFlvRecordingMetaDataId().equals(flvRecordingMetaDataId)) {
            log.debug("Stream Closing :: "+flvRecordingMetaDataId);
            listenerAdapter.closeStream();
          }
         
        }
       
        for (IStreamListener iStreamListener : stream.getStreamListeners()) {
          stream.removeStreamListener(iStreamListener);
        }
     
      }
     
      // Just for Debugging
View Full Code Here

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

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

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

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

  }
  */
 
  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

 
      // 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

 
      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 void pushVideo(VideoData data, int ts) throws IOException {
    if (startPublish) {
      RTMPMessage rtmpMsg = RTMPMessage.build(data, ts);
      client.publishStreamData(streamId, rtmpMsg);
    }
  }
View Full Code Here

    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

            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

TOP

Related Classes of org.red5.server.stream.message.RTMPMessage

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.