[vlc-devel] window positioning
Hornsby Adrian
adrian_hornsby at yahoo.co.uk
Thu Mar 18 12:44:09 CET 2004
Here is what I've done.
in the libvlc.h :
#define VIDEO_X_TEXT N_("Video-x")
#define VIDEO_X_LONGTEXT N_( \
"You can define the position of the video window here - x parameter.")
#define VIDEO_Y_TEXT N_("Video-y")
#define VIDEO_Y_LONGTEXT N_( \
"You can define the position of the video window here - y parameter.")
add_integer( "video-x", 0, NULL, VIDEO_X_TEXT, VIDEO_X_LONGTEXT, VLC_TRUE );
add_integer( "video-y", 0, NULL, VIDEO_Y_TEXT, VIDEO_Y_LONGTEXT, VLC_TRUE );
then in the directx/events.c file :
/*Add variables to indicate the position of the video display */
var_Create( p_vout, "video-x", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT );
var_Create( p_vout, "video-y", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT );
int video_x = var_Get( p_vout, "video-x", &val );
int video_y = var_Get( p_vout, "video-y", &val );
followed by :
/* Create the window */
p_vout->p_sys->hwnd =
CreateWindow( "VLC DirectX", /* name of window class */
VOUT_TITLE " (DirectX Output)", /* window title bar text */
WS_OVERLAPPEDWINDOW | WS_SIZEBOX | WS_VISIBLE |
WS_CLIPCHILDREN, /* window style */
video_x, /* X coordinate */
video_y, /* Y coordinate */
rect_window.right - rect_window.left, /* window width */
rect_window.bottom - rect_window.top, /* window height */
NULL, /* no parent window */
NULL, /* no menu in this window */
hInstance, /* handle of this program instance */
(LPVOID)p_vout ); /* send p_vout to WM_CREATE */
>>>>>>>>> It compiles without error. I can also give the command line parameter --video-x 100 --video-y 300 !! BUT it doesn't effect on the position of the VLC player and it stays at the default position xy 0 0
Any clue ??
************************************************************
HORNSBY Adrian
Teräskatu 7 D 67
33720 Tampere
FINLAND
#Tel :+358 (0)456376712
http://www.students.tut.fi/~hornsby/
************************************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20040318/df9f6268/attachment.html>
More information about the vlc-devel
mailing list