本文整理汇总了Java中uk.co.caprica.vlcj.runtime.RuntimeUtil类的典型用法代码示例。如果您正苦于以下问题:Java RuntimeUtil类的具体用法?Java RuntimeUtil怎么用?Java RuntimeUtil使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
RuntimeUtil类属于uk.co.caprica.vlcj.runtime包,在下文中一共展示了RuntimeUtil类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: VLCPlayer
import uk.co.caprica.vlcj.runtime.RuntimeUtil; //导入依赖的package包/类
VLCPlayer(ElphelVision parent) {
this.Parent = parent;
List<String> vlcArgs = new ArrayList<String>();
vlcArgs.add("--no-video-title-show");
vlcArgs.add("--rtsp-caching=50");
vlcArgs.add("--clock-jitter=0");
// This burns so many people on Windows that I decided to leave it in...
if (RuntimeUtil.isWindows()) {
vlcArgs.add("--plugin-path=" + WindowsRuntimeUtil.getVlcInstallDir() + "\\plugins");
}
// fullScreenStrategy = new
// DefaultFullScreenStrategy(Parent.GetMainframe());
mediaPlayerFactory = new MediaPlayerFactory(vlcArgs.toArray(new String[vlcArgs.size()]));
mediaPlayer = mediaPlayerFactory.newEmbeddedMediaPlayer(fullScreenStrategy);
// mediaPlayer = mediaPlayerFactory.newMediaPlayer(null);
}
开发者ID:apertus-open-source-cinema,项目名称:elphelvision_eclipse,代码行数:21,代码来源:VLCPlayer.java
示例2: VLCPlayer
import uk.co.caprica.vlcj.runtime.RuntimeUtil; //导入依赖的package包/类
VLCPlayer(ElphelVision parent) {
this.Parent = parent;
List<String> vlcArgs = new ArrayList<String>();
vlcArgs.add("--no-video-title-show");
vlcArgs.add("--rtsp-caching=50");
vlcArgs.add("--clock-jitter=0");
// This burns so many people on Windows that I decided to leave it in...
if (RuntimeUtil.isWindows()) {
vlcArgs.add("--plugin-path=" + WindowsRuntimeUtil.getVlcInstallDir() + "\\plugins");
}
//fullScreenStrategy = new DefaultFullScreenStrategy(Parent.GetMainframe());
mediaPlayerFactory = new MediaPlayerFactory(vlcArgs.toArray(new String[vlcArgs.size()]));
mediaPlayer = mediaPlayerFactory.newMediaPlayer(fullScreenStrategy);
//mediaPlayer = mediaPlayerFactory.newMediaPlayer(null);
}
开发者ID:apertus-open-source-cinema,项目名称:elphelvision_netbeans,代码行数:20,代码来源:VLCPlayer.java
示例3: ensureVLCLib
import uk.co.caprica.vlcj.runtime.RuntimeUtil; //导入依赖的package包/类
/**
* Ensures that the vlcj Lib is properly loaded
*/
public synchronized static void ensureVLCLib(){
if(!vlcjLoaded && !vlcjLoadError)
{
String vlclibName = RuntimeUtil.getLibVlcLibraryName();
List<String> libPaths = VLCUtil.getVLCLibPaths();
logger.info("jni loading: " + vlclibName);
for (String libPath : libPaths) {
logger.debug("adding search path: " + libPath);
NativeLibrary.addSearchPath(vlclibName, libPath);
}
try{
Native.loadLibrary(vlclibName, LibVlc.class);
vlcjLoaded = true;
}catch(UnsatisfiedLinkError e){
vlcjLoadError = true;
logger.error(e);
}
}
}
开发者ID:Vidada-Project,项目名称:vidada-desktop,代码行数:27,代码来源:VLCjUtil.java
示例4: initVideoImportEngine
import uk.co.caprica.vlcj.runtime.RuntimeUtil; //导入依赖的package包/类
@Override
public void initVideoImportEngine(Optional<String> pathToLibrary) {
if (pathToLibrary.isPresent()) {
log.debug("Path to library {}", pathToLibrary);
NativeLibrary.addSearchPath(RuntimeUtil.getLibVlcLibraryName(), pathToLibrary.get());
Native.loadLibrary(RuntimeUtil.getLibVlcLibraryName(), LibVlc.class);
log.debug("Library loaded");
}
}
开发者ID:KodeMunkie,项目名称:imagetozxspec,代码行数:10,代码来源:VLCVideoImportEngine.java
示例5: main
import uk.co.caprica.vlcj.runtime.RuntimeUtil; //导入依赖的package包/类
public static void main(String[] args) {
// TODO code application logic here
NativeLibrary.addSearchPath(RuntimeUtil.getLibVlcLibraryName(), NATIVE_LIBRARY_SEARCH_PATH);
System.out.println(LibVlc.INSTANCE.libvlc_get_version());
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
new JSTPlay();
}
});
}
开发者ID:DIT524-V17,项目名称:group-10,代码行数:12,代码来源:JSTPlay.java
示例6: create
import uk.co.caprica.vlcj.runtime.RuntimeUtil; //导入依赖的package包/类
public void create(String filepath) throws Error {
camera = new OrthographicCamera();
camera.setToOrtho(false, w, h);
camera.update();
LibXUtil.initialise();
NativeLibrary.addSearchPath(RuntimeUtil.getLibVlcLibraryName(), vlcpath);
Native.loadLibrary(RuntimeUtil.getLibVlcLibraryName(), LibVlc.class);
image = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().getDefaultConfiguration()
.createCompatibleImage((int) w, (int) h);
image.setAccelerationPriority(1.0f);
String[] args = null;
if ((System.getProperty("os.name").toLowerCase().indexOf("mac") >= 0)) {
String pluginpath = vlcpath.substring(0, vlcpath.lastIndexOf('/')) + "/plugins";
System.out.println(pluginpath);
uk.co.caprica.vlcj.binding.LibC.INSTANCE.setenv("VLC_PLUGIN_PATH", pluginpath, 1);
args = new String[] { "--no-video-title-show", "--verbose=3", "--vout=macosx" };
} else {
args = new String[] { "--no-video-title-show", "--verbose=3" };
}
factory = new MediaPlayerFactory(args);
mediaPlayer = factory.newDirectMediaPlayer(new TestBufferFormatCallback(), new TestRenderCallback());
mediaPlayer.prepareMedia(filepath);
mediaPlayer.start();
mediaPlayer.pause();
System.out.println(LibVlc.INSTANCE.libvlc_get_version());
}
开发者ID:exch-bms2,项目名称:beatoraja,代码行数:34,代码来源:VLCMovieProcessor.java
示例7: ScreenRecorder
import uk.co.caprica.vlcj.runtime.RuntimeUtil; //导入依赖的package包/类
public ScreenRecorder() {
NativeLibrary.addSearchPath(RuntimeUtil.getLibVlcLibraryName(), System.getProperty("user.dir")+"/lib");
System.setProperty("VLC_PLUGIN_PATH", System.getProperty("user.dir")+"/lib/plugins");
mediaPlayerFactory = new MediaPlayerFactory(OPTIONS);
mediaPlayer = mediaPlayerFactory.newHeadlessMediaPlayer();
}
开发者ID:experimentalqa,项目名称:MP4ScreenRecorder,代码行数:7,代码来源:ScreenRecorder.java
示例8: initPlayer
import uk.co.caprica.vlcj.runtime.RuntimeUtil; //导入依赖的package包/类
private void initPlayer() {
boolean found = new NativeDiscovery().discover();
if (!found) {
NativeLibrary.addSearchPath(RuntimeUtil.getLibVlcLibraryName(), NATIVE_LIBRARY_SEARCH_PATH);
}
}
开发者ID:scify,项目名称:TalkAndPlay,代码行数:7,代码来源:MediaPlayerService.java
示例9: cargaLibreria
import uk.co.caprica.vlcj.runtime.RuntimeUtil; //导入依赖的package包/类
private void cargaLibreria() {
NativeLibrary.addSearchPath(RuntimeUtil.getLibVlcLibraryName(), LIB_VLC);
Native.loadLibrary(RuntimeUtil.getLibVlcLibraryName(), LibVlc.class);
}
开发者ID:sfaci,项目名称:vlcj,代码行数:5,代码来源:HolaVLCJ.java
示例10: checkNativeLibrary
import uk.co.caprica.vlcj.runtime.RuntimeUtil; //导入依赖的package包/类
/**
* Check loading of the native library.
*
* @param showError if <code>true</code> will display
* a message to the user in a dialog if the library
* failed to load
*
* @return <code>true</code> if the library was
* loaded correctly. <code>false</code> otherwise.
*
*/
public static boolean checkNativeLibrary(boolean showError) {
if(!isLoaded) {
try {
String vlcLocationDefault = new String();
String vlcPluginPathDefault = null;
// attempt to load native libraries
if(OSInfo.isMacOs()) {
vlcLocationDefault = VLC_LOCATION_MAC;
vlcPluginPathDefault = VLC_PLUGIN_PATH_MAC;
} else if (OSInfo.isWindows()) {
vlcLocationDefault = VLC_LOCATION_WIN;
vlcPluginPathDefault = VLC_PLUGIN_PATH_WIN;
} else if (OSInfo.isNix()) {
// libvlc should be in /usr/lib and already included in LD_LIBRARY_PATH
// on most systems
}
final String vlcLocation = PrefHelper.get(VLC_LOCATION, vlcLocationDefault);
NativeLibrary.addSearchPath(RuntimeUtil.getLibVlcLibraryName(), vlcLocation);
final String vlcPluginPath = PrefHelper.get(VLC_PLUGIN_PATH, vlcPluginPathDefault);
if(vlcPluginPath != null && !OSInfo.isWindows()) {
LibC.INSTANCE.setenv("VLC_PLUGIN_PATH", vlcPluginPath, 1);
}
Object lib = Native.loadLibrary(RuntimeUtil.getLibVlcLibraryName(), LibVlc.class);
isLoaded = true;
// print info to logger
LOGGER.info("Using vlcj " + Info.getInstance().version());
LOGGER.info("Found libVLC " + LibVlcVersion.getVersion() + " at " + getLibraryPath(lib));
} catch (UnsatisfiedLinkError e) {
LOGGER.log(Level.SEVERE, e.getLocalizedMessage(), e);
if(showError)
ToastFactory.makeToast(e.getLocalizedMessage()).start();
}
}
return isLoaded;
}
开发者ID:phon-ca,项目名称:phon,代码行数:53,代码来源:VLCHelper.java
注:本文中的uk.co.caprica.vlcj.runtime.RuntimeUtil类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论