本文整理汇总了Java中org.opensourcephysics.media.core.VideoType类的典型用法代码示例。如果您正苦于以下问题:Java VideoType类的具体用法?Java VideoType怎么用?Java VideoType使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
VideoType类属于org.opensourcephysics.media.core包,在下文中一共展示了VideoType类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createObject
import org.opensourcephysics.media.core.VideoType; //导入依赖的package包/类
/**
* Creates a new XuggleVideo.
*
* @param control the control
* @return the new XuggleVideo
*/
public Object createObject(XMLControl control) {
try {
String path = control.getString("path"); //$NON-NLS-1$
String ext = XML.getExtension(path);
XuggleVideo video = new XuggleVideo(path);
VideoType xuggleType = VideoIO.getVideoType(VideoIO.ENGINE_XUGGLE, ext);
if (xuggleType!=null)
video.setProperty("video_type", xuggleType); //$NON-NLS-1$
return video;
} catch(IOException ex) {
OSPLog.fine(ex.getMessage());
return null;
}
}
示例2: createObject
import org.opensourcephysics.media.core.VideoType; //导入依赖的package包/类
/**
* Creates a new GifVideo.
*
* @param control the control
* @return the new GifVideo
*/
public Object createObject(XMLControl control) {
try {
String path = control.getString("path"); //$NON-NLS-1$
GifVideo video = new GifVideo(path);
VideoType gifType = VideoIO.getVideoType("gif", null); //$NON-NLS-1$
if (gifType!=null)
video.setProperty("video_type", gifType); //$NON-NLS-1$
return video;
} catch(IOException ex) {
OSPLog.fine(ex.getMessage());
return null;
}
}
示例3: setVideoType
import org.opensourcephysics.media.core.VideoType; //导入依赖的package包/类
/**
* Sets the video type.
*
* @param type the video type
*/
public void setVideoType(VideoType type) {
getGrabber().setVideoType(type);
}