当前位置: 首页>>代码示例>>Java>>正文


Java NativeDiscovery类代码示例

本文整理汇总了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();
   
        } 
    }); 
}
 
开发者ID:AkshayS96,项目名称:LiveMediaStreaming,代码行数:24,代码来源:RtspClientPlayer.java

示例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.");
}

   }
 
开发者ID:synergynet,项目名称:synergyview,代码行数:21,代码来源:ApplicationWorkbenchAdvisor.java

示例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);
}
 
开发者ID:RanolP,项目名称:YtQueue,代码行数:11,代码来源:YtQueueMain.java

示例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();
      }
  });
}
 
开发者ID:AkshayS96,项目名称:LiveMediaStreaming,代码行数:13,代码来源:RtspStreamServer.java

示例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();
}
 
开发者ID:MarkXLII,项目名称:subtitle-studio,代码行数:10,代码来源:VlcSdkImplementation.java

示例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();
        }
    });
}
 
开发者ID:DIT524-V17,项目名称:group-10,代码行数:14,代码来源:jSTPlay.java

示例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();
           }
       });
}
 
开发者ID:DIT524-V17,项目名称:group-10,代码行数:14,代码来源:playerBase.java

示例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.");
        }

    }
 
开发者ID:AnDwHaT5,项目名称:PixelUtilities,代码行数:14,代码来源:Basemod.java

示例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);
    }
}
 
开发者ID:scify,项目名称:TalkAndPlay,代码行数:7,代码来源:MediaPlayerService.java

示例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();
    }
 
开发者ID:scify,项目名称:TalkAndPlay,代码行数:44,代码来源:MainPanel.java

示例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);
    }
}
 
开发者ID:flaiker,项目名称:bottimus,代码行数:51,代码来源:Main.java


注:本文中的uk.co.caprica.vlcj.discovery.NativeDiscovery类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。