Search in sources :

Example 1 with IContext

use of org.red5.server.api.IContext in project bigbluebutton by bigbluebutton.

the class ListenStream method startPublishing.

private void startPublishing(IScope aScope) {
    System.out.println("started publishing stream in " + aScope.getName());
    broadcastStream = new AudioStream(listenStreamName);
    broadcastStream.setPublishedName(listenStreamName);
    broadcastStream.setScope(aScope);
    IContext context = aScope.getContext();
    IProviderService providerService = (IProviderService) context.getBean(IProviderService.BEAN_NAME);
    if (providerService.registerBroadcastStream(aScope, listenStreamName, broadcastStream)) {
    // Do nothing.
    } else {
        log.error("could not register broadcast stream");
        throw new RuntimeException("could not register broadcast stream");
    }
    broadcastStream.start();
}
Also used : AudioStream(org.red5.app.sip.AudioStream) IContext(org.red5.server.api.IContext) IProviderService(org.red5.server.stream.IProviderService)

Example 2 with IContext

use of org.red5.server.api.IContext in project bigbluebutton by bigbluebutton.

the class SipToFlashAudioStream method start.

public void start() {
    if (log.isDebugEnabled())
        log.debug("started publishing stream in scope=[" + scope.getName() + "] path=[" + scope.getPath() + "]");
    audioBroadcastStream = new AudioBroadcastStream(listenStreamName);
    audioBroadcastStream.setPublishedName(listenStreamName);
    audioBroadcastStream.setScope(scope);
    IContext context = scope.getContext();
    IProviderService providerService = (IProviderService) context.getBean(IProviderService.BEAN_NAME);
    if (providerService.registerBroadcastStream(scope, listenStreamName, audioBroadcastStream)) {
    // Do nothing. Successfully registered a live broadcast stream. (ralam Sept. 4, 2012)
    } else {
        log.error("could not register broadcast stream");
        throw new RuntimeException("could not register broadcast stream");
    }
    audioBroadcastStream.start();
    transcoder.start();
    rtpStreamReceiver.start();
}
Also used : IContext(org.red5.server.api.IContext) IProviderService(org.red5.server.stream.IProviderService)

Aggregations

IContext (org.red5.server.api.IContext)2 IProviderService (org.red5.server.stream.IProviderService)2 AudioStream (org.red5.app.sip.AudioStream)1