use of org.olat.modules.video.model.VideoTranscodingImpl in project openolat by klemens.
the class VideoTranscodingDAO method createVideoTranscoding.
/**
* Factory method to create and persist new video transcoding objects for a
* given video resource
*
* @param videoResource
* @param resolution
* @param format
* @return
*/
VideoTranscoding createVideoTranscoding(OLATResource videoResource, int resolution, String format) {
VideoTranscodingImpl videoTranscoding = new VideoTranscodingImpl();
videoTranscoding.setCreationDate(new Date());
videoTranscoding.setLastModified(videoTranscoding.getCreationDate());
videoTranscoding.setVideoResource(videoResource);
videoTranscoding.setResolution(resolution);
videoTranscoding.setFormat(format);
videoTranscoding.setStatus(VideoTranscoding.TRANSCODING_STATUS_WAITING);
dbInstance.getCurrentEntityManager().persist(videoTranscoding);
return videoTranscoding;
}
Aggregations