]> git.sesse.net Git - vlc/commitdiff
Same changes that were made in the stbale branch ( FB_NOYPAN support )
authorHenri Fallon <henri@videolan.org>
Mon, 11 Dec 2000 13:55:50 +0000 (13:55 +0000)
committerHenri Fallon <henri@videolan.org>
Mon, 11 Dec 2000 13:55:50 +0000 (13:55 +0000)
include/config.h.in
plugins/fb/vout_fb.c

index 4d9dd6399ba71a60c20db35b1611c2b4fd98f9a9..17d42cd0a282fabe5ad0e7e5373dab40e13ab39a 100644 (file)
 #define VOUT_FB_DEV_VAR                 "vlc_fb_dev"
 #define VOUT_FB_DEV_DEFAULT             "/dev/fb0"
 
+/* Some frame buffers aren't able to support double buffering.
+ * We don't want to lose one frame out of 2, so we may set the
+ * FB_NOYPAN
+ */
+// #define FB_NOYPAN
+   
+
 /*****************************************************************************
  * Video parser configuration
  *****************************************************************************/
index 7b63e61f2d4985c36f4c6f6f79472e0ab2bed894..ffb8d0450ca48fed9b74f2a8bcb01f79e776a3d6 100644 (file)
@@ -174,13 +174,21 @@ int vout_FBManage( vout_thread_t *p_vout )
 void vout_FBDisplay( vout_thread_t *p_vout )
 {
     /* swap the two Y offsets */
+    
+#ifdef FB_NOYPAN
+    
+    /* if the fb doesn't supports ypan, we only use one buffer */
+
+#else
     p_vout->p_sys->var_info.yoffset = p_vout->i_buffer_index ? p_vout->p_sys->var_info.yres : 0;
+   
     /* the X offset should be 0, but who knows ...
      * some other app might have played with the framebuffer */
     p_vout->p_sys->var_info.xoffset = 0;
 
     //ioctl( p_vout->p_sys->i_fb_dev, FBIOPUT_VSCREENINFO, &p_vout->p_sys->var_info );
     ioctl( p_vout->p_sys->i_fb_dev, FBIOPAN_DISPLAY, &p_vout->p_sys->var_info );
+#endif
 }
 
 /*****************************************************************************
@@ -335,8 +343,16 @@ static int FBOpenDisplay( vout_thread_t *p_vout )
     }
 
     /* Set and initialize buffers */
+
     vout_SetBuffers( p_vout, p_vout->p_sys->p_video,
-                     p_vout->p_sys->p_video + p_vout->p_sys->i_page_size );
+
+#ifdef FB_NOYPAN /* If the fb doesn't support ypan */
+            p_vout->p_sys->p_video 
+#else
+            p_vout->p_sys->p_video + p_vout->p_sys->i_page_size 
+#endif
+                );
+    
     intf_DbgMsg("framebuffer type=%d, visual=%d, ypanstep=%d, ywrap=%d, accel=%d\n",
                 fix_info.type, fix_info.visual, fix_info.ypanstep, fix_info.ywrapstep, fix_info.accel );
     return( 0 );