Package net.pms.io

Examples of net.pms.io.SystemUtils


    return defaults.getTsmuxerNewPath();
  }

  @Override
  public String getVlcPath() {
    SystemUtils registry = PMS.get().getRegistry();
    if (registry.getVlcPath() != null) {
      String vlc = registry.getVlcPath();
      String version = registry.getVlcVersion();
      if (new File(vlc).exists() && version != null) {
        LOGGER.debug("Found VLC version " + version + " in Windows Registry: " + vlc);
        return vlc;
      }
    }
View Full Code Here


    private double doPing(int size) {
      // let's get that speed
      OutputParams op = new OutputParams(null);
      op.log = true;
      op.maxBufferSize = 1;
      SystemUtils sysUtil = PMS.get().getRegistry();
      final ProcessWrapperImpl pw = new ProcessWrapperImpl(sysUtil.getPingCommand(addr.getHostAddress(), 3, size), op, true, false);
      Runnable r = new Runnable() {
        @Override
        public void run() {
          try {
            Thread.sleep(3000);
          } catch (InterruptedException e) {
          }
          pw.stopProcess();
        }
      };

      Thread failsafe = new Thread(r, "SpeedStats Failsafe");
      failsafe.start();
      pw.runInSameThread();
      List<String> ls = pw.getOtherResults();
      double time = 0;
      int c = 0;
      String timeString;

      for (String line : ls) {
        timeString = sysUtil.parsePingLine(line);
        if (timeString == null) {
          continue;
        }
        try {
          time += Double.parseDouble(timeString);
View Full Code Here

    return defaults.getTsmuxerPath();
  }

  @Override
  public String getVlcPath() {
    SystemUtils registry = PMS.get().getRegistry();

    if (registry.getVlcPath() != null) {
      String vlc = registry.getVlcPath();
      String version = registry.getVlcVersion();

      if (new File(vlc).exists() && version != null) {
        logger.debug("Found VLC version " + version + " in Windows Registry: " + vlc);
        return vlc;
      }
View Full Code Here

      // let's get that speed
      OutputParams op = new OutputParams(null);
      op.log = true;
      op.maxBufferSize = 1;
      SystemUtils sysUtil = PMS.get().getRegistry();
      final ProcessWrapperImpl pw = new ProcessWrapperImpl(sysUtil.getPingCommand(addr.getHostAddress(), 3, 64000), op,
          true, false);
      Runnable r = new Runnable() {
        public void run() {
          try {
            Thread.sleep(2000);
View Full Code Here

TOP

Related Classes of net.pms.io.SystemUtils

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.