dereferencing pointer to incomplete type

*nix specific usage questions
Blaine
New Cone
New Cone
Posts: 6
Joined: 11 May 2006 12:20

dereferencing pointer to incomplete type

Postby Blaine » 05 Jul 2006 13:14

Hello again
I added a new function to video.c file in vlc_tree/src/control/video.c to move the vlc video window by other application (Linux).

void libvlc_setWindow_Position( libvlc_input_t *p_input, int iPosition_x, int iPosition_y, libvlc_exception_t *p_e )
{
vout_thread_t *p_vout1 = GetVout( p_input, p_e );
if( !p_vout1 )
return;
XMoveWindow(p_vout1->p_sys->p_display, p_vout1->p_sys->p_win->base_window, iPosition_x, iPosition_y);
}

When I compile with make, it shows these errors:
control/video.c: (XMovewindow line number):error: dereferencing pointer to incomplete type
control/video.c: (XMovewindow line number):error: dereferencing pointer to incomplete type

I made these changes (I copied the x11_window_t definition to video.c file to recognise it):

XMoveWindow( (Display *)(vout_sys_t *)(p_vout1->p_sys)->p_display , (x11_window_t *)((vout_sys_t *)(p_vout1->p_sys)->p_win)->base_window, iPosition_x, iPosition_y);

And it shows the same errors:
control/video.c: (XMovewindow line number):error: dereferencing pointer to incomplete type
control/video.c: (XMovewindow line number):error: dereferencing pointer to incomplete type

I tried to do this too but with the same results:
vout_sys_t *p_my_sys = p_vout1->p_sys;
Display * p_my_display = (Display *)(vout_sys_t*)(p_my_sys)->p_display; // IF I COMMENT THIS LINE IT COMPILES WELL., IF IT IS UNCOMMENTED NOT

// COMMENTED LINE XMoveWindow( (Display *)(vout_sys_t *)(p_vout1->p_sys)->p_display , (x11_window_t *)((vout_sys_t *)(p_vout1->p_sys)->p_win)->base_window, iPosition_x, iPosition_y);

What I need to do to compile it well?

xtophe
Big Cone-huna
Big Cone-huna
Posts: 1209
Joined: 24 Nov 2003 10:12
Location: Bristol, England

Postby xtophe » 05 Jul 2006 23:57

You can't put X11 specific function in src/

that should be in modules/x11
Xtophe

Blaine
New Cone
New Cone
Posts: 6
Joined: 11 May 2006 12:20

Postby Blaine » 06 Jul 2006 15:36

But what file or files must I modify to implement a function to move the vlc window with my application?

Thanks for your help.
Blaine


Return to “VLC media player for Linux and friends Troubleshooting”

Who is online

Users browsing this forum: No registered users and 18 guests