登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

Hartley 开发

软硬件开发的乐园

 
 
 

日志

 
 
 
 

Installing JVLC on Windows XP  

2008-03-06 12:01:55|  分类: 默认分类 |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |

Installing JVLC on Windows XP


Prerequisites
  1. Having a Java JRE installed on your system. JRE 1.5 (or better).
  2. Download JVLC for win32.
  3. Unzip the zip file in the directory of your choice.
  4. Patch with the following patch-jvlc-0.9.0-20070310.zip. You will find updated VlcClient classes files.
For this explanation, I suppose that the ZIP file has been unzipped in
C:\jvlc-0.9.0-20070310.

You can safely choose another directory but please be sure to change the paths accordingly
when reading this guide :-).

After unzipping, you can start testing JVLC.

Testing the install

Open a command console.
Start button > Execute > cmd.
Cmd

Change directory to where JVLC is installed issuing the following command :

cd  C:\jvlc-0.9.0-20070310

Then try to launch the VLCExample :

C:\jvlc-0.9.0-20070310>"C:\Program Files\Java\jre1.6.0_01\bin\java.exe" -cp . VLCExample

You should get the following output in your console :

== Starting VLCExample ==
Creating a JVLC instance without args... done.
[00000302] access_directory access error: /home/little/a.avi: No such file or directory
[00000302] access_file access error: cannot open file /home/little/a.avi (No such file or directory)
[00000300] main input error: open of `file:///home/little/a.avi' failed: could not create access

Unfortunately, the input sample file is hardcoded so the example is not working well.
You can quit typing Ctrl C.

Let's try the second example.

In the console, type :
C:\jvlc-0.9.0-20070310>"C:\Program Files\Java\jre1.6.0_01\bin\java.exe" -cp . VlcClient.

The following window should appear.

vlclclient

VlcClient is a very basic player. You enter the location of a file to play using an
URI ( the "file:///home/little/a.avi" ).

Replace the value in the text field with a better one.

For a file on your C: disk, type
file://C:\mydirectory\myvideo.avi

Then you click on Set item. This should start the video.
[Please note the this version seems to have a problem with .mov (Quicktime) files.
Current version of JVLC does not have this problem but you have to compile it
from scratch and this is not part of this document.]

It works fine for an mp3 file.

Developping with JVLC

After testing the installation, you may want to use JVLC to code some more interesting player or
everything else requiring the use of video and/or audio.

You need to create a jar file which contains the classes of JVLC.
It is not distributed in the zip file so you have to build it from class files.
Here is a version of  jvlc.jar.

Open a console.

cd  C:\jvlc-0.9.0-20070310



Creating and running a small example with Eclipse 3.2.

Create an empty project named JVLC .
Import JVLCTest.java.
Import  jvlc.jar into the project.
Show project Properties and add jvlc.jar to the "Libraries" tab.
Library import

Configure Run target of JVLCTest by settings parameters in Arguments tab ( VM arguments ) .
-Djava.library.path=C:\jvlc-0.9.0-20070310

The System.loadLibrary() call seems to be compulsory on Eclipse environment to have it loading the .dll.
This is the way Eclipse works when running programs. Executing java program runs differently in console.
As you can see before, it is optional for running outside Eclipse.
I do not have a better answer for now.

VLM

When playing a video or an audio file (without VLM interface), there is no call to VLM.
What may happen is that you  have VLC installed on your computer and you made VLM calls.
As the VLC (libvlc.dll) shipped with JVLC and the one installed on your computer will share
the same configuration file, you should clear it before running you test.

You can use the --reset-config parameter to JVLC.

Windows Vista

Someone told me that a new version of Windows  has been released under the name of Windows Vista.
Currently, I only have the laptop lent by my boss which runs under Windows XP Pro.

As a result, I have never tested JVLC on Windows Vista.


What's next ?


We currently do not have a way to build a regular JVLC distribution.
For experimented developer, building an own distribution is the best way to be in touch
with current development.
  评论这张
 
阅读(2722)| 评论(4)

历史上的今天

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2018