Commit 10c6c8c9 authored by Henri Fallon's avatar Henri Fallon

Same changes that were made in the stbale branch ( FB_NOYPAN support )
parent 39eb5768
...@@ -358,6 +358,13 @@ ...@@ -358,6 +358,13 @@
#define VOUT_FB_DEV_VAR "vlc_fb_dev" #define VOUT_FB_DEV_VAR "vlc_fb_dev"
#define VOUT_FB_DEV_DEFAULT "/dev/fb0" #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 * Video parser configuration
*****************************************************************************/ *****************************************************************************/
......
...@@ -174,13 +174,21 @@ int vout_FBManage( vout_thread_t *p_vout ) ...@@ -174,13 +174,21 @@ int vout_FBManage( vout_thread_t *p_vout )
void vout_FBDisplay( vout_thread_t *p_vout ) void vout_FBDisplay( vout_thread_t *p_vout )
{ {
/* swap the two Y offsets */ /* 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; 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 ... /* the X offset should be 0, but who knows ...
* some other app might have played with the framebuffer */ * some other app might have played with the framebuffer */
p_vout->p_sys->var_info.xoffset = 0; 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, FBIOPUT_VSCREENINFO, &p_vout->p_sys->var_info );
ioctl( p_vout->p_sys->i_fb_dev, FBIOPAN_DISPLAY, &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 ) ...@@ -335,8 +343,16 @@ static int FBOpenDisplay( vout_thread_t *p_vout )
} }
/* Set and initialize buffers */ /* Set and initialize buffers */
vout_SetBuffers( p_vout, p_vout->p_sys->p_video, 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", 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 ); fix_info.type, fix_info.visual, fix_info.ypanstep, fix_info.ywrapstep, fix_info.accel );
return( 0 ); return( 0 );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment