* vout_xvideo.c: Xvideo video output display method
*****************************************************************************
* Copyright (C) 1998, 1999, 2000, 2001 VideoLAN
- * $Id: vout_xvideo.c,v 1.13 2001/05/01 04:18:18 sam Exp $
+ * $Id: vout_xvideo.c,v 1.18 2001/05/30 17:03:12 sam Exp $
*
* Authors: Shane Harper <shanegh@optusnet.com.au>
* Vincent Seguin <seguin@via.ecp.fr>
#include <sys/ipc.h>
#endif
+#ifndef WIN32
+#include <netinet/in.h> /* BSD: struct in_addr */
+#endif
+
#include <sys/shm.h> /* shmget(), shmctl() */
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include "threads.h"
#include "mtime.h"
#include "tests.h"
-#include "modules.h"
#include "video.h"
#include "video_output.h"
#include "stream_control.h" /* needed by input_ext-intf.h... */
#include "input_ext-intf.h"
+#include "modules.h"
+#include "modules_export.h"
#define GUID_YUV12_PLANAR 0x32315659
boolean_t b_mouse_pointer_visible;
mtime_t i_time_mouse_last_moved; /* used to auto-hide pointer*/
- /* Displaying fullscreen */
- boolean_t b_fullscreen;
-
} vout_sys_t;
/* Fullscreen needs to be able to hide the wm decorations */
}
p_vout->p_sys->i_screen = DefaultScreen( p_vout->p_sys->p_display );
- p_vout->p_sys->b_fullscreen
+ p_vout->b_fullscreen
= main_GetIntVariable( VOUT_FULLSCREEN_VAR, VOUT_FULLSCREEN_DEFAULT );
if( !XVideoCheckForXv( p_vout->p_sys->p_display ) )
static int vout_Manage( vout_thread_t *p_vout )
{
XEvent xevent; /* X11 event */
- boolean_t b_toggle_fullscreen; /* user wants full-screen */
char i_key; /* ISO Latin-1 key */
KeySym x_key_symbol;
- b_toggle_fullscreen = 0;
-
/* Handle X11 events: ConfigureNotify events are parsed to know if the
* output window's size changed, MapNotify and UnmapNotify to know if the
* window is mapped (and if the display is useful), and ClientMessages
break;
case 'f':
case 'F':
- b_toggle_fullscreen = 1;
+ p_vout->i_changes |= VOUT_FULLSCREEN_CHANGE;
break;
case '0':
network_ChannelJoin( 0 );
/* Other event */
else
{
- intf_WarnMsg( 1, "%p -> unhandled event type %d received",
+ intf_WarnMsg( 3, "%p -> unhandled event type %d received",
p_vout, xevent.type );
}
}
}
}
- if ( b_toggle_fullscreen )
+ if ( p_vout->i_changes & VOUT_FULLSCREEN_CHANGE )
{
intf_DbgMsg( "vout: changing full-screen status" );
- p_vout->p_sys->b_fullscreen = !p_vout->p_sys->b_fullscreen;
+ p_vout->b_fullscreen = !p_vout->b_fullscreen;
/* Get rid of the old window */
XVideoDestroyWindow( p_vout );
(p_vout->p_sys->p_xvimage->data_size) /
(p_vout->p_sys->p_xvimage->height);
- /* vout_SetBuffers( p_vout, p_vout->p_sys->p_xvimage->data ); */
+ /* p_vout->pf_setbuffers( p_vout, p_vout->p_sys->p_xvimage->data ); */
}
return( 0 );
/* Set main window's size */
/* If we're full screen, we're full screen! */
- if( p_vout->p_sys->b_fullscreen )
+ if( p_vout->b_fullscreen )
{
p_vout->p_sys->i_window_width = DisplayWidth( p_vout->p_sys->p_display,
p_vout->p_sys->i_screen );
CWBackPixel | CWEventMask,
&xwindow_attributes );
- if ( p_vout->p_sys->b_fullscreen )
+ if ( p_vout->b_fullscreen )
{
prop = XInternAtom(p_vout->p_sys->p_display, "_MOTIF_WM_HINTS", False);
mwmhints.flags = MWM_HINTS_DECORATIONS;
ButtonPressMask | ButtonReleaseMask |
PointerMotionMask );
- if( p_vout->p_sys->b_fullscreen )
+ if( p_vout->b_fullscreen )
{
XSetInputFocus( p_vout->p_sys->p_display, p_vout->p_sys->window,
RevertToNone, CurrentTime );
*h = win_w * 9 / 16;
break;
- case AR_221_1_PICTURE:
+ case AR_221_1_PICTURE:
*h = win_w * 100 / 221;
break;