summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
Diffstat (limited to 'libvo')
-rw-r--r--libvo/font_load.h10
-rw-r--r--libvo/font_load_ft.c12
-rw-r--r--libvo/mga_common.c2
-rw-r--r--libvo/sub.c18
-rw-r--r--libvo/video_out.c36
-rw-r--r--libvo/vo_aa.c2
-rw-r--r--libvo/vo_dga.c44
-rw-r--r--libvo/vo_dxr3.c18
-rw-r--r--libvo/vo_gif89a.c6
-rw-r--r--libvo/vo_gl.c2
-rw-r--r--libvo/vo_macosx.m4
-rw-r--r--libvo/vo_mpegpes.c8
-rw-r--r--libvo/vo_quartz.c2
-rw-r--r--libvo/vo_sdl.c8
-rw-r--r--libvo/vo_wii.c419
-rw-r--r--libvo/vo_x11.c12
-rw-r--r--libvo/vo_xmga.c2
-rw-r--r--libvo/vo_xover.c4
-rw-r--r--libvo/vo_xv.c6
-rw-r--r--libvo/vo_xvidix.c4
-rw-r--r--libvo/vo_xvmc.c12
-rw-r--r--libvo/vosub_vidix.c32
-rw-r--r--libvo/x11_common.c28
-rw-r--r--libvo/x11_common.h2
24 files changed, 573 insertions, 120 deletions
diff --git a/libvo/font_load.h b/libvo/font_load.h
index 282c9cdc7c..38c1e321ec 100644
--- a/libvo/font_load.h
+++ b/libvo/font_load.h
@@ -1,7 +1,7 @@
#ifndef MPLAYER_FONT_LOAD_H
#define MPLAYER_FONT_LOAD_H
-#ifdef HAVE_FREETYPE
+#ifdef CONFIG_FREETYPE
#include <ft2build.h>
#include FT_FREETYPE_H
#endif
@@ -10,14 +10,14 @@ typedef struct {
unsigned char *bmp;
unsigned char *pal;
int w,h,c;
-#ifdef HAVE_FREETYPE
+#ifdef CONFIG_FREETYPE
int charwidth,charheight,pen,baseline,padding;
int current_count, current_alloc;
#endif
} raw_file;
typedef struct font_desc {
-#ifdef HAVE_FREETYPE
+#ifdef CONFIG_FREETYPE
int dynamic;
#endif
char *name;
@@ -34,7 +34,7 @@ typedef struct font_desc {
short width[65536];
int freetype;
-#ifdef HAVE_FREETYPE
+#ifdef CONFIG_FREETYPE
int face_cnt;
FT_Face faces[16];
@@ -63,7 +63,7 @@ typedef struct font_desc {
extern font_desc_t* vo_font;
-#ifdef HAVE_FREETYPE
+#ifdef CONFIG_FREETYPE
extern char *subtitle_font_encoding;
extern float text_font_scale_factor;
diff --git a/libvo/font_load_ft.c b/libvo/font_load_ft.c
index ee7c1dae9b..9d887573da 100644
--- a/libvo/font_load_ft.c
+++ b/libvo/font_load_ft.c
@@ -16,7 +16,7 @@
#include <math.h>
#include <string.h>
-#ifdef HAVE_ICONV
+#ifdef CONFIG_ICONV
#include <iconv.h>
#endif
@@ -24,7 +24,7 @@
#include FT_FREETYPE_H
#include FT_GLYPH_H
-#ifdef HAVE_FONTCONFIG
+#ifdef CONFIG_FONTCONFIG
#include <fontconfig/fontconfig.h>
#endif
@@ -716,7 +716,7 @@ static int generate_tables(font_desc_t *desc, double thickness, double radius)
return 0;
}
-#ifdef HAVE_ICONV
+#ifdef CONFIG_ICONV
/* decode from 'encoding' to unicode */
static FT_ULong decode_char(iconv_t *cd, char c) {
FT_ULong o;
@@ -1009,7 +1009,7 @@ font_desc_t* read_font_desc_ft(const char *fname, int movie_width, int movie_hei
}
desc->face_cnt++;
-#ifdef HAVE_ICONV
+#ifdef CONFIG_ICONV
if (unicode) {
charset_size = prepare_charset_unicode(face, my_charset, my_charcodes);
} else {
@@ -1124,7 +1124,7 @@ int done_freetype(void)
void load_font_ft(int width, int height, font_desc_t** fontp, const char *font_name, float font_scale_factor)
{
-#ifdef HAVE_FONTCONFIG
+#ifdef CONFIG_FONTCONFIG
FcPattern *fc_pattern;
FcPattern *fc_pattern2;
FcChar8 *s;
@@ -1139,7 +1139,7 @@ void load_font_ft(int width, int height, font_desc_t** fontp, const char *font_n
if (vo_font) free_font_desc(vo_font);
-#ifdef HAVE_FONTCONFIG
+#ifdef CONFIG_FONTCONFIG
if (font_fontconfig > 0)
{
if (!font_name)
diff --git a/libvo/mga_common.c b/libvo/mga_common.c
index 9fe2777b4f..34eee958e3 100644
--- a/libvo/mga_common.c
+++ b/libvo/mga_common.c
@@ -508,7 +508,7 @@ static void set_window( void ){
vo_dwidth=drwWidth; vo_dheight=drwHeight;
#ifdef VO_XMGA
-#ifdef HAVE_XINERAMA
+#ifdef CONFIG_XINERAMA
if(XineramaIsActive(mDisplay))
{
XineramaScreenInfo *screens;
diff --git a/libvo/sub.c b/libvo/sub.c
index 58541bcbb9..c7d3fb516e 100644
--- a/libvo/sub.c
+++ b/libvo/sub.c
@@ -14,7 +14,7 @@
#define OSD_NAV_BOX_ALPHA 0x7f
#endif
-#ifdef HAVE_TV_TELETEXT
+#ifdef CONFIG_TV_TELETEXT
#include "stream/tv.h"
#include "osdep/timer.h"
#endif
@@ -72,7 +72,7 @@ char * const sub_osd_names_short[] ={ "", "|>", "||", "[]", "<<" , ">>", "", "",
//static int vo_font_loaded=-1;
font_desc_t* vo_font=NULL;
-#ifdef HAVE_TV_TELETEXT
+#ifdef CONFIG_TV_TELETEXT
void* vo_osd_teletext_page=NULL;
int vo_osd_teletext_half = 0;
int vo_osd_teletext_mode=0;
@@ -245,7 +245,7 @@ inline static void vo_update_nav (mp_osd_obj_t *obj, int dxs, int dys) {
}
#endif
-#ifdef HAVE_TV_TELETEXT
+#ifdef CONFIG_TV_TELETEXT
// renders char to a big per-object buffer where alpha and bitmap are separated
static void tt_draw_alpha_buf(mp_osd_obj_t* obj, int x0,int y0, int w,int h, unsigned char* src, int stride,int fg,int bg,int alpha)
{
@@ -1072,11 +1072,11 @@ int osd_update(struct osd_state *osd, int dxs, int dys)
{
mp_osd_obj_t* obj=vo_osd_list;
int chg=0;
-#ifdef HAVE_FREETYPE
+#ifdef CONFIG_FREETYPE
static int defer_counter = 0, prev_dxs = 0, prev_dys = 0;
#endif
-#ifdef HAVE_FREETYPE
+#ifdef CONFIG_FREETYPE
// here is the right place to get screen dimensions
if (((dxs != vo_image_width)
&& (subtitle_autoscale == 2 || subtitle_autoscale == 3))
@@ -1130,7 +1130,7 @@ int osd_update(struct osd_state *osd, int dxs, int dys)
case OSDTYPE_SUBTITLE:
vo_update_text_sub(osd, obj,dxs,dys);
break;
-#ifdef HAVE_TV_TELETEXT
+#ifdef CONFIG_TV_TELETEXT
case OSDTYPE_TELETEXT:
vo_update_text_teletext(obj,dxs,dys);
break;
@@ -1205,10 +1205,10 @@ struct osd_state *osd_create(void)
#ifdef CONFIG_DVDNAV
new_osd_obj(OSDTYPE_DVDNAV);
#endif
-#if HAVE_TV_TELETEXT
+#if CONFIG_TV_TELETEXT
new_osd_obj(OSDTYPE_TELETEXT);
#endif
-#ifdef HAVE_FREETYPE
+#ifdef CONFIG_FREETYPE
force_load_font = 1;
#endif
return osd;
@@ -1254,7 +1254,7 @@ void osd_draw_text(struct osd_state *osd, int dxs, int dys,
#ifdef CONFIG_DVDNAV
case OSDTYPE_DVDNAV:
#endif
-#ifdef HAVE_TV_TELETEXT
+#ifdef CONFIG_TV_TELETEXT
case OSDTYPE_TELETEXT:
#endif
case OSDTYPE_OSD:
diff --git a/libvo/video_out.c b/libvo/video_out.c
index e932e3c59c..90634fecab 100644
--- a/libvo/video_out.c
+++ b/libvo/video_out.c
@@ -20,7 +20,7 @@
#include "help_mp.h"
#include "osdep/shmem.h"
-#ifdef HAVE_X11
+#ifdef CONFIG_X11
#include "x11_common.h"
#endif
@@ -67,6 +67,7 @@ extern struct vo_driver video_out_sdl;
extern struct vo_driver video_out_3dfx;
extern struct vo_driver video_out_tdfxfb;
extern struct vo_driver video_out_s3fb;
+extern struct vo_driver video_out_wii;
extern struct vo_driver video_out_null;
extern struct vo_driver video_out_zr;
extern struct vo_driver video_out_zr2;
@@ -112,10 +113,10 @@ const struct vo_driver *video_out_drivers[] =
#ifdef CONFIG_DIRECTX
&video_out_directx,
#endif
-#ifdef HAVE_COREVIDEO
+#ifdef CONFIG_COREVIDEO
&video_out_macosx,
#endif
-#ifdef HAVE_QUARTZ
+#ifdef CONFIG_QUARTZ
&video_out_quartz,
#endif
#ifdef CONFIG_XMGA
@@ -130,13 +131,16 @@ const struct vo_driver *video_out_drivers[] =
#ifdef CONFIG_S3FB
&video_out_s3fb,
#endif
+#ifdef CONFIG_WII
+ &video_out_wii,
+#endif
#ifdef CONFIG_3DFX
&video_out_3dfx,
#endif
-#ifdef HAVE_XV
+#ifdef CONFIG_XV
&video_out_xv,
#endif
-#ifdef HAVE_X11
+#ifdef CONFIG_X11
&video_out_x11,
&video_out_xover,
#endif
@@ -144,7 +148,7 @@ const struct vo_driver *video_out_drivers[] =
&video_out_gl,
&video_out_gl2,
#endif
-#ifdef HAVE_DGA
+#ifdef CONFIG_DGA
&video_out_dga,
#endif
#ifdef CONFIG_SDL
@@ -166,19 +170,19 @@ const struct vo_driver *video_out_drivers[] =
#ifdef CONFIG_CACA
&video_out_caca,
#endif
-#ifdef HAVE_DXR2
+#ifdef CONFIG_DXR2
&video_out_dxr2,
#endif
-#ifdef HAVE_DXR3
+#ifdef CONFIG_DXR3
&video_out_dxr3,
#endif
-#ifdef HAVE_IVTV
+#ifdef CONFIG_IVTV
&video_out_ivtv,
#endif
-#ifdef HAVE_V4L2_DECODER
+#ifdef CONFIG_V4L2_DECODER
&video_out_v4l2,
#endif
-#ifdef HAVE_ZR
+#ifdef CONFIG_ZR
&video_out_zr,
&video_out_zr2,
#endif
@@ -195,7 +199,7 @@ const struct vo_driver *video_out_drivers[] =
&video_out_dfbmga,
#endif
#ifdef CONFIG_VIDIX
-#ifdef HAVE_X11
+#ifdef CONFIG_X11
&video_out_xvidix,
#endif
#ifdef WIN32
@@ -212,19 +216,19 @@ const struct vo_driver *video_out_drivers[] =
#ifdef CONFIG_YUV4MPEG
&video_out_yuv4mpeg,
#endif
-#ifdef HAVE_PNG
+#ifdef CONFIG_PNG
&video_out_png,
#endif
-#ifdef HAVE_JPEG
+#ifdef CONFIG_JPEG
&video_out_jpeg,
#endif
-#ifdef HAVE_GIF
+#ifdef CONFIG_GIF
&video_out_gif89a,
#endif
#ifdef CONFIG_TGA
&video_out_tga,
#endif
-#ifdef HAVE_PNM
+#ifdef CONFIG_PNM
&video_out_pnm,
#endif
#ifdef CONFIG_MD5SUM
diff --git a/libvo/vo_aa.c b/libvo/vo_aa.c
index ca547f0e87..19d55da804 100644
--- a/libvo/vo_aa.c
+++ b/libvo/vo_aa.c
@@ -244,7 +244,7 @@ config(uint32_t width, uint32_t height, uint32_t d_width,
vo_font->pic_b[0]=malloc(sizeof(raw_file));
memset(vo_font->pic_b[0],0,sizeof(raw_file));
-#ifdef HAVE_FREETYPE
+#ifdef CONFIG_FREETYPE
vo_font->dynamic = 0;
#endif
diff --git a/libvo/vo_dga.c b/libvo/vo_dga.c
index 1aa0050337..3383a30df5 100644
--- a/libvo/vo_dga.c
+++ b/libvo/vo_dga.c
@@ -37,15 +37,15 @@
#include <X11/Xlib.h>
#include <X11/extensions/xf86dga.h>
-#ifdef HAVE_XF86VM
+#ifdef CONFIG_XF86VM
#include <X11/extensions/xf86vmode.h>
#endif
static const vo_info_t info = {
-#ifdef HAVE_DGA2
+#ifdef CONFIG_DGA2
"DGA ( Direct Graphic Access V2.0 )",
#else
-#ifdef HAVE_XF86VM
+#ifdef CONFIG_XF86VM
"DGA ( Direct Graphic Access V1.0+XF86VidModeExt. )",
#else
"DGA ( Direct Graphic Access V1.0 )",
@@ -186,7 +186,7 @@ static char *vd_GetModeString(int index)
//-----------------------------------------------------------------
-#if defined(HAVE_XF86VM) && !defined(HAVE_DGA2)
+#if defined(CONFIG_XF86VM) && !defined(CONFIG_DGA2)
static XF86VidModeModeInfo **vo_dga_vidmodes = NULL;
#endif
@@ -213,7 +213,7 @@ static int vo_dga_src_mode = 0; // index in mode list that is used by
// codec
static int vo_dga_XServer_mode = 0; // index in mode list for resolution
-#ifdef HAVE_DGA2
+#ifdef CONFIG_DGA2
static XDGAMode *vo_modelines;
static int vo_modecount;
#endif
@@ -350,7 +350,7 @@ static void flip_page(void)
{
if (1 < vo_dga_nr_video_buffers)
{
-#ifdef HAVE_DGA2
+#ifdef CONFIG_DGA2
XDGASetViewport(mDisplay, mScreen,
0, CURRENT_VIDEO_BUFFER.y, XDGAFlipRetrace);
#else
@@ -387,7 +387,7 @@ static int query_format(uint32_t format)
static void uninit(void)
{
-#ifdef HAVE_DGA2
+#ifdef CONFIG_DGA2
XDGADevice *dgadevice;
#endif
@@ -401,7 +401,7 @@ static void uninit(void)
if (vo_grabpointer)
XUngrabPointer(mDisplay, CurrentTime);
XUngrabKeyboard(mDisplay, CurrentTime);
-#ifdef HAVE_DGA2
+#ifdef CONFIG_DGA2
XDGACloseFramebuffer(mDisplay, mScreen);
dgadevice = XDGASetMode(mDisplay, mScreen, 0);
if (dgadevice != NULL)
@@ -411,7 +411,7 @@ static void uninit(void)
#else
XF86DGADirectVideo(mDisplay, mScreen, 0);
// first disable DirectVideo and then switch mode back!
-#ifdef HAVE_XF86VM
+#ifdef CONFIG_XF86VM
if (vo_dga_vidmodes != NULL)
{
int screen;
@@ -537,7 +537,7 @@ static int config(uint32_t width, uint32_t height,
static unsigned char *vo_dga_base;
static int prev_width, prev_height;
-#ifdef HAVE_DGA2
+#ifdef CONFIG_DGA2
// needed to change DGA video mode
int mX = VO_DGA_INVALID_RES, mY = VO_DGA_INVALID_RES, mVBI =
100000, mMaxY = 0, i, j = 0;
@@ -545,7 +545,7 @@ static int config(uint32_t width, uint32_t height,
XDGAMode *modeline;
XDGADevice *dgadevice;
#else
-#ifdef HAVE_XF86VM
+#ifdef CONFIG_XF86VM
unsigned int vm_event, vm_error;
unsigned int vm_ver, vm_rev;
int i, j = 0, have_vm = 0;
@@ -591,7 +591,7 @@ static int config(uint32_t width, uint32_t height,
// choose a suitable mode ...
-#ifdef HAVE_DGA2
+#ifdef CONFIG_DGA2
// Code to change the video mode added by Michael Graffam
// mgraffam@idsi.net
@@ -664,7 +664,7 @@ static int config(uint32_t width, uint32_t height,
#else
-#ifdef HAVE_XF86VM
+#ifdef CONFIG_XF86VM
mp_msg(MSGT_VO, MSGL_INFO,
"vo_dga: DGA 1.0 compatibility code: Using XF86VidMode for mode switching!\n");
@@ -738,8 +738,8 @@ static int config(uint32_t width, uint32_t height,
mp_msg(MSGT_VO, MSGL_ERR,
"vo_dga: Sorry, video larger than viewport is not yet supported!\n");
// ugly, do something nicer in the future ...
-#ifndef HAVE_DGA2
-#ifdef HAVE_XF86VM
+#ifndef CONFIG_DGA2
+#ifdef CONFIG_XF86VM
if (vo_dga_vidmodes)
{
XFree(vo_dga_vidmodes);
@@ -756,8 +756,8 @@ static int config(uint32_t width, uint32_t height,
"vo_dga: Something is wrong with your DGA. There doesn't seem to be a\n"
" single suitable mode!\n"
" Please file a bug report (see DOCS/HTML/en/bugreports.html)\n");
-#ifndef HAVE_DGA2
-#ifdef HAVE_XF86VM
+#ifndef CONFIG_DGA2
+#ifdef CONFIG_XF86VM
if (vo_dga_vidmodes)
{
XFree(vo_dga_vidmodes);
@@ -771,7 +771,7 @@ static int config(uint32_t width, uint32_t height,
if (!vo_config_count || width != prev_width || height != prev_height)
{
-#ifdef HAVE_DGA2
+#ifdef CONFIG_DGA2
if (!XDGAOpenFramebuffer(mDisplay, mScreen))
{
@@ -790,7 +790,7 @@ static int config(uint32_t width, uint32_t height,
#else
-#ifdef HAVE_XF86VM
+#ifdef CONFIG_XF86VM
if (have_vm)
{
XF86VidModeLockModeSwitch(mDisplay, mScreen, 0);
@@ -853,7 +853,7 @@ static int config(uint32_t width, uint32_t height,
init_video_buffers(vo_dga_base,
vo_dga_vp_height,
vo_dga_width * HW_MODE.vdm_bytespp,
-#ifdef HAVE_DGA2
+#ifdef CONFIG_DGA2
modeline->maxViewportY,
#else
vo_dga_vp_height,
@@ -892,7 +892,7 @@ static int preinit(const char *arg)
if (vo_dga_XServer_mode == 0)
{
-#ifndef HAVE_DGA2
+#ifndef CONFIG_DGA2
mp_msg(MSGT_VO, MSGL_ERR,
"vo_dga: Your X-Server is not running in a ");
mp_msg(MSGT_VO, MSGL_ERR,
@@ -903,7 +903,7 @@ static int preinit(const char *arg)
// vd_GetModeString(vo_dga_XServer_mode));
//}
-#ifdef HAVE_DGA2
+#ifdef CONFIG_DGA2
vo_modelines = XDGAQueryModes(mDisplay, mScreen, &vo_modecount);
if (vo_modelines)
{
diff --git a/libvo/vo_dxr3.c b/libvo/vo_dxr3.c
index 982a8eb265..69038ae0eb 100644
--- a/libvo/vo_dxr3.c
+++ b/libvo/vo_dxr3.c
@@ -35,7 +35,7 @@
#ifdef CONFIG_GUI
#include "gui/interface.h"
#endif
-#ifdef HAVE_X11
+#ifdef CONFIG_X11
#include "x11_common.h"
#endif
#include "libavutil/avstring.h"
@@ -152,7 +152,7 @@ static int overlay_signalmode(overlay_t *o, int mode);
/* End overlay.h */
-#ifdef HAVE_X11
+#ifdef CONFIG_X11
#define KEY_COLOR 0x80a040
static XWindowAttributes xwin_attribs;
static overlay_t *overlay_data;
@@ -178,7 +178,7 @@ static int control(uint32_t request, void *data)
return VO_ERROR;
}
return VO_TRUE;
-#ifdef HAVE_X11
+#ifdef CONFIG_X11
case VOCTRL_ONTOP:
vo_x11_ontop();
return VO_TRUE;
@@ -418,7 +418,7 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_
ioctl(fd_control, EM8300_IOCTL_SET_ASPECTRATIO, &ioval);
#ifdef SPU_SUPPORT
-#ifdef HAVE_FREETYPE
+#ifdef CONFIG_FREETYPE
if (ioval == EM8300_ASPECTRATIO_16_9) {
s_width *= d_height*1.78/s_height*(d_width*1.0/d_height)/2.35;
} else {
@@ -458,7 +458,7 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_
#endif
-#ifdef HAVE_X11
+#ifdef CONFIG_X11
if (dxr3_overlay) {
XVisualInfo vinfo;
XSetWindowAttributes xswa;
@@ -634,7 +634,7 @@ static int draw_frame(uint8_t * src[])
static void flip_page(void)
{
-#ifdef HAVE_X11
+#ifdef CONFIG_X11
if (dxr3_overlay) {
int event = vo_x11_check_events(mDisplay);
if (event & VO_EVENT_RESIZE) {
@@ -688,7 +688,7 @@ static int draw_slice(uint8_t *srcimg[], int stride[], int w, int h, int x0, int
static void uninit(void)
{
mp_msg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_DXR3_Uninitializing);
-#ifdef HAVE_X11
+#ifdef CONFIG_X11
if (dxr3_overlay) {
overlay_set_mode(overlay_data, EM8300_OVERLAY_MODE_OFF);
overlay_release(overlay_data);
@@ -746,7 +746,7 @@ static int preinit(const char *arg)
mp_msg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_DXR3_UsingNewSyncEngine);
dxr3_newsync = 1;
} else if (!strncmp("overlay", arg, 7) && !dxr3_overlay) {
-#ifdef HAVE_X11
+#ifdef CONFIG_X11
mp_msg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_DXR3_UsingOverlay);
dxr3_overlay = 1;
#else
@@ -846,7 +846,7 @@ static int preinit(const char *arg)
}
strcpy(fds_name, devname);
-#ifdef HAVE_X11
+#ifdef CONFIG_X11
if (dxr3_overlay) {
/* Fucked up hack needed to enable overlay.
diff --git a/libvo/vo_gif89a.c b/libvo/vo_gif89a.c
index 58da54e8cb..869276d9c4 100644
--- a/libvo/vo_gif89a.c
+++ b/libvo/vo_gif89a.c
@@ -157,7 +157,7 @@ static int config(uint32_t s_width, uint32_t s_height, uint32_t d_width,
uint32_t d_height, uint32_t flags, char *title,
uint32_t format)
{
-#ifdef HAVE_GIF_4
+#ifdef CONFIG_GIF_4
// these are control blocks for the gif looping extension.
char LB1[] = "NETSCAPE2.0";
char LB2[] = { 1, 0, 0 };
@@ -190,7 +190,7 @@ static int config(uint32_t s_width, uint32_t s_height, uint32_t d_width,
// earlier versions of libungif. i don't know exactly which,
// but certainly in all those before v4. if you have problems,
// you need to upgrade your gif library.
-#ifdef HAVE_GIF_4
+#ifdef CONFIG_GIF_4
EGifSetGifVersion("89a");
#else
mp_msg(MSGT_VO, MSGL_ERR, "GIF89a: Your version of libungif needs to be upgraded.\n");
@@ -232,7 +232,7 @@ static int config(uint32_t s_width, uint32_t s_height, uint32_t d_width,
// set the initial width and height info.
EGifPutScreenDesc(new_gif, s_width, s_height, 256, 0, reduce_cmap);
-#ifdef HAVE_GIF_4
+#ifdef CONFIG_GIF_4
// version 3 of libungif does not support multiple control blocks.
// looping requires multiple control blocks.
// therefore, looping is only enabled for v4 and up.
diff --git a/libvo/vo_gl.c b/libvo/vo_gl.c
index f1431e227c..9d538a8447 100644
--- a/libvo/vo_gl.c
+++ b/libvo/vo_gl.c
@@ -149,7 +149,7 @@ static void resize(int x,int y){
glLoadIdentity();
if (!scaled_osd) {
-#ifdef HAVE_FREETYPE
+#ifdef CONFIG_FREETYPE
// adjust font size to display size
force_load_font = 1;
#endif
diff --git a/libvo/vo_macosx.m b/libvo/vo_macosx.m
index 485202d285..9cd0a1a008 100644
--- a/libvo/vo_macosx.m
+++ b/libvo/vo_macosx.m
@@ -322,7 +322,7 @@ static int preinit(const char *arg)
if(!shared_buffer)
{
- #if !defined (MACOSX_FINDER_SUPPORT) || !defined (HAVE_SDL)
+ #if !defined (CONFIG_MACOSX_FINDER) || !defined (CONFIG_SDL)
//this chunk of code is heavily based off SDL_macosx.m from SDL
//it uses an Apple private function to request foreground operation
void CPSEnableForegroundOperation(ProcessSerialNumber* psn);
@@ -909,7 +909,7 @@ static int control(uint32_t request, void *data)
// Without SDL's bootstrap code (include SDL.h in mplayer.c),
// on Leopard, we got trouble to get the play window auto focused
// when app is actived. Following code fix this problem.
-#ifndef HAVE_SDL
+#ifndef CONFIG_SDL
if (isLeopardOrLater && [event type] == NSAppKitDefined
&& [event subtype] == NSApplicationActivatedEventType) {
[window makeMainWindow];
diff --git a/libvo/vo_mpegpes.c b/libvo/vo_mpegpes.c
index 27f002e693..6499326189 100644
--- a/libvo/vo_mpegpes.c
+++ b/libvo/vo_mpegpes.c
@@ -23,9 +23,7 @@
#include <unistd.h>
#include "mp_msg.h"
-#ifdef HAVE_DVB_HEAD
-#define HAVE_DVB 1
-#endif
+
#ifdef HAVE_DVB
#ifndef HAVE_DVB_HEAD
#include <sys/poll.h>
@@ -67,9 +65,9 @@ extern int vo_mpegpes_fd2;
static const vo_info_t info =
{
#ifdef HAVE_DVB
- "Mpeg-PES to DVB card",
+ "MPEG-PES to DVB card",
#else
- "Mpeg-PES file",
+ "MPEG-PES file",
#endif
"mpegpes",
"A'rpi",
diff --git a/libvo/vo_quartz.c b/libvo/vo_quartz.c
index 18eb397fbb..164d00b79d 100644
--- a/libvo/vo_quartz.c
+++ b/libvo/vo_quartz.c
@@ -1137,7 +1137,7 @@ static int preinit(const char *arg)
}
}
-#if !defined (MACOSX_FINDER_SUPPORT) || !defined (HAVE_SDL)
+#if !defined (CONFIG_MACOSX_FINDER) || !defined (CONFIG_SDL)
//this chunk of code is heavily based off SDL_macosx.m from SDL
//it uses an Apple private function to request foreground operation
{
diff --git a/libvo/vo_sdl.c b/libvo/vo_sdl.c
index 4adc38be82..7bf359dc26 100644
--- a/libvo/vo_sdl.c
+++ b/libvo/vo_sdl.c
@@ -70,7 +70,7 @@
#include "aspect.h"
#include "libmpcodecs/vfcap.h"
-#ifdef HAVE_X11
+#ifdef CONFIG_X11
#include <X11/Xlib.h>
#include "x11_common.h"
#endif
@@ -1189,7 +1189,7 @@ static void check_events (void)
}
else if ( keypressed == SDLK_n ) {
-#ifdef HAVE_X11
+#ifdef CONFIG_X11
aspect(&priv->dstwidth, &priv->dstheight,A_NOZOOM);
#endif
if (priv->surface->w != priv->dstwidth || priv->surface->h != priv->dstheight) {
@@ -1523,7 +1523,7 @@ query_format(uint32_t format)
static void
uninit(void)
{
-#ifdef HAVE_X11
+#ifdef CONFIG_X11
struct sdl_priv_s *priv = &sdl_priv;
if(priv->X) {
if( mp_msg_test(MSGT_VO,MSGL_V) ) {
@@ -1599,7 +1599,7 @@ static int preinit(const char *arg)
mp_msg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_SDL_UsingDriver, priv->driver);
priv->X = 0;
-#ifdef HAVE_X11
+#ifdef CONFIG_X11
if(vo_init()) {
if( mp_msg_test(MSGT_VO,MSGL_V) ) {
mp_msg(MSGT_VO,MSGL_V, "SDL: deactivating XScreensaver/DPMS\n"); }
diff --git a/libvo/vo_wii.c b/libvo/vo_wii.c
new file mode 100644
index 0000000000..bccf6f02ef
--- /dev/null
+++ b/libvo/vo_wii.c
@@ -0,0 +1,419 @@
+/*
+ * Video driver for Nintendo Wii/GameCube Framebuffer device
+ *
+ * Copyright (C) 2008 Jing Liu <fatersh-1@yahoo.com>
+ *
+ * Maintainer: Benjamin Zores <ben@geexbox.org>
+ *
+ * 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.
+ */
+
+/*
+ * This driver handles dedicated ATI GPU, which can be found in:
+ * - Nintendo GameCube (ATI LSI Flipper @ 162 MHz)
+ * - Nintendo Wii (ATI Hollywood @ 243 MHz)
+ *
+ * Flipper and Hollywood chipsets are pretty similar, except from clock speed:
+ * - Embedded framebuffer is 2MB.
+ * - Texture cache is 1MB.
+ * - Vertex cache is 0.1 MB.
+ * - Framebuffer is YUY2, not RGB.
+ * - Best resolution is 480p (854x480)
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <errno.h>
+#include <ctype.h>
+
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+#include <sys/kd.h>
+#include <linux/fb.h>
+
+#include "config.h"
+#include "video_out.h"
+#include "video_out_internal.h"
+#include "sub.h"
+#include "mp_msg.h"
+
+#define WII_DEV_NAME "/dev/fb0"
+#define TTY_DEV_NAME "/dev/tty"
+#define FB_PIXEL_SIZE 2
+
+static const vo_info_t info = {
+ "Nintendo Wii/GameCube Framebuffer Device",
+ "wii",
+ "Jing Liu <fartersh-1@yahoo.com>",
+ ""
+};
+
+LIBVO_EXTERN(wii)
+
+static signed int pre_init_err = -2;
+
+static FILE *vt_fp = NULL;
+static int vt_doit = 1;
+static int fb_dev_fd = -1;
+static int fb_tty_fd = -1;
+
+static uint8_t *frame_buffer;
+static uint8_t *center;
+
+static struct fb_var_screeninfo fb_orig_vinfo;
+static struct fb_var_screeninfo fb_vinfo;
+static int fb_line_len;
+static size_t fb_size;
+
+static int in_width, out_width;
+static int in_height, out_height;
+static int fs;
+
+static int
+fb_preinit (int reset)
+{
+ static int fb_preinit_done = 0;
+ static int fb_works = 0;
+
+ if (reset)
+ {
+ fb_preinit_done = 0;
+ return 0;
+ }
+
+ if (fb_preinit_done)
+ return fb_works;
+
+ if ((fb_dev_fd = open (WII_DEV_NAME, O_RDWR)) == -1)
+ {
+ mp_msg (MSGT_VO, MSGL_ERR,
+ "Can't open %s: %s\n", WII_DEV_NAME, strerror (errno));
+ goto err_out;
+ }
+
+ if (ioctl (fb_dev_fd, FBIOGET_VSCREENINFO, &fb_vinfo))
+ {
+ mp_msg (MSGT_VO, MSGL_ERR,
+ "Can't get VSCREENINFO: %s\n", strerror (errno));
+ goto err_out_fd;
+ }
+
+ fb_orig_vinfo = fb_vinfo;
+
+ if ((fb_tty_fd = open (TTY_DEV_NAME, O_RDWR)) < 0)
+ {
+ mp_msg (MSGT_VO, MSGL_ERR,
+ "Notice: Can't open %s: %s\n", TTY_DEV_NAME, strerror (errno));
+ goto err_out_fd;
+ }
+
+ fb_preinit_done = 1;
+ fb_works = 1;
+ return 1;
+
+ err_out_fd:
+ close (fb_dev_fd);
+ fb_dev_fd = -1;
+ err_out:
+ fb_preinit_done = 1;
+ fb_works = 0;
+
+ return 0;
+}
+
+static void
+vt_set_textarea (int u, int l)
+{
+ /* how can I determine the font height?
+ * just use 16 for now
+ */
+ int urow = ((u + 15) / 16) + 1;
+ int lrow = l / 16;
+
+ mp_msg (MSGT_VO, MSGL_DBG2,
+ "vt_set_textarea (%d, %d): %d,%d\n", u, l, urow, lrow);
+
+ if (vt_fp)
+ {
+ fprintf (vt_fp, "\33[%d;%dr\33[%d;%dH", urow, lrow, lrow, 0);
+ fflush (vt_fp);
+ }
+}
+
+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)
+{
+ struct fb_fix_screeninfo fb_finfo;
+ uint32_t black = 0x00800080;
+ long temp;
+ int vt_fd;
+
+ fs = flags & VOFLAG_FULLSCREEN;
+
+ if (pre_init_err == -2)
+ {
+ mp_msg (MSGT_VO, MSGL_ERR,
+ "Internal fatal error: config() was called before preinit()\n");
+ return -1;
+ }
+
+ if (pre_init_err)
+ return 1;
+
+ in_width = width;
+ in_height = height;
+
+ out_width = (d_width && fs) ? d_width : width;
+ out_height = (d_width &am