예제 #1
0
  public synchronized boolean open(File file) {
    if (file == null || !file.isFile()) {
      return false;
    }

    // MacOS filesystem may require NFD unicode decomposition (forcing NFD seems to work for
    // System.out() but passing to libmediainfo is still not working)
    String path = file.getAbsolutePath();
    if (Platform.isMac()) {
      path = Normalizer.normalize(path, Form.NFD);
    }
    return MediaInfoLibrary.INSTANCE.Open(handle, new WString(path)) > 0;
  }