diff options
author | Michael Roitzsch <mroi@users.sourceforge.net> | 2003-10-23 15:17:06 +0000 |
---|---|---|
committer | Michael Roitzsch <mroi@users.sourceforge.net> | 2003-10-23 15:17:06 +0000 |
commit | 7b65c8b1b967474c2dd6b852fbcefc1e6bcd7240 (patch) | |
tree | 2ed3efcbd70780554538f0c696d96ae17e2393d6 /src/video_out | |
parent | 558b00644651500abb40a7f4d73854312b571343 (diff) | |
download | xine-lib-7b65c8b1b967474c2dd6b852fbcefc1e6bcd7240.tar.gz xine-lib-7b65c8b1b967474c2dd6b852fbcefc1e6bcd7240.tar.bz2 |
cleanup in video_out.h
* some obsolete VO_CAP_* constants removed
* VO_ZOOM_* constants replaced by their XINE_VO_ZOOM_* equivalents from xine.h
* moved some bits around
* proc_frame() needs only one parameter: the frame
* renamed copy_called to proc_called
* changed logic in video_out.c to call proc_* functions a bit
(call proc_frame() first, then call proc_slice() if proc_frame() has not set
proc_called, this allows video out plugins to have both hooks called)
CVS patchset: 5576
CVS date: 2003/10/23 15:17:06
Diffstat (limited to 'src/video_out')
-rw-r--r-- | src/video_out/video_out_aa.c | 4 | ||||
-rw-r--r-- | src/video_out/video_out_directfb.c | 4 | ||||
-rwxr-xr-x | src/video_out/video_out_directx.c | 2 | ||||
-rw-r--r-- | src/video_out/video_out_fb.c | 10 | ||||
-rw-r--r-- | src/video_out/video_out_opengl.c | 10 | ||||
-rw-r--r-- | src/video_out/video_out_pgx64.c | 17 | ||||
-rw-r--r-- | src/video_out/video_out_sdl.c | 4 | ||||
-rw-r--r-- | src/video_out/video_out_stk.c | 4 | ||||
-rw-r--r-- | src/video_out/video_out_syncfb.c | 14 | ||||
-rw-r--r-- | src/video_out/video_out_vidix.c | 23 | ||||
-rw-r--r-- | src/video_out/video_out_xshm.c | 7 | ||||
-rw-r--r-- | src/video_out/video_out_xv.c | 33 | ||||
-rw-r--r-- | src/video_out/video_out_xvmc.c | 37 |
13 files changed, 68 insertions, 101 deletions
diff --git a/src/video_out/video_out_aa.c b/src/video_out/video_out_aa.c index c845dfd00..569e8220c 100644 --- a/src/video_out/video_out_aa.c +++ b/src/video_out/video_out_aa.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2000-2001 the xine project + * Copyright (C) 2000-2003 the xine project * * This file is part of xine, a free video player. * @@ -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_aa.c,v 1.38 2003/10/22 20:38:10 komadori Exp $ + * $Id: video_out_aa.c,v 1.39 2003/10/23 15:17:07 mroi Exp $ * * video_out_aa.c, ascii-art output plugin for xine * diff --git a/src/video_out/video_out_directfb.c b/src/video_out/video_out_directfb.c index ffb515f93..14e271908 100644 --- a/src/video_out/video_out_directfb.c +++ b/src/video_out/video_out_directfb.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2000, 2001 the xine project + * Copyright (C) 2000-2003 the xine project * * This file is part of xine, a free video player. * @@ -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_directfb.c,v 1.22 2003/10/22 20:38:10 komadori Exp $ + * $Id: video_out_directfb.c,v 1.23 2003/10/23 15:17:07 mroi Exp $ * * DirectFB based output plugin. * Rich Wareham <richwareham@users.sourceforge.net> diff --git a/src/video_out/video_out_directx.c b/src/video_out/video_out_directx.c index 7ae1d891b..9f0798c6c 100755 --- a/src/video_out/video_out_directx.c +++ b/src/video_out/video_out_directx.c @@ -19,6 +19,8 @@ * * video_out_directx.c, direct draw video output plugin for xine * by Matthew Grooms <elon@altavista.com> + * + * $Id: video_out_directx.c,v 1.8 2003/10/23 15:17:07 mroi Exp $ */ typedef unsigned char boolean; diff --git a/src/video_out/video_out_fb.c b/src/video_out/video_out_fb.c index 931fe94ff..5157a0c02 100644 --- a/src/video_out/video_out_fb.c +++ b/src/video_out/video_out_fb.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2000-2002 the xine project and Fredrik Noring + * Copyright (C) 2000-2003 the xine project and Fredrik Noring * * This file is part of xine, a free video player. * @@ -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_fb.c,v 1.29 2003/10/22 20:38:10 komadori Exp $ + * $Id: video_out_fb.c,v 1.30 2003/10/23 15:17:07 mroi Exp $ * * video_out_fb.c, frame buffer xine driver by Miguel Freitas * @@ -149,16 +149,14 @@ typedef struct static uint32_t fb_get_capabilities(vo_driver_t *this_gen) { - return VO_CAP_YV12 | - VO_CAP_YUY2 | - VO_CAP_BRIGHTNESS; + return VO_CAP_YV12 | VO_CAP_YUY2; } static void fb_frame_proc_slice(vo_frame_t *vo_img, uint8_t **src) { fb_frame_t *frame = (fb_frame_t *)vo_img ; - vo_img->copy_called = 1; + vo_img->proc_called = 1; if(frame->format == XINE_IMGFMT_YV12) frame->yuv2rgb->yuv2rgb_fun(frame->yuv2rgb, frame->rgb_dst, src[0], src[1], src[2]); diff --git a/src/video_out/video_out_opengl.c b/src/video_out/video_out_opengl.c index 1ae5534de..5822ec342 100644 --- a/src/video_out/video_out_opengl.c +++ b/src/video_out/video_out_opengl.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2000-2002 the xine project + * Copyright (C) 2000-2003 the xine project * * This file is part of xine, a free video player. * @@ -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_opengl.c,v 1.29 2003/10/22 20:38:10 komadori Exp $ + * $Id: video_out_opengl.c,v 1.30 2003/10/23 15:17:07 mroi Exp $ * * video_out_glut.c, glut based OpenGL rendering interface for xine * Matthias Hopf <mat@mshopf.de> @@ -189,14 +189,14 @@ enum { CONTEXT_BAD = 0, CONTEXT_SAME_DRAWABLE, CONTEXT_RELOAD, CONTEXT_SET }; static uint32_t opengl_get_capabilities (vo_driver_t *this_gen) { - return VO_CAP_YV12 | VO_CAP_YUY2 | VO_CAP_BRIGHTNESS; + return VO_CAP_YV12 | VO_CAP_YUY2; } static void opengl_frame_proc_slice (vo_frame_t *vo_img, uint8_t **src) { opengl_frame_t *frame = (opengl_frame_t *) vo_img ; - vo_img->copy_called = 1; + vo_img->proc_called = 1; /* DEBUGF ((stderr, "*** %p: frame_copy src %p/%p/%p to %p\n", frame, src[0], src[1], src[2], frame->rgb_dst)); */ @@ -286,7 +286,7 @@ static vo_frame_t *opengl_alloc_frame (vo_driver_t *this_gen) { * supply required functions/fields */ frame->vo_frame.proc_slice = opengl_frame_proc_slice; - frame->vo_frame.proc_frame = opengl_frame_proc_frame; + frame->vo_frame.proc_frame = NULL; frame->vo_frame.field = opengl_frame_field; frame->vo_frame.dispose = opengl_frame_dispose; frame->vo_frame.driver = this_gen; diff --git a/src/video_out/video_out_pgx64.c b/src/video_out/video_out_pgx64.c index 0e6a8ecf6..b08bc4e31 100644 --- a/src/video_out/video_out_pgx64.c +++ b/src/video_out/video_out_pgx64.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2000-2002 the xine project + * Copyright (C) 2000-2003 the xine project * * This file is part of xine, a free video player. * @@ -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_pgx64.c,v 1.41 2003/10/22 20:38:10 komadori Exp $ + * $Id: video_out_pgx64.c,v 1.42 2003/10/23 15:17:07 mroi Exp $ * * video_out_pgx64.c, Sun PGX64/PGX24 output plugin for xine * @@ -267,14 +267,14 @@ static int vram_alloc(pgx64_driver_t* this, int size) * XINE VIDEO DRIVER FUNCTIONS */ -static void pgx64_frame_proc_frame(pgx64_frame_t *frame, uint8_t **src) +static void pgx64_frame_proc_frame(pgx64_frame_t *frame) { int i; - frame->vo_frame.copy_called = 1; + frame->vo_frame.proc_called = 1; for (i=0; i<frame->planes; i++) { - memcpy(frame->buffer_ptrs[i], src[i], frame->lengths[i]); + memcpy(frame->buffer_ptrs[i], frame->vo_frame.base[i], frame->lengths[i]); } } @@ -282,7 +282,7 @@ static void pgx64_frame_proc_slice(pgx64_frame_t *frame, uint8_t **src) { int i, len; - frame->vo_frame.copy_called = 1; + frame->vo_frame.proc_called = 1; for (i=0; i<frame->planes; i++) { len = (frame->lengths[i] - frame->stripe_offsets[i] < frame->stripe_lengths[i]) ? frame->lengths[i] - frame->stripe_offsets[i] : frame->stripe_lengths[i]; @@ -306,10 +306,7 @@ static void pgx64_frame_dispose(pgx64_frame_t *frame) static uint32_t pgx64_get_capabilities(pgx64_driver_t *this) { return VO_CAP_YV12 | - VO_CAP_YUY2 | - VO_CAP_COLORKEY | - VO_CAP_SATURATION | - VO_CAP_BRIGHTNESS; + VO_CAP_YUY2; } static pgx64_frame_t* pgx64_alloc_frame(pgx64_driver_t *this) diff --git a/src/video_out/video_out_sdl.c b/src/video_out/video_out_sdl.c index 5c5af63ad..7d8219da1 100644 --- a/src/video_out/video_out_sdl.c +++ b/src/video_out/video_out_sdl.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2000-2002 the xine project + * Copyright (C) 2000-2003 the xine project * * This file is part of xine, a free video player. * @@ -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_sdl.c,v 1.28 2003/10/22 20:38:10 komadori Exp $ + * $Id: video_out_sdl.c,v 1.29 2003/10/23 15:17:07 mroi Exp $ * * video_out_sdl.c, Simple DirectMedia Layer * diff --git a/src/video_out/video_out_stk.c b/src/video_out/video_out_stk.c index 6f034d98c..871214b34 100644 --- a/src/video_out/video_out_stk.c +++ b/src/video_out/video_out_stk.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2000-2002 the xine project + * Copyright (C) 2000-2003 the xine project * * This file is part of xine, a free video player. * @@ -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_stk.c,v 1.6 2003/10/22 20:38:10 komadori Exp $ + * $Id: video_out_stk.c,v 1.7 2003/10/23 15:17:07 mroi Exp $ * * video_out_stk.c, Libstk Surface Video Driver * more info on Libstk at http://www.libstk.org diff --git a/src/video_out/video_out_syncfb.c b/src/video_out/video_out_syncfb.c index 9a7ba581e..05b2f2311 100644 --- a/src/video_out/video_out_syncfb.c +++ b/src/video_out/video_out_syncfb.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2000-2002 the xine project + * Copyright (C) 2000-2003 the xine project * * This file is part of xine, a free video player. * @@ -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_syncfb.c,v 1.90 2003/10/22 20:38:10 komadori Exp $ + * $Id: video_out_syncfb.c,v 1.91 2003/10/23 15:17:07 mroi Exp $ * * video_out_syncfb.c, SyncFB (for Matrox G200/G400 cards) interface for xine * @@ -683,9 +683,9 @@ static int syncfb_set_property(vo_driver_t* this_gen, int property, int value) break; case VO_PROP_ZOOM_X: - if ((value >= VO_ZOOM_MIN) && (value <= VO_ZOOM_MAX)) { + if ((value >= XINE_VO_ZOOM_MIN) && (value <= XINE_VO_ZOOM_MAX)) { this->props[property].value = value; - this->sc.zoom_factor_x = (double)value / (double)VO_ZOOM_STEP; + this->sc.zoom_factor_x = (double)value / (double)XINE_VO_ZOOM_STEP; syncfb_compute_ideal_size (this); @@ -697,9 +697,9 @@ static int syncfb_set_property(vo_driver_t* this_gen, int property, int value) break; case VO_PROP_ZOOM_Y: - if ((value >= VO_ZOOM_MIN) && (value <= VO_ZOOM_MAX)) { + if ((value >= XINE_VO_ZOOM_MIN) && (value <= XINE_VO_ZOOM_MAX)) { this->props[property].value = value; - this->sc.zoom_factor_y = (double)value / (double)VO_ZOOM_STEP; + this->sc.zoom_factor_y = (double)value / (double)XINE_VO_ZOOM_STEP; syncfb_compute_ideal_size (this); @@ -933,8 +933,6 @@ static vo_driver_t *open_plugin (video_driver_class_t *class_gen, const void *vi this->props[VO_PROP_BRIGHTNESS].value = this->params.brightness; this->props[VO_PROP_BRIGHTNESS].min = -128; this->props[VO_PROP_BRIGHTNESS].max = 127; - - this->supported_capabilities |= (VO_CAP_CONTRAST | VO_CAP_BRIGHTNESS); } else { printf("video_out_syncfb: info. (brightness/contrast control won\'t be available because your SyncFB kernel module seems to be outdated. Please refer to README.syncfb for informations on how to update it.)\n"); } diff --git a/src/video_out/video_out_vidix.c b/src/video_out/video_out_vidix.c index 356d5278b..fe422b823 100644 --- a/src/video_out/video_out_vidix.c +++ b/src/video_out/video_out_vidix.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_vidix.c,v 1.48 2003/10/22 20:38:10 komadori Exp $ + * $Id: video_out_vidix.c,v 1.49 2003/10/23 15:17:07 mroi Exp $ * * video_out_vidix.c * @@ -692,14 +692,14 @@ static int vidix_set_property (vo_driver_t *this_gen, } if ( property == VO_PROP_ZOOM_X ) { - this->sc.zoom_factor_x = (double)value / (double)VO_ZOOM_STEP; + this->sc.zoom_factor_x = (double)value / (double)XINE_VO_ZOOM_STEP; vidix_compute_ideal_size (this); this->sc.force_redraw = 1; } if ( property == VO_PROP_ZOOM_Y ) { - this->sc.zoom_factor_y = (double)value / (double)VO_ZOOM_STEP; + this->sc.zoom_factor_y = (double)value / (double)XINE_VO_ZOOM_STEP; vidix_compute_ideal_size (this); this->sc.force_redraw = 1; @@ -906,32 +906,24 @@ static vidix_driver_t *open_plugin (video_driver_class_t *class_gen) { printf("video_out_vidix: couldn't get equalizer capabilities: %s\n", strerror(err)); } else { if(this->vidix_eq.cap & VEQ_CAP_BRIGHTNESS) { - this->capabilities |= VO_CAP_BRIGHTNESS; - this->props[VO_PROP_BRIGHTNESS].value = 0; this->props[VO_PROP_BRIGHTNESS].min = -1000; this->props[VO_PROP_BRIGHTNESS].max = 1000; } if(this->vidix_eq.cap & VEQ_CAP_CONTRAST) { - this->capabilities |= VO_CAP_CONTRAST; - this->props[VO_PROP_CONTRAST].value = 0; this->props[VO_PROP_CONTRAST].min = -1000; this->props[VO_PROP_CONTRAST].max = 1000; } if(this->vidix_eq.cap & VEQ_CAP_SATURATION) { - this->capabilities |= VO_CAP_SATURATION; - this->props[VO_PROP_SATURATION].value = 0; this->props[VO_PROP_SATURATION].min = -1000; this->props[VO_PROP_SATURATION].max = 1000; } if(this->vidix_eq.cap & VEQ_CAP_HUE) { - this->capabilities |= VO_CAP_HUE; - this->props[VO_PROP_HUE].value = 0; this->props[VO_PROP_HUE].min = -1000; this->props[VO_PROP_HUE].max = 1000; @@ -972,12 +964,12 @@ static vidix_driver_t *open_plugin (video_driver_class_t *class_gen) { this->props[VO_PROP_ASPECT_RATIO].max = XINE_VO_ASPECT_NUM_RATIOS; this->props[VO_PROP_ZOOM_X].value = 100; - this->props[VO_PROP_ZOOM_X].min = VO_ZOOM_MIN; - this->props[VO_PROP_ZOOM_X].max = VO_ZOOM_MAX; + this->props[VO_PROP_ZOOM_X].min = XINE_VO_ZOOM_MIN; + this->props[VO_PROP_ZOOM_X].max = XINE_VO_ZOOM_MAX; this->props[VO_PROP_ZOOM_Y].value = 100; - this->props[VO_PROP_ZOOM_Y].min = VO_ZOOM_MIN; - this->props[VO_PROP_ZOOM_Y].max = VO_ZOOM_MAX; + this->props[VO_PROP_ZOOM_Y].min = XINE_VO_ZOOM_MIN; + this->props[VO_PROP_ZOOM_Y].max = XINE_VO_ZOOM_MAX; this->vo_driver.get_capabilities = vidix_get_capabilities; this->vo_driver.alloc_frame = vidix_alloc_frame; @@ -1097,7 +1089,6 @@ static vo_driver_t *vidix_open_plugin (video_driver_class_t *class_gen, const vo /* We'll assume all drivers support colour keying (which they do at the moment) */ - this->capabilities |= VO_CAP_COLORKEY; this->vidix_grkey.ckey.op = CKEY_TRUE; /* Colour key components */ diff --git a/src/video_out/video_out_xshm.c b/src/video_out/video_out_xshm.c index f6c17cd1a..7190e1600 100644 --- a/src/video_out/video_out_xshm.c +++ b/src/video_out/video_out_xshm.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_xshm.c,v 1.116 2003/10/22 20:38:10 komadori Exp $ + * $Id: video_out_xshm.c,v 1.117 2003/10/23 15:17:07 mroi Exp $ * * video_out_xshm.c, X11 shared memory extension interface for xine * @@ -307,15 +307,14 @@ static void dispose_ximage (xshm_driver_t *this, */ static uint32_t xshm_get_capabilities (vo_driver_t *this_gen) { - return VO_CAP_YV12 | VO_CAP_YUY2 | - VO_CAP_BRIGHTNESS | VO_CAP_CONTRAST | VO_CAP_SATURATION; + return VO_CAP_YV12 | VO_CAP_YUY2; } static void xshm_frame_proc_slice (vo_frame_t *vo_img, uint8_t **src) { xshm_frame_t *frame = (xshm_frame_t *) vo_img ; /*xshm_driver_t *this = (xshm_driver_t *) vo_img->driver; */ - vo_img->copy_called = 1; + vo_img->proc_called = 1; #ifdef LOG printf ("video_out_xshm: copy... (format %d)\n", frame->format); diff --git a/src/video_out/video_out_xv.c b/src/video_out/video_out_xv.c index 316c63eab..b9f0b5d1a 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.177 2003/10/22 20:38:10 komadori Exp $ + * $Id: video_out_xv.c,v 1.178 2003/10/23 15:17:07 mroi Exp $ * * video_out_xv.c, X11 video extension interface for xine * @@ -833,13 +833,13 @@ static int xv_set_property (vo_driver_t *this_gen, break; case VO_PROP_ZOOM_X: - if ((value >= VO_ZOOM_MIN) && (value <= VO_ZOOM_MAX)) { + if ((value >= XINE_VO_ZOOM_MIN) && (value <= XINE_VO_ZOOM_MAX)) { this->props[property].value = value; if (this->xine->verbosity >= XINE_VERBOSITY_LOG) printf ("video_out_xv: VO_PROP_ZOOM_X = %d\n", this->props[property].value); - this->sc.zoom_factor_x = (double)value / (double)VO_ZOOM_STEP; + this->sc.zoom_factor_x = (double)value / (double)XINE_VO_ZOOM_STEP; xv_compute_ideal_size (this); @@ -848,13 +848,13 @@ static int xv_set_property (vo_driver_t *this_gen, break; case VO_PROP_ZOOM_Y: - if ((value >= VO_ZOOM_MIN) && (value <= VO_ZOOM_MAX)) { + if ((value >= XINE_VO_ZOOM_MIN) && (value <= XINE_VO_ZOOM_MAX)) { this->props[property].value = value; if (this->xine->verbosity >= XINE_VERBOSITY_LOG) printf ("video_out_xv: VO_PROP_ZOOM_Y = %d\n", this->props[property].value); - this->sc.zoom_factor_y = (double)value / (double)VO_ZOOM_STEP; + this->sc.zoom_factor_y = (double)value / (double)XINE_VO_ZOOM_STEP; xv_compute_ideal_size (this); @@ -1015,7 +1015,6 @@ static int xv_check_yv12 (Display *display, XvPortID port) { /* called xlocked */ static void xv_check_capability (xv_driver_t *this, - uint32_t capability, int property, XvAttribute attr, int base_id, char *str_prop, char *config_name, @@ -1023,8 +1022,6 @@ static void xv_check_capability (xv_driver_t *this, int int_default; cfg_entry_t *entry; - this->capabilities |= capability; - /* * some Xv drivers (Gatos ATI) report some ~0 as max values, this is confusing. */ @@ -1071,7 +1068,7 @@ static void xv_check_capability (xv_driver_t *this, xv_set_property (&this->vo_driver, property, entry->num_value); - if (capability == VO_CAP_COLORKEY) { + if (strcmp(str_prop, "XV_COLORKEY") == 0) { this->use_colorkey = 1; this->colorkey = entry->num_value; } @@ -1222,39 +1219,33 @@ static vo_driver_t *open_plugin (video_driver_class_t *class_gen, const void *vi for(k = 0; k < nattr; k++) { if((attr[k].flags & XvSettable) && (attr[k].flags & XvGettable)) { if(!strcmp(attr[k].name, "XV_HUE")) { - xv_check_capability (this, VO_CAP_HUE, - VO_PROP_HUE, attr[k], + xv_check_capability (this, VO_PROP_HUE, attr[k], class->adaptor_info[class->adaptor_num].base_id, "XV_HUE", NULL, NULL); } else if(!strcmp(attr[k].name, "XV_SATURATION")) { - xv_check_capability (this, VO_CAP_SATURATION, - VO_PROP_SATURATION, attr[k], + xv_check_capability (this, VO_PROP_SATURATION, attr[k], class->adaptor_info[class->adaptor_num].base_id, "XV_SATURATION", NULL, NULL); } else if(!strcmp(attr[k].name, "XV_BRIGHTNESS")) { - xv_check_capability (this, VO_CAP_BRIGHTNESS, - VO_PROP_BRIGHTNESS, attr[k], + xv_check_capability (this, VO_PROP_BRIGHTNESS, attr[k], class->adaptor_info[class->adaptor_num].base_id, "XV_BRIGHTNESS", NULL, NULL); } else if(!strcmp(attr[k].name, "XV_CONTRAST")) { - xv_check_capability (this, VO_CAP_CONTRAST, - VO_PROP_CONTRAST, attr[k], + xv_check_capability (this, VO_PROP_CONTRAST, attr[k], class->adaptor_info[class->adaptor_num].base_id, "XV_CONTRAST", NULL, NULL); } else if(!strcmp(attr[k].name, "XV_COLORKEY")) { - xv_check_capability (this, VO_CAP_COLORKEY, - VO_PROP_COLORKEY, attr[k], + xv_check_capability (this, VO_PROP_COLORKEY, attr[k], class->adaptor_info[class->adaptor_num].base_id, "XV_COLORKEY", "video.xv_colorkey", _("Colorkey used for Xv video overlay")); } else if(!strcmp(attr[k].name, "XV_AUTOPAINT_COLORKEY")) { - xv_check_capability (this, VO_CAP_AUTOPAINT_COLORKEY, - VO_PROP_AUTOPAINT_COLORKEY, attr[k], + xv_check_capability (this, VO_PROP_AUTOPAINT_COLORKEY, attr[k], class->adaptor_info[class->adaptor_num].base_id, "XV_AUTOPAINT_COLORKEY", "video.xv_autopaint_colorkey", _("Make Xv autopaint its colorkey")); diff --git a/src/video_out/video_out_xvmc.c b/src/video_out/video_out_xvmc.c index e1e6aa2f3..95c40320f 100644 --- a/src/video_out/video_out_xvmc.c +++ b/src/video_out/video_out_xvmc.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2000-2002 the xine project + * Copyright (C) 2000-2003 the xine project * * This file is part of xine, a free video player. * @@ -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_xvmc.c,v 1.3 2003/10/22 20:38:10 komadori Exp $ + * $Id: video_out_xvmc.c,v 1.4 2003/10/23 15:17:07 mroi Exp $ * * video_out_xvmc.c, X11 video motion compensation extension interface for xine * @@ -1211,12 +1211,12 @@ static int xvmc_set_property (vo_driver_t *this_gen, break; case VO_PROP_ZOOM_X: - if ((value >= VO_ZOOM_MIN) && (value <= VO_ZOOM_MAX)) { + if ((value >= XINE_VO_ZOOM_MIN) && (value <= XINE_VO_ZOOM_MAX)) { this->props[property].value = value; printf ("video_out_xv: VO_PROP_ZOOM_X = %d\n", this->props[property].value); - this->sc.zoom_factor_x = (double)value / (double)VO_ZOOM_STEP; + this->sc.zoom_factor_x = (double)value / (double)XINE_VO_ZOOM_STEP; xvmc_compute_ideal_size (this); @@ -1225,12 +1225,12 @@ static int xvmc_set_property (vo_driver_t *this_gen, break; case VO_PROP_ZOOM_Y: - if ((value >= VO_ZOOM_MIN) && (value <= VO_ZOOM_MAX)) { + if ((value >= XINE_VO_ZOOM_MIN) && (value <= XINE_VO_ZOOM_MAX)) { this->props[property].value = value; printf ("video_out_xv: VO_PROP_ZOOM_Y = %d\n", this->props[property].value); - this->sc.zoom_factor_y = (double)value / (double)VO_ZOOM_STEP; + this->sc.zoom_factor_y = (double)value / (double)XINE_VO_ZOOM_STEP; xvmc_compute_ideal_size (this); @@ -1407,7 +1407,6 @@ static void xvmc_dispose (vo_driver_t *this_gen) { } static void xvmc_check_capability (xvmc_driver_t *this, - uint32_t capability, int property, XvAttribute attr, int base_id, char *str_prop, char *config_name, @@ -1416,12 +1415,10 @@ static void xvmc_check_capability (xvmc_driver_t *this, int int_default; cfg_entry_t *entry; - this->capabilities |= capability; - /* * some Xv drivers (Gatos ATI) report some ~0 as max values, this is confusing. */ - if (VO_CAP_COLORKEY && (attr.max_value == ~0)) + if (attr.max_value == ~0) attr.max_value = 2147483615; this->props[property].min = attr.min_value; @@ -1454,7 +1451,7 @@ static void xvmc_check_capability (xvmc_driver_t *this, xvmc_set_property (&this->vo_driver, property, entry->num_value); - if (capability == VO_CAP_COLORKEY) { + if (strcmp(str_prop, "XV_COLORKEY") == 0) { this->use_colorkey = 1; this->colorkey = entry->num_value; } @@ -1598,39 +1595,33 @@ static vo_driver_t *open_plugin (video_driver_class_t *class_gen, const void *vi for(k = 0; k < nattr; k++) { if((attr[k].flags & XvSettable) && (attr[k].flags & XvGettable)) { if(!strcmp(attr[k].name, "XV_HUE")) { - xvmc_check_capability (this, VO_CAP_HUE, - VO_PROP_HUE, attr[k], + xvmc_check_capability (this, VO_PROP_HUE, attr[k], class->adaptor_info[class->adaptor_num].base_id, "XV_HUE", NULL, NULL); } else if(!strcmp(attr[k].name, "XV_SATURATION")) { - xvmc_check_capability (this, VO_CAP_SATURATION, - VO_PROP_SATURATION, attr[k], + xvmc_check_capability (this, VO_PROP_SATURATION, attr[k], class->adaptor_info[class->adaptor_num].base_id, "XV_SATURATION", NULL, NULL); } else if(!strcmp(attr[k].name, "XV_BRIGHTNESS")) { - xvmc_check_capability (this, VO_CAP_BRIGHTNESS, - VO_PROP_BRIGHTNESS, attr[k], + xvmc_check_capability (this, VO_PROP_BRIGHTNESS, attr[k], class->adaptor_info[class->adaptor_num].base_id, "XV_BRIGHTNESS", NULL, NULL); } else if(!strcmp(attr[k].name, "XV_CONTRAST")) { - xvmc_check_capability (this, VO_CAP_CONTRAST, - VO_PROP_CONTRAST, attr[k], + xvmc_check_capability (this, VO_PROP_CONTRAST, attr[k], class->adaptor_info[class->adaptor_num].base_id, "XV_CONTRAST", NULL, NULL); } else if(!strcmp(attr[k].name, "XV_COLORKEY")) { - xvmc_check_capability (this, VO_CAP_COLORKEY, - VO_PROP_COLORKEY, attr[k], + xvmc_check_capability (this, VO_PROP_COLORKEY, attr[k], class->adaptor_info[class->adaptor_num].base_id, "XV_COLORKEY", "video.xv_colorkey", _("Colorkey used for Xv video overlay")); } else if(!strcmp(attr[k].name, "XV_AUTOPAINT_COLORKEY")) { - xvmc_check_capability (this, VO_CAP_AUTOPAINT_COLORKEY, - VO_PROP_AUTOPAINT_COLORKEY, attr[k], + xvmc_check_capability (this, VO_PROP_AUTOPAINT_COLORKEY, attr[k], class->adaptor_info[class->adaptor_num].base_id, "XV_AUTOPAINT_COLORKEY", NULL, NULL); |