#include <vlc/vlc.h>
+#ifndef WIN32
+#include <X11/Xlib.h>
+#endif
+
# ifdef __cplusplus
extern "C" {
# endif
*/
void libvlc_video_take_snapshot( libvlc_input_t *, char *, libvlc_exception_t * );
+int libvlc_video_destroy( libvlc_input_t *, libvlc_exception_t *);
+
+#ifndef WIN32
+int libvlc_video_reparent( libvlc_input_t *, Drawable, libvlc_exception_t * );
+#endif
+
/** @} */
vlc_bool_t b_arg;
unsigned int i_width, i_height;
unsigned int *pi_width, *pi_height;
-
+ Drawable d;
+
switch( i_query )
{
case VOUT_GET_SIZE:
case VOUT_REPARENT:
vlc_mutex_lock( &p_vout->p_sys->lock );
+ d = va_arg( args, Drawable );
+ if ( !d )
XReparentWindow( p_vout->p_sys->p_display,
p_vout->p_sys->original_window.base_window,
DefaultRootWindow( p_vout->p_sys->p_display ),
0, 0 );
+ else
+ XReparentWindow( p_vout->p_sys->p_display,
+ p_vout->p_sys->original_window.base_window,
+ d,
+ 0, 0);
XSync( p_vout->p_sys->p_display, False );
p_vout->p_sys->original_window.owner_window = 0;
vlc_mutex_unlock( &p_vout->p_sys->lock );
/*****************************************************************************
- * video.c: ibvlc new API video functions
+ * video.c: libvlc new API video functions
*****************************************************************************
* Copyright (C) 2005 the VideoLAN team
* $Id: core.c 14187 2006-02-07 16:37:40Z courmisch $
return VLC_TRUE;
}
+
+
+#ifndef WIN32
+int libvlc_video_reparent( libvlc_input_t *p_input, Drawable d,
+ libvlc_exception_t *p_e )
+{
+ vout_thread_t *p_vout = GetVout( p_input, p_e );
+ vout_Control( p_vout , VOUT_REPARENT, d);
+ return 0;
+
+}
+#endif
+
+int libvlc_video_destroy( libvlc_input_t *p_input,
+ libvlc_exception_t *p_e )
+{
+ vout_thread_t *p_vout = GetVout( p_input, p_e );
+ vlc_object_detach( p_vout );
+ vlc_object_release( p_vout );
+ vout_Destroy( p_vout );
+
+ return 0;
+
+}