summaryrefslogtreecommitdiff
path: root/src/video_out
diff options
context:
space:
mode:
Diffstat (limited to 'src/video_out')
-rw-r--r--src/video_out/alphablend.c1
-rw-r--r--src/video_out/video_out_fb.c7
-rw-r--r--src/video_out/video_out_opengl.c7
-rw-r--r--src/video_out/video_out_syncfb.c10
-rw-r--r--src/video_out/video_out_xshm.c13
-rw-r--r--src/video_out/video_out_xv.c25
6 files changed, 31 insertions, 32 deletions
diff --git a/src/video_out/alphablend.c b/src/video_out/alphablend.c
index 8646d2864..2c819b86e 100644
--- a/src/video_out/alphablend.c
+++ b/src/video_out/alphablend.c
@@ -34,6 +34,7 @@
#include <string.h>
#include <stdlib.h>
+#include <stdio.h>
#include <inttypes.h>
#include "video_out.h"
diff --git a/src/video_out/video_out_fb.c b/src/video_out/video_out_fb.c
index 0c073845c..8dbbd0f46 100644
--- a/src/video_out/video_out_fb.c
+++ b/src/video_out/video_out_fb.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_fb.c,v 1.4 2002/01/22 01:43:13 miguelfreitas Exp $
+ * $Id: video_out_fb.c,v 1.5 2002/02/09 07:13:24 guenter Exp $
*
* video_out_fb.c, frame buffer xine driver by Miguel Freitas
*
@@ -154,7 +154,7 @@ static uint32_t fb_get_capabilities (vo_driver_t *this_gen) {
static void fb_frame_copy (vo_frame_t *vo_img, uint8_t **src) {
fb_frame_t *frame = (fb_frame_t *) vo_img ;
- fb_driver_t *this = (fb_driver_t *) vo_img->instance->driver;
+ fb_driver_t *this = (fb_driver_t *) vo_img->driver;
xine_profiler_start_count (this->prof_yuv2rgb);
@@ -176,7 +176,7 @@ static void fb_frame_copy (vo_frame_t *vo_img, uint8_t **src) {
static void fb_frame_field (vo_frame_t *vo_img, int which_field) {
fb_frame_t *frame = (fb_frame_t *) vo_img ;
- fb_driver_t *this = (fb_driver_t *) vo_img->instance->driver;
+ fb_driver_t *this = (fb_driver_t *) vo_img->driver;
switch (which_field) {
case VO_TOP_FIELD:
@@ -226,6 +226,7 @@ static vo_frame_t *fb_alloc_frame (vo_driver_t *this_gen) {
frame->vo_frame.copy = fb_frame_copy;
frame->vo_frame.field = fb_frame_field;
frame->vo_frame.dispose = fb_frame_dispose;
+ frame->vo_frame.driver = this_gen;
return (vo_frame_t *) frame;
}
diff --git a/src/video_out/video_out_opengl.c b/src/video_out/video_out_opengl.c
index 8a2993de9..23e690719 100644
--- a/src/video_out/video_out_opengl.c
+++ b/src/video_out/video_out_opengl.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_opengl.c,v 1.4 2002/01/23 23:27:10 f1rmb Exp $
+ * $Id: video_out_opengl.c,v 1.5 2002/02/09 07:13:24 guenter Exp $
*
* video_out_glut.c, glut based OpenGL rendering interface for xine
* Matthias Hopf <mat@mshopf.de>
@@ -231,7 +231,7 @@ static uint32_t opengl_get_capabilities (vo_driver_t *this_gen) {
static void opengl_frame_copy (vo_frame_t *vo_img, uint8_t **src) {
opengl_frame_t *frame = (opengl_frame_t *) vo_img ;
- opengl_driver_t *this = (opengl_driver_t *) vo_img->instance->driver;
+ opengl_driver_t *this = (opengl_driver_t *) vo_img->driver;
/*fprintf (stderr, "*** frame_copy\n"); */
xine_profiler_start_count (this->prof_yuv2rgb);
@@ -301,12 +301,13 @@ static vo_frame_t *opengl_alloc_frame (vo_driver_t *this_gen) {
pthread_mutex_init (&frame->vo_frame.mutex, NULL);
/*
- * supply required functions
+ * supply required functions/fields
*/
frame->vo_frame.copy = opengl_frame_copy;
frame->vo_frame.field = opengl_frame_field;
frame->vo_frame.dispose = opengl_frame_dispose;
+ frame->vo_frame.driver = this_gen;
return (vo_frame_t *) frame;
}
diff --git a/src/video_out/video_out_syncfb.c b/src/video_out/video_out_syncfb.c
index 87a042c61..ce34a6b1c 100644
--- a/src/video_out/video_out_syncfb.c
+++ b/src/video_out/video_out_syncfb.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_syncfb.c,v 1.52 2002/01/24 23:09:53 guenter Exp $
+ * $Id: video_out_syncfb.c,v 1.53 2002/02/09 07:13:24 guenter Exp $
*
* video_out_syncfb.c, SyncFB (for Matrox G200/G400 cards) interface for xine
*
@@ -327,10 +327,6 @@ static void write_frame_sfb(syncfb_driver_t* this, syncfb_frame_t* frame)
}
break;
- case IMGFMT_RGB:
- printf("video_out_syncfb: error. (RGB565 not yet supported)\n");
- break;
-
default:
printf("video_out_syncfb: error. (unknown frame format)\n");
break;
@@ -545,10 +541,6 @@ static void syncfb_adapt_to_output_area(syncfb_driver_t* this,
this->syncfb_config.src_palette = VIDEO_PALETTE_YUV422;
break;
- case IMGFMT_RGB:
- this->syncfb_config.src_palette = VIDEO_PALETTE_RGB565;
- break;
-
default:
this->syncfb_config.src_palette = 0;
break;
diff --git a/src/video_out/video_out_xshm.c b/src/video_out/video_out_xshm.c
index 6d5ccb918..61e9b3fb2 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.55 2002/01/15 20:35:24 jcdutton Exp $
+ * $Id: video_out_xshm.c,v 1.56 2002/02/09 07:13:24 guenter Exp $
*
* video_out_xshm.c, X11 shared memory extension interface for xine
*
@@ -349,7 +349,7 @@ static uint32_t xshm_get_capabilities (vo_driver_t *this_gen) {
static void xshm_frame_copy (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->instance->driver;
+ xshm_driver_t *this = (xshm_driver_t *) vo_img->driver;
xine_profiler_start_count (this->prof_yuv2rgb);
@@ -371,7 +371,7 @@ static void xshm_frame_copy (vo_frame_t *vo_img, uint8_t **src) {
static void xshm_frame_field (vo_frame_t *vo_img, int which_field) {
xshm_frame_t *frame = (xshm_frame_t *) vo_img ;
- xshm_driver_t *this = (xshm_driver_t *) vo_img->instance->driver;
+ xshm_driver_t *this = (xshm_driver_t *) vo_img->driver;
switch (which_field) {
case VO_TOP_FIELD:
@@ -391,7 +391,7 @@ static void xshm_frame_field (vo_frame_t *vo_img, int which_field) {
static void xshm_frame_dispose (vo_frame_t *vo_img) {
xshm_frame_t *frame = (xshm_frame_t *) vo_img ;
- xshm_driver_t *this = (xshm_driver_t *) vo_img->instance->driver;
+ xshm_driver_t *this = (xshm_driver_t *) vo_img->driver;
if (frame->image) {
XLockDisplay (this->display);
@@ -417,13 +417,14 @@ static vo_frame_t *xshm_alloc_frame (vo_driver_t *this_gen) {
pthread_mutex_init (&frame->vo_frame.mutex, NULL);
/*
- * supply required functions
+ * supply required functions/fields
*/
frame->vo_frame.copy = xshm_frame_copy;
frame->vo_frame.field = xshm_frame_field;
frame->vo_frame.dispose = xshm_frame_dispose;
-
+ frame->vo_frame.driver = this_gen;
+
return (vo_frame_t *) frame;
}
diff --git a/src/video_out/video_out_xv.c b/src/video_out/video_out_xv.c
index 68fd7b15d..30aadd009 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.90 2002/01/24 23:09:54 guenter Exp $
+ * $Id: video_out_xv.c,v 1.91 2002/02/09 07:13:24 guenter Exp $
*
* video_out_xv.c, X11 video extension interface for xine
*
@@ -97,7 +97,6 @@ struct xv_driver_s {
Display *display;
int screen;
Drawable drawable;
- unsigned int xv_format_rgb;
unsigned int xv_format_yv12;
unsigned int xv_format_yuy2;
XVisualInfo vinfo;
@@ -184,7 +183,7 @@ static void xv_frame_field (vo_frame_t *vo_img, int which_field) {
static void xv_frame_dispose (vo_frame_t *vo_img) {
xv_frame_t *frame = (xv_frame_t *) vo_img ;
- xv_driver_t *this = (xv_driver_t *) vo_img->instance->driver;
+ xv_driver_t *this = (xv_driver_t *) vo_img->driver;
if (frame->image) {
XLockDisplay (this->display);
@@ -220,6 +219,8 @@ static vo_frame_t *xv_alloc_frame (vo_driver_t *this_gen) {
frame->vo_frame.field = xv_frame_field;
frame->vo_frame.dispose = xv_frame_dispose;
+ frame->vo_frame.driver = this_gen;
+
return (vo_frame_t *) frame;
}
@@ -258,9 +259,6 @@ static XvImage *create_ximage (xv_driver_t *this, XShmSegmentInfo *shminfo,
case IMGFMT_YV12:
xv_format = this->xv_format_yv12;
break;
- case IMGFMT_RGB:
- xv_format = this->xv_format_rgb;
- break;
case IMGFMT_YUY2:
xv_format = this->xv_format_yuy2;
break;
@@ -842,11 +840,15 @@ static void xv_display_frame (vo_driver_t *this_gen, vo_frame_t *frame_gen) {
xv_driver_t *this = (xv_driver_t *) this_gen;
xv_frame_t *frame = (xv_frame_t *) frame_gen;
+ printf ("video_out_xv: xv_display_frame...\n");
+
if (this->expecting_event) {
frame->vo_frame.displayed (&frame->vo_frame);
this->expecting_event--;
+ printf ("video_out_xv: xv_display_frame... not displayed, waiting for completion event\n");
+
} else {
xv_add_recent_frame (this, frame);
this->cur_frame = frame;
@@ -862,8 +864,12 @@ static void xv_display_frame (vo_driver_t *this_gen, vo_frame_t *frame_gen) {
if (this->deinterlace_enabled && this->deinterlace_method)
xv_deinterlace_frame (this);
+ printf ("video_out_xv: xv_display_frame... lock display...\n");
+
XLockDisplay (this->display);
+ printf ("video_out_xv: xv_display_frame... lock display...locked\n");
+
if (this->use_shm) {
XvShmPutImage(this->display, this->xv_port,
this->drawable, this->gc, this->cur_frame->image,
@@ -887,6 +893,8 @@ static void xv_display_frame (vo_driver_t *this_gen, vo_frame_t *frame_gen) {
XUnlockDisplay (this->display);
}
+
+ printf ("video_out_xv: xv_display_frame... done\n");
}
static int xv_get_property (vo_driver_t *this_gen, int property) {
@@ -1450,7 +1458,6 @@ vo_driver_t *init_video_out_plugin (config_values_t *config, void *visual_gen) {
this->xv_format_yv12 = 0;
this->xv_format_yuy2 = 0;
- this->xv_format_rgb = 0;
for(i = 0; i < formats; i++) {
#ifdef XV_LOG
@@ -1466,10 +1473,6 @@ vo_driver_t *init_video_out_plugin (config_values_t *config, void *visual_gen) {
this->xv_format_yuy2 = fo[i].id;
this->capabilities |= VO_CAP_YUY2;
printf("video_out_xv: this adaptor supports the yuy2 format.\n");
- } else if (fo[i].id == IMGFMT_RGB) {
- this->xv_format_rgb = fo[i].id;
- this->capabilities |= VO_CAP_RGB;
- printf("video_out_xv: this adaptor supports the rgb format.\n");
}
}