Search in sources :

Example 1 with VideoTranscodingImpl

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;
}
Also used : VideoTranscodingImpl(org.olat.modules.video.model.VideoTranscodingImpl) VideoTranscoding(org.olat.modules.video.VideoTranscoding) Date(java.util.Date)

Example 2 with VideoTranscodingImpl

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;
}
Also used : VideoTranscodingImpl(org.olat.modules.video.model.VideoTranscodingImpl) VideoTranscoding(org.olat.modules.video.VideoTranscoding) Date(java.util.Date)

Example 3 with VideoTranscodingImpl

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;
}
Also used : VideoTranscodingImpl(org.olat.modules.video.model.VideoTranscodingImpl) VideoTranscoding(org.olat.modules.video.VideoTranscoding) Date(java.util.Date)

Example 4 with VideoTranscodingImpl

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;
}
Also used : VideoTranscodingImpl(org.olat.modules.video.model.VideoTranscodingImpl) VideoTranscoding(org.olat.modules.video.VideoTranscoding) Date(java.util.Date)

Example 5 with VideoTranscodingImpl

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;
}
Also used : VideoTranscodingImpl(org.olat.modules.video.model.VideoTranscodingImpl) Date(java.util.Date)

Aggregations

Date (java.util.Date)6 VideoTranscodingImpl (org.olat.modules.video.model.VideoTranscodingImpl)6 VideoTranscoding (org.olat.modules.video.VideoTranscoding)4