Window sizing problem

This forum is about all development around libVLC.
Lohkay
Blank Cone
Blank Cone
Posts: 17
Joined: 06 Jan 2009 23:08

Window sizing problem

Postby Lohkay » 06 Jan 2009 23:26

Hi, hope someone can hint me regarding a problem I've been trying to solve. I have a WPF application that uses VLC through a WindowFormHost and everything works fine normally. I do get a situation from time to time where the video is cropped inside the window I give VLC. I've used Spy++ to monitor the windows inside my application and I noticed that VLC adds a child window to the window I give him... this same behavior is present in the VLC player as well. In the following screenshot, I've selected the window I give VLC which gets renamed to "VLC (hardware YUV DirectX)":

Image

Notice the white rectangle which represents the size of the window. Inside that window, there's another window without a caption that holds the actual video. It would seem VLC uses this dual window system to implement black bars to keep the aspect ratio which is just fine by me. But like you saw in the previous screenshot, the video isn't using the whole window size... and actually I'm only getting a crop out of the video. Here's a screenshot of me getting info on that child window:

Image

Notice that spy++ gives me a Rect much smaller for that child window. Like I said above, this only happen occasionally and appears to be very random, the size of the child window can be anywhere from 10% to 100% of the parent window. I'm not assuming that the problem is in the VLC library and I'm really just looking for insights of how those 2 windows interact and why would a problem like that raise its ugly head from time to time.

This is running on Window XP SP3 with DX 9.0c. Application is running in WPF with framework 3.5 SP1. libVLC version used is 0.9.8.1

Thanks

Lohkay
Blank Cone
Blank Cone
Posts: 17
Joined: 06 Jan 2009 23:08

Re: Window sizing problem

Postby Lohkay » 09 Jan 2009 20:43

Hello, I was wondering, did I formulate my question incorrectly or didn't provide enough information? I see people coming into the thread but not a single answer or comment. I didn't find a solution on my side... it would seem that whatever I do (try to refresh the window after starting VLC, send WM_Paint messages, etc) doesn't change anything to the problem. But if I manually move the window or resize it, it fixes itself.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Window sizing problem

Postby Jean-Baptiste Kempf » 10 Jan 2009 03:32

Probably noone knows enough WPF to understand the issue.
maybe your code is the issue, can you submit it?
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 47 guests