Examples of IStreamableFileService


Examples of org.red5.io.IStreamableFileService

      throw new IOException("The file is read-only");

    }

    IStreamableFileService service = factory.getService(file);

    IStreamableFile flv = service.getStreamableFile(file);

    writer = flv.getWriter();

  }
View Full Code Here

Examples of org.red5.io.IStreamableFileService

    } else if (!file.canWrite()) {
      throw new IOException("The file is read-only");
    }

    IStreamableFileService service = factory.getService(this.file);
    IStreamableFile flv = service.getStreamableFile(this.file);
    this.writer = flv.getWriter();

  }
View Full Code Here

Examples of org.red5.io.IStreamableFileService

    } else if (!file.canWrite()) {
      throw new IOException("The file is read-only");
    }

    IStreamableFileService service = factory.getService(this.file);
    IStreamableFile flv = service.getStreamableFile(this.file);
    this.writer = flv.getWriter();

  }
View Full Code Here

Examples of org.red5.io.IStreamableFileService

    } else if (!file.canWrite()) {
      throw new IOException("The file is read-only");
    }

    IStreamableFileService service = factory.getService(file);
    IStreamableFile flv = service.getStreamableFile(file);
    writer = flv.getWriter();
  }
View Full Code Here

Examples of org.red5.io.IStreamableFileService

      // Maybe the (previously existing) file has been deleted
      file.createNewFile();
    } else if (!file.canWrite()) {
      throw new IOException("the file is read-only");
    }
    IStreamableFileService service = factory.getService(file);
    IStreamableFile flv = service.getStreamableFile(file);
    if (mode == null || mode.equals(IClientStream.MODE_RECORD)) {
      writer = flv.getWriter();
    } else if (mode.equals(IClientStream.MODE_APPEND)) {
      writer = flv.getAppendWriter();
    } else {
View Full Code Here

Examples of org.red5.io.IStreamableFileService

     */
    private void init() throws IOException {
    IStreamableFileFactory factory = (IStreamableFileFactory) ScopeUtils
        .getScopeService(scope, IStreamableFileFactory.class,
            StreamableFileFactory.class);
    IStreamableFileService service = factory.getService(file);
    if (service == null) {
      log.error("No service found for " + file.getAbsolutePath());
      return;
    }
    IStreamableFile streamFile = service.getStreamableFile(file);
    reader = streamFile.getReader();
    if (start > 0) {
      seek(start);
    }
  }
View Full Code Here

Examples of org.red5.io.IStreamableFileService

    double duration = 0;

    IStreamableFileFactory factory = (IStreamableFileFactory) ScopeUtils
        .getScopeService(scope, IStreamableFileFactory.class,
            StreamableFileFactory.class);
    IStreamableFileService service = factory.getService(file);
    if (service == null) {
      log.error("No service found for {}", file.getAbsolutePath());
      return 0;
    }
    try {
      IStreamableFile streamFile = service.getStreamableFile(file);
      ITagReader reader = streamFile.getReader();
      duration = (double) reader.getDuration() / 1000;
      reader.close();
    } catch (IOException e) {
      log.error("error read stream file {}. {}", file.getAbsolutePath(), e);
View Full Code Here

Examples of org.red5.io.IStreamableFileService

    } else if (!file.canWrite()) {
      throw new IOException("The file is read-only");
    }

    IStreamableFileService service = factory.getService(file);
    IStreamableFile flv = service.getStreamableFile(file);
    writer = flv.getWriter();
  }
View Full Code Here

Examples of org.red5.io.IStreamableFileService

    } else if (!file.canWrite()) {
      throw new IOException("The file is read-only");
    }

    IStreamableFileService service = factory.getService(this.file);
    IStreamableFile flv = service.getStreamableFile(this.file);
    this.writer = flv.getWriter();

  }
View Full Code Here

Examples of org.red5.server.api.service.IStreamableFileService

    } else if (!file.canWrite()) {
      throw new IOException("The file is read-only");
    }

    IStreamableFileService service = factory.getService(file);
    IStreamableFile flv = service.getStreamableFile(file);
    writer = flv.getWriter();
  }
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.