]> git.sesse.net Git - vlc/blobdiff - plugins/x11/vout_x11.c
* XVideo plugin courtesy of Shane Harper <shanegh@optusnet.com.au>
[vlc] / plugins / x11 / vout_x11.c
index 5ab0b4960d14e1d97cd78ddec06602d4a4c91917..c8230ebafda9bedd1b1b5db1accbda1f70e5e87e 100644 (file)
@@ -2,7 +2,7 @@
  * 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>
@@ -178,7 +178,7 @@ static int vout_Create( vout_thread_t *p_vout )
     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 );
     }
 
@@ -188,7 +188,7 @@ static int vout_Create( vout_thread_t *p_vout )
 
     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 );
     }
@@ -198,7 +198,7 @@ static int vout_Create( vout_thread_t *p_vout )
      * 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 );
@@ -210,7 +210,7 @@ static int vout_Create( vout_thread_t *p_vout )
      * 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 );
@@ -259,7 +259,7 @@ static int vout_Init( vout_thread_t *p_vout )
         }
         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;
         }
     }
@@ -269,14 +269,14 @@ static int vout_Init( vout_thread_t *p_vout )
     {
         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;
@@ -494,7 +494,7 @@ static int vout_Manage( vout_thread_t *p_vout )
      */
     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 */
@@ -507,7 +507,7 @@ static int vout_Manage( vout_thread_t *p_vout )
         /* 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 );
        }
 
@@ -515,7 +515,8 @@ static int vout_Manage( vout_thread_t *p_vout )
          * 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;
@@ -734,7 +735,7 @@ static int X11InitDisplay( vout_thread_t *p_vout, char *psz_display )
                                  == 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 */
@@ -753,7 +754,7 @@ static int X11InitDisplay( vout_thread_t *p_vout, char *psz_display )
                                     &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;
@@ -772,7 +773,7 @@ static int X11InitDisplay( vout_thread_t *p_vout, char *psz_display )
                                     &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;
@@ -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 );
     if( !pb_data )                                                  /* error */
     {
-        intf_ErrMsg("error: %s", strerror(ENOMEM));
+        intf_ErrMsg( "vout error: %s", strerror(ENOMEM));
         return( 1 );
     }
 
@@ -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 );
     if(! *pp_ximage )                                               /* error */
     {
-        intf_ErrMsg("error: XShmCreateImage() failed");
+        intf_ErrMsg( "vout error: XShmCreateImage() failed" );
         return( 1 );
     }
 
@@ -888,7 +889,7 @@ static int X11CreateShmImage( vout_thread_t *p_vout, XImage **pp_ximage,
                                  * (*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 );
@@ -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);
     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 );
@@ -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 )
          == 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 );
@@ -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 */
     {                                   /* also automatic freeing...         */
-        intf_ErrMsg( "error: can't detach shared memory (%s)",
+        intf_ErrMsg( "error: cannot detach shared memory (%s)",
                      strerror(errno) );
     }
 }
@@ -1002,7 +1003,7 @@ void X11DisableScreenSaver( vout_thread_t *p_vout )
                      &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,