diff options
Diffstat (limited to 'src/video_out')
| -rw-r--r-- | src/video_out/video_out_caca.c | 10 | ||||
| -rw-r--r-- | src/video_out/video_out_directx.c | 10 | ||||
| -rw-r--r-- | src/video_out/video_out_raw.c | 6 | ||||
| -rw-r--r-- | src/video_out/video_out_sdl.c | 16 | ||||
| -rw-r--r-- | src/video_out/video_out_xv.c | 2 | ||||
| -rw-r--r-- | src/video_out/video_out_xvmc.c | 2 | ||||
| -rw-r--r-- | src/video_out/video_out_xxmc.c | 7 |
7 files changed, 36 insertions, 17 deletions
diff --git a/src/video_out/video_out_caca.c b/src/video_out/video_out_caca.c index 084b43a7a..e995cead4 100644 --- a/src/video_out/video_out_caca.c +++ b/src/video_out/video_out_caca.c @@ -262,6 +262,7 @@ static int caca_redraw_needed (vo_driver_t *this_gen) { static vo_driver_t *open_plugin (video_driver_class_t *class_gen, const void *visual_gen) { caca_class_t *class = (caca_class_t *) class_gen; + caca_display_t *dp = (caca_display_t *)visual_gen; caca_driver_t *this; this = calloc(1, sizeof (caca_driver_t)); @@ -286,8 +287,13 @@ static vo_driver_t *open_plugin (video_driver_class_t *class_gen, const void *vi this->yuv2rgb_factory = yuv2rgb_factory_init(MODE_32_RGB, 0, NULL); this->yuv2rgb_factory->set_csc_levels(this->yuv2rgb_factory, 0, 128, 128); - this->cv = cucul_create_canvas(0, 0); - this->dp = caca_create_display(this->cv); + if (dp) { + this->cv = caca_get_canvas(dp); + this->dp = dp; + } else { + this->cv = cucul_create_canvas(0, 0); + this->dp = caca_create_display(this->cv); + } caca_refresh_display(this->dp); return &this->vo_driver; diff --git a/src/video_out/video_out_directx.c b/src/video_out/video_out_directx.c index 7c63f93e9..9570135b0 100644 --- a/src/video_out/video_out_directx.c +++ b/src/video_out/video_out_directx.c @@ -117,7 +117,7 @@ typedef struct { yuv2rgb_t *yuv2rgb; /* used for format conversion */ int mode; /* rgb mode */ int bytespp; /* rgb bits per pixel */ - + DDPIXELFORMAT primary_pixel_format; alphablend_t alphablend_extra_data; } win32_driver_t; @@ -367,8 +367,9 @@ static boolean CreateSecondary( win32_driver_t * win32_driver, int width, int he lprintf("CreateSecondary() - Falling back to back buffer same as primary\n"); lprintf("CreateSecondary() - act_format = (NATIVE) %d\n", IMGFMT_NATIVE); - ddsd.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT; + ddsd.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT | DDSD_PIXELFORMAT; ddsd.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY; + ddsd.ddpfPixelFormat = win32_driver->primary_pixel_format; win32_driver->act_format = IMGFMT_NATIVE; if( IDirectDraw_CreateSurface( win32_driver->ddobj, &ddsd, &win32_driver->secondary, 0 ) == DD_OK ) @@ -429,6 +430,10 @@ static boolean CheckPixelFormat( win32_driver_t * win32_driver ) Error( 0, "IDirectDrawSurface_GetPixelFormat ( CheckPixelFormat ) : error 0x%lx", result ); return 0; } + + /* store pixel format for CreateSecondary */ + + win32_driver->primary_pixel_format = ddpf; /* TODO : support paletized video modes */ @@ -478,6 +483,7 @@ static boolean CheckPixelFormat( win32_driver_t * win32_driver ) win32_driver->mode = MODE_15_BGR; } + lprintf("win32 mode: %u\n", win32_driver->mode); return TRUE; } diff --git a/src/video_out/video_out_raw.c b/src/video_out/video_out_raw.c index e6961c4a7..ad7c783ef 100644 --- a/src/video_out/video_out_raw.c +++ b/src/video_out/video_out_raw.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007 the xine project + * Copyright (C) 2007-2008 the xine project * * This file is part of xine, a free video player. * @@ -215,7 +215,7 @@ static void raw_overlay_end (vo_driver_t *this_gen, vo_frame_t *vo_img) if ( !this->ovl_changed ) return; - this->raw_overlay_cb( this->user_data, this->ovl_changed-1, &this->overlays ); + this->raw_overlay_cb( this->user_data, this->ovl_changed-1, this->overlays ); this->ovl_changed = 0; } @@ -475,7 +475,7 @@ static int raw_gui_data_exchange (vo_driver_t *this_gen, int data_type, void *da static uint32_t raw_get_capabilities (vo_driver_t *this_gen) { - uint32_t capabilities = VO_CAP_YV12 | VO_CAP_YUY2; + uint32_t capabilities = VO_CAP_YV12 | VO_CAP_YUY2 | VO_CAP_CROP; return capabilities; } diff --git a/src/video_out/video_out_sdl.c b/src/video_out/video_out_sdl.c index b96a4ba23..32c0c41cf 100644 --- a/src/video_out/video_out_sdl.c +++ b/src/video_out/video_out_sdl.c @@ -469,9 +469,11 @@ static vo_driver_t *open_plugin (video_driver_class_t *class_gen, const void *vi sdl_driver_t *this; const SDL_VideoInfo *vidInfo; -#ifdef HAVE_X11 +#if defined(HAVE_X11) || defined(WIN32) static char SDL_windowhack[32]; x11_visual_t *visual = (x11_visual_t *) visual_gen; +#endif +#ifdef HAVE_X11 XWindowAttributes window_attributes; #endif @@ -502,14 +504,18 @@ static vo_driver_t *open_plugin (video_driver_class_t *class_gen, const void *vi _x_vo_scale_init( &this->sc, 0, 0, config); this->sc.frame_output_cb = visual->frame_output_cb; this->sc.user_data = visual->user_data; - - /* set SDL to use our existing X11 window */ - sprintf(SDL_windowhack,"SDL_WINDOWID=0x%x", (uint32_t) this->drawable ); - putenv(SDL_windowhack); #else _x_vo_scale_init( &this->sc, 0, 0, config ); #endif +#if defined(HAVE_X11) || defined(WIN32) + /* set SDL to use our existing X11/win32 window */ + if (visual->d){ + sprintf(SDL_windowhack,"SDL_WINDOWID=0x%x", (uint32_t) visual->d); + putenv(SDL_windowhack); + } +#endif + if ((SDL_Init (SDL_INIT_VIDEO)) < 0) { xprintf (this->xine, XINE_VERBOSITY_DEBUG, "video_out_sdl: open_plugin - sdl video initialization failed.\n"); return NULL; diff --git a/src/video_out/video_out_xv.c b/src/video_out/video_out_xv.c index c78200077..5d53fa95b 100644 --- a/src/video_out/video_out_xv.c +++ b/src/video_out/video_out_xv.c @@ -939,7 +939,7 @@ static int xv_gui_data_exchange (vo_driver_t *this_gen, return 0; } -static void xv_store_port_attribute(xv_driver_t *this, char *name) { +static void xv_store_port_attribute(xv_driver_t *this, const char *name) { Atom atom; xv_portattribute_t *attr; diff --git a/src/video_out/video_out_xvmc.c b/src/video_out/video_out_xvmc.c index 5caf58fae..b6cae552e 100644 --- a/src/video_out/video_out_xvmc.c +++ b/src/video_out/video_out_xvmc.c @@ -692,6 +692,7 @@ static cxid_t *xvmc_set_context (xvmc_driver_t *this, return NULL; } +#if 0 static XvImage *create_ximage (xvmc_driver_t *this, XShmSegmentInfo *shminfo, int width, int height, int format) { unsigned int xvmc_format; @@ -747,6 +748,7 @@ static void dispose_ximage (xvmc_driver_t *this, lprintf ("dispose_ximage\n"); XFree(myimage); } +#endif static void xvmc_update_frame_format (vo_driver_t *this_gen, vo_frame_t *frame_gen, diff --git a/src/video_out/video_out_xxmc.c b/src/video_out/video_out_xxmc.c index 297d4ad49..ba83b7fe7 100644 --- a/src/video_out/video_out_xxmc.c +++ b/src/video_out/video_out_xxmc.c @@ -159,7 +159,6 @@ static void xxmc_xvmc_dump_subpictures(xxmc_driver_t *this) static void xxmc_xvmc_surface_handler_construct(xxmc_driver_t *this) { - int i; xvmc_surface_handler_t *handler = &this->xvmc_surf_handler; pthread_mutex_init(&handler->mutex,NULL); @@ -1648,8 +1647,8 @@ static void xxmc_display_frame (vo_driver_t *this_gen, vo_frame_t *frame_gen) * other than 100 %, so let's disable deinterlacing at all for this frame */ if (this->deinterlace_enabled && this->bob) { - disable_deinterlace = this->disable_bob_for_progressive_frames && frame->vo_frame.progressive_frame - || this->disable_bob_for_scaled_osd && this->scaled_osd_active + disable_deinterlace = (this->disable_bob_for_progressive_frames && frame->vo_frame.progressive_frame) + || (this->disable_bob_for_scaled_osd && this->scaled_osd_active) || !frame->vo_frame.stream || xine_get_param(frame->vo_frame.stream, XINE_PARAM_FINE_SPEED) != XINE_FINE_SPEED_NORMAL; if (!disable_deinterlace) { @@ -2442,7 +2441,7 @@ static vo_driver_t *open_plugin (video_driver_class_t *class_gen, const void *vi x11_visual_t *visual = (x11_visual_t *) visual_gen; XColor dummy; XvImage *myimage; - unsigned int adaptors, j; + unsigned int adaptors; unsigned int ver,rel,req,ev,err; XShmSegmentInfo myshminfo; XvPortID xv_port; |
