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)":
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:
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