changeset 8063:4c7ef4aeb88b

Overlay cropping options. Patch by Mark <CompGuy284 at attbi dot com> extanded by myself a bit
author albeu
date Sat, 02 Nov 2002 22:46:09 +0000
parents ed2d3e7e7e36
children cb911c5c3310
files libvo/vo_dxr2.c
diffstat 1 files changed, 10 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/vo_dxr2.c	Sat Nov 02 22:44:15 2002 +0000
+++ b/libvo/vo_dxr2.c	Sat Nov 02 22:46:09 2002 +0000
@@ -73,7 +73,8 @@
 static int ck_bmin = 0x40;
 static int ck_bmax = 0xFF;
 static int ck_b = 0xFF;
-
+static int cr_left = 0, cr_right = 0;
+static int cr_top = 55, cr_bot = 300;
 
 config_t dxr2_opts[] = {
   { "overlay", &use_ol, CONF_TYPE_FLAG, 0, 0, 1, NULL},
@@ -125,6 +126,10 @@
   { "ck-bmin", &ck_bmin, CONF_TYPE_INT, CONF_RANGE, 0, 0xFF, NULL},
   { "ck-bmax", &ck_bmax, CONF_TYPE_INT, CONF_RANGE, 0, 0xFF, NULL},
   { "ck-b", &ck_b, CONF_TYPE_INT, CONF_RANGE, 0, 0xFF, NULL},
+  { "cr-left", &cr_left, CONF_TYPE_INT, CONF_RANGE, 0, 500, NULL},
+  { "cr-right", &cr_right, CONF_TYPE_INT, CONF_RANGE, 0, 500, NULL},
+  { "cr-top", &cr_top, CONF_TYPE_INT, CONF_RANGE, 0, 500, NULL},
+  { "cr-bot", &cr_bot, CONF_TYPE_INT, CONF_RANGE, 0, 500, NULL},
 
   { NULL,NULL, 0, 0, 0, 0, NULL}
 };
@@ -414,10 +419,10 @@
   dxr2_twoArg_t win;
   dxr2_fourArg_t crop;
 
-  crop.arg1=0;
-  crop.arg2=0;
-  crop.arg3=55;
-  crop.arg4=300;
+  crop.arg1= cr_left;
+  crop.arg2= cr_right;
+  crop.arg3 = cr_top;
+  crop.arg4 = cr_bot;
   ioctl(dxr2_fd, DXR2_IOC_SET_OVERLAY_CROPPING, &crop);
   
   oc.arg1 = 0x40;