Example usage for com.liferay.portal.kernel.util PropsKeys DL_FILE_ENTRY_PREVIEW_VIDEO_BIT_RATE

List of usage examples for com.liferay.portal.kernel.util PropsKeys DL_FILE_ENTRY_PREVIEW_VIDEO_BIT_RATE

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.util PropsKeys DL_FILE_ENTRY_PREVIEW_VIDEO_BIT_RATE.

Prototype

String DL_FILE_ENTRY_PREVIEW_VIDEO_BIT_RATE

To view the source code for com.liferay.portal.kernel.util PropsKeys DL_FILE_ENTRY_PREVIEW_VIDEO_BIT_RATE.

Click Source Link

Usage

From source file:com.liferay.portlet.documentlibrary.util.LiferayVideoConverter.java

License:Open Source License

protected void initVideoBitRateMap(Properties videoProperties) {
    _videoBitRateMap = new HashMap<String, Integer>();

    for (String previewVideoContainer : _previewVideoContainers) {
        int videoBitRate = GetterUtil.getInteger(videoProperties.getProperty(
                PropsKeys.DL_FILE_ENTRY_PREVIEW_VIDEO_BIT_RATE + "[" + previewVideoContainer + "]"));

        if (videoBitRate > _VIDEO_BIT_RATE_MAX) {
            videoBitRate = _VIDEO_BIT_RATE_MAX;
        }/*from   ww  w .j a v a  2 s . c  o  m*/

        if (videoBitRate > 0) {
            _videoBitRateMap.put(previewVideoContainer, videoBitRate);

            if (_log.isInfoEnabled()) {
                _log.info("Bit rate for " + previewVideoContainer + " set to " + videoBitRate);
            }
        }
    }
}