Windows GDI output & window size

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
Triff

Windows GDI output & window size

Postby Triff » 27 May 2004 10:50

Hello,
It seems lik windows GDI output module (vlc 0.7.3-svn) create a window of size (video width x (video height + 10).
I don't know from where those number come from, but for me (windows 2000, nothing special like big fonts or anything), the good size would be (video width + 8)x(video height + 27).
(on the left, bottom and right, the window drawing is 4 pixel wide, and on the top, the window drawing + title bar is 23 pixels wide).

I don't know if it's the same for everyone anyway, but if not and if it's difficult to ask Windows about those numbers, it would be cool to be able to set them up in the preferences ...

--
Triff

Sigmund
Big Cone-huna
Big Cone-huna
Posts: 893
Joined: 26 Nov 2003 09:38

Postby Sigmund » 27 May 2004 11:13

The windows GDI output isn't well maintained. It actually hasn't been worked much on at all so I wouldn't be supprised by stupid bugs like this. Anyway I suggest you use the directx output on windows.

Triff

Postby Triff » 27 May 2004 13:37

The windows GDI output isn't well maintained. It actually hasn't been worked much on at all so I wouldn't be supprised by stupid bugs like this. Anyway I suggest you use the directx output on windows.
In fact, I use DirectX.
I just used Windows GDI to try to understand the problem of the "strange video size in mp4/H263.

Anyway here is a patch (win >=95 ; win >=NT3.1):
in wingdi.c, around line 343:
Adding:
/* Calculate output window size*/
/* windows define :
typedef struct _RECT {
LONG left;
LONG top;
LONG right;
LONG bottom;
} RECT, *PRECT;
*/
RECT RECT_tmp = {0, 0, p_vout->render.i_width, p_vout->render.i_height};
/* and
BOOL AdjustWindowRect(
LPRECT lpRect, // pointer on a RECT
DWORD dwStyle, // same as in CreateWindow
BOOL bMenu // is ther a menu line ?
);
*/
AdjustWindowRect(&RECT_tmp, WS_VISIBLE | WS_SIZEBOX | WS_CAPTION, 0);

/* and modifying */
/* Create output window */
p_vout->p_sys->window =
CreateWindow( psz_class, psz_title,
WS_VISIBLE | WS_SIZEBOX | WS_CAPTION,
CW_USEDEFAULT, CW_USEDEFAULT,
/* 2 modified lines
p_vout->render.i_width,
p_vout->render.i_height + 10,
*/
RECT_tmp.right - RECT_tmp.left,
RECT_tmp.bottom- RECT_tmp.top,
NULL, NULL, instance, (LPVOID)p_vout );

But I don't know how to free the RECT_tmp structure (an weither it should be freed), and how it should be writed in the Videolan style.

--
Triff

Gibalou
Big Cone-huna
Big Cone-huna
Posts: 608
Joined: 26 Nov 2003 10:59

Postby Gibalou » 27 May 2004 15:39

This is exactly what is already done in the directx video output plugin.
This hasn't been implemented in the GDI one because it was only a kind of proof of concept plugin which nobody uses.

However somebody has been working on reviving the WinCE port of VLC and has been improving the GDI plugin so it might soon become a bit more full-featured (although still slow as hell ;).

Guest

Postby Guest » 27 May 2004 15:51

This is exactly what is already done in the directx video output plugin.
This hasn't been implemented in the GDI one because it was only a kind of proof of concept plugin which nobody uses.

However somebody has been working on reviving the WinCE port of VLC and has been improving the GDI plugin so it might soon become a bit more full-featured (although still slow as hell ;).
OK.
Thank you for the reply,
--
Triff

david71
New Cone
New Cone
Posts: 5
Joined: 15 Jun 2004 16:45

windows gdi port

Postby david71 » 15 Jun 2004 17:40

I hope you keep it maintained. I can't use DirectX output without uninstalling PowerDVD. PowerDVD wont share with other programs.


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 9 guests