Package org.red5.server.stream

Examples of org.red5.server.stream.ClientBroadcastStream


      StreamListener listenerAdapter = streamListeners.get(flvRecordingMetaDataId);

      log.debug("Stream Closing :: " + flvRecordingMetaDataId);

      ClientBroadcastStream stream = (ClientBroadcastStream) streamToClose;

      // the stream can be null if the user just closes the browser
      // without canceling the recording before leaving
      if (stream != null) {
        // Iterate through all stream listeners and stop the appropriate
        if (stream.getStreamListeners() != null) {
          for (IStreamListener iStreamListener : stream.getStreamListeners()) {
            stream.removeStreamListener(iStreamListener);
          }
        }
      }

      if (listenerAdapter == null) {
View Full Code Here


          + 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
          .getBroadcastStream(conn.getScope(), broadcastid);

      if (stream == null) {
        log.debug("Unable to get stream: " + streamName);
        return;
      }
      // Save the stream to disk.
      if (isScreenData) {
       
        StreamVideoListener streamScreenListener = new StreamVideoListener(streamName,
                                    conn.getScope(), flvRecordingMetaDataId, isScreenData,
                                    isInterview, flvRecordingMetaDataDao);
       
        streamListeners.put(flvRecordingMetaDataId, streamScreenListener);
       
        stream.addStreamListener(streamScreenListener);
      } 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);

        StreamAudioListener streamAudioListener = new StreamAudioListener(streamName,
                                  conn.getScope(), flvRecordingMetaDataId, isScreenData,
                                  isInterview, flvRecordingMetaDeltaDao, flvRecordingMetaDataDao);

        streamListeners.put(flvRecordingMetaDataId, streamAudioListener);

        stream.addStreamListener(streamAudioListener);
      }
      // Just for Debug Purpose
      // stream.saveAs(streamName+"_DEBUG", false);
    } catch (Exception e) {
      log.error("Error while saving stream: " + streamName, e);
View Full Code Here

      BaseStreamListener listenerAdapter = streamListeners.get(flvRecordingMetaDataId);
     
      log.debug("Stream Closing :: " + flvRecordingMetaDataId);
     
      ClientBroadcastStream stream = (ClientBroadcastStream) streamToClose;

      //the stream can be null if the user just closes the browser
      //without canceling the recording before leaving
      if (stream != null) {
        //Iterate through all stream listeners and stop the appropriate
        if (stream.getStreamListeners() != null) {
 
          for (IStreamListener iStreamListener : stream
              .getStreamListeners()) {
            stream.removeStreamListener(iStreamListener);
          }
        }
      }
     
      if (listenerAdapter == null) {
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.getBroadcastStream(conn.getScope(), broadcastid);

      if (stream == null) {
        log.debug("Unable to get stream: " + streamName);
        return;
      }
      // Save the stream to disk.
      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);
      StreamListener streamListener = new StreamListener(!isScreenData, streamName, conn.getScope(),
          flvRecordingMetaDataId, isScreenData, isInterview, metaDataDao, metaDeltaDao);

      streamListeners.put(flvRecordingMetaDataId, streamListener);

      stream.addStreamListener(streamListener);
      // Just for Debug Purpose
      // stream.saveAs(streamName+"_DEBUG", false);
    } catch (Exception e) {
      log.error("Error while saving stream: " + streamName, e);
    }
View Full Code Here

      StreamListener listenerAdapter = streamListeners.get(flvRecordingMetaDataId);

      log.debug("Stream Closing :: " + flvRecordingMetaDataId);

      ClientBroadcastStream stream = (ClientBroadcastStream) streamToClose;

      // the stream can be null if the user just closes the browser
      // without canceling the recording before leaving
      if (stream != null) {
        // Iterate through all stream listeners and stop the appropriate
        if (stream.getStreamListeners() != null) {
          for (IStreamListener iStreamListener : stream.getStreamListeners()) {
            stream.removeStreamListener(iStreamListener);
          }
        }
      }

      if (listenerAdapter == null) {
View Full Code Here

          + 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
          .getBroadcastStream(conn.getScope(), broadcastid);

      if (stream == null) {
        log.debug("Unable to get stream: " + streamName);
        return;
      }
      // Save the stream to disk.
      if (isScreenData) {
       
        StreamVideoListener streamScreenListener = new StreamVideoListener(streamName,
                                    conn.getScope(), flvRecordingMetaDataId, isScreenData,
                                    isInterview, flvRecordingMetaDataDao);
       
        streamListeners.put(flvRecordingMetaDataId, streamScreenListener);
       
        stream.addStreamListener(streamScreenListener);
      } 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);

        StreamAudioListener streamAudioListener = new StreamAudioListener(streamName,
                                  conn.getScope(), flvRecordingMetaDataId, isScreenData,
                                  isInterview, flvRecordingMetaDeltaDao, flvRecordingMetaDataDao);

        streamListeners.put(flvRecordingMetaDataId, streamAudioListener);

        stream.addStreamListener(streamAudioListener);
      }
      // Just for Debug Purpose
      // stream.saveAs(streamName+"_DEBUG", false);
    } catch (Exception e) {
      log.error("Error while saving stream: " + streamName, e);
View Full Code Here

      BaseStreamListener listenerAdapter = streamListeners.get(flvRecordingMetaDataId);
     
      log.debug("Stream Closing :: " + flvRecordingMetaDataId);
     
      ClientBroadcastStream stream = (ClientBroadcastStream) streamToClose;

      //the stream can be null if the user just closes the browser
      //without canceling the recording before leaving
      if (stream != null) {
        //Iterate through all stream listeners and stop the appropriate
        if (stream.getStreamListeners() != null) {
 
          for (IStreamListener iStreamListener : stream
              .getStreamListeners()) {
            stream.removeStreamListener(iStreamListener);
          }
        }
      }
     
      if (listenerAdapter == null) {
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.getBroadcastStream(conn.getScope(), broadcastid);

      if (stream == null) {
        log.debug("Unable to get stream: " + streamName);
        return;
      }
      // Save the stream to disk.
      log.debug("### stream " + stream);
      log.debug("### streamName " + streamName);
      log.debug("### conn.getScope() " + conn.getScope());
      log.debug("### flvRecordingMetaDataId " + metaId);
      log.debug("### isScreenData " + isScreenData);
      log.debug("### isInterview " + isInterview);
      StreamListener streamListener = new StreamListener(!isScreenData, streamName, conn.getScope(), metaId, isScreenData, isInterview, metaDataDao, metaDeltaDao);

      streamListeners.put(metaId, streamListener);

      stream.addStreamListener(streamListener);
      // Just for Debug Purpose
      // stream.saveAs(streamName+"_DEBUG", false);
    } catch (Exception e) {
      log.error("Error while saving stream: " + streamName, e);
    }
View Full Code Here

      StreamListener listenerAdapter = streamListeners.get(metaId);

      log.debug("Stream Closing :: " + metaId);

      ClientBroadcastStream stream = (ClientBroadcastStream) streamToClose;

      // the stream can be null if the user just closes the browser
      // without canceling the recording before leaving
      if (stream != null) {
        // Iterate through all stream listeners and stop the appropriate
        if (stream.getStreamListeners() != null) {
          for (IStreamListener iStreamListener : stream.getStreamListeners()) {
            stream.removeStreamListener(iStreamListener);
          }
        }
      }

      FlvRecordingMetaData metaData = metaDataDao.get(metaId);
View Full Code Here

      this.so = app.getSharedObject(room, "mtSO", true);
      if (id % 2 == 0) {
        TestStreamConnection conn = new TestStreamConnection("localhost", "/junit/mt", "session" + id);
        conn.setClient(registry.newClient(null));
        // create a few streams
        this.stream = new ClientBroadcastStream();
        String name = "stream" + id;
        stream.setRegisterJMX(false);
        stream.setPublishedName(name);
        stream.setScope(room);
        stream.setConnection(conn);       
View Full Code Here

TOP

Related Classes of org.red5.server.stream.ClientBroadcastStream

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.