VLC - JVLC Issues Understood but fix up to VLC-JVLC Team

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.
adanecito
Cone that earned his stripes
Cone that earned his stripes
Posts: 151
Joined: 06 Mar 2007 17:59

VLC - JVLC Issues Understood but fix up to VLC-JVLC Team

Postby adanecito » 09 Apr 2007 05:13

Hi Everyone,

I would like to thank the VLC for all the recent fixes in 0.9.0 and the JVLC bindings team for thier help. After several weeks of learning how to compile the code using cygwin and my slow but persistant picking at the code and some help from a good friend I was able to get the jvlc bindings to work under windows xp & 2000 (I have not tried Vista yet).
During the process I had to understand and overcome (so far) the following issues:

1. Video pops out of JVLC canvas (extension of awt Canvas).
2. Once #1 was fixed the video appeared in the canvas but when the window was moved the video stayed in place.
3. Video after fixing #2 appears to display quickly then disappear.
4. 0.9.0 of vlc did not display video properly in XP & Windows 2000 it seemed to move through the video very quickly and no sound was heard.

#4 was fixed by the much appreciated help from the vlc team.

#1, #2 & #3 I put in a work around with help from another friend but seemed to indicate that perhaps the JVLC bindings team was using some code developed for vlc not quite understanding what the code was intended to do.

The crux of the problem is in the a section of code in the events.c file under the modules/video_output/directx folder. When the paint() method is called in the JVLCCanvas class (under bindings/java/org/videolan/jvlc folder) it eventually invokes the Control function and the case VOUT_REPARENT is executed. In there the usage of :

1. WS_OVERLAPPEDWINDOW | WS_SIZEBOX for the windows style cause the video to pop out of the canvas.

2. The fact that the hparent was set to 0 and SetParent was called with the second argument to zero caused the Video to stay in place instead of move with the Canvas when the window with the canvas was moved.

3. SetWindowPos was called caused the video in the canvas to disappear.


So there you have it. The major issue now is what can be done to the Control function so it can be used by both the vlc.exe and the jvlc bindings. The following questions need to be answered that were generated during the troubleshooting process:

1. p_vout->p_sys->hparent = 0;
Why is hparent being manually set to 0 (the desktop) between mutex lock/unlock statement rather than use SetParent to do this like the code 4 lines later does?

2. SetParent( p_vout->p_sys->hwnd, 0 );
Why is the parent being set to the desktop? This causes the JVLC code to leave the video in one place after the window containing the video canvas is moved.

3. p_vout->p_sys->i_window_style = WS_CLIPCHILDREN | WS_OVERLAPPEDWINDOW | WS_SIZEBOX;
Why is the window_style always being forced to these values? The comment at the beginning of the case code also says 'Change window style, borders and title bar' but why would reparenting always make these changes. The code in the DirectXWindowCreate method uses different styles depending on whether the window is decorated or not and whether it is a child window or not.

4. SetWindowPos( p_vout->p_sys->hwnd, 0, point.x, point.y, 0, 0, SWP_NOSIZE|SWP_NOZORDER|SWP_FRAMECHANGED );
Why is the window position setting the width and height to 0? This causes the window to effectively disappear.

5.When is the VOUT_REPARENT case code being called?
That is, what scenarios in the VLC.exe execution cause this case code to be executed? The JVLC code appears to be executing this code to cause repaint operations and that seems a little odd. It does not appear that this section of the events.c code is designed for being executed independently of the VLC.exe file; this may be contributing to, or even causing, the problems that the JVLC code is experiencing.

6. When is the control method itself being called?
What scenarios in the VLC.exe execution cause the control method to be executed?



I modified the code to work for me but I am afraid it will not work for the vlc.exe. So the VLC & JVLC teams need to discuss and come up with a fix that works for both usages (vlc.exe and jvlc bindings).

Thanks,
Tony

P.S. I almost forgot. I could not find a registration link on the jvlc trac site and my login for trac for vlc did not work so had to post this lengthy message. Sorry.

adanecito
Cone that earned his stripes
Cone that earned his stripes
Posts: 151
Joined: 06 Mar 2007 17:59

Postby adanecito » 12 Apr 2007 23:23

Hi,

Just reminding the VLC-JVLC team this issue needs to be addressed. People are already emailing me about the issues and fixes and I am hoping the two teams are talking to each other right now about this.



Regards,
-Tony

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

Postby littlejohn » 15 Apr 2007 19:26

Hi,

Just reminding the VLC-JVLC team this issue needs to be addressed. People are already emailing me about the issues and fixes and I am hoping the two teams are talking to each other right now about this.



Regards,
-Tony
These issues should be all solved in svn commit 19826. Update your sources and let me know.

Cheers,
Filippo

jvlc_user
New Cone
New Cone
Posts: 1
Joined: 27 Apr 2007 18:07

svn commit 19916 jvlc fullscreen

Postby jvlc_user » 27 Apr 2007 18:22

no video in fullscreen, but there is audio.

Also, can somebody please fix this in audio-jni.cc


JNIEXPORT void JNICALL Java_org_videolan_jvlc_Audio__1toggleMute (JNIEnv *env, jobject _this)
{
INIT_FUNCTION;

libvlc_audio_get_mute( ( libvlc_instance_t * ) instance, exception );

CHECK_EXCEPTION_FREE;
}


Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: No registered users and 47 guests