[vlc-devel] Re: problems compiling new function in video.c

Donoso Gabilondo, Daniel donoso.d at ikusi.es
Thu Jul 6 10:55:04 CEST 2006


The problem was with p_sys pointer. I copied the struct vout_sys_t to
video.c file and now compiles without errors, but doing the XMoveWindow the
application crashes.

 

How can I move the video window to other position when it is playing?

 

  _____  

De: Donoso Gabilondo, Daniel [mailto:donoso.d at ikusi.es] 
Enviado el: miércoles, 05 de julio de 2006 10:43
Para: vlc-devel at videolan.org
Asunto: [vlc-devel] problems compiling new function in video.c

 

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 some 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?

 

Regards,

Daniel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20060706/d146931b/attachment.html>


More information about the vlc-devel mailing list