summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
Diffstat (limited to 'libvo')
-rw-r--r--libvo/video_out.c12
-rw-r--r--libvo/vo_cvidix.c178
-rw-r--r--libvo/vo_fbdev.c83
-rw-r--r--libvo/vo_svga.c52
-rw-r--r--libvo/vo_vesa.c74
-rw-r--r--libvo/vo_winvidix.c345
-rw-r--r--libvo/vo_xvidix.c421
-rw-r--r--libvo/vosub_vidix.c702
-rw-r--r--libvo/vosub_vidix.h47
9 files changed, 0 insertions, 1914 deletions
diff --git a/libvo/video_out.c b/libvo/video_out.c
index 3e2e108d4b..6bfc22575e 100644
--- a/libvo/video_out.c
+++ b/libvo/video_out.c
@@ -118,9 +118,6 @@ extern struct vo_driver video_out_gif89a;
extern struct vo_driver video_out_vesa;
extern struct vo_driver video_out_directfb;
extern struct vo_driver video_out_dfbmga;
-extern struct vo_driver video_out_xvidix;
-extern struct vo_driver video_out_winvidix;
-extern struct vo_driver video_out_cvidix;
extern struct vo_driver video_out_tdfx_vid;
extern struct vo_driver video_out_xvr100;
extern struct vo_driver video_out_tga;
@@ -237,15 +234,6 @@ const struct vo_driver *video_out_drivers[] =
#ifdef CONFIG_DIRECTFB
&video_out_dfbmga,
#endif
-#ifdef CONFIG_VIDIX
-#ifdef CONFIG_X11
- &video_out_xvidix,
-#endif
-#if defined(__MINGW32__) || defined(__CYGWIN__)
- &video_out_winvidix,
-#endif
- &video_out_cvidix,
-#endif
&video_out_null,
// should not be auto-selected
#ifdef CONFIG_DIRECTFB
diff --git a/libvo/vo_cvidix.c b/libvo/vo_cvidix.c
deleted file mode 100644
index d0e6860c65..0000000000
--- a/libvo/vo_cvidix.c
+++ /dev/null
@@ -1,178 +0,0 @@
-/*
- * VIDIX-accelerated overlay on (black) background
- *
- * should work on any OS
- *
- * copyright (C) 2003 Sascha Sommer
- *
- * This file is part of MPlayer.
- *
- * MPlayer 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.
- *
- * MPlayer 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 MPlayer; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <math.h>
-#include <errno.h>
-
-#include "config.h"
-#include "video_out.h"
-#include "video_out_internal.h"
-#include "aspect.h"
-#include "geometry.h"
-
-#include "mp_msg.h"
-
-#include "vosub_vidix.h"
-#include "vidix/vidix.h"
-
-
-static const vo_info_t info = {
- "console VIDIX",
- "cvidix",
- "Sascha Sommer",
- ""
-};
-
-LIBVO_EXTERN(cvidix)
-
-/* VIDIX related */
-static char *vidix_name;
-static uint32_t swidth,sheight,sformat;
-/// center video only when screenw & height are set
-static uint32_t center=0;
-static vidix_grkey_t gr_key;
-
-
-static uint32_t setup_vidix(void){
- int x=vo_dx,y=vo_dy;
- aspect(&vo_dwidth,&vo_dheight,vo_fs ? A_ZOOM : A_NOZOOM);
- if(vo_fs || center){
- if(vo_dwidth <= vo_screenwidth)x = (vo_screenwidth - vo_dwidth)/2;
- else x=0;
- if(vo_dheight <= vo_screenheight)y = (vo_screenheight - vo_dheight)/2;
- else y=0;
- }
- if(vo_config_count)vidix_stop();
- if(vidix_init(swidth, sheight, x, y, vo_dwidth, vo_dheight, sformat, 32, vo_screenwidth,vo_screenheight)){
- mp_msg(MSGT_VO, MSGL_FATAL, "Can't setup VIDIX driver: %s\n", strerror(errno));
- return 1;
- }
- vidix_start();
- if(vidix_grkey_support()){
- vidix_grkey_get(&gr_key);
- gr_key.key_op = KEYS_PUT;
- if (!vo_fs && !(vo_colorkey & 0xff000000)){
- gr_key.ckey.op = CKEY_TRUE;
- gr_key.ckey.red = (vo_colorkey & 0x00FF0000) >> 16;
- gr_key.ckey.green = (vo_colorkey & 0x0000FF00) >> 8;
- gr_key.ckey.blue = vo_colorkey & 0x000000FF;
- }
- else gr_key.ckey.op = CKEY_FALSE;
- vidix_grkey_set(&gr_key);
- }
- return 0;
-}
-
-static int config(uint32_t width, uint32_t height, uint32_t d_width,uint32_t d_height, uint32_t flags, char *title, uint32_t format){
- vo_fs = flags & VOFLAG_FULLSCREEN;
- if(!vo_config_count){
- if(vo_screenwidth && vo_screenheight){
- if(!vo_geometry)center=1;
- }
- }
- if(!vo_screenwidth){
- mp_msg(MSGT_VO, MSGL_WARN, "vo_cvidix: Screen width not set (see -screenw), assuming 640 pixels.\n");
- vo_screenwidth = 640;
- }
- if(!vo_screenheight){
- mp_msg(MSGT_VO, MSGL_WARN, "vo_cvidix: Screen height not set (see -screenh), assuming 480 pixels.\n");
- vo_screenheight = 480;
- }
- swidth = width;
- sheight = height;
- sformat = format;
- vo_dwidth=d_width;
- vo_dheight=d_height;
- aspect_save_orig(width,height);
- aspect_save_prescale(d_width,d_height);
- aspect_save_screenres(vo_screenwidth,vo_screenheight);
- if(!vo_geometry){
- vo_dx=0;
- vo_dy=0;
- }
- else geometry(&vo_dx, &vo_dy, &vo_dwidth, &vo_dheight,vo_screenwidth,vo_screenheight);
- return setup_vidix();
-}
-
-static void check_events(void){
-}
-
-/* draw_osd, flip_page, draw_slice, draw_frame should be
- overwritten with vidix functions (vosub_vidix.c) */
-static void draw_osd(void){
- mp_msg(MSGT_VO, MSGL_FATAL, "vo_cvidix: error: didn't use vidix draw_osd!\n");
- return;
-}
-
-static void flip_page(void){
- mp_msg(MSGT_VO, MSGL_FATAL, "vo_cvidix: error: didn't use vidix flip_page!\n");
- return;
-}
-
-static int draw_slice(uint8_t *src[], int stride[],int w, int h, int x, int y){
- mp_msg(MSGT_VO, MSGL_FATAL, "vo_cvidix: error: didn't use vidix draw_slice!\n");
- return -1;
-}
-
-static int draw_frame(uint8_t *src[]){
- mp_msg(MSGT_VO, MSGL_FATAL, "vo_cvidix: error: didn't use vidix draw_frame!\n");
- return -1;
-}
-
-static int query_format(uint32_t format){
- return vidix_query_fourcc(format);
-}
-
-static void uninit(void){
- if(!vo_config_count) return;
- vidix_term();
- free(vidix_name);
- vidix_name = NULL;
-}
-
-static int preinit(const char *arg){
- if(arg)vidix_name = strdup(arg);
- else {
- mp_msg(MSGT_VO, MSGL_INFO, "vo_cvidix: No vidix driver name provided, probing available ones (-v option for details)!\n");
- vidix_name = NULL;
- }
- if (vidix_preinit(vidix_name, video_out_cvidix.old_functions))return 1;
- return 0;
-}
-
-static int control(uint32_t request, void *data){
- switch (request) {
- case VOCTRL_QUERY_FORMAT:
- return query_format(*((uint32_t*)data));
- case VOCTRL_FULLSCREEN:
- if(vo_fs)vo_fs=0;
- else vo_fs=1;
- setup_vidix();
- return VO_TRUE;
- }
- return vidix_control(request, data);
-}
diff --git a/libvo/vo_fbdev.c b/libvo/vo_fbdev.c
index 2d422af269..0937c00312 100644
--- a/libvo/vo_fbdev.c
+++ b/libvo/vo_fbdev.c
@@ -41,9 +41,6 @@
#include "fastmemcpy.h"
#include "sub/sub.h"
#include "geometry.h"
-#ifdef CONFIG_VIDIX
-#include "vosub_vidix.h"
-#endif
#include "aspect.h"
#include "mp_msg.h"
#include "libavutil/common.h"
@@ -57,11 +54,6 @@ static const vo_info_t info = {
LIBVO_EXTERN(fbdev)
-#ifdef CONFIG_VIDIX
-/* Name of VIDIX driver */
-static const char *vidix_name = NULL;
-static vidix_grkey_t gr_key;
-#endif
static signed int pre_init_err = -2;
/******************************
* fb.modes support *
@@ -926,51 +918,6 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width,
fb_page = 0;
}
-#ifdef CONFIG_VIDIX
- if (vidix_name) {
- unsigned image_width, image_height, x_offset, y_offset;
- if (zoom || fs) {
- aspect_save_orig(width, height);
- aspect_save_prescale(d_width, d_height);
- aspect_save_screenres(fb_xres, fb_yres);
- aspect(&image_width, &image_height, fs ? A_ZOOM : A_NOZOOM);
- } else {
- image_width = width;
- image_height = height;
- }
-
- if (fb_xres > image_width)
- x_offset = (fb_xres - image_width) / 2;
- else
- x_offset = 0;
- if (fb_yres > image_height)
- y_offset = (fb_yres - image_height) / 2;
- else
- y_offset = 0;
-
- if (vidix_init(width, height, x_offset, y_offset, image_width,
- image_height, format, fb_bpp, fb_xres, fb_yres) != 0) {
- mp_msg(MSGT_VO, MSGL_ERR, "Can't initialize VIDIX driver\n");
- vidix_name = NULL;
- vidix_term();
- return -1;
- } else
- mp_msg(MSGT_VO, MSGL_V, "Using VIDIX\n");
- vidix_start();
- if (vidix_grkey_support()) {
- vidix_grkey_get(&gr_key);
- gr_key.key_op = KEYS_PUT;
- if (!(vo_colorkey & 0xff000000)) {
- gr_key.ckey.op = CKEY_TRUE;
- gr_key.ckey.red = (vo_colorkey & 0x00ff0000) >> 16;
- gr_key.ckey.green = (vo_colorkey & 0x0000ff00) >> 8;
- gr_key.ckey.blue = vo_colorkey & 0x000000ff;
- } else
- gr_key.ckey.op = CKEY_FALSE;
- vidix_grkey_set(&gr_key);
- }
- } else
-#endif
{
int x_offset = 0, y_offset = 0;
geometry(&x_offset, &y_offset, &out_width, &out_height, fb_xres, fb_yres);
@@ -1009,10 +956,6 @@ static int query_format(uint32_t format)
{
if (!fb_preinit(0))
return 0;
-#ifdef CONFIG_VIDIX
- if (vidix_name)
- return vidix_query_fourcc(format);
-#endif
if ((format & IMGFMT_BGR_MASK) == IMGFMT_BGR) {
int bpp = format & 0xff;
@@ -1056,10 +999,6 @@ static void flip_page(void)
{
int next_page = !fb_page;
int page_delta = next_page - fb_page;
-#ifdef CONFIG_VIDIX
- if (vidix_name)
- return;
-#endif
if (!vo_doublebuffering)
return;
@@ -1098,10 +1037,6 @@ static void uninit(void)
if (frame_buffer)
munmap(frame_buffer, fb_size);
frame_buffer = NULL;
-#ifdef CONFIG_VIDIX
- if (vidix_name)
- vidix_term();
-#endif
fb_preinit(1);
}
@@ -1110,14 +1045,6 @@ static int preinit(const char *vo_subdevice)
pre_init_err = 0;
if (vo_subdevice) {
-#ifdef CONFIG_VIDIX
- if (memcmp(vo_subdevice, "vidix", 5) == 0)
- vidix_name = &vo_subdevice[5];
- if (vidix_name)
- pre_init_err = vidix_preinit(vidix_name,
- video_out_fbdev.old_functions);
- else
-#endif
{
free(fb_dev_name);
fb_dev_name = strdup(vo_subdevice);
@@ -1155,15 +1082,5 @@ static int control(uint32_t request, void *data)
return query_format(*(uint32_t*)data);
}
-#ifdef CONFIG_VIDIX
- if (vidix_name) {
- switch (request) {
- case VOCTRL_SET_EQUALIZER:
- case VOCTRL_GET_EQUALIZER:
- return vidix_control(request, data);
- }
- }
-#endif
-
return VO_NOTIMPL;
}
diff --git a/libvo/vo_svga.c b/libvo/vo_svga.c
index d44821df05..3afb8e36a2 100644
--- a/libvo/vo_svga.c
+++ b/libvo/vo_svga.c
@@ -55,9 +55,6 @@ TODO:
#include "video_out_internal.h"
#include "fastmemcpy.h"
#include "osdep/getch2.h"
-#ifdef CONFIG_VIDIX
-#include "vosub_vidix.h"
-#endif
#include "sub/sub.h"
@@ -112,11 +109,6 @@ static const vo_info_t info = {
""
};
-#ifdef CONFIG_VIDIX
-static char vidix_name[32] = "";
-static vidix_grkey_t gr_key;
-#endif
-
LIBVO_EXTERN(svga)
@@ -140,17 +132,6 @@ static int preinit(const char *arg)
blackbar_osd=0;
if(arg)while(*arg) {
-#ifdef CONFIG_VIDIX
- if(memcmp(arg,"vidix",5)==0) {
- i=6;
- while(arg[i] && arg[i]!=':') i++;
- strncpy(vidix_name, arg+6, i-6);
- vidix_name[i-5]=0;
- if(arg[i]==':')i++;
- arg+=i;
- vidix_preinit(vidix_name, video_out_svga.old_functions);
- }
-#endif
if(!strncmp(arg,"sq",2)) {
squarepix=1;
arg+=2;
@@ -365,11 +346,6 @@ static int control(uint32_t request, void *data)
return get_image(data);
}
-#ifdef CONFIG_VIDIX
- if (vidix_name[0])
- return vidix_control(request, data);
-#endif
-
return VO_NOTIMPL;
}
@@ -525,30 +501,6 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width,
x_pos &= ~(15); //align x offset position to 16 pixels
mp_tmsg(MSGT_VO,MSGL_INFO, "[VO_SVGA] Centering image. Starting at (%d,%d)\n",x_pos,y_pos);
-#ifdef CONFIG_VIDIX
-
- if(vidix_name[0]){
- vidix_init(width, height, x_pos, y_pos, modeinfo->width, modeinfo->height,
- format, mode_bpp, modeinfo->width,modeinfo->height);
- mp_tmsg(MSGT_VO,MSGL_INFO, "[VO_SVGA] Using VIDIX. w=%i h=%i mw=%i mh=%i\n",width,height,
- modeinfo->width,modeinfo->height);
- vidix_start();
- /*set colorkey*/
- if(vidix_grkey_support()){
- vidix_grkey_get(&gr_key);
- gr_key.key_op = KEYS_PUT;
- if (!(vo_colorkey & 0xFF000000)) {
- gr_key.ckey.op = CKEY_TRUE;
- gr_key.ckey.red = (vo_colorkey & 0x00FF0000) >> 16;
- gr_key.ckey.green = (vo_colorkey & 0x0000FF00) >> 8;
- gr_key.ckey.blue = vo_colorkey & 0x000000FF;
- } else
- gr_key.ckey.op = CKEY_FALSE;
- vidix_grkey_set(&gr_key);
- }
- }
-#endif
-
vga_setdisplaystart(0);
return 0;
}
@@ -608,10 +560,6 @@ static void check_events(void) {
}
static void uninit(void) {
-
-#ifdef CONFIG_VIDIX
- if(vidix_name[0])vidix_term();
-#endif
vga_setmode(TEXT);
}
diff --git a/libvo/vo_vesa.c b/libvo/vo_vesa.c
index 698b9f033a..b9cb60a625 100644
--- a/libvo/vo_vesa.c
+++ b/libvo/vo_vesa.c
@@ -53,9 +53,6 @@
#include "mpbswap.h"
#include "aspect.h"
#include "vesa_lvo.h"
-#ifdef CONFIG_VIDIX
-#include "vosub_vidix.h"
-#endif
#include "mp_msg.h"
#include "libswscale/swscale.h"
@@ -112,11 +109,6 @@ uint8_t multi_idx=0; /* active buffer */
/* Linux Video Overlay */
static const char *lvo_name = NULL;
static int lvo_opened = 0;
-#ifdef CONFIG_VIDIX
-static const char *vidix_name = NULL;
-static int vidix_opened = 0;
-static vidix_grkey_t gr_key;
-#endif
/* Neomagic TV out */
static int neomagic_tvout = 0;
@@ -154,9 +146,6 @@ static void vesa_term( void )
{
int err;
if(lvo_opened) { vlvo_term(); lvo_opened = 0; }
-#ifdef CONFIG_VIDIX
- else if(vidix_opened) { vidix_term(); vidix_opened = 0; }
-#endif
if(init_state) if((err=vbeRestoreState(init_state)) != VBE_OK) PRINT_VBE_ERR("vbeRestoreState",err);
init_state=NULL;
if(init_mode) if((err=vbeSetMode(init_mode,NULL)) != VBE_OK) PRINT_VBE_ERR("vbeSetMode",err);
@@ -441,10 +430,6 @@ static uint32_t parseSubDevice(const char *sd)
if(strcmp(sd,"neotv_ntsc") == 0) { neomagic_tvout = 1; neomagic_tvnorm = NEO_NTSC; }
else
if(memcmp(sd,"lvo:",4) == 0) lvo_name = &sd[4]; /* lvo_name will be valid within init() */
-#ifdef CONFIG_VIDIX
- else
- if(memcmp(sd,"vidix",5) == 0) vidix_name = &sd[5]; /* vidix_name will be valid within init() */
-#endif
else { mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_VESA] unknown subdevice: '%s'.\n", sd); return 0xFFFFFFFFUL; }
return flags;
}
@@ -453,9 +438,6 @@ static int query_format(uint32_t format)
{
if( mp_msg_test(MSGT_VO,MSGL_DBG3) )
mp_msg(MSGT_VO,MSGL_DBG3, "vo_vesa: query_format was called: %x (%s)\n",format,vo_format_name(format));
-#ifdef CONFIG_VIDIX
- if(vidix_name) return vidix_query_fourcc(format);
-#endif
if (format == IMGFMT_MPEGPES)
return 0;
// FIXME: this is just broken...
@@ -788,9 +770,6 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin
{
/* software scale */
if(use_scaler > 1
-#ifdef CONFIG_VIDIX
- || vidix_name
-#endif
)
{
aspect_save_orig(width,height);
@@ -807,9 +786,6 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin
use_scaler = 1;
}
if(!lvo_name
-#ifdef CONFIG_VIDIX
- && !vidix_name
-#endif
)
{
sws = sws_getContextFromCmdLine(srcW,srcH,srcFourcc,dstW,dstH,dstFourcc);
@@ -897,9 +873,6 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin
{
cpy_blk_fnc = vbeCopyBlock;
if(!lvo_name
-#ifdef CONFIG_VIDIX
- && !vidix_name
-#endif
)
{
if(!(dga_buffer = memalign(64,video_mode_info.XResolution*video_mode_info.YResolution*dstBpp)))
@@ -964,41 +937,6 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin
else mp_tmsg(MSGT_VO,MSGL_INFO, "[VO_VESA] Using video overlay: %s.\n",lvo_name);
lvo_opened = 1;
}
-#ifdef CONFIG_VIDIX
- else
- if(vidix_name)
- {
- if(vidix_init(width,height,x_offset,y_offset,dstW,
- dstH,format,dstBpp,
- video_mode_info.XResolution,video_mode_info.YResolution) != 0)
- {
- mp_tmsg(MSGT_VO,MSGL_ERR, "[VO_VESA] Can't initialize VIDIX driver.\n");
- vesa_term();
- return -1;
- }
- else mp_tmsg(MSGT_VO,MSGL_INFO, "[VO_VESA] Using VIDIX.\n");
- vidix_start();
-
- /* set colorkey */
- if (vidix_grkey_support())
- {
- vidix_grkey_get(&gr_key);
- gr_key.key_op = KEYS_PUT;
-#if 0
- if (!(vo_colorkey & 0xFF000000))
- {
- gr_key.ckey.op = CKEY_TRUE;
- gr_key.ckey.red = (vo_colorkey & 0x00FF0000) >> 16;
- gr_key.ckey.green = (vo_colorkey & 0x0000FF00) >> 8;
- gr_key.ckey.blue = vo_colorkey & 0x000000FF;
- } else
-#endif
- gr_key.ckey.op = CKEY_FALSE;
- vidix_grkey_set(&gr_key);
- }
- vidix_opened = 1;
- }
-#endif
}
else
{
@@ -1066,15 +1004,8 @@ static int preinit(const char *arg)
mp_msg(MSGT_VO,MSGL_DBG3, "vo_vesa: subdevice %s is being initialized\n",arg);
subdev_flags = 0;
lvo_name = NULL;
-#ifdef CONFIG_VIDIX
- vidix_name = NULL;
-#endif
if(arg) subdev_flags = parseSubDevice(arg);
if(lvo_name) pre_init_err = vlvo_preinit(lvo_name);
-#ifdef CONFIG_VIDIX
- else if(vidix_name) pre_init_err = vidix_preinit(vidix_name,
- video_out_vesa.old_functions);
-#endif
// check if we can open /dev/mem (it will be opened later in config(), but if we
// detect now that we can't we can exit cleanly)
fd = open("/dev/mem", O_RDWR);
@@ -1094,10 +1025,5 @@ static int control(uint32_t request, void *data)
return query_format(*((uint32_t*)data));
}
-#ifdef CONFIG_VIDIX
- if (vidix_name)
- return vidix_control(request, data);
-#endif
-
return VO_NOTIMPL;
}
diff --git a/libvo/vo_winvidix.c b/libvo/vo_winvidix.c
deleted file mode 100644
index 9655d95b4b..0000000000
--- a/libvo/vo_winvidix.c
+++ /dev/null
@@ -1,345 +0,0 @@
-/*
- * VIDIX-accelerated overlay in a Win32 window
- *
- * copyright (C) 2003 Sascha Sommer
- *
- * This file is part of MPlayer.
- *
- * MPlayer 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.
- *
- * MPlayer 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 MPlayer; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <math.h>
-#include <errno.h>
-
-#include "config.h"
-#include "video_out.h"
-#include "video_out_internal.h"
-
-#include <windows.h>
-#include "osdep/keycodes.h"
-#include "input/input.h"
-
-#include "aspect.h"
-#include "mp_msg.h"
-#include "mp_fifo.h"
-
-#include "vosub_vidix.h"
-#include "vidix/vidix.h"
-
-
-static const vo_info_t info =
-{
- "WIN32 (VIDIX)",
- "winvidix",
- "Sascha Sommer",
- ""
-};
-
-LIBVO_EXTERN(winvidix)
-
-/* VIDIX related */
-static char *vidix_name;
-
-static int depthonscreen;
-/* Image parameters */
-static uint32_t image_width;
-static uint32_t image_height;
-static uint32_t image_format;
-/* Window parameters */
-static HWND hWnd=NULL,hWndFS=NULL;
-static float window_aspect;
-
-static vidix_grkey_t gr_key;
-
-
-void set_video_eq(int cap);
-
-
-static LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
-{
- switch (message){
- case WM_DESTROY:
- PostQuitMessage(0);
- return 0;
- case WM_CLOSE:
- mplayer_put_key(KEY_CLOSE_WIN);
- break;
- case WM_WINDOWPOSCHANGED:
- {
- int tmpheight=0;
- /*calculate new window rect*/
- if(!vo_fs){
- RECT rd;
- POINT point_window;
- if(!hWnd)hWnd=hwnd;
- ShowCursor(TRUE);
- point_window.x = 0;
- point_window.y = 0;
- ClientToScreen(hWnd,&point_window);
- GetClientRect(hWnd,&rd);
-
- vo_dwidth=rd.right - rd.left;
- vo_dheight=rd.bottom - rd.top;
- vo_dx =point_window.x;
- vo_dy =point_window.y;
- // aspect(&vo_dwidth, &vo_dheight, A_NOZOOM);
-
- /* keep aspect on resize, borrowed from vo_directx.c */
- tmpheight = ((float)vo_dwidth/window_aspect);
- tmpheight += tmpheight % 2;
- if(tmpheight > vo_dheight)
- {
- vo_dwidth = ((float)vo_dheight*window_aspect);
- vo_dwidth += vo_dwidth % 2;
- }
- else vo_dheight = tmpheight;
- rd.right = rd.left + vo_dwidth;
- rd.bottom = rd.top + vo_dheight;
-
- if(rd.left < 0) rd.left = 0;
- if(rd.right > vo_screenwidth) rd.right = vo_screenwidth;
- if(rd.top < 0) rd.top = 0;
- if(rd.bottom > vo_screenheight) rd.bottom = vo_screenheight;
-
- AdjustWindowRect(&rd, WS_OVERLAPPEDWINDOW | WS_SIZEBOX, 0);
- SetWindowPos(hWnd, HWND_TOPMOST, vo_dx+rd.left, vo_dy+rd.top, rd.right-rd.left, rd.bottom-rd.top, SWP_NOOWNERZORDER);
- }
- else {
- if(ShowCursor(FALSE)>=0)while(ShowCursor(FALSE)>=0){}
- aspect(&vo_dwidth, &vo_dheight, A_ZOOM);
- vo_dx = (vo_screenwidth - vo_dwidth)/2;
- vo_dy = (vo_screenheight - vo_dheight)/2;
- }
- /*update vidix*/
- /* FIXME: implement runtime resize/move if possible, this way is very ugly! */
- vidix_stop();
- if(vidix_init(image_width, image_height, vo_dx, vo_dy, vo_dwidth, vo_dheight, image_format, depthonscreen, vo_screenwidth, vo_screenheight) != 0)
- mp_msg(MSGT_VO, MSGL_FATAL, "Can't initialize VIDIX driver: %s\n", strerror(errno));
- /*set colorkey*/
- vidix_start();
- mp_msg(MSGT_VO, MSGL_V, "[winvidix] window properties: pos: %dx%d, size: %dx%d\n",vo_dx, vo_dy, vo_dwidth, vo_dheight);
- if(vidix_grkey_support()){
- vidix_grkey_get(&gr_key);
- gr_key.key_op = KEYS_PUT;
- gr_key.ckey.op = CKEY_TRUE;
- if(vo_fs)gr_key.ckey.red = gr_key.ckey.green = gr_key.ckey.blue = 0;
- else {
- gr_key.ckey.red = gr_key.ckey.blue = 255;
- gr_key.ckey.green = 0;
- }
- vidix_grkey_set(&gr_key);
- }
-
- }
- break;
- case WM_SYSCOMMAND:
- switch (wParam){
- case SC_SCREENSAVE:
- case SC_MONITORPOWER:
- return 0;
- }
- break;
- case WM_KEYDOWN:
- switch (wParam){
- case VK_LEFT:
- {mplayer_put_key(KEY_LEFT);break;}
- case VK_UP:
- {mplayer_put_key(KEY_UP);break;}
- case VK_RIGHT:
- {mplayer_put_key(KEY_RIGHT);break;}
- case VK_DOWN:
- {mplayer_put_key(KEY_DOWN);break;}
- case VK_TAB:
- {mplayer_put_key(KEY_TAB);break;}
- case VK_CONTROL:
- {mplayer_put_key(KEY_CTRL);break;}
- case VK_DELETE:
- {mplayer_put_key(KEY_DELETE);break;}
- case VK_INSERT:
- {mplayer_put_key(KEY_INSERT);break;}
- case VK_HOME:
- {mplayer_put_key(KEY_HOME);break;}
- case VK_END:
- {mplayer_put_key(KEY_END);break;}
- case VK_PRIOR:
- {mplayer_put_key(KEY_PAGE_UP);break;}
- case VK_NEXT:
- {mplayer_put_key(KEY_PAGE_DOWN);break;}
- case VK_ESCAPE:
- {mplayer_put_key(KEY_ESC);break;}
- }
- break;
- case WM_CHAR:
- mplayer_put_key(wParam);
- break;
- }
- return DefWindowProc(hwnd, message, wParam, lParam);
-}
-
-
-static int config(uint32_t width, uint32_t height, uint32_t d_width,uint32_t d_height, uint32_t flags, char *title, uint32_t format){
- title = "MPlayer VIDIX WIN32 Overlay";
-
- panscan_init();
-
- image_height = height;
- image_width = width;
- image_format = format;
- vo_screenwidth = GetSystemMetrics(SM_CXSCREEN);
- vo_screenheight = GetSystemMetrics(SM_CYSCREEN);
- depthonscreen = GetDeviceCaps(GetDC(GetDesktopWindow()),BITSPIXEL);
-
-
- aspect_save_orig(width, height);
- aspect_save_prescale(d_width, d_height);
- aspect_save_screenres(vo_screenwidth, vo_screenheight);
-
- vo_dx = 0;
- vo_dy = 0;
-
- vo_dx=( vo_screenwidth - d_width ) / 2; vo_dy=( vo_screenheight - d_height ) / 2;
- geometry(&vo_dx, &vo_dy, &d_width, &d_height, vo_screenwidth, vo_screenheight);
-
- vo_fs = flags&VOFLAG_FULLSCREEN;
-
-
- aspect(&d_width, &d_height, A_NOZOOM);
- vo_dwidth=d_width; vo_dheight=d_height;
- window_aspect = (float)d_width / (float)d_height;
-
-
- if(!vo_config_count){
- HINSTANCE hInstance = GetModuleHandle(NULL);
- WNDCLASS wc;
- RECT rd;
- rd.left = vo_dx;
- rd.top = vo_dy;
- rd.right = rd.left + vo_dwidth;
- rd.bottom = rd.top + vo_dheight;
- AdjustWindowRect(&rd,WS_OVERLAPPEDWINDOW| WS_SIZEBOX,0);
- wc.style = CS_HREDRAW | CS_VREDRAW;
- wc.lpfnWndProc = WndProc;
- wc.cbClsExtra = 0;
- wc.cbWndExtra = 0;
- wc.hInstance = hInstance;
- wc.hCursor = LoadCursor(NULL,IDC_ARROW);
- wc.hIcon =ExtractIcon(hInstance,"mplayer.exe",0);
-//LoadIcon(NULL,IDI_APPLICATION);
- wc.hbrBackground = CreateSolidBrush(RGB(255,0,255));
- wc.lpszClassName = "MPlayer - The Movie Player";
- wc.lpszMenuName = NULL;
- RegisterClass(&wc);
- hWnd = CreateWindow("MPlayer - The Movie Player",
- title,
- WS_OVERLAPPEDWINDOW| WS_SIZEBOX,
- rd.left,
- rd.top,
- rd.right - rd.left,
- rd.bottom - rd.top,
- NULL,
- NULL,
- hInstance,
- NULL);
- wc.hbrBackground = CreateSolidBrush(RGB(0,0,0));
- wc.lpszClassName = "MPlayer - Fullscreen";
- RegisterClass(&wc);
- hWndFS = CreateWindow("MPlayer - Fullscreen","MPlayer VIDIX Fullscreen",WS_POPUP,0,0,vo_screenwidth,vo_screenheight,hWnd,NULL,hInstance,NULL);
-
-
-
-
-
- }
- ShowWindow(hWnd,SW_SHOW);
- if(vo_fs)ShowWindow(hWndFS,SW_SHOW);
-
- return 0;
-}
-
-static void check_events(void){
- MSG msg;
- while (PeekMessage(&msg, NULL, 0, 0,PM_REMOVE))
- {
- TranslateMessage(&msg);
- DispatchMessage(&msg);
- }
-}
-
-/* draw_osd, flip_page, draw_slice, draw_frame should be
- overwritten with vidix functions (vosub_vidix.c) */
-static void draw_osd(void){
- mp_msg(MSGT_VO, MSGL_FATAL, "[winvidix] error: didn't use vidix draw_osd!\n");
- return;
-}
-
-static void flip_page(void){
- mp_msg(MSGT_VO, MSGL_FATAL, "[winvidix] error: didn't use vidix flip_page!\n");
- return;
-}
-
-static int draw_slice(uint8_t *src[], int stride[],int w, int h, int x, int y){
- mp_msg(MSGT_VO, MSGL_FATAL, "[winvidix] error: didn't use vidix draw_slice!\n");
- return -1;
-}
-
-static int draw_frame(uint8_t *src[]){
- mp_msg(MSGT_VO, MSGL_FATAL, "[winvidix] error: didn't use vidix draw_frame!\n");
- return -1;
-}
-
-static int query_format(uint32_t format){
- return vidix_query_fourcc(format);
-}
-
-static void uninit(void){
- DestroyWindow(hWndFS);
- DestroyWindow(hWnd);
- if ( !vo_config_count ) return;
- vidix_term();
-
- free(vidix_name);
- vidix_name = NULL;
-}
-
-static int preinit(const char *arg){
- if (arg)
- vidix_name = strdup(arg);
- else
- {
- mp_msg(MSGT_VO, MSGL_INFO, "No vidix driver name provided, probing available ones (-v option for details)!\n");
- vidix_name = NULL;
- }
-
- if (vidix_preinit(vidix_name, video_out_winvidix.old_functions) != 0)
- return 1;
-
- return 0;
-}
-
-static int control(uint32_t request, void *data){
- switch (request) {
- case VOCTRL_FULLSCREEN:
- if(!vo_fs){vo_fs=1;ShowWindow(hWndFS,SW_SHOW);SetForegroundWindow(hWndFS);}
- else {vo_fs=0; ShowWindow(hWndFS,SW_HIDE);}
- break;
- case VOCTRL_QUERY_FORMAT:
- return query_format(*((uint32_t*)data));
- }
- return vidix_control(request, data);
-// return VO_NOTIMPL;
-}
diff --git a/libvo/vo_xvidix.c b/libvo/vo_xvidix.c
deleted file mode 100644
index 7741b9b6ff..0000000000
--- a/libvo/vo_xvidix.c
+++ /dev/null
@@ -1,421 +0,0 @@
-/*
- * VIDIX-accelerated overlay in an X window
- *
- * copyright (C) Alex Beregszaszi & Zoltan Ponekker & Nick Kurshev
- *
- * WS window manager by Pontscho/Fresh!
- *
- * based on vo_gl.c and vo_vesa.c and vo_xmga.c (.so mastah! ;))
- *
- * This file is part of MPlayer.
- *
- * MPlayer 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.
- *
- * MPlayer 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 MPlayer; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <math.h>
-#include <errno.h>
-
-#include "config.h"
-#include "video_out.h"
-#include "video_out_internal.h"
-
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
-//#include <X11/keysym.h>
-
-#ifdef CONFIG_XINERAMA
-#include <X11/extensions/Xinerama.h>
-#endif
-
-#include "x11_common.h"
-#include "aspect.h"
-#include "mp_msg.h"
-
-#include "vosub_vidix.h"
-#include "vidix/vidix.h"
-