From 10c6c8c961049c000fae66c3041d3fbb23623ea8 Mon Sep 17 00:00:00 2001 From: Henri Fallon Date: Mon, 11 Dec 2000 13:55:50 +0000 Subject: [PATCH] Same changes that were made in the stbale branch ( FB_NOYPAN support ) --- include/config.h.in | 7 +++++++ plugins/fb/vout_fb.c | 18 +++++++++++++++++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/include/config.h.in b/include/config.h.in index 4d9dd6399b..17d42cd0a2 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -358,6 +358,13 @@ #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 *****************************************************************************/ diff --git a/plugins/fb/vout_fb.c b/plugins/fb/vout_fb.c index 7b63e61f2d..ffb8d0450c 100644 --- a/plugins/fb/vout_fb.c +++ b/plugins/fb/vout_fb.c @@ -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 ); -- 2.39.2