diff options
-rw-r--r-- | include/xine.h.tmpl.in | 39 | ||||
-rw-r--r-- | src/video_out/video_out_xv.c | 36 | ||||
-rw-r--r-- | src/xine-engine/video_out.h | 40 |
3 files changed, 74 insertions, 41 deletions
diff --git a/include/xine.h.tmpl.in b/include/xine.h.tmpl.in index a51b59119..aa3701fbc 100644 --- a/include/xine.h.tmpl.in +++ b/include/xine.h.tmpl.in @@ -28,7 +28,7 @@ \endverbatim */ /* - * $Id: xine.h.tmpl.in,v 1.67 2001/12/13 22:24:17 miguelfreitas Exp $ + * $Id: xine.h.tmpl.in,v 1.68 2001/12/14 16:50:57 f1rmb Exp $ * */ @@ -216,6 +216,11 @@ int xine_check_version(int major, int minor, int sub); * Driver can set COLORKEY value. */ #define VO_CAP_COLORKEY 0x00000100 +/** + * \def VO_CAP_AUTOPAINT_COLORKEY + * Driver can set AUTOPAINT_COLORKEY value. + */ +#define VO_CAP_AUTOPAINT_COLORKEY 0x00000400 /** @} end of video_cap */ @@ -229,79 +234,85 @@ int xine_check_version(int major, int minor, int sub); * Interleave property. * \sa vo_driver_t */ -#define VO_PROP_INTERLACED 0 +#define VO_PROP_INTERLACED 0 /** * \def VO_PROP_ASPECT_RATIO * Aspect ratio property. * \sa vo_driver_t, video_ratio */ -#define VO_PROP_ASPECT_RATIO 1 +#define VO_PROP_ASPECT_RATIO 1 /** * \def VO_PROP_HUE * Hue property. * \sa vo_driver_t */ -#define VO_PROP_HUE 2 +#define VO_PROP_HUE 2 /** * \def VO_PROP_SATURATION * Saturation property. * \sa vo_driver_t */ -#define VO_PROP_SATURATION 3 +#define VO_PROP_SATURATION 3 /** * \def VO_PROP_CONTRAST * Contrast property. * \sa vo_driver_t */ -#define VO_PROP_CONTRAST 4 +#define VO_PROP_CONTRAST 4 /** * \def VO_PROP_BRIGHTNESS * Brightness property. * \sa vo_driver_t */ -#define VO_PROP_BRIGHTNESS 5 +#define VO_PROP_BRIGHTNESS 5 /** * \def VO_PROP_COLORKEY * Colorkey property. * \sa vo_driver_t */ -#define VO_PROP_COLORKEY 6 +#define VO_PROP_COLORKEY 6 +/** + * \def VO_PROP_AUTOPAINT_COLORKEY + * Autopaint colorkey property. + * \sa vo_driver_t + */ +#define VO_PROP_AUTOPAINT_COLORKEY 7 /** * \def VO_PROP_ZOOM_X * Horizontal zoom property. * \sa vo_driver_t */ -#define VO_PROP_ZOOM_X 7 +#define VO_PROP_ZOOM_X 8 /** * \def VO_PROP_ZOOM_Y * Vertical zoom property. * \sa vo_driver_t */ -#define VO_PROP_ZOOM_Y 8 +#define VO_PROP_ZOOM_Y 9 /** * \def VO_PROP_OFFSET_X * Horizontal offset property. * \sa vo_driver_t */ -#define VO_PROP_OFFSET_X 9 +#define VO_PROP_OFFSET_X 10 /** * \def VO_PROP_OFFSET_Y * Vertical offset property. * \sa vo_driver_t */ -#define VO_PROP_OFFSET_Y 10 +#define VO_PROP_OFFSET_Y 11 /** * \def VO_PROP_TVMODE * Change TVmode property. * \sa vo_driver_t */ -#define VO_PROP_TVMODE 11 +#define VO_PROP_TVMODE 12 /** * \def VO_NUM_PROPERTIES * Number of available properties property. * \sa vo_driver_t */ -#define VO_NUM_PROPERTIES 12 +#define VO_NUM_PROPERTIES 13 /** @} end of video_prop */ diff --git a/src/video_out/video_out_xv.c b/src/video_out/video_out_xv.c index 6bd3ac55f..ec6264fc3 100644 --- a/src/video_out/video_out_xv.c +++ b/src/video_out/video_out_xv.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: video_out_xv.c,v 1.85 2001/12/09 23:13:31 guenter Exp $ + * $Id: video_out_xv.c,v 1.86 2001/12/14 16:50:57 f1rmb Exp $ * * video_out_xv.c, X11 video extension interface for xine * @@ -1162,10 +1162,17 @@ static void xv_check_capability (xv_driver_t *this, cfg_entry_t *entry; this->capabilities |= capability; + + /* + * Some Xv drivers (Gatos ATI) report some ~0 as max values, this is confusing. + */ + if(VO_PROP_COLORKEY && (attr.max_value == ~0)) + attr.max_value = 2147483615; + this->props[property].min = attr.min_value; this->props[property].max = attr.max_value; this->props[property].atom = XInternAtom (this->display, str_prop, False); - + XvGetPortAttribute (this->display, this->xv_port, this->props[property].atom, &int_default); @@ -1174,14 +1181,22 @@ static void xv_check_capability (xv_driver_t *this, sprintf (this->scratch, "video.%s", str_prop); - this->config->register_range (this->config, this->scratch, int_default, - this->props[property].min, this->props[property].max, - "Xv property", NULL, xv_property_callback, &this->props[property]); - + /* This is a boolean property */ + if((attr.min_value == 0) && (attr.max_value == 1)) { + this->config->register_bool (this->config, this->scratch, int_default, + "Xv property", NULL, xv_property_callback, &this->props[property]); + + } + else { + this->config->register_range (this->config, this->scratch, int_default, + this->props[property].min, this->props[property].max, + "Xv property", NULL, xv_property_callback, &this->props[property]); + } + entry = this->config->lookup_entry (this->config, this->scratch); - + this->props[property].entry = entry; - + xv_set_property (&this->vo_driver, property, entry->num_value); if (capability == VO_CAP_COLORKEY) { @@ -1390,6 +1405,11 @@ vo_driver_t *init_video_out_plugin (config_values_t *config, void *visual_gen) { xv_check_capability (this, VO_CAP_COLORKEY, VO_PROP_COLORKEY, attr[k], adaptor_info[adaptor_num].base_id, "XV_COLORKEY"); + + } else if(!strcmp(attr[k].name, "XV_AUTOPAINT_COLORKEY")) { + xv_check_capability (this, VO_CAP_AUTOPAINT_COLORKEY, + VO_PROP_AUTOPAINT_COLORKEY, attr[k], + adaptor_info[adaptor_num].base_id, "XV_AUTOPAINT_COLORKEY"); } else if(!strcmp(attr[k].name, "XV_FILTER")) { int xv_filter; diff --git a/src/xine-engine/video_out.h b/src/xine-engine/video_out.h index 4f0acf681..d3dc51afa 100644 --- a/src/xine-engine/video_out.h +++ b/src/xine-engine/video_out.h @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: video_out.h,v 1.31 2001/11/28 22:19:12 miguelfreitas Exp $ + * $Id: video_out.h,v 1.32 2001/12/14 16:50:57 f1rmb Exp $ * * * xine version of video_out.h @@ -160,19 +160,20 @@ struct vo_instance_s { /* constants for the get/set property functions */ -#define VO_PROP_INTERLACED 0 -#define VO_PROP_ASPECT_RATIO 1 -#define VO_PROP_HUE 2 -#define VO_PROP_SATURATION 3 -#define VO_PROP_CONTRAST 4 -#define VO_PROP_BRIGHTNESS 5 -#define VO_PROP_COLORKEY 6 -#define VO_PROP_ZOOM_X 7 -#define VO_PROP_ZOOM_Y 8 -#define VO_PROP_OFFSET_X 9 -#define VO_PROP_OFFSET_Y 10 -#define VO_PROP_TVMODE 11 -#define VO_NUM_PROPERTIES 12 +#define VO_PROP_INTERLACED 0 +#define VO_PROP_ASPECT_RATIO 1 +#define VO_PROP_HUE 2 +#define VO_PROP_SATURATION 3 +#define VO_PROP_CONTRAST 4 +#define VO_PROP_BRIGHTNESS 5 +#define VO_PROP_COLORKEY 6 +#define VO_PROP_AUTOPAINT_COLORKEY 7 +#define VO_PROP_ZOOM_X 8 +#define VO_PROP_ZOOM_Y 9 +#define VO_PROP_OFFSET_X 10 +#define VO_PROP_OFFSET_Y 11 +#define VO_PROP_TVMODE 12 +#define VO_NUM_PROPERTIES 13 /* zoom specific constants FIXME: generate this from xine.tmpl.in */ #define VO_ZOOM_STEP 100 @@ -218,11 +219,12 @@ struct vo_instance_s { #define VO_CAP_YV12 0x00000004 /* driver can handle YUV 4:2:0 pictures */ #define VO_CAP_YUY2 0x00000008 /* driver can handle YUY2 pictures */ -#define VO_CAP_HUE 0x00000010 /* driver can set HUE value */ -#define VO_CAP_SATURATION 0x00000020 /* driver can set SATURATION value */ -#define VO_CAP_BRIGHTNESS 0x00000040 /* driver can set BRIGHTNESS value */ -#define VO_CAP_CONTRAST 0x00000080 /* driver can set CONTRAST value */ -#define VO_CAP_COLORKEY 0x00000100 /* driver can set COLORKEY value */ +#define VO_CAP_HUE 0x00000010 /* driver can set HUE value */ +#define VO_CAP_SATURATION 0x00000020 /* driver can set SATURATION value */ +#define VO_CAP_BRIGHTNESS 0x00000040 /* driver can set BRIGHTNESS value */ +#define VO_CAP_CONTRAST 0x00000080 /* driver can set CONTRAST value */ +#define VO_CAP_COLORKEY 0x00000100 /* driver can set COLORKEY value */ +#define VO_CAP_AUTOPAINT_COLORKEY 0x00000200 /* driver can set AUTOPAINT_COLORKEY value */ /* * vo_driver_s contains the functions every display driver |