本文整理汇总了Java中uk.co.caprica.vlcj.discovery.NativeDiscovery类的典型用法代码示例。如果您正苦于以下问题:Java NativeDiscovery类的具体用法?Java NativeDiscovery怎么用?Java NativeDiscovery使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
NativeDiscovery类属于uk.co.caprica.vlcj.discovery包,在下文中一共展示了NativeDiscovery类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: main
import uk.co.caprica.vlcj.discovery.NativeDiscovery; //导入依赖的package包/类
public static void main(String[] args) {
//if(args.length != 1) {
// System.err.println("Specify an mrl");
// System.exit(1);
//}
new NativeDiscovery().discover();
setLookAndFeel();
//final String mrl = args[0];
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
RtspClientPlayer rtspClientPlayer=new RtspClientPlayer();
CommandClass commandClass= new CommandClass(rtspClientPlayer);
commandClass.setDaemon(true);
commandClass.start();
}
});
}
示例2: initialize
import uk.co.caprica.vlcj.discovery.NativeDiscovery; //导入依赖的package包/类
@Override
public void initialize(IWorkbenchConfigurer configurer) {
super.initialize(configurer);
org.eclipse.ui.ide.IDE.registerAdapters();
declareWorkbenchImages();
boolean found = false;
String vlcLib = ManagementFactory.getRuntimeMXBean().getSystemProperties().get("vlc");
if (vlcLib != null) {
found = true;
NativeLibrary.addSearchPath("vlc", vlcLib);
}
if (!found) {
found = new NativeDiscovery().discover();
}
if (!found) {
MessageDialog.openError(PlatformUI.getWorkbench().getDisplay().getActiveShell(), "Error", "Cannot play videos. VLC is either not installed or located in an unexpected directory. " + "If VLC is installed in an unexpected directory you can provide the path to its library. " + "Find SynergyView.ini and add a line to the end (if not already there) starting with " + "-Dvlc= followed by the path to an installation instance of VLC's lib folder.");
}
}
示例3: main
import uk.co.caprica.vlcj.discovery.NativeDiscovery; //导入依赖的package包/类
public static void main(String[] args) {
boolean found = new NativeDiscovery().discover();
if (!found) {
JOptionPane.showMessageDialog(null,
"VLC media player를 찾을 수 없습니다.\n\n\nhttps://nightlies.videolan.org/ 해당 URL을 통해 3.0.0 이상의 Nightly 빌드를 받아주세요.",
"오류", JOptionPane.ERROR_MESSAGE);
}
System.out.println(LibVlc.INSTANCE.libvlc_get_version());
YtQueueFrame.INSTANCE.setVisible(true);
}
示例4: main
import uk.co.caprica.vlcj.discovery.NativeDiscovery; //导入依赖的package包/类
public static void main(String[] args)throws Exception {
new NativeDiscovery().discover();
//use in the case of explicit search path
//NativeLibrary.addSearchPath(RuntimeUtils.getLibVlcLibraryName(,NATIVE_LIBRARY_SEARCH_PATH);
SwingUtilities.invokeLater(new Runnable(){
@Override
public void run(){
new RtspStreamServer();
}
});
}
示例5: VlcSdkImplementation
import uk.co.caprica.vlcj.discovery.NativeDiscovery; //导入依赖的package包/类
private VlcSdkImplementation() {
ArrayList<String> optionsList = new ArrayList<String>();
optionsList.add("--no-plugins-cache");
optionsList.add("--no-video-title-show");
optionsList.add("--no-snapshot-preview");
options = optionsList.toArray(new String[optionsList.size()]);
new NativeDiscovery().discover();
}
示例6: main
import uk.co.caprica.vlcj.discovery.NativeDiscovery; //导入依赖的package包/类
public static void main(String[] args) {
// TODO code application logic here
boolean found = new NativeDiscovery().discover();
System.out.println(found);
System.out.println(LibVlc.INSTANCE.libvlc_get_version());
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
new jSTPlay();
}
});
}
示例7: main
import uk.co.caprica.vlcj.discovery.NativeDiscovery; //导入依赖的package包/类
public static void main(String[] args) {
// TODO Auto-generated method stub
boolean found = new NativeDiscovery().discover();
System.out.println(found);
System.out.println(LibVlc.INSTANCE.libvlc_get_version());
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
new playerBase();
}
});
}
示例8: initVLC
import uk.co.caprica.vlcj.discovery.NativeDiscovery; //导入依赖的package包/类
private void initVLC() {
new NativeDiscovery().discover();
try {
Version vlcVersion = LibVlcVersion.getVersion();
System.out.println("VLC VERSION " + vlcVersion.toString());
vlcLoaded = true;
} catch (UnsatisfiedLinkError error) {
System.out.println("You need to install VLC for radio functions.");
}
}
示例9: initPlayer
import uk.co.caprica.vlcj.discovery.NativeDiscovery; //导入依赖的package包/类
private void initPlayer() {
boolean found = new NativeDiscovery().discover();
if (!found) {
NativeLibrary.addSearchPath(RuntimeUtil.getLibVlcLibraryName(), NATIVE_LIBRARY_SEARCH_PATH);
}
}
示例10: initCustomComponents
import uk.co.caprica.vlcj.discovery.NativeDiscovery; //导入依赖的package包/类
private void initCustomComponents() {
List<User> users = talkAndPlayProfilesConfig.getConfigurationHandler().getUsers();
if (users.size() > 4) {
usersPanel.setLayout(new GridLayout(0, 6));
} else {
usersPanel.setLayout(new GridLayout(0, users.size() + 2));
}
userPanelList = new ArrayList<>();
for (final User user : users) {
UserPanel userPanel = new UserPanel(parent, user);
userPanel.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
if (evt.getClickCount() == 2) {
boolean found = new NativeDiscovery().discover();
if (found) {
GridFrame imagesFrame;
try {
imagesFrame = new GridFrame(user.getName());
imagesFrame.setLocationRelativeTo(null);
imagesFrame.setTitle("Talk&Play");
imagesFrame.setExtendedState(JFrame.MAXIMIZED_BOTH);
imagesFrame.setVisible(true);
} catch (IOException ex) {
Logger.getLogger(MainFrame.class.getName()).log(Level.SEVERE, null, ex);
}
} else {
JOptionPane.showMessageDialog(parent,
"Εγκατέστησε το VLC και δοκίμασε ξανά");
}
}
}
});
userPanelList.add(userPanel);
}
repaintUsers();
}
示例11: main
import uk.co.caprica.vlcj.discovery.NativeDiscovery; //导入依赖的package包/类
public static void main(String[] args) {
// Set up logging
LogManager.getLogManager().reset();
Handler handler = new ConsoleHandler();
handler.setLevel(Level.ALL);
handler.setFormatter(new LogFormatter());
Logger.getLogger("").addHandler(handler);
// Redirect default System.out to the logger (because JDA does not use java logging...)
System.setOut(new PrintStream(System.out) {
@Override
public void print(String s) {
Logger.getLogger("System.out").info(s);
}
});
LOG.info("Starting...");
// Try to find VLC
boolean found = new NativeDiscovery().discover();
if (found) LOG.info("Found VLC: " + LibVlc.INSTANCE.libvlc_get_version());
else {
LOG.severe("Could not find VLC, exiting");
System.exit(-1);
}
// AudioService
AudioService audioService = new AudioService();
try {
// Load configuration
new ConfigurationBuilder(new File("config.properties")).build();
// Start JDA
JDA jda = new JDABuilder()
.setEmail(Configuration.EMAIL)
.setPassword(Configuration.PASSWORD)
.addListener(new JoinMessageListener(audioService))
.addListener(new CommandListener(audioService))
.buildAsync();
// Log to the specified log channel
if (!Configuration.LOG_CHANNEL.isEmpty()) {
ChannelLogHandler channelLogHandler = new ChannelLogHandler(jda, new LogFormatter());
Logger.getLogger("").addHandler(channelLogHandler);
}
} catch (Exception e) {
LOG.log(Level.SEVERE, "An unexpected error occurred", e);
}
}