use of lucee.runtime.video.VideoInput in project Lucee by lucee.
the class Video method doActionCutImage.
private void doActionCutImage() throws PageException, IOException {
// precheck settings
checkFile(source, "source", true, true, false);
if (!checkDestination(source, destination, name, nameconflict))
return;
// input
if (profile == null)
profile = new VideoProfileImpl();
// settings
settings(destination, profile);
destination.setMaxFrames(1);
destination.setFormat("image2");
// execute
Struct info = toStruct(getVideoExecuter().convert(pageContext.getConfig(), new VideoInput[] { source }, destination, profile));
// write cfvideo
debug(source);
pageContext.setVariable(result, info);
// setResult(raw,false);
}
use of lucee.runtime.video.VideoInput in project Lucee by lucee.
the class Video method doActionConvert.
private Struct doActionConvert(VideoInput source, VideoOutput destination, VideoProfile quality, String name, int nameconflict) throws PageException, IOException {
// precheck settings
checkFile(source, "source", true, true, false);
if (!checkDestination(source, destination, name, nameconflict))
return new StructImpl();
// input
if (quality == null)
quality = new VideoProfileImpl();
// settings
settings(destination, quality);
// execute
Struct info = toStruct(getVideoExecuter().convert(pageContext.getConfig(), new VideoInput[] { source }, destination, quality));
// write cfvideo
debug(source);
pageContext.setVariable(result, info);
return info;
// return setResult(raw,false);
}
use of lucee.runtime.video.VideoInput in project Lucee by lucee.
the class VideoPlayerJW method calculateDimension.
private static int[] calculateDimension(PageContext pc, List params, int width, String strWidth, int height, String strHeight) throws PageException {
Iterator it = params.iterator();
ArrayList sources = new ArrayList();
// Resource[] sources=new Resource[params.size()];
VideoPlayerParamBean param;
while (it.hasNext()) {
param = (VideoPlayerParamBean) it.next();
if (param.getVideo() != null)
sources.add(new VideoInputImpl(param.getVideo()));
}
return VideoUtilImpl.getInstance().calculateDimension(pc, (VideoInput[]) sources.toArray(new VideoInput[sources.size()]), width, strWidth, height, strHeight);
}
Aggregations