Search in sources :

Example 1 with ClientBroadcastStream

use of org.red5.server.stream.ClientBroadcastStream in project bigbluebutton by bigbluebutton.

the class Application method recordStream.

/**
     * A hook to record a sample stream. A file is written in webapps/sip/streams/
     * @param stream
     */
private void recordStream(IBroadcastStream stream) {
    IConnection conn = Red5.getConnectionLocal();
    String streamName = stream.getPublishedName();
    try {
        ClientBroadcastStream cstream = (ClientBroadcastStream) this.getBroadcastStream(conn.getScope(), stream.getPublishedName());
        cstream.saveAs(streamName, false);
    } catch (Exception e) {
        System.out.println("ERROR while recording stream " + e.getMessage());
        e.printStackTrace();
    }
}
Also used : IConnection(org.red5.server.api.IConnection) ClientBroadcastStream(org.red5.server.stream.ClientBroadcastStream) PeerNotFoundException(org.bigbluebutton.voiceconf.sip.PeerNotFoundException)

Example 2 with ClientBroadcastStream

use of org.red5.server.stream.ClientBroadcastStream in project bigbluebutton by bigbluebutton.

the class VideoApplication method recordStream.

/**
	 * A hook to record a stream. A file is written in webapps/video-broadcast/streams/
	 * @param stream
	 */
private void recordStream(IBroadcastStream stream) {
    IConnection conn = Red5.getConnectionLocal();
    long now = System.currentTimeMillis();
    // + "-" + now; /** Comment out for now...forgot why I added this - ralam */
    String recordingStreamName = stream.getPublishedName();
    try {
        log.info("Recording stream " + recordingStreamName);
        ClientBroadcastStream cstream = (ClientBroadcastStream) this.getBroadcastStream(conn.getScope(), stream.getPublishedName());
        cstream.saveAs(recordingStreamName, false);
    } catch (Exception e) {
        log.error("ERROR while recording stream " + e.getMessage());
        e.printStackTrace();
    }
}
Also used : IConnection(org.red5.server.api.IConnection) ClientBroadcastStream(org.red5.server.stream.ClientBroadcastStream)

Example 3 with ClientBroadcastStream

use of org.red5.server.stream.ClientBroadcastStream in project bigbluebutton by bigbluebutton.

the class VideoApplication method recordStream.

/**
     * A hook to record a stream. A file is written in webapps/video/streams/
     * @param stream
     */
private void recordStream(IBroadcastStream stream) {
    IConnection conn = Red5.getConnectionLocal();
    long now = System.currentTimeMillis();
    // + "-" + now; /** Comment out for now...forgot why I added this - ralam */
    String recordingStreamName = stream.getPublishedName();
    try {
        log.info("Recording stream " + recordingStreamName);
        ClientBroadcastStream cstream = (ClientBroadcastStream) this.getBroadcastStream(conn.getScope(), stream.getPublishedName());
        cstream.saveAs(recordingStreamName, false);
    } catch (Exception e) {
        log.error("ERROR while recording stream " + e.getMessage());
        e.printStackTrace();
    }
}
Also used : IConnection(org.red5.server.api.IConnection) ClientBroadcastStream(org.red5.server.stream.ClientBroadcastStream)

Example 4 with ClientBroadcastStream

use of org.red5.server.stream.ClientBroadcastStream in project bigbluebutton by bigbluebutton.

the class Red5AppAdapter method recordStream.

/**
   * A hook to record a stream. A file is written in webapps/video/streams/
   * @param stream
   */
private void recordStream(IBroadcastStream stream) {
    IConnection conn = Red5.getConnectionLocal();
    long now = System.currentTimeMillis();
    // + "-" + now; /** Comment out for now...forgot why I added this - ralam */
    String recordingStreamName = stream.getPublishedName();
    try {
        log.info("Recording stream " + recordingStreamName);
        ClientBroadcastStream cstream = (ClientBroadcastStream) this.getBroadcastStream(conn.getScope(), stream.getPublishedName());
        cstream.saveAs(recordingStreamName, false);
    } catch (Exception e) {
        log.error("ERROR while recording stream " + e.getMessage());
        e.printStackTrace();
    }
}
Also used : IConnection(org.red5.server.api.IConnection) ClientBroadcastStream(org.red5.server.stream.ClientBroadcastStream)

Aggregations

IConnection (org.red5.server.api.IConnection)4 ClientBroadcastStream (org.red5.server.stream.ClientBroadcastStream)4 PeerNotFoundException (org.bigbluebutton.voiceconf.sip.PeerNotFoundException)1