* vout_x11.c: X11 video output display method
*****************************************************************************
* 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>
* Samuel Hocevar <sam@zoy.org>
p_vout->p_sys = malloc( sizeof( vout_sys_t ) );
if( p_vout->p_sys == NULL )
{
- intf_ErrMsg("error: %s", strerror(ENOMEM) );
+ intf_ErrMsg( "vout error: %s", strerror(ENOMEM) );
return( 1 );
}
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 );
return( 1 );
}
* but also command buttons, subtitles and other indicators */
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 );
free( p_vout->p_sys );
return( 1 );
* id is still valid. */
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 );
free( p_vout->p_sys );
return( 1 );
}
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;
}
}
{
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[1] = NULL;
return( 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] );
p_vout->p_sys->p_ximage[0] = NULL;
p_vout->p_sys->p_ximage[1] = NULL;
*/
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;
/* Resize window */
/* Recreate XImages. If SysInit failed, the thread can't go on. */
if( vout_Init( p_vout ) )
{
- intf_ErrMsg("error: can't resize display");
+ intf_ErrMsg( "vout error: cannot resize display" );
return( 1 );
}
* tables. This is needed since conversion buffer size may have
* changed */
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;
== True );
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 */
&xvisual_template, &i_count );
if( p_xvisual == NULL )
{
- intf_ErrMsg("vout error: no PseudoColor visual available");
+ intf_ErrMsg( "vout error: no PseudoColor visual available" );
return( 1 );
}
p_vout->i_bytes_per_pixel = 1;
&xvisual_template, &i_count );
if( p_xvisual == NULL )
{
- intf_ErrMsg("vout error: no TrueColor visual available");
+ intf_ErrMsg( "vout error: no TrueColor visual available" );
return( 1 );
}
p_vout->i_red_mask = p_xvisual->red_mask;
pb_data = (byte_t *) malloc( p_vout->i_bytes_per_line * p_vout->i_height );
if( !pb_data ) /* error */
{
- intf_ErrMsg("error: %s", strerror(ENOMEM));
+ intf_ErrMsg( "vout error: %s", strerror(ENOMEM));
return( 1 );
}
p_shm_info, p_vout->i_width, p_vout->i_height );
if(! *pp_ximage ) /* error */
{
- intf_ErrMsg("error: XShmCreateImage() failed");
+ intf_ErrMsg( "vout error: XShmCreateImage() failed" );
return( 1 );
}
* (*pp_ximage)->height, IPC_CREAT | 0777);
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));
XDestroyImage( *pp_ximage );
return( 1 );
p_shm_info->shmaddr = (*pp_ximage)->data = shmat(p_shm_info->shmid, 0, 0);
if(! p_shm_info->shmaddr )
{ /* error */
- intf_ErrMsg("error: can't attach shared memory (%s)",
+ intf_ErrMsg( "vout error: cannot attach shared memory (%s)",
strerror(errno));
shmctl( p_shm_info->shmid, IPC_RMID, 0 ); /* free shared memory */
XDestroyImage( *pp_ximage );
if( XShmAttach( p_vout->p_sys->p_display, p_shm_info )
== 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
* and automatic free */
XDestroyImage( *pp_ximage );
if( shmdt( p_shm_info->shmaddr ) ) /* detach shared memory from process */
{ /* also automatic freeing... */
- intf_ErrMsg( "error: can't detach shared memory (%s)",
+ intf_ErrMsg( "error: cannot detach shared memory (%s)",
strerror(errno) );
}
}
&p_vout->p_sys->i_ss_exposure );
/* Disable screen saver */
- intf_DbgMsg("intf: disabling screen saver");
+ intf_DbgMsg( "vout: disabling screen saver" );
XSetScreenSaver( p_vout->p_sys->p_display, 0,
p_vout->p_sys->i_ss_interval,
p_vout->p_sys->i_ss_blanking,