Examples of IProviderService


Examples of org.red5.server.stream.IProviderService

  /* Wrapper around the stream interfaces */

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

Examples of org.red5.server.stream.IProviderService

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

Examples of org.red5.server.stream.IProviderService

   *
   * @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) ScopeUtils.getScopeService(scope, IProviderService.class, ProviderService.class);
    IMessageInput msgIn = service.getVODProviderInput(scope, name);
    if (msgIn instanceof AbstractPipe) {
      ((AbstractPipe) msgIn).close();
    }
    return (msgIn != null);
  }
View Full Code Here

Examples of org.red5.server.stream.IProviderService

   *            Stream name
   * @return Stream length in seconds (?)
   */
  public double getStreamLength(String name) {
    double duration = 0;
    IProviderService provider = (IProviderService) ScopeUtils.getScopeService(scope, IProviderService.class, ProviderService.class);
    File file = provider.getVODProviderFile(scope, name);
    if (file != null && file.canRead()) {
      IStreamableFileFactory factory = (IStreamableFileFactory) ScopeUtils.getScopeService(scope, IStreamableFileFactory.class, StreamableFileFactory.class);
      IStreamableFileService service = factory.getService(file);
      if (service != null) {
        ITagReader reader = null;
View Full Code Here

Examples of org.red5.server.stream.IProviderService

      long playItemSize = -1;
      String playItemName = "";
      if (item != null) {
        playItemName = item.getName();
        //get file size in bytes if available
        IProviderService providerService = (IProviderService) scope.getContext().getBean(IProviderService.BEAN_NAME);
        if (providerService != null) {
          File file = providerService.getVODProviderFile(scope, playItemName);
          if (file != null) {
            playItemSize = file.length();
          } else {
            log.debug("File was null, this is ok for live streams");
          }
View Full Code Here

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

Examples of org.red5.server.stream.IProviderService

        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

Examples of org.red5.server.stream.IProviderService

  /* 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

Examples of org.red5.server.stream.IProviderService

   *
   * @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

Examples of org.red5.server.stream.IProviderService

   *
   * @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
TOP
Copyright © 2018 www.massapi.com. 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.