diff options
Diffstat (limited to 'src/video_out')
-rw-r--r-- | src/video_out/Makefile.am | 148 | ||||
-rw-r--r-- | src/video_out/alphablend.c | 1 | ||||
-rw-r--r-- | src/video_out/video_out_aa.c | 7 | ||||
-rw-r--r-- | src/video_out/video_out_fb.c | 41 | ||||
-rw-r--r-- | src/video_out/video_out_opengl.c | 6 | ||||
-rw-r--r-- | src/video_out/video_out_sdl.c | 54 | ||||
-rw-r--r-- | src/video_out/video_out_syncfb.c | 64 | ||||
-rw-r--r-- | src/video_out/video_out_vidix.c | 10 | ||||
-rw-r--r-- | src/video_out/video_out_x11.h | 121 | ||||
-rw-r--r-- | src/video_out/video_out_xshm.c | 45 | ||||
-rw-r--r-- | src/video_out/video_out_xv.c | 116 |
11 files changed, 255 insertions, 358 deletions
diff --git a/src/video_out/Makefile.am b/src/video_out/Makefile.am index 99cd43fe1..532e7d87d 100644 --- a/src/video_out/Makefile.am +++ b/src/video_out/Makefile.am @@ -2,45 +2,42 @@ SUBDIRS = libdha vidix VIDIX_CFLAGS = -I$(top_builddir)/src/video_out/vidix -I$(top_srcdir)/src/video_out/vidix -CFLAGS = @CFLAGS@ $(X_CFLAGS) $(LIBMPEG2_CFLAGS) -DXINE_COMPILE $(SDL_CFLAGS) $(VIDIX_CFLAGS) $(DIRECTFB_CFLAGS) -DEBUG_CFLAGS = @DEBUG_CFLAGS@ $(X_CFLAGS) $(LIBMPEG2_CFLAGS) -DXINE_COMPILE $(SDL_CFLAGS) $(VIDIX_CFLAGS) $(DIRECTFB_CFLAGS) +CFLAGS = @CFLAGS@ $(X_CFLAGS) $(LIBMPEG2_CFLAGS) -DXINE_COMPILE $(SDL_CFLAGS) $(VIDIX_CFLAGS) +DEBUG_CFLAGS = @DEBUG_CFLAGS@ $(X_CFLAGS) $(LIBMPEG2_CFLAGS) -DXINE_COMPILE $(SDL_CFLAGS) $(VIDIX_CFLAGS) LIBTOOL = $(SHELL) $(top_builddir)/libtool-nofpic libdir = $(XINE_PLUGINDIR) -if HAVE_X11 -xshm_module = xineplug_vo_out_xshm.la -syncfb_module = xineplug_vo_out_syncfb.la -if HAVE_VIDIX -vidix_module = xineplug_vo_out_vidix.la -endif -if HAVE_XV +#if HAVE_X11 +#xshm_module = xineplug_vo_out_xshm.la +#syncfb_module = xineplug_vo_out_syncfb.la +#if HAVE_VIDIX +#vidix_module = xineplug_vo_out_vidix.la +#endif +#if HAVE_XV xv_module = xineplug_vo_out_xv.la -endif -if HAVE_OPENGL -opengl_module = xineplug_vo_out_opengl.la -endif -if HAVE_SUNFB -pgx64_module = xineplug_vo_out_pgx64.la -endif -endif +#endif +#if HAVE_OPENGL +#opengl_module = xineplug_vo_out_opengl.la +#endif +#endif -if HAVE_AA -aa_module = xineplug_vo_out_aa.la -endif +#if HAVE_AA +#aa_module = xineplug_vo_out_aa.la +#endif -if HAVE_FB -fb_module = xineplug_vo_out_fb.la -endif +#if HAVE_FB +#fb_module = xineplug_vo_out_fb.la +#endif -if HAVE_DIRECTFB -directfb_module = xineplug_vo_out_directfb.la -endif +#if HAVE_DIRECTFB +#directfb_module = xineplug_vo_out_directfb.la +#endif -if HAVE_SDL -sdl_module = xineplug_vo_out_sdl.la -endif +#if HAVE_SDL +#sdl_module = xineplug_vo_out_sdl.la +#endif @@ -49,67 +46,54 @@ endif # all xine video out plugins should be named # "xineplug_vo_out_*" -lib_LTLIBRARIES = $(xshm_module) $(xv_module) $(directfb_module) $(aa_module) \ - $(syncfb_module) $(fb_module) $(opengl_module) \ - $(sdl_module) $(vidix_module) $(pgx64_module) +#lib_LTLIBRARIES = $(xshm_module) $(xv_module) $(directfb_module) $(aa_module) \ +# $(syncfb_module) $(fb_module) $(opengl_module) $(sdl_module) $(vidix_module) +lib_LTLIBRARIES = $(xv_module) xineplug_vo_out_xv_la_SOURCES = deinterlace.c alphablend.c video_out_xv.c xineplug_vo_out_xv_la_LIBADD = $(XV_LIB) $(X_LIBS) -lXext \ - $(top_builddir)/src/xine-utils/libxineutils.la \ - $(top_builddir)/src/xine-engine/libxine.la + $(top_builddir)/src/xine-utils/libxineutils.la xineplug_vo_out_xv_la_LDFLAGS = -avoid-version -module -xineplug_vo_out_xshm_la_SOURCES = yuv2rgb.c yuv2rgb_mmx.c yuv2rgb_mlib.c \ - alphablend.c video_out_xshm.c -xineplug_vo_out_xshm_la_LIBADD = $(X_LIBS) -lXext \ - $(top_builddir)/src/xine-utils/libxineutils.la \ - $(top_builddir)/src/xine-engine/libxine.la -xineplug_vo_out_xshm_la_LDFLAGS = -avoid-version -module - -xineplug_vo_out_opengl_la_SOURCES = yuv2rgb.c yuv2rgb_mmx.c yuv2rgb_mlib.c \ - alphablend.c video_out_opengl.c -xineplug_vo_out_opengl_la_LIBADD = $(OPENGL_LIBS) $(GLUT_LIBS) $(GLU_LIBS) $(X_LIBS) \ - $(top_builddir)/src/xine-utils/libxineutils.la -xineplug_vo_out_opengl_la_LDFLAGS = -avoid-version -module - -xineplug_vo_out_syncfb_la_SOURCES = alphablend.c video_out_syncfb.c -xineplug_vo_out_syncfb_la_LIBADD = $(X_LIBS) -lXext \ - $(top_builddir)/src/xine-utils/libxineutils.la \ - $(top_builddir)/src/xine-engine/libxine.la -xineplug_vo_out_syncfb_la_LDFLAGS = -avoid-version -module - -xineplug_vo_out_aa_la_SOURCES = video_out_aa.c -xineplug_vo_out_aa_la_LIBADD = $(AALIB_LIBS) -xineplug_vo_out_aa_la_LDFLAGS = -avoid-version -module - -xineplug_vo_out_fb_la_SOURCES = yuv2rgb.c yuv2rgb_mmx.c yuv2rgb_mlib.c \ - alphablend.c video_out_fb.c -xineplug_vo_out_fb_la_LIBADD = $(top_builddir)/src/xine-utils/libxineutils.la \ - $(top_builddir)/src/xine-engine/libxine.la -xineplug_vo_out_fb_la_LDFLAGS = -avoid-version -module - -xineplug_vo_out_directfb_la_SOURCES = alphablend.c video_out_directfb.c -xineplug_vo_out_directfb_la_LIBADD = $(DIRECTFB_LIBS) -xineplug_vo_out_directfb_la_LDFLAGS = -avoid-version -module - -xineplug_vo_out_sdl_la_SOURCES = alphablend.c video_out_sdl.c -xineplug_vo_out_sdl_la_LIBADD = $(SDL_LIBS) \ - $(top_builddir)/src/xine-engine/libxine.la -xineplug_vo_out_sdl_la_LDFLAGS = -avoid-version -module - -xineplug_vo_out_vidix_la_SOURCES = alphablend.c video_out_vidix.c -xineplug_vo_out_vidix_la_LIBADD = $(X_LIBS) $(top_builddir)/src/video_out/vidix/libvidix.la \ - $(top_builddir)/src/xine-engine/libxine.la -xineplug_vo_out_vidix_la_LDFLAGS = -avoid-version -module - -xineplug_vo_out_pgx64_la_SOURCES = video_out_pgx64.c -xineplug_vo_out_pgx64_la_LIBADD = $(X_LIBS) -xineplug_vo_out_pgx64_la_LDFLAGS = -avoid-version -module +#xineplug_vo_out_xshm_la_SOURCES = yuv2rgb.c yuv2rgb_mmx.c yuv2rgb_mlib.c \ +# alphablend.c video_out_xshm.c +#xineplug_vo_out_xshm_la_LIBADD = $(X_LIBS) -lXext \ +# $(top_builddir)/src/xine-utils/libxineutils.la +#xineplug_vo_out_xshm_la_LDFLAGS = -avoid-version -module +# +#xineplug_vo_out_opengl_la_SOURCES = yuv2rgb.c yuv2rgb_mmx.c yuv2rgb_mlib.c \ +# alphablend.c video_out_opengl.c +#xineplug_vo_out_opengl_la_LIBADD = $(OPENGL_LIBS) $(GLUT_LIBS) $(GLU_LIBS) $(X_LIBS) \ +# $(top_builddir)/src/xine-utils/libxineutils.la +#xineplug_vo_out_opengl_la_LDFLAGS = -avoid-version -module +# +#xineplug_vo_out_syncfb_la_SOURCES = alphablend.c video_out_syncfb.c +#xineplug_vo_out_syncfb_la_LIBADD = $(X_LIBS) $(top_builddir)/src/xine-utils/libxineutils.la +#xineplug_vo_out_syncfb_la_LDFLAGS = -avoid-version -module +# +#xineplug_vo_out_aa_la_SOURCES = video_out_aa.c +#xineplug_vo_out_aa_la_LIBADD = $(AALIB_LIBS) +#xineplug_vo_out_aa_la_LDFLAGS = -avoid-version -module +# +#xineplug_vo_out_fb_la_SOURCES = yuv2rgb.c yuv2rgb_mmx.c yuv2rgb_mlib.c \ +# alphablend.c video_out_fb.c +#xineplug_vo_out_fb_la_LIBADD = $(top_builddir)/src/xine-utils/libxineutils.la +#xineplug_vo_out_fb_la_LDFLAGS = -avoid-version -module +# +#xineplug_vo_out_directfb_la_SOURCES = alphablend.c video_out_directfb.c +#xineplug_vo_out_directfb_la_LIBADD = $(DIRECTFB_LIBS) +#xineplug_vo_out_directfb_la_LDFLAGS = -avoid-version -module +# +#xineplug_vo_out_sdl_la_SOURCES = alphablend.c video_out_sdl.c +#xineplug_vo_out_sdl_la_LIBADD = $(SDL_LIBS) +#xineplug_vo_out_sdl_la_LDFLAGS = -avoid-version -module +# +#xineplug_vo_out_vidix_la_SOURCES = alphablend.c video_out_vidix.c +#xineplug_vo_out_vidix_la_LIBADD = $(X_LIBS) $(top_builddir)/src/video_out/vidix/libvidix.la +#xineplug_vo_out_vidix_la_LDFLAGS = -avoid-version -module noinst_HEADERS = yuv2rgb.h video_out_syncfb.h alphablend.h deinterlace.h -include_HEADERS = video_out_x11.h - debug: @$(MAKE) CFLAGS="$(DEBUG_CFLAGS) -DXINE_COMPILE" diff --git a/src/video_out/alphablend.c b/src/video_out/alphablend.c index 07cb89dc4..1e9d19a6a 100644 --- a/src/video_out/alphablend.c +++ b/src/video_out/alphablend.c @@ -37,6 +37,7 @@ #include <stdio.h> #include <inttypes.h> +#include "xine_internal.h" #include "video_out.h" #include "alphablend.h" diff --git a/src/video_out/video_out_aa.c b/src/video_out/video_out_aa.c index 99e66522e..6ebdc0dd7 100644 --- a/src/video_out/video_out_aa.c +++ b/src/video_out/video_out_aa.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_aa.c,v 1.25 2002/08/10 21:25:20 miguelfreitas Exp $ + * $Id: video_out_aa.c,v 1.26 2002/09/04 23:31:12 guenter Exp $ * * video_out_aa.c, ascii-art output plugin for xine * @@ -27,6 +27,9 @@ #include "config.h" #endif +#warning DISABLED: FIXME +#if 0 + #include <stdio.h> #include <stdlib.h> #include <stdarg.h> @@ -300,3 +303,5 @@ vo_info_t *get_video_out_plugin_info() { vo_info_aa.description = _("xine video output plugin using the ascii-art library"); return &vo_info_aa; } + +#endif diff --git a/src/video_out/video_out_fb.c b/src/video_out/video_out_fb.c index 2d74452de..a6b0b43c1 100644 --- a/src/video_out/video_out_fb.c +++ b/src/video_out/video_out_fb.c @@ -1,7 +1,7 @@ /* - * Copyright (C) 2000, 2001 the xine project + * Copyright (C) 2000-2002 the xine project * - * This file is part of xine, a unix video player. + * This file is part of xine, a free video player. * * xine is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -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.15 2002/08/23 00:24:30 miguelfreitas Exp $ + * $Id: video_out_fb.c,v 1.16 2002/09/04 23:31:12 guenter Exp $ * * video_out_fb.c, frame buffer xine driver by Miguel Freitas * @@ -44,6 +44,7 @@ #include <sys/stat.h> #include <fcntl.h> +#include "xine.h" #include "video_out.h" #include <errno.h> @@ -90,7 +91,7 @@ typedef struct fb_frame_s { typedef struct fb_driver_s { - vo_driver_t vo_driver; + xine_vo_driver_t vo_driver; config_values_t *config; @@ -120,14 +121,14 @@ typedef struct fb_driver_s { * and now, the driver functions */ -static uint32_t fb_get_capabilities (vo_driver_t *this_gen) { +static uint32_t fb_get_capabilities (xine_vo_driver_t *this_gen) { return VO_CAP_COPIES_IMAGE | VO_CAP_YV12 | VO_CAP_YUY2 | VO_CAP_BRIGHTNESS; } static void fb_frame_copy (vo_frame_t *vo_img, uint8_t **src) { fb_frame_t *frame = (fb_frame_t *) vo_img ; - if (frame->format == IMGFMT_YV12) { + if (frame->format == XINE_IMGFMT_YV12) { frame->yuv2rgb->yuv2rgb_fun (frame->yuv2rgb, frame->rgb_dst, src[0], src[1], src[2]); } else { @@ -171,7 +172,7 @@ static void fb_frame_dispose (vo_frame_t *vo_img) { } -static vo_frame_t *fb_alloc_frame (vo_driver_t *this_gen) { +static vo_frame_t *fb_alloc_frame (xine_vo_driver_t *this_gen) { fb_driver_t *this = (fb_driver_t *) this_gen; fb_frame_t *frame ; @@ -226,7 +227,7 @@ static void fb_compute_rgb_size (fb_driver_t *this, fb_frame_t *frame) { #endif } -static void fb_update_frame_format (vo_driver_t *this_gen, +static void fb_update_frame_format (xine_vo_driver_t *this_gen, vo_frame_t *frame_gen, uint32_t width, uint32_t height, int ratio_code, int format, int flags) { @@ -290,7 +291,7 @@ static void fb_update_frame_format (vo_driver_t *this_gen, frame->data = xine_xmalloc (frame->sc.output_width * frame->sc.output_height * this->bytes_per_pixel ); - if (format == IMGFMT_YV12) { + if (format == XINE_IMGFMT_YV12) { frame->vo_frame.pitches[0] = 8*((width + 7) / 8); frame->vo_frame.pitches[1] = 8*((width + 15) / 16); frame->vo_frame.pitches[2] = 8*((width + 15) / 16); @@ -387,7 +388,7 @@ static void fb_overlay_clut_yuv2rgb(fb_driver_t *this, vo_overlay_t *overlay, } } -static void fb_overlay_blend (vo_driver_t *this_gen, vo_frame_t *frame_gen, vo_overlay_t *overlay) { +static void fb_overlay_blend (xine_vo_driver_t *this_gen, vo_frame_t *frame_gen, vo_overlay_t *overlay) { fb_driver_t *this = (fb_driver_t *) this_gen; fb_frame_t *frame = (fb_frame_t *) frame_gen; @@ -419,11 +420,11 @@ static void fb_overlay_blend (vo_driver_t *this_gen, vo_frame_t *frame_gen, vo_o } } -static int fb_redraw_needed (vo_driver_t *this_gen) { +static int fb_redraw_needed (xine_vo_driver_t *this_gen) { return 0; } -static void fb_display_frame (vo_driver_t *this_gen, vo_frame_t *frame_gen) { +static void fb_display_frame (xine_vo_driver_t *this_gen, vo_frame_t *frame_gen) { fb_driver_t *this = (fb_driver_t *) this_gen; fb_frame_t *frame = (fb_frame_t *) frame_gen; @@ -457,7 +458,7 @@ static void fb_display_frame (vo_driver_t *this_gen, vo_frame_t *frame_gen) { frame->vo_frame.displayed (&frame->vo_frame); } -static int fb_get_property (vo_driver_t *this_gen, int property) { +static int fb_get_property (xine_vo_driver_t *this_gen, int property) { fb_driver_t *this = (fb_driver_t *) this_gen; @@ -496,7 +497,7 @@ static int fb_set_property (vo_driver_t *this_gen, return value; } -static void fb_get_property_min_max (vo_driver_t *this_gen, +static void fb_get_property_min_max (xine_vo_driver_t *this_gen, int property, int *min, int *max) { /* fb_driver_t *this = (fb_driver_t *) this_gen; */ @@ -517,14 +518,14 @@ static int is_fullscreen_size (fb_driver_t *this, int w, int h) return 0; } -static int fb_gui_data_exchange (vo_driver_t *this_gen, +static int fb_gui_data_exchange (xine_vo_driver_t *this_gen, int data_type, void *data) { return 0; } -static void fb_exit (vo_driver_t *this_gen) { +static void fb_exit (xine_vo_driver_t *this_gen) { fb_driver_t *this = (fb_driver_t *) this_gen; @@ -533,7 +534,7 @@ static void fb_exit (vo_driver_t *this_gen) { close(this->fd); } -vo_driver_t *init_video_out_plugin (config_values_t *config, void *visual_gen) { +xine_vo_driver_t *init_video_out_plugin (config_values_t *config, void *visual_gen) { fb_driver_t *this; int mode; @@ -735,7 +736,7 @@ vo_driver_t *init_video_out_plugin (config_values_t *config, void *visual_gen) { this->yuv2rgb_gamma = config->register_range (config, "video.fb_gamma", 0, -100, 100, "gamma correction for fb driver", - NULL, NULL, NULL); + NULL, 0, NULL, NULL); this->yuv2rgb_factory = yuv2rgb_factory_init (mode, this->yuv2rgb_swap, this->yuv2rgb_cmap); @@ -749,7 +750,7 @@ static vo_info_t vo_info_fb = { 6, "fb", NULL, - VISUAL_TYPE_FB, + XINE_VISUAL_TYPE_FB, 5 }; @@ -757,3 +758,5 @@ vo_info_t *get_video_out_plugin_info() { vo_info_fb.description = _("xine video output plugin using linux framebuffer device"); return &vo_info_fb; } + + diff --git a/src/video_out/video_out_opengl.c b/src/video_out/video_out_opengl.c index c4ba278ef..2a504b9c0 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.16 2002/08/10 21:25:20 miguelfreitas Exp $ + * $Id: video_out_opengl.c,v 1.17 2002/09/04 23:31:12 guenter Exp $ * * video_out_glut.c, glut based OpenGL rendering interface for xine * Matthias Hopf <mat@mshopf.de> @@ -57,6 +57,9 @@ #include "config.h" #endif +#warning DISABLED: FIXME +#if 0 + #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -1113,3 +1116,4 @@ vo_info_t *get_video_out_plugin_info() { return &vo_info_shm; } +#endif diff --git a/src/video_out/video_out_sdl.c b/src/video_out/video_out_sdl.c index d03432cde..98b107892 100644 --- a/src/video_out/video_out_sdl.c +++ b/src/video_out/video_out_sdl.c @@ -1,7 +1,7 @@ /* - * Copyright (C) 2000, 2001 the xine project + * Copyright (C) 2000-2002 the xine project * - * This file is part of xine, a unix video player. + * This file is part of xine, a free video player. * * xine is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -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.12 2002/08/16 21:10:02 miguelfreitas Exp $ + * $Id: video_out_sdl.c,v 1.13 2002/09/04 23:31:12 guenter Exp $ * * video_out_sdl.c, Simple DirectMedia Layer * @@ -49,15 +49,15 @@ #include <math.h> #include <SDL/SDL.h> -#include "video_out.h" +#include "xine.h" #include "xine_internal.h" +#include "video_out.h" #include "alphablend.h" #include "xineutils.h" #include "vo_scale.h" #ifdef HAVE_X11 #include <X11/Xlib.h> -#include "video_out_x11.h" #endif /* @@ -75,13 +75,13 @@ typedef struct sdl_frame_s { struct sdl_driver_s { - vo_driver_t vo_driver; + xine_vo_driver_t vo_driver; config_values_t *config; - SDL_Surface * surface; - uint32_t sdlflags; - uint8_t bpp; + SDL_Surface *surface; + uint32_t sdlflags; + uint8_t bpp; pthread_mutex_t mutex; @@ -98,7 +98,7 @@ struct sdl_driver_s { }; -static uint32_t sdl_get_capabilities (vo_driver_t *this_gen) { +static uint32_t sdl_get_capabilities (xine_vo_driver_t *this_gen) { sdl_driver_t *this = (sdl_driver_t *) this_gen; @@ -119,7 +119,7 @@ static void sdl_frame_dispose (vo_frame_t *vo_img) { free (frame); } -static vo_frame_t *sdl_alloc_frame (vo_driver_t *this_gen) { +static vo_frame_t *sdl_alloc_frame (xine_vo_driver_t *this_gen) { sdl_frame_t *frame ; @@ -160,7 +160,7 @@ static void sdl_compute_output_size (sdl_driver_t *this) { } -static void sdl_update_frame_format (vo_driver_t *this_gen, +static void sdl_update_frame_format (xine_vo_driver_t *this_gen, vo_frame_t *frame_gen, uint32_t width, uint32_t height, int ratio_code, int format, int flags) { @@ -181,14 +181,14 @@ static void sdl_update_frame_format (vo_driver_t *this_gen, frame->overlay = NULL; } - if( format == IMGFMT_YV12 ) { + if( format == XINE_IMGFMT_YV12 ) { #ifdef SDL_LOG printf ("video_out_sdl: format YV12 "); #endif frame->overlay = SDL_CreateYUVOverlay (width, height, SDL_YV12_OVERLAY, this->surface); - } else if( format == IMGFMT_YUY2 ) { + } else if( format == XINE_IMGFMT_YUY2 ) { #ifdef SDL_LOG printf ("video_out_sdl: format YUY2 "); #endif @@ -219,12 +219,12 @@ static void sdl_update_frame_format (vo_driver_t *this_gen, /* * */ -static void sdl_overlay_blend (vo_driver_t *this_gen, vo_frame_t *frame_gen, vo_overlay_t *overlay) { +static void sdl_overlay_blend (xine_vo_driver_t *this_gen, vo_frame_t *frame_gen, vo_overlay_t *overlay) { sdl_frame_t *frame = (sdl_frame_t *) frame_gen; if (overlay->rle) { - if( frame->format == IMGFMT_YV12 ) + if( frame->format == XINE_IMGFMT_YV12 ) blend_yuv( frame->vo_frame.base, overlay, frame->width, frame->height); else blend_yuy2( frame->vo_frame.base[0], overlay, frame->width, frame->height); @@ -251,7 +251,7 @@ static void sdl_check_events (sdl_driver_t * this) } } -static int sdl_redraw_needed (vo_driver_t *this_gen) { +static int sdl_redraw_needed (xine_vo_driver_t *this_gen) { sdl_driver_t *this = (sdl_driver_t *) this_gen; int ret = 0; @@ -290,7 +290,7 @@ static int sdl_redraw_needed (vo_driver_t *this_gen) { } -static void sdl_display_frame (vo_driver_t *this_gen, vo_frame_t *frame_gen) { +static void sdl_display_frame (xine_vo_driver_t *this_gen, vo_frame_t *frame_gen) { sdl_driver_t *this = (sdl_driver_t *) this_gen; sdl_frame_t *frame = (sdl_frame_t *) frame_gen; @@ -331,7 +331,7 @@ static void sdl_display_frame (vo_driver_t *this_gen, vo_frame_t *frame_gen) { pthread_mutex_unlock(&this->mutex); } -static int sdl_get_property (vo_driver_t *this_gen, int property) { +static int sdl_get_property (xine_vo_driver_t *this_gen, int property) { sdl_driver_t *this = (sdl_driver_t *) this_gen; @@ -360,7 +360,7 @@ static int sdl_set_property (vo_driver_t *this_gen, return value; } -static void sdl_get_property_min_max (vo_driver_t *this_gen, +static void sdl_get_property_min_max (xine_vo_driver_t *this_gen, int property, int *min, int *max) { /* sdl_driver_t *this = (sdl_driver_t *) this_gen; */ @@ -377,9 +377,9 @@ static int sdl_gui_data_exchange (vo_driver_t *this_gen, switch (data_type) { - case GUI_DATA_EX_DRAWABLE_CHANGED: + case XINE_GUI_SEND_DRAWABLE_CHANGED: #ifdef SDL_LOG - printf ("video_out_sdl: GUI_DATA_EX_DRAWABLE_CHANGED\n"); + printf ("video_out_sdl: XINE_GUI_SEND_DRAWABLE_CHANGED\n"); #endif this->drawable = (Drawable) data; @@ -387,9 +387,9 @@ static int sdl_gui_data_exchange (vo_driver_t *this_gen, /* probably we need to close and reinitialize SDL */ break; - case GUI_DATA_EX_EXPOSE_EVENT: + case XINE_GUI_SEND_EXPOSE_EVENT: #ifdef SDL_LOG - printf ("video_out_sdl: GUI_DATA_EX_EXPOSE_EVENT\n"); + printf ("video_out_sdl: XINE_GUI_SEND_EXPOSE_EVENT\n"); #endif break; @@ -421,7 +421,7 @@ static int sdl_gui_data_exchange (vo_driver_t *this_gen, return ret; } -static void sdl_exit (vo_driver_t *this_gen) { +static void sdl_exit (xine_vo_driver_t *this_gen) { sdl_driver_t *this = (sdl_driver_t *) this_gen; @@ -429,7 +429,7 @@ static void sdl_exit (vo_driver_t *this_gen) { SDL_QuitSubSystem (SDL_INIT_VIDEO); } -vo_driver_t *init_video_out_plugin (config_values_t *config, void *visual_gen) { +xine_vo_driver_t *init_video_out_plugin (config_values_t *config, void *visual_gen) { sdl_driver_t *this; const SDL_VideoInfo * vidInfo; @@ -530,7 +530,7 @@ static vo_info_t vo_info_sdl = { 6, "sdl", NULL, - VISUAL_TYPE_X11, + XINE_VISUAL_TYPE_X11, 4 }; diff --git a/src/video_out/video_out_syncfb.c b/src/video_out/video_out_syncfb.c index e727dee77..7465dcf26 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.76 2002/08/16 22:51:39 miguelfreitas Exp $ + * $Id: video_out_syncfb.c,v 1.77 2002/09/04 23:31:12 guenter Exp $ * * video_out_syncfb.c, SyncFB (for Matrox G200/G400 cards) interface for xine * @@ -53,8 +53,8 @@ #include "video_out_syncfb.h" +#include "xine.h" #include "video_out.h" -#include "video_out_x11.h" #include "xine_internal.h" #include "alphablend.h" #include "xineutils.h" @@ -78,7 +78,7 @@ typedef struct { struct syncfb_driver_s { - vo_driver_t vo_driver; + xine_vo_driver_t vo_driver; config_values_t *config; @@ -263,14 +263,14 @@ static void write_frame_YUY2(syncfb_driver_t* this, syncfb_frame_t* frame) static void write_frame_sfb(syncfb_driver_t* this, syncfb_frame_t* frame) { switch(frame->format) { - case IMGFMT_YUY2: + case XINE_IMGFMT_YUY2: if(this->capabilities.palettes & (1<<VIDEO_PALETTE_YUV422)) write_frame_YUY2(this, frame); else printf("video_out_syncfb: error. (YUY2 not supported by your graphic card)\n"); break; - case IMGFMT_YV12: + case XINE_IMGFMT_YV12: switch(this->yuv_format) { case VIDEO_PALETTE_YUV422: write_frame_YUV422(this, frame); @@ -378,13 +378,13 @@ static void syncfb_compute_output_size(syncfb_driver_t *this) this->syncfb_config.syncfb_mode |= SYNCFB_FEATURE_DEINTERLACE; switch(this->cur_frame->format) { - case IMGFMT_YV12: + case XINE_IMGFMT_YV12: this->syncfb_config.src_palette = this->yuv_format; break; - case IMGFMT_YUY2: + case XINE_IMGFMT_YUY2: this->syncfb_config.src_palette = VIDEO_PALETTE_YUV422; break; - default: + default: printf("video_out_syncfb: error. (unknown frame format)\n"); this->syncfb_config.src_palette = 0; break; @@ -420,7 +420,7 @@ static void syncfb_compute_output_size(syncfb_driver_t *this) * public functions defined and used by the xine interface */ -static int syncfb_redraw_needed(vo_driver_t* this_gen) +static int syncfb_redraw_needed(xine_vo_driver_t* this_gen) { syncfb_driver_t* this = (syncfb_driver_t *) this_gen; @@ -438,7 +438,7 @@ static int syncfb_redraw_needed(vo_driver_t* this_gen) return ret; } -static uint32_t syncfb_get_capabilities (vo_driver_t *this_gen) +static uint32_t syncfb_get_capabilities (xine_vo_driver_t *this_gen) { syncfb_driver_t *this = (syncfb_driver_t *) this_gen; @@ -460,7 +460,7 @@ static void syncfb_frame_dispose(vo_frame_t* vo_img) } } -static vo_frame_t* syncfb_alloc_frame(vo_driver_t* this_gen) +static vo_frame_t* syncfb_alloc_frame(xine_vo_driver_t* this_gen) { syncfb_frame_t* frame; @@ -488,7 +488,7 @@ static vo_frame_t* syncfb_alloc_frame(vo_driver_t* this_gen) return (vo_frame_t *) frame; } -static void syncfb_update_frame_format(vo_driver_t* this_gen, +static void syncfb_update_frame_format(xine_vo_driver_t* this_gen, vo_frame_t* frame_gen, uint32_t width, uint32_t height, int ratio_code, int format, int flags) @@ -510,7 +510,7 @@ static void syncfb_update_frame_format(vo_driver_t* this_gen, frame->format = format; switch(format) { - case IMGFMT_YV12: + case XINE_IMGFMT_YV12: /* frame->vo_frame.base[0] = xine_xmalloc_aligned(16, frame_size, (void **)&frame->data_mem[0]); frame->vo_frame.base[1] = xine_xmalloc_aligned(16, frame_size/4, (void **)&frame->data_mem[1]); frame->vo_frame.base[2] = xine_xmalloc_aligned(16, frame_size/4, (void **)&frame->data_mem[2]);*/ @@ -521,21 +521,21 @@ static void syncfb_update_frame_format(vo_driver_t* this_gen, frame->vo_frame.base[1] = malloc(frame->vo_frame.pitches[1] * ((height+1)/2)); frame->vo_frame.base[2] = malloc(frame->vo_frame.pitches[2] * ((height+1)/2)); break; - case IMGFMT_YUY2: + case XINE_IMGFMT_YUY2: /* frame->vo_frame.base[0] = xine_xmalloc_aligned(16, (frame_size*2), (void **)&frame->data_mem[0]);*/ frame->vo_frame.pitches[0] = 8*((width + 3) / 4); frame->vo_frame.base[0] = malloc(frame->vo_frame.pitches[0] * height); frame->vo_frame.base[1] = NULL; frame->vo_frame.base[2] = NULL; break; - default: + default: printf("video_out_syncfb: error. (unable to allocate framedata because of unknown frame format: %04x)\n", format); } /* if((format == IMGFMT_YV12 && (frame->data_mem[0] == NULL || frame->data_mem[1] == NULL || frame->data_mem[2] == NULL)) || (format == IMGFMT_YUY2 && frame->data_mem[0] == NULL)) {*/ - if((format == IMGFMT_YV12 && (frame->vo_frame.base[0] == NULL || frame->vo_frame.base[1] == NULL || frame->vo_frame.base[2] == NULL)) - || (format == IMGFMT_YUY2 && frame->vo_frame.base[0] == NULL)) { + if((format == XINE_IMGFMT_YV12 && (frame->vo_frame.base[0] == NULL || frame->vo_frame.base[1] == NULL || frame->vo_frame.base[2] == NULL)) + || (format == XINE_IMGFMT_YUY2 && frame->vo_frame.base[0] == NULL)) { printf("video_out_syncfb: error. (framedata allocation failed: out of memory)\n"); free_framedata(frame); @@ -545,20 +545,20 @@ static void syncfb_update_frame_format(vo_driver_t* this_gen, frame->ratio_code = ratio_code; } -static void syncfb_overlay_blend(vo_driver_t* this_gen, vo_frame_t* frame_gen, vo_overlay_t* overlay) +static void syncfb_overlay_blend(xine_vo_driver_t* this_gen, vo_frame_t* frame_gen, vo_overlay_t* overlay) { syncfb_frame_t* frame = (syncfb_frame_t *) frame_gen; /* alpha blend here */ if(overlay->rle) { - if(frame->format == IMGFMT_YV12) + if(frame->format == XINE_IMGFMT_YV12) blend_yuv(frame->vo_frame.base, overlay, frame->width, frame->height); else blend_yuy2(frame->vo_frame.base[0], overlay, frame->width, frame->height); } } -static void syncfb_display_frame(vo_driver_t* this_gen, vo_frame_t* frame_gen) +static void syncfb_display_frame(xine_vo_driver_t* this_gen, vo_frame_t* frame_gen) { syncfb_driver_t* this = (syncfb_driver_t *) this_gen; syncfb_frame_t* frame = (syncfb_frame_t *) frame_gen; @@ -631,14 +631,14 @@ static void syncfb_display_frame(vo_driver_t* this_gen, vo_frame_t* frame_gen) this->bufinfo.id = -1; } -static int syncfb_get_property(vo_driver_t* this_gen, int property) +static int syncfb_get_property(xine_vo_driver_t* this_gen, int property) { syncfb_driver_t* this = (syncfb_driver_t *) this_gen; return this->props[property].value; } -static int syncfb_set_property(vo_driver_t* this_gen, int property, int value) +static int syncfb_set_property(xine_vo_driver_t* this_gen, int property, int value) { syncfb_driver_t* this = (syncfb_driver_t *) this_gen; @@ -745,7 +745,7 @@ static int syncfb_set_property(vo_driver_t* this_gen, int property, int value) return value; } -static void syncfb_get_property_min_max(vo_driver_t *this_gen, +static void syncfb_get_property_min_max(xine_vo_driver_t *this_gen, int property, int *min, int *max) { syncfb_driver_t* this = (syncfb_driver_t *) this_gen; @@ -760,7 +760,7 @@ static int syncfb_gui_data_exchange(vo_driver_t* this_gen, int data_type, syncfb_driver_t* this = (syncfb_driver_t *) this_gen; switch (data_type) { - case GUI_DATA_EX_DRAWABLE_CHANGED: + case XINE_GUI_SEND_DRAWABLE_CHANGED: this->drawable = (Drawable) data; this->gc = XCreateGC (this->display, this->drawable, 0, NULL); break; @@ -790,7 +790,7 @@ static int syncfb_gui_data_exchange(vo_driver_t* this_gen, int data_type, return 0; } -static void syncfb_exit(vo_driver_t *this_gen) +static void syncfb_exit(xine_vo_driver_t *this_gen) { syncfb_driver_t *this = (syncfb_driver_t *) this_gen; @@ -803,7 +803,7 @@ static void syncfb_exit(vo_driver_t *this_gen) close(this->fd); } -vo_driver_t *init_video_out_plugin(config_values_t *config, void *visual_gen) +xine_vo_driver_t *init_video_out_plugin(config_values_t *config, void *visual_gen) { syncfb_driver_t* this; Display* display = NULL; @@ -815,7 +815,8 @@ vo_driver_t *init_video_out_plugin(config_values_t *config, void *visual_gen) display = visual->display; device_name = config->register_string(config, "video.syncfb_device", "/dev/syncfb", - _("syncfb (teletux) device node"), NULL, NULL, NULL); + _("syncfb (teletux) device node"), + NULL, 10, NULL, NULL); if(!(this = xine_xmalloc(sizeof (syncfb_driver_t)))) { printf("video_out_syncfb: aborting. (allocation of syncfb_driver_t failed: out of memory)\n"); @@ -938,7 +939,10 @@ vo_driver_t *init_video_out_plugin(config_values_t *config, void *visual_gen) /* FIXME: setting the default_repeat to anything higher than 1 will result in a distorted video, so for now, set this manually to 0 until the kernel driver is fixed... */ - this->default_repeat = config->register_range(config, "video.syncfb_default_repeat", 3, 1, 4, "default frame repeat for SyncFB", NULL, NULL, NULL); + this->default_repeat = config->register_range(config, + "video.syncfb_default_repeat", 3, 1, 4, + "default frame repeat for SyncFB", NULL, + 0, NULL, NULL); this->default_repeat = 0; this->display = visual->display; @@ -978,7 +982,7 @@ static vo_info_t vo_info_syncfb = { 6, "SyncFB", NULL, - VISUAL_TYPE_X11, + XINE_VISUAL_TYPE_X11, 10 }; @@ -986,3 +990,5 @@ vo_info_t *get_video_out_plugin_info() { vo_info_syncfb.description = _("xine video output plugin using the SyncFB module for Matrox G200/G400 cards"); return &vo_info_syncfb; } + + diff --git a/src/video_out/video_out_vidix.c b/src/video_out/video_out_vidix.c index a610705b6..9262f14b0 100644 --- a/src/video_out/video_out_vidix.c +++ b/src/video_out/video_out_vidix.c @@ -1,7 +1,7 @@ /* - * Copyright (C) 2000, 2001 the xine project + * Copyright (C) 2000-2002 the xine project * - * This file is part of xine, a unix video player. + * This file is part of xine, a free video player. * * xine is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -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.10 2002/09/02 19:58:47 f1rmb Exp $ + * $Id: video_out_vidix.c,v 1.11 2002/09/04 23:31:12 guenter Exp $ * * video_out_vidix.c * @@ -33,6 +33,9 @@ #include "config.h" #endif +#warning DISABLED: FIXME +#if 0 + #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -741,3 +744,4 @@ vo_info_t *get_video_out_plugin_info() { return &vo_info_vidix; } +#endif diff --git a/src/video_out/video_out_x11.h b/src/video_out/video_out_x11.h deleted file mode 100644 index 16d687277..000000000 --- a/src/video_out/video_out_x11.h +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Copyright (C) 2000-2002 the xine project - * - * This file is part of xine, a free video player. - * - * xine is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * xine is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * 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_x11.h,v 1.15 2002/03/21 18:29:51 miguelfreitas Exp $ - * - * structs and defines specific to all x11 related output plugins - * (any x11 base xine ui should include this) - */ - -#ifndef HAVE_VIDEO_OUT_X11_H -#define HAVE_VIDEO_OUT_X11_H - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct { - - /* area of that drawable to be used by video */ - int x,y,w,h; - -} x11_rectangle_t; - -/* - * this is the visual data struct any x11 gui should supply - * (pass this to init_video_out_plugin or the xine_load_video_output_plugin - * utility function) - */ - -typedef struct { - - /* some information about the display */ - Display *display; - int screen; - double display_ratio; - - /* drawable to display the video in/on */ - Drawable d; - - void *user_data; - - /* - * dest size callback - * - * this will be called by the video driver to find out - * how big the video output area size will be for a - * given video size. The ui should _not_ adjust it's - * video out area, just do some calculations and return - * the size. This will be called for every frame, ui - * implementation should be fast. - */ - void (*dest_size_cb) (void *user_data, - int video_width, int video_height, - int *dest_width, int *dest_height); - - /* - * frame output callback - * - * this will be called by the video driver for every frame - * it's about to draw. ui can adapt it's size if necessary - * here. - * note: the ui doesn't have to adjust itself to this - * size, this is just to be taken as a hint. - * ui must return the actual size of the video output - * area and the video output driver will do it's best - * to adjust the video frames to that size (while - * preserving aspect ration and stuff). - * dest_x, dest_y: offset inside window - * dest_width, dest_height: available drawing space - * win_x, win_y: window absolute screen position - */ - - void (*frame_output_cb) (void *user_data, - int video_width, int video_height, - int *dest_x, int *dest_y, - int *dest_width, int *dest_height, - int *win_x, int *win_y); - -} x11_visual_t; - -/* - * constants for gui_data_exchange's data_type parameter - */ - -/* xevent *data */ -#define GUI_DATA_EX_COMPLETION_EVENT 1 -/* Drawable has changed */ -#define GUI_DATA_EX_DRAWABLE_CHANGED 2 -/* xevent *data */ -#define GUI_DATA_EX_EXPOSE_EVENT 3 -/* x11_rectangle_t *data */ -#define GUI_DATA_EX_TRANSLATE_GUI_TO_VIDEO 4 -/* int *data */ -#define GUI_DATA_EX_VIDEOWIN_VISIBLE 5 - -/* *data contains chosen visual, select a new one or change it to NULL - * to indicate the visual to use or that no visual will work */ -/* XVisualInfo **data */ -#define GUI_SELECT_VISUAL 8 - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/src/video_out/video_out_xshm.c b/src/video_out/video_out_xshm.c index f9b0b32ab..f202d6d95 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.86 2002/08/28 14:20:10 miguelfreitas Exp $ + * $Id: video_out_xshm.c,v 1.87 2002/09/04 23:31:12 guenter Exp $ * * video_out_xshm.c, X11 shared memory extension interface for xine * @@ -37,6 +37,7 @@ #include <string.h> #include <math.h> +#include "xine.h" #include "video_out.h" #include <X11/Xlib.h> @@ -54,7 +55,6 @@ #include <netinet/in.h> #include "xine_internal.h" -#include "video_out_x11.h" #include "alphablend.h" #include "yuv2rgb.h" #include "xineutils.h" @@ -90,7 +90,7 @@ typedef struct xshm_frame_s { typedef struct xshm_driver_s { - vo_driver_t vo_driver; + xine_vo_driver_t vo_driver; config_values_t *config; @@ -296,7 +296,7 @@ static void dispose_ximage (xshm_driver_t *this, * and now, the driver functions */ -static uint32_t xshm_get_capabilities (vo_driver_t *this_gen) { +static uint32_t xshm_get_capabilities (xine_vo_driver_t *this_gen) { return VO_CAP_COPIES_IMAGE | VO_CAP_YV12 | VO_CAP_YUY2 | VO_CAP_BRIGHTNESS; } @@ -308,7 +308,7 @@ static void xshm_frame_copy (vo_frame_t *vo_img, uint8_t **src) { printf ("video_out_xshm: copy... (format %d)\n", frame->format); #endif - if (frame->format == IMGFMT_YV12) { + if (frame->format == XINE_IMGFMT_YV12) { frame->yuv2rgb->yuv2rgb_fun (frame->yuv2rgb, frame->rgb_dst, src[0], src[1], src[2]); } else { @@ -360,7 +360,7 @@ static void xshm_frame_dispose (vo_frame_t *vo_img) { } -static vo_frame_t *xshm_alloc_frame (vo_driver_t *this_gen) { +static vo_frame_t *xshm_alloc_frame (xine_vo_driver_t *this_gen) { xshm_frame_t *frame ; xshm_driver_t *this = (xshm_driver_t *) this_gen; @@ -422,7 +422,7 @@ static void xshm_compute_rgb_size (xshm_driver_t *this, xshm_frame_t *frame) { #endif } -static void xshm_update_frame_format (vo_driver_t *this_gen, +static void xshm_update_frame_format (xine_vo_driver_t *this_gen, vo_frame_t *frame_gen, uint32_t width, uint32_t height, int ratio_code, int format, int flags) { @@ -521,7 +521,7 @@ static void xshm_update_frame_format (vo_driver_t *this_gen, XUnlockDisplay (this->display); - if (format == IMGFMT_YV12) { + if (format == XINE_IMGFMT_YV12) { frame->vo_frame.pitches[0] = 8*((width + 7) / 8); frame->vo_frame.pitches[1] = 8*((width + 15) / 16); frame->vo_frame.pitches[2] = 8*((width + 15) / 16); @@ -597,7 +597,7 @@ static void xshm_overlay_clut_yuv2rgb(xshm_driver_t *this, vo_overlay_t *overla } } -static void xshm_overlay_blend (vo_driver_t *this_gen, vo_frame_t *frame_gen, vo_overlay_t *overlay) { +static void xshm_overlay_blend (xine_vo_driver_t *this_gen, vo_frame_t *frame_gen, vo_overlay_t *overlay) { xshm_driver_t *this = (xshm_driver_t *) this_gen; xshm_frame_t *frame = (xshm_frame_t *) frame_gen; @@ -649,7 +649,7 @@ static void clean_output_area (xshm_driver_t *this, xshm_frame_t *frame) { XUnlockDisplay (this->display); } -static int xshm_redraw_needed (vo_driver_t *this_gen) { +static int xshm_redraw_needed (xine_vo_driver_t *this_gen) { xshm_driver_t *this = (xshm_driver_t *) this_gen; int ret = 0; @@ -669,7 +669,7 @@ static int xshm_redraw_needed (vo_driver_t *this_gen) { return ret; } -static void xshm_display_frame (vo_driver_t *this_gen, vo_frame_t *frame_gen) { +static void xshm_display_frame (xine_vo_driver_t *this_gen, vo_frame_t *frame_gen) { xshm_driver_t *this = (xshm_driver_t *) this_gen; xshm_frame_t *frame = (xshm_frame_t *) frame_gen; @@ -759,7 +759,7 @@ static void xshm_display_frame (vo_driver_t *this_gen, vo_frame_t *frame_gen) { #endif } -static int xshm_get_property (vo_driver_t *this_gen, int property) { +static int xshm_get_property (xine_vo_driver_t *this_gen, int property) { xshm_driver_t *this = (xshm_driver_t *) this_gen; @@ -807,7 +807,7 @@ static int xshm_set_property (vo_driver_t *this_gen, return value; } -static void xshm_get_property_min_max (vo_driver_t *this_gen, +static void xshm_get_property_min_max (xine_vo_driver_t *this_gen, int property, int *min, int *max) { /* xshm_driver_t *this = (xshm_driver_t *) this_gen; */ @@ -826,7 +826,7 @@ static int xshm_gui_data_exchange (vo_driver_t *this_gen, xshm_driver_t *this = (xshm_driver_t *) this_gen; switch (data_type) { - case GUI_DATA_EX_COMPLETION_EVENT: { + case XINE_GUI_SEND_COMPLETION_EVENT: { XShmCompletionEvent *cev = (XShmCompletionEvent *) data; @@ -844,7 +844,7 @@ static int xshm_gui_data_exchange (vo_driver_t *this_gen, } break; - case GUI_DATA_EX_EXPOSE_EVENT: + case XINE_GUI_SEND_EXPOSE_EVENT: /* FIXME : take care of completion events */ #ifdef LOG @@ -894,7 +894,7 @@ static int xshm_gui_data_exchange (vo_driver_t *this_gen, break; - case GUI_DATA_EX_DRAWABLE_CHANGED: + case XINE_GUI_SEND_DRAWABLE_CHANGED: this->drawable = (Drawable) data; XFreeGC(this->display, this->gc); @@ -902,7 +902,7 @@ static int xshm_gui_data_exchange (vo_driver_t *this_gen, break; - case GUI_DATA_EX_TRANSLATE_GUI_TO_VIDEO: + case XINE_GUI_SEND_TRANSLATE_GUI_TO_VIDEO: if (this->cur_frame) { @@ -930,7 +930,7 @@ static int xshm_gui_data_exchange (vo_driver_t *this_gen, return 0; } -static void xshm_exit (vo_driver_t *this_gen) { +static void xshm_exit (xine_vo_driver_t *this_gen) { xshm_driver_t *this = (xshm_driver_t *) this_gen; @@ -996,7 +996,7 @@ static char *visual_class_name(Visual *visual) { } } -vo_driver_t *init_video_out_plugin (config_values_t *config, void *visual_gen) { +xine_vo_driver_t *init_video_out_plugin (config_values_t *config, void *visual_gen) { xshm_driver_t *this; x11_visual_t *visual = (x11_visual_t *) visual_gen; @@ -1038,7 +1038,7 @@ vo_driver_t *init_video_out_plugin (config_values_t *config, void *visual_gen) { this->sc.scaling_disabled = config->register_bool (config, "video.disable_scaling", 0, _("disable all video scaling (faster!)"), - NULL, NULL, NULL); + NULL, 10, NULL, NULL); this->drawable = visual->d; this->expecting_event = 0; this->cur_frame = NULL; @@ -1185,7 +1185,7 @@ vo_driver_t *init_video_out_plugin (config_values_t *config, void *visual_gen) { this->yuv2rgb_gamma = config->register_range (config, "video.xshm_gamma", 0, -100, 100, _("gamma correction for XShm driver"), - NULL, NULL, NULL); + NULL, 0, NULL, NULL); this->yuv2rgb_factory = yuv2rgb_factory_init (mode, swapped, this->yuv2rgb_cmap); @@ -1198,7 +1198,7 @@ static vo_info_t vo_info_shm = { 6, /* interface version */ "XShm", /* id */ NULL, - VISUAL_TYPE_X11, /* visual_type */ + XINE_VISUAL_TYPE_X11, /* visual_type */ 6 }; @@ -1207,3 +1207,4 @@ vo_info_t *get_video_out_plugin_info() { return &vo_info_shm; } + diff --git a/src/video_out/video_out_xv.c b/src/video_out/video_out_xv.c index 56c729217..015c18757 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.128 2002/08/19 13:06:37 miguelfreitas Exp $ + * $Id: video_out_xv.c,v 1.129 2002/09/04 23:31:12 guenter Exp $ * * video_out_xv.c, X11 video extension interface for xine * @@ -41,6 +41,7 @@ #include <stdlib.h> #include <string.h> #include <math.h> +#include <assert.h> #if defined(__FreeBSD__) #include <machine/param.h> @@ -57,8 +58,8 @@ #include <X11/extensions/Xv.h> #include <X11/extensions/Xvlib.h> +#include "xine.h" #include "video_out.h" -#include "video_out_x11.h" #include "xine_internal.h" /* #include "overlay.h" */ #include "alphablend.h" @@ -97,7 +98,7 @@ typedef struct { struct xv_driver_s { - vo_driver_t vo_driver; + xine_vo_driver_t vo_driver; config_values_t *config; @@ -113,7 +114,6 @@ struct xv_driver_s { XColor black; int expecting_event; /* completion event handling */ int use_shm; - xv_property_t props[VO_NUM_PROPERTIES]; uint32_t capabilities; @@ -138,7 +138,7 @@ struct xv_driver_s { int gX11Fail; -static uint32_t xv_get_capabilities (vo_driver_t *this_gen) { +static uint32_t xv_get_capabilities (xine_vo_driver_t *this_gen) { xv_driver_t *this = (xv_driver_t *) this_gen; @@ -175,7 +175,7 @@ static void xv_frame_dispose (vo_frame_t *vo_img) { free (frame); } -static vo_frame_t *xv_alloc_frame (vo_driver_t *this_gen) { +static vo_frame_t *xv_alloc_frame (xine_vo_driver_t *this_gen) { xv_frame_t *frame ; @@ -234,10 +234,10 @@ static XvImage *create_ximage (xv_driver_t *this, XShmSegmentInfo *shminfo, XvImage *image=NULL; switch (format) { - case IMGFMT_YV12: + case XINE_IMGFMT_YV12: xv_format = this->xv_format_yv12; break; - case IMGFMT_YUY2: + case XINE_IMGFMT_YUY2: xv_format = this->xv_format_yuy2; break; default: @@ -337,10 +337,10 @@ static XvImage *create_ximage (xv_driver_t *this, XShmSegmentInfo *shminfo, char *data; switch (format) { - case IMGFMT_YV12: + case XINE_IMGFMT_YV12: data = malloc (width * height * 3/2); break; - case IMGFMT_YUY2: + case XINE_IMGFMT_YUY2: data = malloc (width * height * 2); break; default: @@ -375,7 +375,7 @@ static void dispose_ximage (xv_driver_t *this, } } -static void xv_update_frame_format (vo_driver_t *this_gen, +static void xv_update_frame_format (xine_vo_driver_t *this_gen, vo_frame_t *frame_gen, uint32_t width, uint32_t height, int ratio_code, int format, int flags) { @@ -561,14 +561,14 @@ static void xv_compute_output_size (xv_driver_t *this) { /* onefield_xv divide by 2 the number of lines */ if (this->deinterlace_enabled - && (this->deinterlace_method == DEINTERLACE_ONEFIELDXV) - && (this->cur_frame->format == IMGFMT_YV12)) { + && (this->deinterlace_method == DEINTERLACE_ONEFIELDXV) + && (this->cur_frame->format == XINE_IMGFMT_YV12)) { this->sc.displayed_height = this->sc.displayed_height / 2; this->sc.displayed_yoffset = this->sc.displayed_yoffset / 2; } } -static void xv_overlay_blend (vo_driver_t *this_gen, vo_frame_t *frame_gen, vo_overlay_t *overlay) { +static void xv_overlay_blend (xine_vo_driver_t *this_gen, vo_frame_t *frame_gen, vo_overlay_t *overlay) { xv_frame_t *frame = (xv_frame_t *) frame_gen; @@ -577,7 +577,7 @@ static void xv_overlay_blend (vo_driver_t *this_gen, vo_frame_t *frame_gen, vo_o */ if (overlay->rle) { - if( frame->format == IMGFMT_YV12 ) + if (frame->format == XINE_IMGFMT_YV12) blend_yuv( frame->vo_frame.base, overlay, frame->width, frame->height); else blend_yuy2( frame->vo_frame.base[0], overlay, frame->width, frame->height); @@ -614,10 +614,10 @@ static void xv_flush_recent_frames (xv_driver_t *this) { } #endif -static int xv_redraw_needed (vo_driver_t *this_gen) { +static int xv_redraw_needed (xine_vo_driver_t *this_gen) { xv_driver_t *this = (xv_driver_t *) this_gen; int ret = 0; - + if( vo_scale_redraw_needed( &this->sc ) ) { xv_compute_output_size (this); @@ -630,7 +630,7 @@ static int xv_redraw_needed (vo_driver_t *this_gen) { return ret; } -static void xv_display_frame (vo_driver_t *this_gen, vo_frame_t *frame_gen) { +static void xv_display_frame (xine_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; @@ -661,7 +661,7 @@ static void xv_display_frame (vo_driver_t *this_gen, vo_frame_t *frame_gen) { */ if (this->deinterlace_enabled && this->deinterlace_method - && frame->format == IMGFMT_YV12) + && frame->format == XINE_IMGFMT_YV12) xv_deinterlace_frame (this); /* @@ -721,24 +721,25 @@ static void xv_display_frame (vo_driver_t *this_gen, vo_frame_t *frame_gen) { */ } -static int xv_get_property (vo_driver_t *this_gen, int property) { +static int xv_get_property (xine_vo_driver_t *this_gen, int property) { xv_driver_t *this = (xv_driver_t *) this_gen; return this->props[property].value; } -static void xv_property_callback (void *property_gen, cfg_entry_t *entry) { +static void xv_property_callback (void *property_gen, xine_cfg_entry_t *entry) { xv_property_t *property = (xv_property_t *) property_gen; xv_driver_t *this = property->this; XvSetPortAttribute (this->display, this->xv_port, - property->atom, entry->num_value); + property->atom, + entry->num_value); } -static int xv_set_property (vo_driver_t *this_gen, +static int xv_set_property (xine_vo_driver_t *this_gen, int property, int value) { xv_driver_t *this = (xv_driver_t *) this_gen; @@ -814,7 +815,7 @@ static int xv_set_property (vo_driver_t *this_gen, return value; } -static void xv_get_property_min_max (vo_driver_t *this_gen, +static void xv_get_property_min_max (xine_vo_driver_t *this_gen, int property, int *min, int *max) { xv_driver_t *this = (xv_driver_t *) this_gen; @@ -823,13 +824,13 @@ static void xv_get_property_min_max (vo_driver_t *this_gen, *max = this->props[property].max; } -static int xv_gui_data_exchange (vo_driver_t *this_gen, +static int xv_gui_data_exchange (xine_vo_driver_t *this_gen, int data_type, void *data) { xv_driver_t *this = (xv_driver_t *) this_gen; switch (data_type) { - case GUI_DATA_EX_COMPLETION_EVENT: { + case XINE_GUI_SEND_COMPLETION_EVENT: { XShmCompletionEvent *cev = (XShmCompletionEvent *) data; @@ -841,7 +842,7 @@ static int xv_gui_data_exchange (vo_driver_t *this_gen, } break; - case GUI_DATA_EX_EXPOSE_EVENT: { + case XINE_GUI_SEND_EXPOSE_EVENT: { /* XExposeEvent * xev = (XExposeEvent *) data; */ @@ -884,12 +885,12 @@ static int xv_gui_data_exchange (vo_driver_t *this_gen, } break; - case GUI_DATA_EX_DRAWABLE_CHANGED: + case XINE_GUI_SEND_DRAWABLE_CHANGED: this->drawable = (Drawable) data; this->gc = XCreateGC (this->display, this->drawable, 0, NULL); break; - case GUI_DATA_EX_TRANSLATE_GUI_TO_VIDEO: + case XINE_GUI_SEND_TRANSLATE_GUI_TO_VIDEO: { int x1, y1, x2, y2; x11_rectangle_t *rect = data; @@ -906,7 +907,7 @@ static int xv_gui_data_exchange (vo_driver_t *this_gen, /* onefield_xv divide by 2 the number of lines */ if (this->deinterlace_enabled && (this->deinterlace_method == DEINTERLACE_ONEFIELDXV) - && (this->cur_frame->format == IMGFMT_YV12)) { + && (this->cur_frame->format == XINE_IMGFMT_YV12)) { rect->y = rect->y * 2; rect->h = rect->h * 2; } @@ -921,7 +922,7 @@ static int xv_gui_data_exchange (vo_driver_t *this_gen, return 0; } -static void xv_exit (vo_driver_t *this_gen) { +static void xv_exit (xine_vo_driver_t *this_gen) { xv_driver_t *this = (xv_driver_t *) this_gen; int i; @@ -956,7 +957,7 @@ static int xv_check_yv12 (Display *display, XvPortID port) { formatValues = XvListImageFormats (display, port, &formats); for (i = 0; i < formats; i++) - if ((formatValues[i].id == IMGFMT_YV12) && + if ((formatValues[i].id == XINE_IMGFMT_YV12) && (! (strcmp (formatValues[i].guid, "YV12")))) { XFree (formatValues); return 0; @@ -997,13 +998,13 @@ static void xv_check_capability (xv_driver_t *this, 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]); + NULL, 10, 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]); + NULL, 10, xv_property_callback, &this->props[property]); } entry = this->config->lookup_entry (this->config, this->scratch); @@ -1018,15 +1019,13 @@ static void xv_check_capability (xv_driver_t *this, } } -static void xv_update_deinterlace(void *this_gen, cfg_entry_t *entry) -{ +static void xv_update_deinterlace(void *this_gen, xine_cfg_entry_t *entry) { xv_driver_t *this = (xv_driver_t *) this_gen; this->deinterlace_method = entry->num_value; } -static void xv_update_XV_FILTER(void *this_gen, cfg_entry_t *entry) -{ +static void xv_update_XV_FILTER(void *this_gen, xine_cfg_entry_t *entry) { xv_driver_t *this = (xv_driver_t *) this_gen; Atom atom; int xv_filter; @@ -1039,8 +1038,7 @@ static void xv_update_XV_FILTER(void *this_gen, cfg_entry_t *entry) printf("video_out_xv: bilinear scaling mode (XV_FILTER) = %d\n",xv_filter); } -static void xv_update_XV_DOUBLE_BUFFER(void *this_gen, cfg_entry_t *entry) -{ +static void xv_update_XV_DOUBLE_BUFFER(void *this_gen, xine_cfg_entry_t *entry) { xv_driver_t *this = (xv_driver_t *) this_gen; Atom atom; int xv_double_buffer; @@ -1054,8 +1052,9 @@ static void xv_update_XV_DOUBLE_BUFFER(void *this_gen, cfg_entry_t *entry) } -vo_driver_t *init_video_out_plugin (config_values_t *config, void *visual_gen) { +void *init_video_out_plugin (xine_t *xine, void *visual_gen) { + config_values_t *config = xine->config; xv_driver_t *this; Display *display = NULL; unsigned int adaptor_num, adaptors, i, j, formats; @@ -1141,7 +1140,7 @@ vo_driver_t *init_video_out_plugin (config_values_t *config, void *visual_gen) { this->overlay = NULL; this->screen = visual->screen; - vo_scale_init( &this->sc, visual->display_ratio, 1, 0 ); + vo_scale_init (&this->sc, 1.0 /* FIXME */, 1, 0 ); this->sc.frame_output_cb = visual->frame_output_cb; this->sc.user_data = visual->user_data; @@ -1239,13 +1238,13 @@ vo_driver_t *init_video_out_plugin (config_values_t *config, void *visual_gen) { xv_filter = config->register_range (config, "video.XV_FILTER", 0, attr[k].min_value, attr[k].max_value, _("bilinear scaling mode (permedia 2/3)"), - NULL, xv_update_XV_FILTER, this); + NULL, 10, xv_update_XV_FILTER, this); config->update_num(config,"video.XV_FILTER",xv_filter); } else if(!strcmp(attr[k].name, "XV_DOUBLE_BUFFER")) { int xv_double_buffer; xv_double_buffer = config->register_bool (config, "video.XV_DOUBLE_BUFFER", 1, _("double buffer to sync video to the retrace"), - NULL, xv_update_XV_DOUBLE_BUFFER, this); + NULL, 10, xv_update_XV_DOUBLE_BUFFER, this); config->update_num(config,"video.XV_DOUBLE_BUFFER",xv_double_buffer); } } @@ -1272,11 +1271,11 @@ vo_driver_t *init_video_out_plugin (config_values_t *config, void *visual_gen) { fo[i].id, (char*)&fo[i].id, (fo[i].format == XvPacked) ? "packed" : "planar"); #endif - if (fo[i].id == IMGFMT_YV12) { + if (fo[i].id == XINE_IMGFMT_YV12) { this->xv_format_yv12 = fo[i].id; this->capabilities |= VO_CAP_YV12; printf("video_out_xv: this adaptor supports the yv12 format.\n"); - } else if (fo[i].id == IMGFMT_YUY2) { + } else if (fo[i].id == XINE_IMGFMT_YUY2) { this->xv_format_yuy2 = fo[i].id; this->capabilities |= VO_CAP_YUY2; printf("video_out_xv: this adaptor supports the yuy2 format.\n"); @@ -1288,24 +1287,22 @@ vo_driver_t *init_video_out_plugin (config_values_t *config, void *visual_gen) { * to find out if MIT shm really works, using supported format */ myimage = create_ximage (this, &myshminfo, 100, 100, - (this->xv_format_yv12 != 0) ? IMGFMT_YV12 : IMGFMT_YUY2); + (this->xv_format_yv12 != 0) ? XINE_IMGFMT_YV12 : XINE_IMGFMT_YUY2); dispose_ximage (this, &myshminfo, myimage); this->deinterlace_method = config->register_enum (config, "video.deinterlace_method", 4, deinterlace_methods, _("Software deinterlace method (Key I toggles deinterlacer on/off)"), - NULL, xv_update_deinterlace, this); + NULL, 10, xv_update_deinterlace, this); this->deinterlace_enabled = 0; return &this->vo_driver; } static vo_info_t vo_info_xv = { - 6, - "Xv", - NULL, - VISUAL_TYPE_X11, - 9 + 5, /* priority */ + "xine video output plugin using the MIT X video extension", /* description */ + XINE_VISUAL_TYPE_X11 /* visual type */ }; vo_info_t *get_video_out_plugin_info() { @@ -1313,4 +1310,17 @@ vo_info_t *get_video_out_plugin_info() { return &vo_info_xv; } +/* + * exported plugin catalog entry + */ + +plugin_info_t xine_plugin_info[] = { + /* type, API, "name", version, special_info, init_function */ + { PLUGIN_VIDEO_OUT, 9, "xv", XINE_VERSION_CODE, &vo_info_xv, init_video_out_plugin }, + { PLUGIN_NONE, 0, "", 0, NULL, NULL } +}; + + #endif + + |