List of usage examples for com.liferay.portal.kernel.util PropsKeys DL_FILE_ENTRY_PREVIEW_VIDEO_CONTAINERS
String DL_FILE_ENTRY_PREVIEW_VIDEO_CONTAINERS
To view the source code for com.liferay.portal.kernel.util PropsKeys DL_FILE_ENTRY_PREVIEW_VIDEO_CONTAINERS.
Click Source Link
From source file:com.liferay.portlet.documentlibrary.util.LiferayVideoConverter.java
License:Open Source License
public LiferayVideoConverter(String inputURL, String outputURL, String tempFileName, Properties videoProperties, Properties ffpresetProperties) { _inputURL = inputURL;/*from w w w . j ava2 s .com*/ _outputURL = outputURL; _tempFileName = tempFileName; _ffpresetProperties = ffpresetProperties; _height = GetterUtil.getInteger(videoProperties.getProperty(PropsKeys.DL_FILE_ENTRY_PREVIEW_VIDEO_HEIGHT), _height); _width = GetterUtil.getInteger(videoProperties.getProperty(PropsKeys.DL_FILE_ENTRY_PREVIEW_VIDEO_WIDTH), _width); _previewVideoContainers = StringUtil .split(videoProperties.getProperty(PropsKeys.DL_FILE_ENTRY_PREVIEW_VIDEO_CONTAINERS)); initVideoBitRateMap(videoProperties); initVideoFrameRateMap(videoProperties); }
From source file:com.liferay.portlet.documentlibrary.util.VideoProcessorImpl.java
License:Open Source License
private VideoProcessorImpl() { boolean valid = true; if ((_PREVIEW_TYPES.length == 0) || (_PREVIEW_TYPES.length > 2)) { valid = false;//from www.j a v a 2s.c o m } else { for (String previewType : _PREVIEW_TYPES) { if (!previewType.equals("mp4") && !previewType.equals("ogv")) { valid = false; break; } } } if (!valid && _log.isWarnEnabled()) { StringBundler sb = new StringBundler(5); sb.append("Liferay is incorrectly configured to generate video "); sb.append("previews using video containers other than MP4 or "); sb.append("OGV. Please change the property "); sb.append(PropsKeys.DL_FILE_ENTRY_PREVIEW_VIDEO_CONTAINERS); sb.append(" in portal-ext.properties."); _log.warn(sb.toString()); } FileUtil.mkdirs(PREVIEW_TMP_PATH); FileUtil.mkdirs(THUMBNAIL_TMP_PATH); }