diff options
author | pontscho <pontscho@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-06-05 19:35:54 +0000 |
---|---|---|
committer | pontscho <pontscho@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-06-05 19:35:54 +0000 |
commit | ae8906e42cbf6de281e5c90fb05704234f777d67 (patch) | |
tree | f09eecbaec15cde716c93c02877c4bb3a4e7bdeb /libvo/vo_xv.c | |
parent | 49d13970550898741af54c3f70f88fc890db3fb2 (diff) | |
download | mpv-ae8906e42cbf6de281e5c90fb05704234f777d67.tar.bz2 mpv-ae8906e42cbf6de281e5c90fb05704234f777d67.tar.xz |
added panscan support for xmga/xvidix
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@6308 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo/vo_xv.c')
-rw-r--r-- | libvo/vo_xv.c | 38 |
1 files changed, 17 insertions, 21 deletions
diff --git a/libvo/vo_xv.c b/libvo/vo_xv.c index 39b087cf42..317941a04e 100644 --- a/libvo/vo_xv.c +++ b/libvo/vo_xv.c @@ -94,10 +94,6 @@ static uint32_t image_height; static uint32_t image_format; static int flip_flag; -static int panscan_x; -static int panscan_y; -static float panscan_amount; - static Window mRoot; static uint32_t drwX,drwY,drwBorderWidth,drwDepth; static uint32_t dwidth,dheight; @@ -338,9 +334,7 @@ static uint32_t config(uint32_t width, uint32_t height, uint32_t d_width, uint32 static uint32_t vm_height; #endif - panscan_x = 0; - panscan_y = 0; - panscan_amount = 0.0f; + panscan_init(); aspect_save_orig(width,height); aspect_save_prescale(d_width,d_height); @@ -604,31 +598,19 @@ static void draw_osd(void) static void flip_page(void) { - if((vo_fs && (vo_panscan != panscan_amount)) || (!vo_fs && panscan_amount)) - { - int panscan_area = (vo_screenheight-vo_dheight); - - panscan_amount = vo_fs ? vo_panscan : 0; - - panscan_x = panscan_area * panscan_amount * (image_width / (float)image_height); - panscan_y = panscan_area * panscan_amount; - - XClearWindow(mDisplay, vo_window); - XFlush(mDisplay); - } if ( Shmem_Flag ) { XvShmPutImage(mDisplay, xv_port, vo_window, vo_gc, xvimage[current_buf], 0, 0, image_width, image_height, - drwX-(panscan_x>>1),drwY-(panscan_y>>1),vo_dwidth+panscan_x,(vo_fs?vo_dheight - 1:vo_dheight)+panscan_y, + drwX-(vo_panscan_x>>1),drwY-(vo_panscan_y>>1),vo_dwidth+vo_panscan_x,(vo_fs?vo_dheight - 1:vo_dheight)+vo_panscan_y, False); } else { XvPutImage(mDisplay, xv_port, vo_window, vo_gc, xvimage[current_buf], 0, 0, image_width, image_height, - drwX-(panscan_x>>1),drwY-(panscan_y>>1),vo_dwidth+panscan_x,(vo_fs?vo_dheight - 1:vo_dheight)+panscan_y); + drwX-(vo_panscan_x>>1),drwY-(vo_panscan_y>>1),vo_dwidth+vo_panscan_x,(vo_fs?vo_dheight - 1:vo_dheight)+vo_panscan_y); } if (num_buffers>1){ current_buf=(current_buf+1)%num_buffers; @@ -874,6 +856,20 @@ static uint32_t control(uint32_t request, void *data, ...) case VOCTRL_FULLSCREEN: vo_x11_fullscreen(); return VO_TRUE; + case VOCTRL_GUISUPPORT: + return VO_TRUE; + case VOCTRL_GET_PANSCAN: + return VO_TRUE; + case VOCTRL_SET_PANSCAN: + +// if((vo_fs && (vo_panscan != vo_panscan_amount)) || (!vo_fs && vo_panscan_amount)) + if ( vo_fs && ( vo_panscan != vo_panscan_amount ) ) + { + panscan_calc(); + XClearWindow(mDisplay, vo_window); + XFlush(mDisplay); + } + return VO_TRUE; } return VO_NOTIMPL; } |