Page 1 of 1

Windows GDI output & window size

Posted: 27 May 2004 10:50
by Triff
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

Posted: 27 May 2004 11:13
by Sigmund
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.

Posted: 27 May 2004 13:37
by Triff
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

Posted: 27 May 2004 15:39
by Gibalou
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 ;).

Posted: 27 May 2004 15:51
by Guest
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

windows gdi port

Posted: 15 Jun 2004 17:40
by david71
I hope you keep it maintained. I can't use DirectX output without uninstalling PowerDVD. PowerDVD wont share with other programs.