use of org.olat.modules.video.model.VideoTranscodingImpl in project OpenOLAT by OpenOLAT.
the class VideoTranscodingDAO method updateTranscodingStatus.
/**
* Update transcoding status so TranscodingJob can find the resource.
*
* @param videoTranscoding
* @return updated videoTranscoding
*/
VideoTranscoding updateTranscodingStatus(VideoTranscoding videoTranscoding) {
((VideoTranscodingImpl) videoTranscoding).setLastModified(new Date());
videoTranscoding.setStatus(-1);
VideoTranscoding trans = dbInstance.getCurrentEntityManager().merge(videoTranscoding);
return trans;
}
use of org.olat.modules.video.model.VideoTranscodingImpl in project OpenOLAT by OpenOLAT.
the class VideoTranscodingDAO method updateTranscoding.
/**
* Merge updated video transcoding, persist on DB
*
* @param videoTranscoding
* @return Updated transcoding object
*/
VideoTranscoding updateTranscoding(VideoTranscoding videoTranscoding) {
((VideoTranscodingImpl) videoTranscoding).setLastModified(new Date());
VideoTranscoding trans = dbInstance.getCurrentEntityManager().merge(videoTranscoding);
return trans;
}
use of org.olat.modules.video.model.VideoTranscodingImpl in project openolat by klemens.
the class VideoTranscodingDAO method updateTranscodingStatus.
/**
* Update transcoding status so TranscodingJob can find the resource.
*
* @param videoTranscoding
* @return updated videoTranscoding
*/
VideoTranscoding updateTranscodingStatus(VideoTranscoding videoTranscoding) {
((VideoTranscodingImpl) videoTranscoding).setLastModified(new Date());
videoTranscoding.setStatus(-1);
VideoTranscoding trans = dbInstance.getCurrentEntityManager().merge(videoTranscoding);
return trans;
}
use of org.olat.modules.video.model.VideoTranscodingImpl in project openolat by klemens.
the class VideoTranscodingDAO method updateTranscoding.
/**
* Merge updated video transcoding, persist on DB
*
* @param videoTranscoding
* @return Updated transcoding object
*/
VideoTranscoding updateTranscoding(VideoTranscoding videoTranscoding) {
((VideoTranscodingImpl) videoTranscoding).setLastModified(new Date());
VideoTranscoding trans = dbInstance.getCurrentEntityManager().merge(videoTranscoding);
return trans;
}
use of org.olat.modules.video.model.VideoTranscodingImpl in project OpenOLAT by OpenOLAT.
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