[Mplayer-cvslog] CVS: main/libvo sub.h,1.18,1.19 video_out.c,1.51,1.52 video_out.h,1.33,1.34 vo_xv.c,1.92,1.93
Arpi of Ize
arpi at mplayerhq.hu
Tue Jun 4 22:17:09 CEST 2002
Update of /cvsroot/mplayer/main/libvo
In directory mail:/var/tmp.root/cvs-serv24199/libvo
Modified Files:
sub.h video_out.c video_out.h vo_xv.c
Log Message:
pan&scan support with -vo xv by ?? <mplayer at svennevid.net>
Index: sub.h
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/sub.h,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- sub.h 17 May 2002 23:47:27 -0000 1.18
+++ sub.h 4 Jun 2002 20:17:07 -0000 1.19
@@ -74,6 +74,7 @@
#define OSD_VOLUME 0x09
#define OSD_BRIGHTNESS 0x0A
#define OSD_HUE 0x0B
+#define OSD_PANSCAN 0x50
#define OSD_PB_START 0x10
#define OSD_PB_0 0x11
Index: video_out.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/video_out.c,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -r1.51 -r1.52
--- video_out.c 13 May 2002 13:15:40 -0000 1.51
+++ video_out.c 4 Jun 2002 20:17:07 -0000 1.52
@@ -56,6 +56,7 @@
int vo_vsync = 0;
int vo_fs = 0;
int vo_fsmode = 0;
+float vo_panscan = 0.0f;
int vo_pts=0; // for hw decoding
float vo_fps=0; // for mp1e rte
Index: video_out.h
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/video_out.h,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- video_out.h 17 May 2002 23:47:27 -0000 1.33
+++ video_out.h 4 Jun 2002 20:17:07 -0000 1.34
@@ -216,6 +216,7 @@
extern int vo_vsync;
extern int vo_fs;
extern int vo_fsmode;
+extern float vo_panscan;
extern int vo_mouse_timer_const;
Index: vo_xv.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_xv.c,v
retrieving revision 1.92
retrieving revision 1.93
diff -u -r1.92 -r1.93
--- vo_xv.c 3 Jun 2002 22:29:49 -0000 1.92
+++ vo_xv.c 4 Jun 2002 20:17:07 -0000 1.93
@@ -94,6 +94,10 @@
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;
@@ -333,6 +337,10 @@
static uint32_t vm_height;
#endif
+ panscan_x = 0;
+ panscan_y = 0;
+ panscan_amount = 0.0f;
+
aspect_save_orig(width,height);
aspect_save_prescale(d_width,d_height);
@@ -595,18 +603,31 @@
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,drwY,vo_dwidth,(vo_fs?vo_dheight - 1:vo_dheight),
+ drwX-(panscan_x>>1),drwY-(panscan_y>>1),vo_dwidth+panscan_x,(vo_fs?vo_dheight - 1:vo_dheight)+panscan_y,
False);
}
else
{
XvPutImage(mDisplay, xv_port, vo_window, vo_gc, xvimage[current_buf],
0, 0, image_width, image_height,
- drwX,drwY,vo_dwidth,(vo_fs?vo_dheight - 1:vo_dheight));
+ drwX-(panscan_x>>1),drwY-(panscan_y>>1),vo_dwidth+panscan_x,(vo_fs?vo_dheight - 1:vo_dheight)+panscan_y);
}
if (num_buffers>1){
current_buf=(current_buf+1)%num_buffers;
More information about the MPlayer-cvslog
mailing list