]> git.sesse.net Git - vlc/blobdiff - plugins/fb/vout_fb.c
* Fixed the BeOS compile typo.
[vlc] / plugins / fb / vout_fb.c
index 43a236aa0330bab077e79ba16adfd7cf3421830d..8111a033a4f9fd92c773f1695a596473c12d0a5a 100644 (file)
@@ -2,6 +2,7 @@
  * vout_fb.c: framebuffer video output display method
  *****************************************************************************
  * Copyright (C) 1998, 1999, 2000, 2001 VideoLAN
+ * $Id: vout_fb.c,v 1.13 2001/05/30 17:03:12 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
@@ -56,6 +57,8 @@
 #include "intf_msg.h"
 #include "main.h"
 
+#include "modules_export.h"
+
 /*****************************************************************************
  * vout_sys_t: video output framebuffer method descriptor
  *****************************************************************************
@@ -333,7 +336,7 @@ static int vout_Manage( vout_thread_t *p_vout )
      */
     if( p_vout->i_changes & VOUT_SIZE_CHANGE )
     {
-        intf_WarnMsg( 1, "vout: reinitializing framebuffer screen" );
+        intf_WarnMsg( 3, "vout: reinitializing framebuffer screen" );
         p_vout->i_changes &= ~VOUT_SIZE_CHANGE;
 
         /* Destroy XImages to change their size */
@@ -458,7 +461,7 @@ static int FBOpenDisplay( vout_thread_t *p_vout )
 
     /* FIXME: if the image is full-size, it gets cropped on the left
      * because of the xres / xres_virtual slight difference */
-    intf_WarnMsg( 1, "vout: %ix%i (virtual %ix%i)",
+    intf_WarnMsg( 3, "vout: %ix%i (virtual %ix%i)",
                   p_vout->p_sys->var_info.xres,
                   p_vout->p_sys->var_info.yres,
                   p_vout->p_sys->var_info.xres_virtual,
@@ -562,17 +565,17 @@ static int FBOpenDisplay( vout_thread_t *p_vout )
     /* Set and initialize buffers */
     if( p_vout->p_sys->b_pan )
     {
-        vout_SetBuffers( p_vout, p_vout->p_sys->p_video,
+        p_vout->pf_setbuffers( p_vout, p_vout->p_sys->p_video,
                                  p_vout->p_sys->p_video
                                   + p_vout->p_sys->i_page_size );
     }
     else
     {
-        vout_SetBuffers( p_vout, p_vout->p_sys->p_video,
+        p_vout->pf_setbuffers( p_vout, p_vout->p_sys->p_video,
                                  p_vout->p_sys->p_video );
     }
     
-    intf_WarnMsg( 1, "framebuffer type=%d, visual=%d, ypanstep=%d, ywrap=%d, accel=%d",
+    intf_WarnMsg( 3, "framebuffer type=%d, visual=%d, ypanstep=%d, ywrap=%d, accel=%d",
                   fix_info.type, fix_info.visual, fix_info.ypanstep, fix_info.ywrapstep, fix_info.accel );
     return( 0 );
 }
@@ -607,26 +610,35 @@ static void FBCloseDisplay( vout_thread_t *p_vout )
  *****************************************************************************/
 static void FBSwitchDisplay(int i_signal)
 {
-    if( p_main->p_vout != NULL )
+#if 0
+    vout_thread_t *p_vout;
+
+    vlc_mutex_lock( &p_vout_bank->lock );
+
+    /* XXX: only test the first video output */
+    if( p_vout_bank->i_count )
     {
+        p_vout = p_vout_bank->pp_vout[0];
+
         switch( i_signal )
         {
         case SIGUSR1:                                /* vt has been released */
-            p_main->p_vout->b_active = 0;
-            ioctl( ((vout_sys_t *)p_main->p_vout->p_sys)->i_tty_dev,
-                   VT_RELDISP, 1 );
+            p_vout->b_active = 0;
+            ioctl( p_vout->p_sys->i_tty_dev, VT_RELDISP, 1 );
             break;
         case SIGUSR2:                                /* vt has been acquired */
-            p_main->p_vout->b_active = 1;
-            ioctl( ((vout_sys_t *)p_main->p_vout->p_sys)->i_tty_dev,
-                   VT_RELDISP, VT_ACTIVATE );
+            p_vout->b_active = 1;
+            ioctl( p_vout->p_sys->i_tty_dev, VT_RELDISP, VT_ACTIVATE );
             /* handle blanking */
-            vlc_mutex_lock( &p_main->p_vout->change_lock );
-            p_main->p_vout->i_changes |= VOUT_SIZE_CHANGE;
-            vlc_mutex_unlock( &p_main->p_vout->change_lock );
+            vlc_mutex_lock( &p_vout->change_lock );
+            p_vout->i_changes |= VOUT_SIZE_CHANGE;
+            vlc_mutex_unlock( &p_vout->change_lock );
             break;
         }
     }
+
+    vlc_mutex_unlock( &p_vout_bank->lock );
+#endif
 }
 
 /*****************************************************************************