use of org.olat.modules.video.model.VideoMetadataImpl in project OpenOLAT by OpenOLAT.
the class VideoManagerImpl method readVideoMetadataFile.
@Override
public VideoMetadata readVideoMetadataFile(OLATResource videoResource) {
VFSContainer baseContainer = FileResourceManager.getInstance().getFileResourceRootImpl(videoResource);
VFSLeaf metaDataFile = (VFSLeaf) baseContainer.resolve(FILENAME_VIDEO_METADATA_XML);
try {
return (VideoMetadata) XStreamHelper.readObject(XStreamHelper.createXStreamInstance(), metaDataFile);
} catch (Exception e) {
log.error("Error while parsing XStream file for videoResource::" + videoResource, e);
// return an empty, so at least it displays something and not an error
VideoMetadata meta = new VideoMetadataImpl();
meta.setWidth(800);
meta.setHeight(600);
return meta;
}
}
use of org.olat.modules.video.model.VideoMetadataImpl in project openolat by klemens.
the class VideoManagerImpl method readVideoMetadataFile.
@Override
public VideoMetadata readVideoMetadataFile(OLATResource videoResource) {
VFSContainer baseContainer = FileResourceManager.getInstance().getFileResourceRootImpl(videoResource);
VFSLeaf metaDataFile = (VFSLeaf) baseContainer.resolve(FILENAME_VIDEO_METADATA_XML);
try {
return (VideoMetadata) XStreamHelper.readObject(XStreamHelper.createXStreamInstance(), metaDataFile);
} catch (Exception e) {
log.error("Error while parsing XStream file for videoResource::" + videoResource, e);
// return an empty, so at least it displays something and not an error
VideoMetadata meta = new VideoMetadataImpl();
meta.setWidth(800);
meta.setHeight(600);
return meta;
}
}
Aggregations