• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java LibVlc类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中uk.co.caprica.vlcj.binding.LibVlc的典型用法代码示例。如果您正苦于以下问题:Java LibVlc类的具体用法?Java LibVlc怎么用?Java LibVlc使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



LibVlc类属于uk.co.caprica.vlcj.binding包,在下文中一共展示了LibVlc类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: ensureVLCLib

import uk.co.caprica.vlcj.binding.LibVlc; //导入依赖的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


示例2: main

import uk.co.caprica.vlcj.binding.LibVlc; //导入依赖的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


示例3: initVideoImportEngine

import uk.co.caprica.vlcj.binding.LibVlc; //导入依赖的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


示例4: main

import uk.co.caprica.vlcj.binding.LibVlc; //导入依赖的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


示例5: main

import uk.co.caprica.vlcj.binding.LibVlc; //导入依赖的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: main

import uk.co.caprica.vlcj.binding.LibVlc; //导入依赖的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


示例7: create

import uk.co.caprica.vlcj.binding.LibVlc; //导入依赖的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


示例8: initComponents

import uk.co.caprica.vlcj.binding.LibVlc; //导入依赖的package包/类
/**
 * This method is called from within the constructor to initialize the form.
 * WARNING: Do NOT modify this code. The content of this method is always
 * regenerated by the Form Editor.
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

    vernum = new javax.swing.JLabel();
    jLabel1 = new javax.swing.JLabel();
    vlcInfo = new javax.swing.JLabel();

    setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
    setTitle("Version");
    setAlwaysOnTop(true);
    setLocation(new java.awt.Point(0, 0));
    setLocationByPlatform(true);
    setModal(true);

    vernum.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
    vernum.setText("jTV by Genesys890");
    vernum.setToolTipText("");

    jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
    jLabel1.setText("V 0.0.1");

    vlcInfo.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
    vlcInfo.setText("VLC Version: "+LibVlc.INSTANCE.libvlc_get_version());
    vlcInfo.setToolTipText("");

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(
        layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
        .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
            .addContainerGap()
            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                .addComponent(vlcInfo, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(vernum, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 356, Short.MAX_VALUE))
            .addContainerGap())
    );
    layout.setVerticalGroup(
        layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
        .addGroup(layout.createSequentialGroup()
            .addContainerGap()
            .addComponent(vernum)
            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
            .addComponent(jLabel1)
            .addGap(41, 41, 41)
            .addComponent(vlcInfo, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addContainerGap(104, Short.MAX_VALUE))
    );

    pack();
    setLocationRelativeTo(null);
}
 
开发者ID:Genesys890,项目名称:jTV,代码行数:59,代码来源:jTVVersion.java


示例9: vlcSetVersion

import uk.co.caprica.vlcj.binding.LibVlc; //导入依赖的package包/类
public void vlcSetVersion(){
    vlcInfo.setIcon(null);
    vlcInfo.setText(LibVlc.INSTANCE.libvlc_get_version());
   // vlcInfo.revalidate();
}
 
开发者ID:Genesys890,项目名称:jTV,代码行数:6,代码来源:jTVVersion.java


示例10: main

import uk.co.caprica.vlcj.binding.LibVlc; //导入依赖的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


示例11: cargaLibreria

import uk.co.caprica.vlcj.binding.LibVlc; //导入依赖的package包/类
private void cargaLibreria() {
	NativeLibrary.addSearchPath(RuntimeUtil.getLibVlcLibraryName(), LIB_VLC);
	Native.loadLibrary(RuntimeUtil.getLibVlcLibraryName(), LibVlc.class);
}
 
开发者ID:sfaci,项目名称:vlcj,代码行数:5,代码来源:HolaVLCJ.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java TimestampSerializer类代码示例发布时间:2022-05-22
下一篇:
Java Word类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap