]> git.sesse.net Git - vlc/commitdiff
. support framebuffer
authorSam Hocevar <sam@videolan.org>
Fri, 21 Jan 2000 11:31:01 +0000 (11:31 +0000)
committerSam Hocevar <sam@videolan.org>
Fri, 21 Jan 2000 11:31:01 +0000 (11:31 +0000)
 . input clavier limit�e mais fonctionnelle

Makefile
include/config.h
src/video_output/video_fb.c

index 472dea1fa601c51fc539bdd666b4dc57dbbd4cf4..2185b5e52242626b7a7dd801a13ba9fb3d5b0536 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -14,9 +14,9 @@
 #SHELL = /bin/sh
 
 # Video output settings
-VIDEO=X11
+#VIDEO=X11
 #VIDEO=DGA (not yet supported)
-#VIDEO=FB
+VIDEO=FB
 #VIDEO=GGI
 #VIDEO=BEOS (not yet supported)
 
@@ -89,6 +89,7 @@ CCFLAGS += -D_REENTRANT
 CCFLAGS += -D_GNU_SOURCE
 
 # Optimizations : don't compile debug versions with them
+#CCFLAGS += -g
 CCFLAGS += -O6
 CCFLAGS += -ffast-math -funroll-loops -fargument-noalias-global
 CCFLAGS += -fomit-frame-pointer
index 9b917b4c0b494f90886189f44738c4f4bcf8e8c8..f5bc7f435eaf783b7862f88419794fc9ecf78fd5 100644 (file)
  *******************************************************************************/
 
 /* General debugging support */
-#define DEBUG
+//#define DEBUG
 
 /* Modules specific debugging - this will produce a lot of output, but can be
  * usefull to track a bug */
-#define DEBUG_INTF
+/*#define DEBUG_INTF
 #define DEBUG_INPUT
 #define DEBUG_AUDIO
-#define DEBUG_VIDEO
+#define DEBUG_VIDEO*/
 
 /* Debugging log file - if defined, a file can be used to store all messages. If
  * DEBUG_LOG_ONLY is defined, debug messages will only be printed to the log and
index 79d363ebd7798f69f904fb695725e5c1e25d2212..f8c5a0271585f80aed82788e359a154c813c76d1 100644 (file)
@@ -67,6 +67,7 @@ typedef struct vout_sys_s
  ******************************************************************************/
 static int     FBOpenDisplay   ( vout_thread_t *p_vout );
 static void    FBCloseDisplay  ( vout_thread_t *p_vout );
+static void    FBBlankDisplay  ( vout_thread_t *p_vout );
 
 
 /******************************************************************************
@@ -146,7 +147,13 @@ void vout_SysDestroy( vout_thread_t *p_vout )
 int vout_SysManage( vout_thread_t *p_vout )
 {
     /* XXX */
-    
+    if( p_vout->i_changes & VOUT_SIZE_CHANGE )
+    {
+        intf_DbgMsg("resizing window\n");
+        p_vout->i_changes &= ~VOUT_SIZE_CHANGE;
+       FBBlankDisplay( p_vout );
+    }
+                                       
     return 0;
 }
 
@@ -160,12 +167,16 @@ void vout_SysDisplay( vout_thread_t *p_vout )
 {
     /* Swap buffers */
     //p_vout->p_sys->i_buffer_index = ++p_vout->p_sys->i_buffer_index & 1;
+    p_vout->p_sys->i_buffer_index = 0;
 
     /* tout est bien affiché, on peut échanger les 2 écrans */
+    p_vout->p_sys->var_info.xoffset = 0;
     p_vout->p_sys->var_info.yoffset =
-        /*p_vout->p_sys->i_buffer_index ?*/ 0 /*: p_vout->p_sys->var_info.yres*/;
+        0;
+        //p_vout->p_sys->i_buffer_index ? 0 : p_vout->p_sys->var_info.yres;
 
-    ioctl( p_vout->p_sys->i_fb_dev, FBIOPUT_VSCREENINFO, &p_vout->p_sys->var_info );   
+    //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 );       
 }
 
 /******************************************************************************
@@ -221,6 +232,7 @@ static int FBOpenDisplay( vout_thread_t *p_vout )
     p_vout->p_sys->var_info.activate = FB_ACTIVATE_NXTOPEN;
     p_vout->p_sys->var_info.xoffset =  0;
     p_vout->p_sys->var_info.yoffset =  0;
+    fprintf(stderr, "ypanstep is %i\n", fix_info.ypanstep);
     //??ask sam p_vout->p_sys->mode_info.sync = FB_SYNC_VERT_HIGH_ACT;
     //???
     if( ioctl( p_vout->p_sys->i_fb_dev, FBIOPUT_VSCREENINFO, &p_vout->p_sys->var_info ) )
@@ -305,3 +317,13 @@ static void FBCloseDisplay( vout_thread_t *p_vout )
     close( p_vout->p_sys->i_fb_dev );    
 }
 
+/******************************************************************************
+ * FBBlankDisplay: render a blank screen
+ ******************************************************************************
+ * This function is called by all other rendering functions when they arrive on
+ * a non blanked screen.
+ ******************************************************************************/
+static void FBBlankDisplay( vout_thread_t *p_vout )
+{
+    memset( p_vout->p_sys->p_video, 0x00, 2*p_vout->p_sys->i_page_size );
+}