Package org.red5.server.stream

Examples of org.red5.server.stream.IProviderService


      case PipeConnectionEvent.PROVIDER_DISCONNECT:
        if (compCounter.decrementAndGet() <= 0) {
          // XXX should we synchronize parent before removing?
          if (hasParent()) {
            IScope parent = getParent();
            IProviderService providerService = (IProviderService) parent.getContext().getBean(IProviderService.BEAN_NAME);
            removed = providerService.unregisterBroadcastStream(parent, getName());
          } else {
            removed = true;
          }
        }
        break;
View Full Code Here


        stream.setRegisterJMX(false);
        stream.setPublishedName(name);
        stream.setScope(room);
        stream.setConnection(conn);       
        //
        IProviderService providerService = (IProviderService) room.getContext().getBean(IProviderService.BEAN_NAME);
        // publish this server-side stream
        providerService.registerBroadcastStream(room, name, stream);
        // start it
        app.streamBroadcastStart(stream);
        if (room.getBroadcastScope(name) == null) {
          log.warn("Stream scope failed");
        }
View Full Code Here

  /* Wrapper around the stream interfaces */

  /** {@inheritDoc} */
    public boolean hasBroadcastStream(IScope scope, String name) {
    IProviderService service = (IProviderService) getScopeService(scope,
        IProviderService.class, ProviderService.class);
    return (service.getLiveProviderInput(scope, name, false) != null);
  }
View Full Code Here

   *
   * @param  scope  Scope to retrieve broadcasted stream names
   * @return  List of broadcasted stream names.
   */
  public List<String> getBroadcastStreamNames(IScope scope) {
    IProviderService service = (IProviderService) getScopeService(scope,
        IProviderService.class, ProviderService.class);
    return service.getBroadcastStreamNames(scope);
  }
View Full Code Here

   *
   * @return <code>true</code> if scope has VOD stream with given name,
   *         <code>false</code> otherwise.
   */
  public boolean hasOnDemandStream(IScope scope, String name) {
    IProviderService service = (IProviderService) getScopeService(scope,
        IProviderService.class, ProviderService.class);
    return (service.getVODProviderInput(scope, name) != null);
  }
View Full Code Here

   * @param name
   *            Stream name
   * @return  Stream length in seconds (?)
   */
  public double getStreamLength(String name) {
    IProviderService provider = (IProviderService) getScopeService(scope,
        IProviderService.class, ProviderService.class);
    File file = provider.getVODProviderFile(scope, name);
    if (file == null) {
      return 0;
    }

    double duration = 0;
View Full Code Here

    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");
    }
View Full Code Here

    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");
    }
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.stream.IProviderService

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.