Package org.red5.server.api.stream

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


        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

    log.debug("Name of CLient and Stream to be recorded: "+broadcastid);   
    //log.debug("Application.getInstance()"+Application.getInstance());
    log.debug("Scope "+conn);
    log.debug("Scope "+conn.getScope());
    // Get a reference to the current broadcast stream.
    ClientBroadcastStream stream = (ClientBroadcastStream) ScopeApplicationAdapter.getInstance()
        .getBroadcastStream(conn.getScope(), broadcastid);
    try {
      // Save the stream to disk.
      stream.saveAs(streamName, false);
    } catch (Exception e) {
      log.error("Error while saving stream: " + streamName, e);
    }
  }
View Full Code Here

      log.debug("Name of CLient and Stream to be recorded: "+broadcastid);   
      //log.debug("Application.getInstance()"+Application.getInstance());
      log.debug("Scope "+conn);
      log.debug("Scope "+conn.getScope());
      // Get a reference to the current broadcast stream.
      ClientBroadcastStream stream = (ClientBroadcastStream) ScopeApplicationAdapter.getInstance()
          .getBroadcastStream(conn.getScope(), broadcastid);
   
     
      // Save the stream to disk.
      if (isScreenData) {
        stream.addStreamListener(new StreamScreenListener(streamName, conn.getScope(), flvRecordingMetaDataId, isScreenData, isInterview));
      } else {
          
        log.debug("### stream "+stream);
        log.debug("### streamName "+streamName);
        log.debug("### conn.getScope() "+conn.getScope());
        log.debug("### flvRecordingMetaDataId "+flvRecordingMetaDataId);
        log.debug("### isScreenData "+isScreenData);
        log.debug("### isInterview "+isInterview);
       
        if (isInterview) {
         
          //Additionally record the Video Signal
          stream.addStreamListener(new StreamScreenListener("AV_"+streamName, conn.getScope(), flvRecordingMetaDataId, isScreenData, isInterview));
        }
       
        stream.addStreamListener(new StreamAudioListener(streamName, conn.getScope(), flvRecordingMetaDataId, isScreenData, isInterview));
      }
      //Just for Debug Purpose
      //stream.saveAs(streamName+"_DEBUG", false);
    } catch (Exception e) {
      log.error("Error while saving stream: " + streamName, e);
View Full Code Here

     
      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

    log.debug("Name of CLient and Stream to be recorded: "+broadcastid);   
    //log.debug("Application.getInstance()"+Application.getInstance());
    log.debug("Scope "+conn);
    log.debug("Scope "+conn.getScope());
    // Get a reference to the current broadcast stream.
    ClientBroadcastStream stream = (ClientBroadcastStream) ScopeApplicationAdapter.getInstance()
        .getBroadcastStream(conn.getScope(), Long.valueOf(broadcastid).toString());
    try {
      // Save the stream to disk.
      stream.saveAs(streamName, false);
    } catch (Exception e) {
      log.error("Error while saving stream: " + streamName, e);
    }
  }
View Full Code Here

   * @param conn
   */
  public static void stopRecordingShow(IConnection conn, long broadcastId) throws Exception {
    log.debug("** stopRecordingShow: "+conn);
    log.debug("### Stop recording show for broadcastId: "+ broadcastId + " || " + conn.getScope().getContextPath());
    ClientBroadcastStream stream = (ClientBroadcastStream) ScopeApplicationAdapter.getInstance().
                        getBroadcastStream(conn.getScope(), Long.valueOf(broadcastId).toString());
    // Stop recording.
    stream.stopRecording();
  }
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

TOP

Related Classes of org.red5.server.api.stream.IBroadcastStreamService

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.