Commit 5ff854ec authored by Sam Hocevar's avatar Sam Hocevar

  * XVideo plugin courtesy of Shane Harper <shanegh@optusnet.com.au>
  * Makefile.in and configure.in fixes by Nilmoni Deb <ndeb@ece.cmu.edu>
  * A few syntax fixes in the plain X11 plugin
parent 52985bd2
...@@ -16,7 +16,7 @@ D: directory browsing code in modules.c ...@@ -16,7 +16,7 @@ D: directory browsing code in modules.c
N: Stphane Borel N: Stphane Borel
E: stef@via.ecp.fr E: stef@via.ecp.fr
D: MPEG video decoder D: MPEG video decoder
D: DVD input D: DVD input, IFO parsing, CSS decryption
N: Arnaud de Bossoreille de Ribou N: Arnaud de Bossoreille de Ribou
E: bozo@via.ecp.fr E: bozo@via.ecp.fr
...@@ -30,6 +30,10 @@ N: Renaud Dartus ...@@ -30,6 +30,10 @@ N: Renaud Dartus
E: reno@via.ecp.fr E: reno@via.ecp.fr
D: AC3 decoder D: AC3 decoder
N: Nilmoni Deb
E: ndeb@ece.cmu.edu
D: Minor configure.in and Makefile.in fixes
N: Colin Delacroix N: Colin Delacroix
E: colin@zoy.org E: colin@zoy.org
D: MacOS X sound support D: MacOS X sound support
...@@ -55,6 +59,8 @@ D: Bug fixes ...@@ -55,6 +59,8 @@ D: Bug fixes
N: Shane Harper N: Shane Harper
E: shanegh@optusnet.com.au E: shanegh@optusnet.com.au
D: SDL plugin fixes and enhancements D: SDL plugin fixes and enhancements
D: XVideo video output
D: Gnome and Gtk+ interface enhancements
N: Gal Hendryckx N: Gal Hendryckx
E: jimmy@via.ecp.fr E: jimmy@via.ecp.fr
......
...@@ -28,10 +28,6 @@ libdir=@libdir@ ...@@ -28,10 +28,6 @@ libdir=@libdir@
CC=@CC@ CC=@CC@
SHELL=@SHELL@ SHELL=@SHELL@
LIB_SDL=@LIB_SDL@
LIB_GLIDE=@LIB_GLIDE@
LIB_GGI=@LIB_GGI@
#----------------- do not change anything below this line ---------------------- #----------------- do not change anything below this line ----------------------
################################################################################ ################################################################################
...@@ -73,6 +69,7 @@ endif ...@@ -73,6 +69,7 @@ endif
# #
# C headers directories # C headers directories
# #
INCLUDE += @INCLUDE@
INCLUDE += -Iinclude -I/usr/local/include INCLUDE += -Iinclude -I/usr/local/include
# #
...@@ -423,7 +420,10 @@ PLUGIN_SDL = plugins/sdl/sdl.o \ ...@@ -423,7 +420,10 @@ PLUGIN_SDL = plugins/sdl/sdl.o \
PLUGIN_TS = plugins/mpeg/ts.o \ PLUGIN_TS = plugins/mpeg/ts.o \
plugins/mpeg/input_ts.o plugins/mpeg/input_ts.o
PLUGIN_X11= plugins/x11/x11.o \ PLUGIN_XVIDEO = plugins/x11/xvideo.o \
plugins/x11/vout_xvideo.o
PLUGIN_X11 = plugins/x11/x11.o \
plugins/x11/vout_x11.o plugins/x11/vout_x11.o
PLUGIN_YUV = plugins/yuv/yuv.o \ PLUGIN_YUV = plugins/yuv/yuv.o \
...@@ -464,6 +464,7 @@ STD_PLUGIN_OBJ = \ ...@@ -464,6 +464,7 @@ STD_PLUGIN_OBJ = \
NONSTD_PLUGIN_OBJ = \ NONSTD_PLUGIN_OBJ = \
$(PLUGIN_X11) \ $(PLUGIN_X11) \
$(PLUGIN_XVIDEO) \
$(PLUGIN_GLIDE) \ $(PLUGIN_GLIDE) \
$(PLUGIN_GTK) \ $(PLUGIN_GTK) \
$(PLUGIN_GNOME) \ $(PLUGIN_GNOME) \
...@@ -607,6 +608,11 @@ $(STD_PLUGIN_OBJ): %.o: .dep/%.d ...@@ -607,6 +608,11 @@ $(STD_PLUGIN_OBJ): %.o: .dep/%.d
$(STD_PLUGIN_OBJ): %.o: %.c $(STD_PLUGIN_OBJ): %.o: %.c
$(CC) $(CFLAGS) $(PCFLAGS) -c -o $@ $< $(CC) $(CFLAGS) $(PCFLAGS) -c -o $@ $<
$(PLUGIN_XVIDEO): %.o: Makefile.dep
$(PLUGIN_XVIDEO): %.o: .dep/%.d
$(PLUGIN_XVIDEO): %.o: %.c
$(CC) $(CFLAGS) $(PCFLAGS) -I/usr/X11R6/include -c -o $@ $<
$(PLUGIN_X11): %.o: Makefile.dep $(PLUGIN_X11): %.o: Makefile.dep
$(PLUGIN_X11): %.o: .dep/%.d $(PLUGIN_X11): %.o: .dep/%.d
$(PLUGIN_X11): %.o: %.c $(PLUGIN_X11): %.o: %.c
...@@ -693,10 +699,10 @@ lib/fb.so: $(PLUGIN_FB) ...@@ -693,10 +699,10 @@ lib/fb.so: $(PLUGIN_FB)
$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS)
lib/ggi.so: $(PLUGIN_GGI) lib/ggi.so: $(PLUGIN_GGI)
$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) $(LIB_GGI) $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) @LIB_GGI@
lib/glide.so: $(PLUGIN_GLIDE) lib/glide.so: $(PLUGIN_GLIDE)
$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) $(LIB_GLIDE) $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) @LIB_GLIDE@
lib/gnome.so: $(PLUGIN_GNOME) lib/gnome.so: $(PLUGIN_GNOME)
$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) `gnome-config --libs gnomeui | sed 's,-rdynamic,,'` $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) `gnome-config --libs gnomeui | sed 's,-rdynamic,,'`
...@@ -750,7 +756,7 @@ lib/qt.so: $(PLUGIN_QT) ...@@ -750,7 +756,7 @@ lib/qt.so: $(PLUGIN_QT)
$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -lqt -L${QTDIR}/lib $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -lqt -L${QTDIR}/lib
lib/sdl.so: $(PLUGIN_SDL) lib/sdl.so: $(PLUGIN_SDL)
$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) $(LIB_SDL) $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) @LIB_SDL@
lib/ts.so: $(PLUGIN_TS) lib/ts.so: $(PLUGIN_TS)
ifeq ($(SYS),darwin) ifeq ($(SYS),darwin)
...@@ -759,6 +765,13 @@ else ...@@ -759,6 +765,13 @@ else
$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS)
endif endif
lib/xvideo.so: $(PLUGIN_XVIDEO)
ifeq ($(SYS),nto-qnx)
$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -L/usr/X11R6/lib -lX11 -lXext -lXv -lsocket
else
$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -L/usr/X11R6/lib -lX11 -lXext -lXv
endif
lib/x11.so: $(PLUGIN_X11) lib/x11.so: $(PLUGIN_X11)
ifeq ($(SYS),nto-qnx) ifeq ($(SYS),nto-qnx)
$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -L/usr/X11R6/lib -lX11 -lXext -lsocket $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -L/usr/X11R6/lib -lX11 -lXext -lsocket
......
This diff is collapsed.
...@@ -198,7 +198,8 @@ AC_ARG_WITH(sdl, ...@@ -198,7 +198,8 @@ AC_ARG_WITH(sdl,
PLUGINS=${PLUGINS}"sdl "; PLUGINS=${PLUGINS}"sdl ";
if test "x$withval" != "xyes"; if test "x$withval" != "xyes";
then then
LIB_SDL="L/usr/X11R6/lib -l"$withval LIB_SDL="-L/usr/X11R6/lib -L"$withval"/lib -l"$withval
INCLUDE=${INCLUDE}" -I"$withval"/include"
else else
AC_CHECK_HEADERS(SDL/SDL.h, , [echo "Cannot find SDL headers !"; exit]) AC_CHECK_HEADERS(SDL/SDL.h, , [echo "Cannot find SDL headers !"; exit])
LIB_SDL="-L/usr/X11R6/lib -lSDL" LIB_SDL="-L/usr/X11R6/lib -lSDL"
...@@ -245,6 +246,9 @@ fi ...@@ -245,6 +246,9 @@ fi
AC_ARG_ENABLE(x11, AC_ARG_ENABLE(x11,
[ --disable-x11 X11 support (default enabled)]) [ --disable-x11 X11 support (default enabled)])
if test x$enable_x11 != xno; then PLUGINS=${PLUGINS}"x11 "; fi if test x$enable_x11 != xno; then PLUGINS=${PLUGINS}"x11 "; fi
AC_ARG_ENABLE(xvideo,
[ --enable-xvideo XVideo interface support (default disabled)],
[if test x$enable_xvideo = xyes; then PLUGINS=${PLUGINS}"xvideo "; fi])
AC_ARG_ENABLE(alsa, AC_ARG_ENABLE(alsa,
[ --enable-alsa Alsa sound drivers support (Only for linux) (default disabled)], [ --enable-alsa Alsa sound drivers support (Only for linux) (default disabled)],
...@@ -258,6 +262,7 @@ AC_SUBST(SYS) ...@@ -258,6 +262,7 @@ AC_SUBST(SYS)
AC_SUBST(ARCH) AC_SUBST(ARCH)
AC_SUBST(PLUGINS) AC_SUBST(PLUGINS)
AC_SUBST(ALIASES) AC_SUBST(ALIASES)
AC_SUBST(INCLUDE)
AC_SUBST(DEBUG) AC_SUBST(DEBUG)
AC_SUBST(STATS) AC_SUBST(STATS)
AC_SUBST(OPTIMS) AC_SUBST(OPTIMS)
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* vout_x11.c: X11 video output display method * vout_x11.c: X11 video output display method
***************************************************************************** *****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN * Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: vout_x11.c,v 1.16 2001/03/16 22:37:06 massiot Exp $ * $Id: vout_x11.c,v 1.17 2001/04/01 06:21:44 sam Exp $
* *
* Authors: Vincent Seguin <seguin@via.ecp.fr> * Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org> * Samuel Hocevar <sam@zoy.org>
...@@ -178,7 +178,7 @@ static int vout_Create( vout_thread_t *p_vout ) ...@@ -178,7 +178,7 @@ static int vout_Create( vout_thread_t *p_vout )
p_vout->p_sys = malloc( sizeof( vout_sys_t ) ); p_vout->p_sys = malloc( sizeof( vout_sys_t ) );
if( p_vout->p_sys == NULL ) if( p_vout->p_sys == NULL )
{ {
intf_ErrMsg("error: %s", strerror(ENOMEM) ); intf_ErrMsg( "vout error: %s", strerror(ENOMEM) );
return( 1 ); return( 1 );
} }
...@@ -188,7 +188,7 @@ static int vout_Create( vout_thread_t *p_vout ) ...@@ -188,7 +188,7 @@ static int vout_Create( vout_thread_t *p_vout )
if( p_vout->p_sys->p_display == NULL ) /* error */ if( p_vout->p_sys->p_display == NULL ) /* error */
{ {
intf_ErrMsg("error: can't open display %s\n", psz_display ); intf_ErrMsg( "vout error: cannot open display %s", psz_display );
free( p_vout->p_sys ); free( p_vout->p_sys );
return( 1 ); return( 1 );
} }
...@@ -198,7 +198,7 @@ static int vout_Create( vout_thread_t *p_vout ) ...@@ -198,7 +198,7 @@ static int vout_Create( vout_thread_t *p_vout )
* but also command buttons, subtitles and other indicators */ * but also command buttons, subtitles and other indicators */
if( X11CreateWindow( p_vout ) ) if( X11CreateWindow( p_vout ) )
{ {
intf_ErrMsg("error: can't create interface window\n" ); intf_ErrMsg( "vout error: cannot create X11 window" );
XCloseDisplay( p_vout->p_sys->p_display ); XCloseDisplay( p_vout->p_sys->p_display );
free( p_vout->p_sys ); free( p_vout->p_sys );
return( 1 ); return( 1 );
...@@ -210,7 +210,7 @@ static int vout_Create( vout_thread_t *p_vout ) ...@@ -210,7 +210,7 @@ static int vout_Create( vout_thread_t *p_vout )
* id is still valid. */ * id is still valid. */
if( X11InitDisplay( p_vout, psz_display ) ) if( X11InitDisplay( p_vout, psz_display ) )
{ {
intf_ErrMsg("error: can't initialize X11 display" ); intf_ErrMsg( "vout error: cannot initialize X11 display" );
XCloseDisplay( p_vout->p_sys->p_display ); XCloseDisplay( p_vout->p_sys->p_display );
free( p_vout->p_sys ); free( p_vout->p_sys );
return( 1 ); return( 1 );
...@@ -259,7 +259,7 @@ static int vout_Init( vout_thread_t *p_vout ) ...@@ -259,7 +259,7 @@ static int vout_Init( vout_thread_t *p_vout )
} }
if( i_err ) /* an error occured */ if( i_err ) /* an error occured */
{ {
intf_Msg("vout: XShm video extension unavailable" ); intf_Msg( "vout: XShm video extension unavailable" );
p_vout->p_sys->b_shm = 0; p_vout->p_sys->b_shm = 0;
} }
} }
...@@ -269,14 +269,14 @@ static int vout_Init( vout_thread_t *p_vout ) ...@@ -269,14 +269,14 @@ static int vout_Init( vout_thread_t *p_vout )
{ {
if( X11CreateImage( p_vout, &p_vout->p_sys->p_ximage[0] ) ) if( X11CreateImage( p_vout, &p_vout->p_sys->p_ximage[0] ) )
{ {
intf_ErrMsg("error: can't create images"); intf_ErrMsg( "vout error: cannot create images" );
p_vout->p_sys->p_ximage[0] = NULL; p_vout->p_sys->p_ximage[0] = NULL;
p_vout->p_sys->p_ximage[1] = NULL; p_vout->p_sys->p_ximage[1] = NULL;
return( 1 ); return( 1 );
} }
if( X11CreateImage( p_vout, &p_vout->p_sys->p_ximage[1] ) ) if( X11CreateImage( p_vout, &p_vout->p_sys->p_ximage[1] ) )
{ {
intf_ErrMsg("error: can't create images"); intf_ErrMsg( "vout error: cannot create images" );
X11DestroyImage( p_vout->p_sys->p_ximage[0] ); X11DestroyImage( p_vout->p_sys->p_ximage[0] );
p_vout->p_sys->p_ximage[0] = NULL; p_vout->p_sys->p_ximage[0] = NULL;
p_vout->p_sys->p_ximage[1] = NULL; p_vout->p_sys->p_ximage[1] = NULL;
...@@ -494,7 +494,7 @@ static int vout_Manage( vout_thread_t *p_vout ) ...@@ -494,7 +494,7 @@ static int vout_Manage( vout_thread_t *p_vout )
*/ */
if( p_vout->i_changes & VOUT_SIZE_CHANGE ) if( p_vout->i_changes & VOUT_SIZE_CHANGE )
{ {
intf_DbgMsg("resizing window"); intf_DbgMsg( "vout info: resizing window" );
p_vout->i_changes &= ~VOUT_SIZE_CHANGE; p_vout->i_changes &= ~VOUT_SIZE_CHANGE;
/* Resize window */ /* Resize window */
...@@ -507,7 +507,7 @@ static int vout_Manage( vout_thread_t *p_vout ) ...@@ -507,7 +507,7 @@ static int vout_Manage( vout_thread_t *p_vout )
/* Recreate XImages. If SysInit failed, the thread can't go on. */ /* Recreate XImages. If SysInit failed, the thread can't go on. */
if( vout_Init( p_vout ) ) if( vout_Init( p_vout ) )
{ {
intf_ErrMsg("error: can't resize display"); intf_ErrMsg( "vout error: cannot resize display" );
return( 1 ); return( 1 );
} }
...@@ -515,7 +515,8 @@ static int vout_Manage( vout_thread_t *p_vout ) ...@@ -515,7 +515,8 @@ static int vout_Manage( vout_thread_t *p_vout )
* tables. This is needed since conversion buffer size may have * tables. This is needed since conversion buffer size may have
* changed */ * changed */
p_vout->i_changes |= VOUT_YUV_CHANGE; p_vout->i_changes |= VOUT_YUV_CHANGE;
intf_Msg("vout: video display resized (%dx%d)", p_vout->i_width, p_vout->i_height); intf_Msg( "vout: video display resized (%dx%d)",
p_vout->i_width, p_vout->i_height);
} }
return 0; return 0;
...@@ -734,7 +735,7 @@ static int X11InitDisplay( vout_thread_t *p_vout, char *psz_display ) ...@@ -734,7 +735,7 @@ static int X11InitDisplay( vout_thread_t *p_vout, char *psz_display )
== True ); == True );
if( !p_vout->p_sys->b_shm ) if( !p_vout->p_sys->b_shm )
{ {
intf_Msg("vout: XShm video extension is not available"); intf_Msg( "vout: XShm video extension is not available" );
} }
/* Get screen depth */ /* Get screen depth */
...@@ -753,7 +754,7 @@ static int X11InitDisplay( vout_thread_t *p_vout, char *psz_display ) ...@@ -753,7 +754,7 @@ static int X11InitDisplay( vout_thread_t *p_vout, char *psz_display )
&xvisual_template, &i_count ); &xvisual_template, &i_count );
if( p_xvisual == NULL ) if( p_xvisual == NULL )
{ {
intf_ErrMsg("vout error: no PseudoColor visual available"); intf_ErrMsg( "vout error: no PseudoColor visual available" );
return( 1 ); return( 1 );
} }
p_vout->i_bytes_per_pixel = 1; p_vout->i_bytes_per_pixel = 1;
...@@ -772,7 +773,7 @@ static int X11InitDisplay( vout_thread_t *p_vout, char *psz_display ) ...@@ -772,7 +773,7 @@ static int X11InitDisplay( vout_thread_t *p_vout, char *psz_display )
&xvisual_template, &i_count ); &xvisual_template, &i_count );
if( p_xvisual == NULL ) if( p_xvisual == NULL )
{ {
intf_ErrMsg("vout error: no TrueColor visual available"); intf_ErrMsg( "vout error: no TrueColor visual available" );
return( 1 ); return( 1 );
} }
p_vout->i_red_mask = p_xvisual->red_mask; p_vout->i_red_mask = p_xvisual->red_mask;
...@@ -822,7 +823,7 @@ static int X11CreateImage( vout_thread_t *p_vout, XImage **pp_ximage ) ...@@ -822,7 +823,7 @@ static int X11CreateImage( vout_thread_t *p_vout, XImage **pp_ximage )
pb_data = (byte_t *) malloc( p_vout->i_bytes_per_line * p_vout->i_height ); pb_data = (byte_t *) malloc( p_vout->i_bytes_per_line * p_vout->i_height );
if( !pb_data ) /* error */ if( !pb_data ) /* error */
{ {
intf_ErrMsg("error: %s", strerror(ENOMEM)); intf_ErrMsg( "vout error: %s", strerror(ENOMEM));
return( 1 ); return( 1 );
} }
...@@ -877,7 +878,7 @@ static int X11CreateShmImage( vout_thread_t *p_vout, XImage **pp_ximage, ...@@ -877,7 +878,7 @@ static int X11CreateShmImage( vout_thread_t *p_vout, XImage **pp_ximage,
p_shm_info, p_vout->i_width, p_vout->i_height ); p_shm_info, p_vout->i_width, p_vout->i_height );
if(! *pp_ximage ) /* error */ if(! *pp_ximage ) /* error */
{ {
intf_ErrMsg("error: XShmCreateImage() failed"); intf_ErrMsg( "vout error: XShmCreateImage() failed" );
return( 1 ); return( 1 );
} }
...@@ -888,7 +889,7 @@ static int X11CreateShmImage( vout_thread_t *p_vout, XImage **pp_ximage, ...@@ -888,7 +889,7 @@ static int X11CreateShmImage( vout_thread_t *p_vout, XImage **pp_ximage,
* (*pp_ximage)->height, IPC_CREAT | 0777); * (*pp_ximage)->height, IPC_CREAT | 0777);
if( p_shm_info->shmid < 0) /* error */ if( p_shm_info->shmid < 0) /* error */
{ {
intf_ErrMsg("error: can't allocate shared image data (%s)", intf_ErrMsg( "vout error: cannot allocate shared image data (%s)",
strerror(errno)); strerror(errno));
XDestroyImage( *pp_ximage ); XDestroyImage( *pp_ximage );
return( 1 ); return( 1 );
...@@ -898,7 +899,7 @@ static int X11CreateShmImage( vout_thread_t *p_vout, XImage **pp_ximage, ...@@ -898,7 +899,7 @@ static int X11CreateShmImage( vout_thread_t *p_vout, XImage **pp_ximage,
p_shm_info->shmaddr = (*pp_ximage)->data = shmat(p_shm_info->shmid, 0, 0); p_shm_info->shmaddr = (*pp_ximage)->data = shmat(p_shm_info->shmid, 0, 0);
if(! p_shm_info->shmaddr ) if(! p_shm_info->shmaddr )
{ /* error */ { /* error */
intf_ErrMsg("error: can't attach shared memory (%s)", intf_ErrMsg( "vout error: cannot attach shared memory (%s)",
strerror(errno)); strerror(errno));
shmctl( p_shm_info->shmid, IPC_RMID, 0 ); /* free shared memory */ shmctl( p_shm_info->shmid, IPC_RMID, 0 ); /* free shared memory */
XDestroyImage( *pp_ximage ); XDestroyImage( *pp_ximage );
...@@ -914,7 +915,7 @@ static int X11CreateShmImage( vout_thread_t *p_vout, XImage **pp_ximage, ...@@ -914,7 +915,7 @@ static int X11CreateShmImage( vout_thread_t *p_vout, XImage **pp_ximage,
if( XShmAttach( p_vout->p_sys->p_display, p_shm_info ) if( XShmAttach( p_vout->p_sys->p_display, p_shm_info )
== False ) /* error */ == False ) /* error */
{ {
intf_ErrMsg("error: can't attach shared memory to X11 server"); intf_ErrMsg( "vout error: cannot attach shared memory to X11 server" );
shmdt( p_shm_info->shmaddr ); /* detach shared memory from process shmdt( p_shm_info->shmaddr ); /* detach shared memory from process
* and automatic free */ * and automatic free */
XDestroyImage( *pp_ximage ); XDestroyImage( *pp_ximage );
...@@ -962,7 +963,7 @@ static void X11DestroyShmImage( vout_thread_t *p_vout, XImage *p_ximage, ...@@ -962,7 +963,7 @@ static void X11DestroyShmImage( vout_thread_t *p_vout, XImage *p_ximage,
if( shmdt( p_shm_info->shmaddr ) ) /* detach shared memory from process */ if( shmdt( p_shm_info->shmaddr ) ) /* detach shared memory from process */
{ /* also automatic freeing... */ { /* also automatic freeing... */
intf_ErrMsg( "error: can't detach shared memory (%s)", intf_ErrMsg( "error: cannot detach shared memory (%s)",
strerror(errno) ); strerror(errno) );
} }
} }
...@@ -1002,7 +1003,7 @@ void X11DisableScreenSaver( vout_thread_t *p_vout ) ...@@ -1002,7 +1003,7 @@ void X11DisableScreenSaver( vout_thread_t *p_vout )
&p_vout->p_sys->i_ss_exposure ); &p_vout->p_sys->i_ss_exposure );
/* Disable screen saver */ /* Disable screen saver */
intf_DbgMsg("intf: disabling screen saver"); intf_DbgMsg( "vout: disabling screen saver" );
XSetScreenSaver( p_vout->p_sys->p_display, 0, XSetScreenSaver( p_vout->p_sys->p_display, 0,
p_vout->p_sys->i_ss_interval, p_vout->p_sys->i_ss_interval,
p_vout->p_sys->i_ss_blanking, p_vout->p_sys->i_ss_blanking,
......
This diff is collapsed.
/*****************************************************************************
* xvideo.c : Xvideo plugin for vlc
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* $Id: xvideo.c,v 1.1 2001/04/01 06:21:44 sam Exp $
*
* Authors: Shane Harper <shanegh@optusnet.com.au>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#define MODULE_NAME xvideo
#include "modules_inner.h"
/*****************************************************************************
* Preamble
*****************************************************************************/
#include "defs.h"
#include <stdlib.h> /* malloc(), free() */
#include "config.h"
#include "common.h" /* boolean_t, byte_t */
#include "threads.h"
#include "mtime.h"
#include "video.h"
#include "video_output.h"
#include "modules.h"
/*****************************************************************************
* Building configuration tree
*****************************************************************************/
MODULE_CONFIG_START
ADD_WINDOW( "Configuration for xvideo module" )
ADD_COMMENT( "For now, the xvideo module cannot be configured" )
MODULE_CONFIG_END
/*****************************************************************************
* Capabilities defined in the other files.
******************************************************************************/
void _M( vout_getfunctions )( function_list_t * p_function_list );
/*****************************************************************************
* InitModule: get the module structure and configuration.
*****************************************************************************
* We have to fill psz_name, psz_longname and psz_version. These variables
* will be strdup()ed later by the main application because the module can
* be unloaded later to save memory, and we want to be able to access this
* data even after the module has been unloaded.
*****************************************************************************/
MODULE_INIT
{
p_module->psz_name = MODULE_STRING;
p_module->psz_longname = "XVideo extension module";
p_module->psz_version = VERSION;
p_module->i_capabilities = MODULE_CAPABILITY_NULL
| MODULE_CAPABILITY_VOUT;
return( 0 );
}
/*****************************************************************************
* ActivateModule: set the module to an usable state.
*****************************************************************************
* This function fills the capability functions and the configuration
* structure. Once ActivateModule() has been called, the i_usage can
* be set to 0 and calls to NeedModule() be made to increment it. To unload
* the module, one has to wait until i_usage == 0 and call DeactivateModule().
*****************************************************************************/
MODULE_ACTIVATE
{
p_module->p_functions = malloc( sizeof( module_functions_t ) );
if( p_module->p_functions == NULL )
{
return( -1 );
}
_M( vout_getfunctions )( &p_module->p_functions->vout );
p_module->p_config = p_config;
return( 0 );
}
/*****************************************************************************
* DeactivateModule: make sure the module can be unloaded.
*****************************************************************************
* This function must only be called when i_usage == 0. If it successfully
* returns, i_usage can be set to -1 and the module unloaded. Be careful to
* lock usage_lock during the whole process.
*****************************************************************************/
MODULE_DEACTIVATE
{
free( p_module->p_functions );
return( 0 );
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment