summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Roitzsch <mroi@users.sourceforge.net>2003-10-23 15:17:06 +0000
committerMichael Roitzsch <mroi@users.sourceforge.net>2003-10-23 15:17:06 +0000
commit7b65c8b1b967474c2dd6b852fbcefc1e6bcd7240 (patch)
tree2ed3efcbd70780554538f0c696d96ae17e2393d6 /src
parent558b00644651500abb40a7f4d73854312b571343 (diff)
downloadxine-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')
-rw-r--r--src/dxr3/video_out_dxr3.c45
-rw-r--r--src/video_out/video_out_aa.c4
-rw-r--r--src/video_out/video_out_directfb.c4
-rwxr-xr-xsrc/video_out/video_out_directx.c2
-rw-r--r--src/video_out/video_out_fb.c10
-rw-r--r--src/video_out/video_out_opengl.c10
-rw-r--r--src/video_out/video_out_pgx64.c17
-rw-r--r--src/video_out/video_out_sdl.c4
-rw-r--r--src/video_out/video_out_stk.c4
-rw-r--r--src/video_out/video_out_syncfb.c14
-rw-r--r--src/video_out/video_out_vidix.c23
-rw-r--r--src/video_out/video_out_xshm.c7
-rw-r--r--src/video_out/video_out_xv.c33
-rw-r--r--src/video_out/video_out_xvmc.c37
-rw-r--r--src/xine-engine/post.c30
-rw-r--r--src/xine-engine/video_out.c59
-rw-r--r--src/xine-engine/video_out.h123
17 files changed, 189 insertions, 237 deletions
diff --git a/src/dxr3/video_out_dxr3.c b/src/dxr3/video_out_dxr3.c
index 51e872af7..edfe91611 100644
--- a/src/dxr3/video_out_dxr3.c
+++ b/src/dxr3/video_out_dxr3.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_dxr3.c,v 1.88 2003/10/06 21:52:43 miguelfreitas Exp $
+ * $Id: video_out_dxr3.c,v 1.89 2003/10/23 15:17:06 mroi Exp $
*/
/* mpeg1 encoding video out plugin for the dxr3.
@@ -107,7 +107,8 @@ static void dxr3_vo_class_dispose(video_driver_class_t *class_gen);
/* plugin instance functions */
static uint32_t dxr3_get_capabilities(vo_driver_t *this_gen);
static vo_frame_t *dxr3_alloc_frame(vo_driver_t *this_gen);
-static void dxr3_frame_copy(vo_frame_t *frame_gen, uint8_t **src);
+static void dxr3_frame_proc_frame(vo_frame_t *frame_gen);
+static void dxr3_frame_proc_slice(vo_frame_t *frame_gen, uint8_t **src);
static void dxr3_frame_field(vo_frame_t *vo_img, int which_field);
static void dxr3_frame_dispose(vo_frame_t *frame_gen);
static void dxr3_update_frame_format(vo_driver_t *this_gen, vo_frame_t *frame_gen,
@@ -495,48 +496,52 @@ static vo_driver_t *dxr3_vo_open_plugin(video_driver_class_t *class_gen, const v
static uint32_t dxr3_get_capabilities(vo_driver_t *this_gen)
{
- return VO_CAP_YV12 | VO_CAP_YUY2 |
- VO_CAP_SATURATION | VO_CAP_BRIGHTNESS | VO_CAP_CONTRAST;
+ return VO_CAP_YV12 | VO_CAP_YUY2;
}
static vo_frame_t *dxr3_alloc_frame(vo_driver_t *this_gen)
{
dxr3_frame_t *frame;
-#if 0
dxr3_driver_t *this = (dxr3_driver_t *)this_gen;
-#endif
frame = (dxr3_frame_t *)malloc(sizeof(dxr3_frame_t));
memset(frame, 0, sizeof(dxr3_frame_t));
pthread_mutex_init(&frame->vo_frame.mutex, NULL);
-#if 1
- /* always call frame_copy since we do some little vpts tweaking there */
- frame->vo_frame.copy = dxr3_frame_copy;
-#else
- if (this->enc && this->enc->on_frame_copy)
- frame->vo_frame.copy = dxr3_frame_copy;
- else
- frame->vo_frame.copy = NULL;
-#endif
- frame->vo_frame.field = dxr3_frame_field;
+ if (this->enc && this->enc->on_frame_copy) {
+ frame->vo_frame.proc_frame = NULL;
+ frame->vo_frame.proc_slice = dxr3_frame_proc_slice;
+ } else {
+ frame->vo_frame.proc_frame = dxr3_frame_proc_frame;
+ frame->vo_frame.proc_slice = NULL;
+ }
+ frame->vo_frame.field = dxr3_frame_field;
frame->vo_frame.dispose = dxr3_frame_dispose;
frame->vo_frame.driver = this_gen;
return &frame->vo_frame;
}
-static void dxr3_frame_copy(vo_frame_t *frame_gen, uint8_t **src)
+static void dxr3_frame_proc_frame(vo_frame_t *frame_gen)
+{
+ /* we reduce the vpts to give the card some extra decoding time */
+ if (frame_gen->format != XINE_IMGFMT_DXR3 && !frame_gen->proc_called)
+ frame_gen->vpts -= DECODE_PIPE_PREBUFFER;
+
+ frame_gen->proc_called = 1;
+}
+
+static void dxr3_frame_proc_slice(vo_frame_t *frame_gen, uint8_t **src)
{
dxr3_frame_t *frame = (dxr3_frame_t *)frame_gen;
dxr3_driver_t *this = (dxr3_driver_t *)frame_gen->driver;
- /* vpts hack: we reduce the vpts to give the card some extra decoding time */
- if (frame_gen->format != XINE_IMGFMT_DXR3 && !frame_gen->copy_called)
+ /* we reduce the vpts to give the card some extra decoding time */
+ if (frame_gen->format != XINE_IMGFMT_DXR3 && !frame_gen->proc_called)
frame_gen->vpts -= DECODE_PIPE_PREBUFFER;
- frame_gen->copy_called = 1;
+ frame_gen->proc_called = 1;
if (frame_gen->format != XINE_IMGFMT_DXR3 && this->enc && this->enc->on_frame_copy)
this->enc->on_frame_copy(this, frame, src);
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);
diff --git a/src/xine-engine/post.c b/src/xine-engine/post.c
index bbccf1187..c00b47d28 100644
--- a/src/xine-engine/post.c
+++ b/src/xine-engine/post.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: post.c,v 1.16 2003/10/22 20:38:10 komadori Exp $
+ * $Id: post.c,v 1.17 2003/10/23 15:17:07 mroi Exp $
*/
/*
@@ -132,10 +132,10 @@ static void post_frame_proc_slice(vo_frame_t *vo_img, uint8_t **src) {
vo_img->port = &port->port;
}
-static void post_frame_proc_frame(vo_frame_t *vo_img, uint8_t **src) {
+static void post_frame_proc_frame(vo_frame_t *vo_img) {
post_video_port_t *port = (post_video_port_t *)vo_img->port;
vo_img->port = port->original_port;
- port->original_frame.proc_frame(vo_img, src);
+ port->original_frame.proc_frame(vo_img);
vo_img->port = &port->port;
}
@@ -193,25 +193,25 @@ static void post_frame_proc_macro_block(int x,
void post_intercept_video_frame(vo_frame_t *frame, post_video_port_t *port) {
- port->original_frame.port = frame->port;
- port->original_frame.free = frame->free;
- port->original_frame.proc_slice = frame->proc_slice;
- port->original_frame.proc_frame = frame->proc_frame;
- port->original_frame.field = frame->field;
- port->original_frame.draw = frame->draw;
- port->original_frame.lock = frame->lock;
- port->original_frame.dispose = frame->dispose;
+ port->original_frame.port = frame->port;
+ port->original_frame.free = frame->free;
+ port->original_frame.proc_slice = frame->proc_slice;
+ port->original_frame.proc_frame = frame->proc_frame;
port->original_frame.proc_macro_block = frame->proc_macro_block;
+ port->original_frame.field = frame->field;
+ port->original_frame.draw = frame->draw;
+ port->original_frame.lock = frame->lock;
+ port->original_frame.dispose = frame->dispose;
frame->port = &port->port;
frame->free = post_frame_free;
- frame->proc_slice = frame->proc_slice ? post_frame_proc_slice : NULL;
- frame->proc_frame = frame->proc_frame ? post_frame_proc_frame : NULL;
+ frame->proc_slice = frame->proc_slice ? post_frame_proc_slice : NULL;
+ frame->proc_frame = frame->proc_frame ? post_frame_proc_frame : NULL;
+ frame->proc_macro_block = frame->proc_macro_block ? post_frame_proc_macro_block : NULL;
frame->field = post_frame_field;
frame->draw = post_frame_draw;
frame->lock = post_frame_lock;
frame->dispose = post_frame_dispose;
- frame->proc_macro_block = post_frame_proc_macro_block;
}
void post_restore_video_frame(vo_frame_t *frame, post_video_port_t *port) {
@@ -219,11 +219,11 @@ void post_restore_video_frame(vo_frame_t *frame, post_video_port_t *port) {
frame->free = port->original_frame.free;
frame->proc_slice = port->original_frame.proc_slice;
frame->proc_frame = port->original_frame.proc_frame;
+ frame->proc_macro_block = port->original_frame.proc_macro_block;
frame->field = port->original_frame.field;
frame->draw = port->original_frame.draw;
frame->lock = port->original_frame.lock;
frame->dispose = port->original_frame.dispose;
- frame->proc_macro_block = port->original_frame.proc_macro_block;
}
diff --git a/src/xine-engine/video_out.c b/src/xine-engine/video_out.c
index f91cf15f3..5fb08867e 100644
--- a/src/xine-engine/video_out.c
+++ b/src/xine-engine/video_out.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.c,v 1.174 2003/10/22 20:38:10 komadori Exp $
+ * $Id: video_out.c,v 1.175 2003/10/23 15:17:07 mroi Exp $
*
* frame allocation / queuing / scheduling / output functions
*/
@@ -50,6 +50,16 @@
#define NUM_FRAME_BUFFERS 15
typedef struct {
+ vo_frame_t *first;
+ vo_frame_t *last;
+ int num_buffers;
+
+ int locked_for_read;
+ pthread_mutex_t mutex;
+ pthread_cond_t not_empty;
+} img_buf_fifo_t;
+
+typedef struct {
xine_video_port_t vo; /* public part */
@@ -100,20 +110,11 @@ typedef struct {
int frame_drop_cpt;
} vos_t;
+
/*
* frame queue (fifo) util functions
*/
-struct img_buf_fifo_s {
- vo_frame_t *first;
- vo_frame_t *last;
- int num_buffers;
-
- int locked_for_read;
- pthread_mutex_t mutex;
- pthread_cond_t not_empty;
-} ;
-
static img_buf_fifo_t *vo_new_img_buf_queue () {
img_buf_fifo_t *queue;
@@ -219,13 +220,15 @@ static void vo_frame_dec_lock (vo_frame_t *img) {
pthread_mutex_unlock (&img->mutex);
}
-/* call vo_driver->copy method for the entire frame */
-static void vo_frame_driver_copy(vo_frame_t *img)
+/* call vo_driver->proc methods for the entire frame */
+static void vo_frame_driver_proc(vo_frame_t *img)
{
if (img->proc_frame) {
- img->proc_frame(img, img->base);
+ img->proc_frame(img);
}
- else if (img->proc_slice) {
+ if (img->proc_called) return;
+
+ if (img->proc_slice) {
if (img->format == XINE_IMGFMT_YV12) {
int height = img->height;
uint8_t* src[3];
@@ -294,7 +297,7 @@ static vo_frame_t *vo_get_frame (xine_video_port_t *this_gen,
img->ratio = ratio;
img->format = format;
img->flags = flags;
- img->copy_called = 0;
+ img->proc_called = 0;
img->bad_frame = 0;
img->progressive_frame = 0;
img->repeat_first_field = 0;
@@ -391,9 +394,9 @@ static int vo_frame_draw (vo_frame_t *img, xine_stream_t *stream) {
if (!img->bad_frame) {
- /* do not call copy() for frames that will be dropped */
- if( !frames_to_skip && !img->copy_called )
- vo_frame_driver_copy(img);
+ /* do not call proc_*() for frames that will be dropped */
+ if( !frames_to_skip && !img->proc_called )
+ vo_frame_driver_proc(img);
/*
* put frame into FIFO-Buffer
@@ -564,18 +567,18 @@ static vo_frame_t * duplicate_frame( vos_t *this, vo_frame_t *img ) {
xine_fast_memcpy(dupl->base[0], img->base[0], image_size);
}
- dupl->bad_frame = 0;
- dupl->pts = 0;
- dupl->vpts = 0;
- dupl->copy_called = 0;
+ dupl->bad_frame = 0;
+ dupl->pts = 0;
+ dupl->vpts = 0;
+ dupl->proc_called = 0;
dupl->duration = img->duration;
dupl->stream = img->stream;
memcpy( dupl->extra_info, img->extra_info, sizeof(extra_info_t) );
- /* delay frame copying for now, we might not even need it (eg. frame will be discarded) */
- /* vo_frame_driver_copy(dupl); */
+ /* delay frame processing for now, we might not even need it (eg. frame will be discarded) */
+ /* vo_frame_driver_proc(dupl); */
return dupl;
}
@@ -789,11 +792,11 @@ static void overlay_and_display_frame (vos_t *this,
img->vpts);
#endif
- /* no, this is not were copy() is usually called.
+ /* no, this is not were proc_*() is usually called.
* it's just to catch special cases like late or duplicated frames.
*/
- if(!img->copy_called )
- vo_frame_driver_copy(img);
+ if(!img->proc_called )
+ vo_frame_driver_proc(img);
pthread_mutex_lock( &img->stream->current_extra_info_lock );
{
diff --git a/src/xine-engine/video_out.h b/src/xine-engine/video_out.h
index 3e132ac94..9eb663cca 100644
--- a/src/xine-engine/video_out.h
+++ b/src/xine-engine/video_out.h
@@ -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.h,v 1.98 2003/10/22 20:38:10 komadori Exp $
+ * $Id: video_out.h,v 1.99 2003/10/23 15:17:07 mroi Exp $
*
*
* xine version of video_out.h
@@ -52,11 +52,12 @@ extern "C" {
#include <inttypes.h>
#include <pthread.h>
+
typedef struct vo_frame_s vo_frame_t;
-typedef struct img_buf_fifo_s img_buf_fifo_t;
+typedef struct vo_driver_s vo_driver_t;
+typedef struct video_driver_class_s video_driver_class_t;
typedef struct vo_overlay_s vo_overlay_t;
typedef struct video_overlay_manager_s video_overlay_manager_t;
-typedef struct vo_driver_s vo_driver_t;
/* to access extra_info_t contents one have to include xine_internal.h */
#ifndef EXTRA_INFO
@@ -64,51 +65,33 @@ typedef struct vo_driver_s vo_driver_t;
typedef struct extra_info_s extra_info_t;
#endif
+
+typedef struct xine_macroblock_s {
+ short *blockptr; /* pointer to current dct block */
+ short *blockbaseptr; /* pointer to base of dct block array in blocks */
+ short xvmc_accel; /* type of acceleration supported */
+} xine_macroblocks_t;
+
+
/* public part, video drivers may add private fields
*
* Remember that adding new functions to this structure requires
* adaption of the post plugin decoration layer. Be sure to look into
* src/xine-engine/post.[ch].
*/
-
-typedef struct xine_macroblock_s {
- short *blockptr; // pointer to current dct block
- short *blockbaseptr; // pointer to base of dct block array in blocks
- short xvmc_accel; // type of acceleration supported
-} xine_macroblocks_t;
-
struct vo_frame_s {
/*
* member functions
*/
- /* this frame is no longer used by the decoder, video driver, etc */
- void (*free) (vo_frame_t *vo_img);
-
/* tell video driver to copy/convert the whole of this frame, may be NULL */
- /* this function MUST set the variable copy_called above */
- void (*proc_frame) (vo_frame_t *vo_img, uint8_t **src);
+ /* at least one of proc_frame() and proc_slice() MUST set the variable proc_called to 1 */
+ void (*proc_frame) (vo_frame_t *vo_img);
/* tell video driver to copy/convert a slice of this frame, may be NULL */
- /* this function MUST set the variable copy_called above */
+ /* at least one of proc_frame() and proc_slice() MUST set the variable proc_called to 1 */
void (*proc_slice) (vo_frame_t *vo_img, uint8_t **src);
- /* tell video driver that the decoder starts a new field */
- void (*field) (vo_frame_t *vo_img, int which_field);
-
- /* append this frame to the display queue,
- returns number of frames to skip if decoder is late */
- int (*draw) (vo_frame_t *vo_img, xine_stream_t *stream);
-
- /* lock frame as reference, must be paired with free.
- * most decoders/drivers do not need to call this function since
- * newly allocated frames are already locked once.
- */
- void (*lock) (vo_frame_t *vo_img);
-
- /* free memory/resources for this frame */
- void (*dispose) (vo_frame_t *vo_img);
-
/* XvMC routine for rendering macroblocks */
void (*proc_macro_block)(int x,
int y,
@@ -126,6 +109,25 @@ struct vo_frame_s {
int (*f_mot_pmv)[2],
int (*b_mot_pmv)[2]);
+ /* tell video driver that the decoder starts a new field */
+ void (*field) (vo_frame_t *vo_img, int which_field);
+
+ /* append this frame to the display queue,
+ returns number of frames to skip if decoder is late */
+ int (*draw) (vo_frame_t *vo_img, xine_stream_t *stream);
+
+ /* lock frame as reference, must be paired with free.
+ * most decoders/drivers do not need to call this function since
+ * newly allocated frames are already locked once.
+ */
+ void (*lock) (vo_frame_t *vo_img);
+
+ /* this frame is no longer used by the decoder, video driver, etc */
+ void (*free) (vo_frame_t *vo_img);
+
+ /* free memory/resources for this frame */
+ void (*dispose) (vo_frame_t *vo_img);
+
/*
* public variables to decoders and vo drivers
* changing anything here will require recompiling them both
@@ -149,10 +151,6 @@ struct vo_frame_s {
int progressive_frame;
int picture_coding_type;
- /* pan/scan offset */
- int pan_scan_x;
- int pan_scan_y;
-
/* extra info coming from input or demuxers */
extra_info_t *extra_info;
@@ -163,7 +161,7 @@ struct vo_frame_s {
int drawn; /* used by decoder, frame has already been drawn */
int flags; /* remember the frame flags */
- int copy_called; /* track use of copy() method */
+ int proc_called; /* track use of proc_*() methods */
/* used to carry macroblocks information for XvMC acceleration */
xine_macroblocks_t *macroblocks;
@@ -185,6 +183,7 @@ struct vo_frame_s {
int is_first;
};
+
/*
* Remember that adding new functions to this structure requires
* adaption of the post plugin decoration layer. Be sure to look into
@@ -210,24 +209,19 @@ struct xine_video_port_s {
uint32_t height, double ratio,
int format, int flags);
+ /* retrieves the last displayed frame (useful for taking snapshots) */
vo_frame_t* (*get_last_frame) (xine_video_port_t *self);
/* overlay stuff */
void (*enable_ovl) (xine_video_port_t *self, int ovl_enable);
- /* video driver is no longer used by decoder => close */
- void (*close) (xine_video_port_t *self, xine_stream_t *stream);
-
- /* called on xine exit */
- void (*exit) (xine_video_port_t *self);
-
- /* get overlay instance (overlay source) */
+ /* get overlay manager */
video_overlay_manager_t* (*get_overlay_manager) (xine_video_port_t *self);
/* flush video_out fifo */
void (*flush) (xine_video_port_t *self);
- /* * Get/Set video property
+ /* Get/Set video property
*
* See VO_PROP_* bellow
*/
@@ -238,13 +232,18 @@ struct xine_video_port_s {
int (*status) (xine_video_port_t *self, xine_stream_t *stream,
int *width, int *height, int64_t *img_duration);
+ /* video driver is no longer used by decoder => close */
+ void (*close) (xine_video_port_t *self, xine_stream_t *stream);
+
+ /* called on xine exit */
+ void (*exit) (xine_video_port_t *self);
+
/* the driver in use */
vo_driver_t *driver;
};
/* constants for the get/set property functions */
-
#define VO_PROP_INTERLACED 0
#define VO_PROP_ASPECT_RATIO 1
#define VO_PROP_HUE 2
@@ -261,11 +260,6 @@ struct xine_video_port_s {
#define VO_PROP_DISCARD_FRAMES 14 /* not used by drivers */
#define VO_NUM_PROPERTIES 15
-/* zoom specific constants FIXME: generate this from xine.tmpl.in */
-#define VO_ZOOM_STEP 100
-#define VO_ZOOM_MAX 400
-#define VO_ZOOM_MIN 100
-
/* number of colors in the overlay palette. Currently limited to 256
at most, because some alphablend functions use an 8-bit index into
the palette. This should probably be classified as a bug. */
@@ -278,7 +272,6 @@ struct xine_video_port_s {
#define VO_NUM_RECENT_FRAMES 2
/* get_frame flags */
-
#define VO_TOP_FIELD 1
#define VO_BOTTOM_FIELD 2
#define VO_BOTH_FIELDS (VO_TOP_FIELD | VO_BOTTOM_FIELD)
@@ -287,18 +280,10 @@ struct xine_video_port_s {
#define VO_NEW_SEQUENCE_FLAG 16 /* set after MPEG2 Sequence Header Code (used by XvMC) */
/* video driver capabilities */
-
-#define VO_CAP_YV12 0x00000002 /* driver can handle YUV 4:2:0 pictures */
-#define VO_CAP_YUY2 0x00000004 /* 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_AUTOPAINT_COLORKEY 0x00000200 /* driver can set AUTOPAINT_COLORKEY value */
-#define VO_CAP_XVMC_MOCOMP 0x00000400 /* driver can set XvMC motion compensation */
-#define VO_CAP_XVMC_IDCT 0x00000800 /* driver can use XvMC idct acceleration */
+#define VO_CAP_YV12 0x00000001 /* driver can handle YUV 4:2:0 pictures */
+#define VO_CAP_YUY2 0x00000002 /* driver can handle YUY2 pictures */
+#define VO_CAP_XVMC_MOCOMP 0x00000004 /* driver can use XvMC motion compensation */
+#define VO_CAP_XVMC_IDCT 0x00000008 /* driver can use XvMC idct acceleration */
/* macroblock modes */
#define XINE_MACROBLOCK_INTRA 1
@@ -347,7 +332,6 @@ struct vo_driver_s {
*/
vo_frame_t* (*alloc_frame) (vo_driver_t *self);
-
/*
* check if the given image fullfills the format specified
* (re-)allocate memory if necessary
@@ -378,7 +362,6 @@ struct vo_driver_s {
/*
* these can be used by the gui directly:
*/
-
int (*get_property) (vo_driver_t *self, int property);
int (*set_property) (vo_driver_t *self,
int property, int value);
@@ -391,7 +374,6 @@ struct vo_driver_s {
* this should be used to propagate events, display data, window sizes
* etc. to the driver
*/
-
int (*gui_data_exchange) (vo_driver_t *self, int data_type,
void *data);
@@ -404,14 +386,11 @@ struct vo_driver_s {
/*
* free all resources, close driver
*/
-
void (*dispose) (vo_driver_t *self);
void *node; /* needed by plugin_loader */
};
-typedef struct video_driver_class_s video_driver_class_t;
-
struct video_driver_class_s {
/*
@@ -433,7 +412,6 @@ struct video_driver_class_s {
/*
* free all class-related resources
*/
-
void (*dispose) (video_driver_class_t *self);
};
@@ -500,7 +478,6 @@ video_overlay_manager_t *video_overlay_new_instance (void);
* build a video_out_port from
* a given video driver
*/
-
xine_video_port_t *vo_new_port (xine_t *xine, vo_driver_t *driver, int grabonly) ;
#ifdef __cplusplus