JNative and JVLC

Microsoft Windows specific usage questions
Forum rules
Please post only Windows specific questions in this forum category. If you don't know where to post, please read the different forums' rules. Thanks.
mike007
New Cone
New Cone
Posts: 4
Joined: 24 Jul 2008 18:58

JNative and JVLC

Postby mike007 » 24 Jul 2008 19:08

Hello,

i am currently working on an own solution to access the DLLs of VLC under java using jNative(Playing audio and video is no problem it's very easy to handle :) ). I also tried jVLC and found out that the video should be displayable on a JPanel in Java. In jVLC this works not really good. At the start of the programm (using jVLC) the JVLCPanel shows the video correct. But after removing the window or changing window location the video pops up in the DirektX native window.

jVLC is not of interest for me I want to realize it my own way. But I don't know how to access the DirectX Hardware VideoLayer to put it into Java as a JPanel. Is there a function inside the DLLs of VLC to get the videostream ?

Is there also any other possibility to deactivate the doubleclick function (toggle Fullscreen) in the DirectX Hardware VideoLayer window ?

Thanks

mike

littlejohn
Blank Cone
Blank Cone
Posts: 73
Joined: 04 May 2006 14:59

Re: JNative and JVLC

Postby littlejohn » 27 Jul 2008 22:38

Hello,

i am currently working on an own solution to access the DLLs of VLC under java using jNative(Playing audio and video is no problem it's very easy to handle :) ). I also tried jVLC and found out that the video should be displayable on a JPanel in Java. In jVLC this works not really good. At the start of the programm (using jVLC) the JVLCPanel shows the video correct. But after removing the window or changing window location the video pops up in the DirektX native window.

jVLC is not of interest for me I want to realize it my own way. But I don't know how to access the DirectX Hardware VideoLayer to put it into Java as a JPanel. Is there a function inside the DLLs of VLC to get the videostream ?

Is there also any other possibility to deactivate the doubleclick function (toggle Fullscreen) in the DirectX Hardware VideoLayer window ?

Thanks

mike
Hi Mike,
thanks for reporting the pop-up behaviour on windows, I'll check it out. Which version of jvlc/vlc are you using?

As regards getting the videostream, you can use the libvlc_media_player_set_drawable which sets the native window ID (ie, the HWND on windows) for the stream to be played.

Cheers,
Filippo

mike007
New Cone
New Cone
Posts: 4
Joined: 24 Jul 2008 18:58

Re: JNative and JVLC

Postby mike007 » 28 Jul 2008 00:27

thanks for reporting the pop-up behaviour on windows, I'll check it out. Which version of jvlc/vlc are you using?

As regards getting the videostream, you can use the libvlc_media_player_set_drawable which sets the native window ID (ie, the HWND on windows) for the stream to be played.
I used this one http://www.dcs.gla.ac.uk/~stuartr/pages/jvlc.html But I used the newest VLC 0.8.6i (But I don't think that the problem came from this)

It's not only the pop up behavior it's also the permanent drawing of the video hardware output on one position at the screens upper left. If I move the Java window the Video stays in the Background and does not move.
But I want to use JNative and my own implementation of functions. So I will try to use libvlc_media_player_set_drawable. Thanks.

I also need to deactivate the double click function on the VLC video output window (toggle Fullscreen). Any suggestions there how to deactivate this?

littlejohn
Blank Cone
Blank Cone
Posts: 73
Joined: 04 May 2006 14:59

Re: JNative and JVLC

Postby littlejohn » 28 Jul 2008 10:42


I used this one http://www.dcs.gla.ac.uk/~stuartr/pages/jvlc.html But I used the newest VLC 0.8.6i (But I don't think that the problem came from this)
Hi Mike,
that version of jvlc is 2 years old at least. Why don't you try the latest to check if the popup behaviour is now correct?

I also need to deactivate the double click function on the VLC video output window (toggle Fullscreen). Any suggestions there how to deactivate this?
Currently, no.

Cheers,
Filippo

mike007
New Cone
New Cone
Posts: 4
Joined: 24 Jul 2008 18:58

Re: JNative and JVLC

Postby mike007 » 29 Jul 2008 23:05

I used this because I do not have any time to set up an linux system now to make a cross compiling. And truely I am a little too lazy :P

About the doubleclick I guess I have to change some lines in the VLC c++ Sources. But my understanding in c++ is not that good.

I will try what you said. Thanks for the help.

littlejohn
Blank Cone
Blank Cone
Posts: 73
Joined: 04 May 2006 14:59

Re: JNative and JVLC

Postby littlejohn » 30 Jul 2008 00:21

I used this because I do not have any time to set up an linux system now to make a cross compiling. And truely I am a little too lazy :P
It's a common misconception that you need to crosscompile vlc to get jvlc work on windows, and that's why I will not ever refer to guides online about getting jvlc to work on windows. Just download the nightlies, and for vlc you are done. Then get jvlc and compile it with maven, as you would on linux.

Cheers,
Filippo

saurabh
Blank Cone
Blank Cone
Posts: 25
Joined: 05 Aug 2008 08:19
Operating System: Linux
Location: Pune, India

Re: JNative and JVLC

Postby saurabh » 09 Aug 2008 15:03

Hi...
My player is working fine...
But I wanna add some more enhancements...
So I wanna kno how can I get th video file's properties before I play it.... ?
Cause jvlc has functionality to get width and hight after th file stars to play...
but i want to get these functionalities b4 playing th file...
So could u help me... ?
Thanks in advance...

littlejohn
Blank Cone
Blank Cone
Posts: 73
Joined: 04 May 2006 14:59

Re: JNative and JVLC

Postby littlejohn » 09 Aug 2008 15:24

Currently, using libvlc you have no means to do it. File an enhancement request on trac.

Cheers,
Filippo

mike007
New Cone
New Cone
Posts: 4
Joined: 24 Jul 2008 18:58

Re: JNative and JVLC

Postby mike007 » 20 Aug 2008 19:19

Hello,

so I took the time and found the libvlc_media_player_set_drawable. But can it be that it is called

Code: Select all

void libvlc_video_set_parent( libvlc_instance_t *, libvlc_drawable_t, libvlc_exception_t * );
???

The problem now is how can I emulate the datatypes in jNative. I also don't know how to generate libvlc_exception_t. The libvlc_drawable_t is the HWND of the drawing component in Win32 and how can I generate libvlc_instance_t ???

may I use

Code: Select all

libvlc_instance_t * libvlc_new( int , char **, libvlc_exception_t *);


Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: No registered users and 45 guests