package net.pms.configuration; import net.pms.util.PropertiesUtil; import static org.apache.commons.lang3.StringUtils.isNotBlank; class WindowsDefaultPaths implements ProgramPaths { @Override public String getFfmpegPath() { return getBinariesPath() + "win32/ffmpeg.exe"; } @Override public String getFlacPath() { return getBinariesPath() + "win32/flac.exe"; } @Override public String getMencoderPath() { return getBinariesPath() + "win32/mencoder.exe"; } @Override public String getMplayerPath() { return getBinariesPath() + "win32/mplayer.exe"; } @Override public String getTsmuxerPath() { return getBinariesPath() + "win32/tsMuxeR.exe"; } @Override public String getVlcPath() { return getBinariesPath() + "videolan/vlc.exe"; } @Override public String getDCRaw() { return getBinariesPath() + "win32/dcrawMS.exe"; } /** * Returns the path where binaries can be found. This path differs between * the build phase and the test phase. The path will end with a slash unless * it is empty. * * @return The path for binaries. */ private String getBinariesPath() { String path = PropertiesUtil.getProjectProperties().get("project.binaries.dir"); if (isNotBlank(path)) { if (path.endsWith("/")) { return path; } else { return path + "/"; } } else { return ""; } } }