diff options
119 files changed, 786 insertions, 693 deletions
diff --git a/DOCS/man/fr/mplayer.1 b/DOCS/man/fr/mplayer.1 index 2d3a595ba6..915c523e17 100644 --- a/DOCS/man/fr/mplayer.1 +++ b/DOCS/man/fr/mplayer.1 @@ -1,4 +1,4 @@ -.\" synced with r27979 +.\" synced with r28056 .\" Encoding: iso-8859-1 .\" MPlayer (C) 2000-2008 MPlayer Team .\" The English man page was/is done by Gabucino, Diego Biurrun, Jonas Jermann @@ -2868,10 +2868,14 @@ Définit le canal de mixage (par défaut\ : pcm). .PD 1 . .TP -.B sdl (SDL uniquement) +.B sdl (SDL uniquement, bogué, périmé) Pilote de sortie audio de la librairie SDL. SDL (Simple Directmedia Layer) est une librairie très indépendante de la plateforme. +Notez qu'il souffre d'un certain nombre de bogues mineurs (\-vm/\-novm est à +peu près ignoré, \-fs se comporte comme like \-novm, la fenêtre est +systématiquement dans le coin en haut à gauche lorsque l'on sort du mode plein +écran, panscan n'est pas géré, ...) .PD 0 .RSs .IPs <pilote> @@ -500,7 +500,7 @@ SRCS_COMMON-$(WIN32DLL) += libmpcodecs/ad_acm.c \ SRCS_COMMON-$(XANIM_CODECS) += libmpcodecs/vd_xanim.c SRCS_COMMON-$(XMMS_PLUGINS) += libmpdemux/demux_xmms.c SRCS_COMMON-$(XVID4) += libmpcodecs/vd_xvid4.c -SRCS_COMMON-$(ZORAN) += libmpcodecs/vd_zrmjpeg.c \ +SRCS_COMMON-$(ZR) += libmpcodecs/vd_zrmjpeg.c \ libmpcodecs/vf_zrmjpeg.c SRCS_MPLAYER = mplayer.c \ @@ -515,7 +515,6 @@ SRCS_MPLAYER = mplayer.c \ libao2/ao_mpegpes.c \ libao2/ao_null.c \ libao2/ao_pcm.c \ - $(addprefix libao2/,$(AO_SRCS)) \ libvo/aspect.c \ libvo/geometry.c \ libvo/old_vo_wrapper.c \ @@ -523,10 +522,32 @@ SRCS_MPLAYER = mplayer.c \ libvo/video_out.c \ libvo/vo_mpegpes.c \ libvo/vo_null.c \ - $(addprefix libvo/,$(VO_SRCS)) \ +SRCS_MPLAYER-$(3DFX) += libvo/vo_3dfx.c +SRCS_MPLAYER-$(AA) += libvo/vo_aa.c +SRCS_MPLAYER-$(ALSA1X) += libao2/ao_alsa.c +SRCS_MPLAYER-$(ALSA5) += libao2/ao_alsa5.c +SRCS_MPLAYER-$(ALSA9) += libao2/ao_alsa.c SRCS_MPLAYER-$(APPLE_IR) += input/appleir.c SRCS_MPLAYER-$(APPLE_REMOTE) += input/ar.c +SRCS_MPLAYER-$(ARTS) += libao2/ao_arts.c +SRCS_MPLAYER-$(BL) += libvo/vo_bl.c +SRCS_MPLAYER-$(CACA) += libvo/vo_caca.c +SRCS_MPLAYER-$(COREAUDIO) += libao2/ao_macosx.c +SRCS_MPLAYER-$(COREVIDEO) += libvo/vo_macosx.m +SRCS_MPLAYER-$(DFBMGA) += libvo/vo_dfbmga.c +SRCS_MPLAYER-$(DGA) += libvo/vo_dga.c +SRCS_MPLAYER-$(DIRECT3D) += libvo/vo_direct3d.c libvo/w32_common.c +SRCS_MPLAYER-$(DIRECTFB) += libvo/vo_directfb2.c +SRCS_MPLAYER-$(DIRECTX) += libao2/ao_dsound.c libvo/vo_directx.c +SRCS_MPLAYER-$(DXR2) += libao2/ao_dxr2.c libvo/vo_dxr2.c +SRCS_MPLAYER-$(DXR3) += libvo/vo_dxr3.c +SRCS_MPLAYER-$(ESD) += libao2/ao_esd.c +SRCS_MPLAYER-$(FBDEV) += libvo/vo_fbdev.c libvo/vo_fbdev2.c +SRCS_MPLAYER-$(GGI) += libvo/vo_ggi.c +SRCS_MPLAYER-$(GIF) += libvo/vo_gif89a.c +SRCS_MPLAYER-$(GL) += libvo/gl_common.c libvo/vo_gl.c libvo/vo_gl2.c +SRCS_MPLAYER-$(GL_WIN32) += libvo/w32_common.c SRCS_MPLAYER-$(GUI) += gui/bitmap.c SRCS_MPLAYER-$(GUI_GTK) += gui/app.c \ gui/cfg.c \ @@ -563,7 +584,10 @@ SRCS_MPLAYER-$(GUI_WIN32) += gui/win32/dialogs.c \ gui/win32/widgetrender.c \ gui/win32/wincfg.c \ +SRCS_MPLAYER-$(IVTV) += libao2/ao_ivtv.c libvo/vo_ivtv.c +SRCS_MPLAYER-$(JACK) += libao2/ao_jack.c SRCS_MPLAYER-$(JOYSTICK) += input/joystick.c +SRCS_MPLAYER-$(JPEG) += libvo/vo_jpeg.c SRCS_MPLAYER-$(LIBMENU) += libmenu/menu.c \ libmenu/menu_chapsel.c \ libmenu/menu_cmdlist.c \ @@ -577,8 +601,28 @@ SRCS_MPLAYER-$(LIBMENU) += libmenu/menu.c \ SRCS_MPLAYER-$(LIBMENU_DVBIN) += libmenu/menu_dvbin.c SRCS_MPLAYER-$(LIRC) += input/lirc.c - -SRCS_MPLAYER-$(VIDIX) += libvo/vosub_vidix.c \ +SRCS_MPLAYER-$(MD5SUM) += libvo/vo_md5sum.c +SRCS_MPLAYER-$(MGA) += libvo/vo_mga.c +SRCS_MPLAYER-$(NAS) += libao2/ao_nas.c +SRCS_MPLAYER-$(OPENAL) += libao2/ao_openal.c +SRCS_MPLAYER-$(OSS) += libao2/ao_oss.c +SRCS_MPLAYER-$(PNG) += libvo/vo_png.c +SRCS_MPLAYER-$(PNM) += libvo/vo_pnm.c +SRCS_MPLAYER-$(PULSE) += libao2/ao_pulse.c +SRCS_MPLAYER-$(QUARTZ) += libvo/vo_quartz.c +SRCS_MPLAYER-$(S3FB) += libvo/vo_s3fb.c +SRCS_MPLAYER-$(SDL) += libao2/ao_sdl.c libvo/vo_sdl.c +SRCS_MPLAYER-$(SGIAUDIO) += libao2/ao_sgi.c +SRCS_MPLAYER-$(SUNAUDIO) += libao2/ao_sun.c +SRCS_MPLAYER-$(SVGA) += libvo/vo_svga.c +SRCS_MPLAYER-$(TDFXFB) += libvo/vo_tdfxfb.c +SRCS_MPLAYER-$(TDFXVID) += libvo/vo_tdfx_vid.c +SRCS_MPLAYER-$(TGA) += libvo/vo_tga.c +SRCS_MPLAYER-$(V4L2) += libvo/vo_v4l2.c +SRCS_MPLAYER-$(V4L2) += libao2/ao_v4l2.c +SRCS_MPLAYER-$(VESA) += libvo/gtf.c libvo/vo_vesa.c libvo/vesa_lvo.c +SRCS_MPLAYER-$(VIDIX) += libvo/vo_cvidix.c \ + libvo/vosub_vidix.c \ vidix/vidix.c \ vidix/drivers.c \ vidix/dha.c \ @@ -601,6 +645,17 @@ SRCS_MPLAYER-$(VIDIX_S3) += vidix/s3_vid.c SRCS_MPLAYER-$(VIDIX_SH_VEU) += vidix/sh_veu_vid.c SRCS_MPLAYER-$(VIDIX_SIS) += vidix/sis_vid.c vidix/sis_bridge.c SRCS_MPLAYER-$(VIDIX_UNICHROME) += vidix/unichrome_vid.c +SRCS_MPLAYER-$(WII) += libvo/vo_wii.c +SRCS_MPLAYER-$(WIN32WAVEOUT) += libao2/ao_win32.c +SRCS_MPLAYER-$(WINVIDIX) += libvo/vo_winvidix.c +SRCS_MPLAYER-$(X11) += libvo/vo_x11.c libvo/vo_xover.c libvo/x11_common.c +SRCS_MPLAYER-$(XMGA) += libvo/vo_xmga.c +SRCS_MPLAYER-$(XV) += libvo/vo_xv.c +SRCS_MPLAYER-$(XVIDIX) += libvo/vo_xvidix.c +SRCS_MPLAYER-$(XVMC) += libvo/vo_xvmc.c +SRCS_MPLAYER-$(XVR100) += libvo/vo_xvr100.c +SRCS_MPLAYER-$(YUV4MPEG) += libvo/vo_yuv4mpeg.c +SRCS_MPLAYER-$(ZR) += libvo/jpeg_enc.c libvo/vo_zr.c libvo/vo_zr2.c SRCS_MENCODER = mencoder.c \ mp_msg-mencoder.c \ diff --git a/cfg-mencoder.h b/cfg-mencoder.h index 2afd25945a..5d09b45a3b 100644 --- a/cfg-mencoder.h +++ b/cfg-mencoder.h @@ -8,8 +8,8 @@ #include "cfg-common.h" extern int sws_flags; -extern int readPPOpt(void *, char *arg); -extern void revertPPOpt(void *conf, char* opt); +int readPPOpt(void *, char *arg); +void revertPPOpt(void *conf, char* opt); extern char *pp_help; extern m_option_t lameopts_conf[]; @@ -20,7 +20,7 @@ extern m_option_t faacopts_conf[]; extern m_option_t vfwopts_conf[]; extern m_option_t xvidencopts_conf[]; -extern void x264enc_set_param(const m_option_t* opt, char* arg); +void x264enc_set_param(const m_option_t* opt, char* arg); extern m_option_t nuvopts_conf[]; extern m_option_t mpegopts_conf[]; diff --git a/cfg-mplayer.h b/cfg-mplayer.h index 283f9a589c..8bcad6c9e0 100644 --- a/cfg-mplayer.h +++ b/cfg-mplayer.h @@ -34,8 +34,8 @@ extern int menu_fribidi_flip_commas; extern char *unrar_executable; -extern int vo_zr_parseoption(const m_option_t* conf, char *opt, char * param); -extern void vo_zr_revertoption(const m_option_t* opt,char* pram); +int vo_zr_parseoption(const m_option_t* conf, char *opt, char * param); +void vo_zr_revertoption(const m_option_t* opt,char* pram); extern m_option_t dxr2_opts[]; @@ -44,8 +44,8 @@ extern int guiWinID; extern int sws_flags; -extern int readPPOpt(void *conf, char *arg); -extern void revertPPOpt(void *conf, char* opt); +int readPPOpt(void *conf, char *arg); +void revertPPOpt(void *conf, char* opt); extern char* pp_help; const m_option_t vd_conf[]={ @@ -2513,7 +2513,7 @@ int run_command(MPContext *mpctx, mp_cmd_t *cmd) break; case MP_CMD_QUIT: - exit_player_with_rc(mpctx, MSGTR_Exit_quit, + exit_player_with_rc(mpctx, EXIT_QUIT, (cmd->nargs > 0) ? cmd->args[0].v.i : 0); case MP_CMD_PLAY_TREE_STEP:{ @@ -2428,7 +2428,7 @@ echores $_asmalign_pot echocheck "yasm" if test -z "$YASMFLAGS" ; then if darwin ; then - x86_64 && objformat="macho64" || objformat="macho32" + x86_64 && objformat="macho64" || objformat="macho" elif win32 ; then objformat="win32" else @@ -2736,8 +2736,8 @@ fi echocheck "__builtin_expect" # GCC branch prediction hint cat > $TMPC << EOF -int foo (int a) { - a = __builtin_expect (a, 10); +int foo(int a) { + a = __builtin_expect(a, 10); return a == 10 ? 0 : 1; } int main(void) { return foo(10) && foo(0); } @@ -3125,7 +3125,7 @@ if test "$_pthreads" = auto ; then cat > $TMPC << EOF #include <pthread.h> void* func(void *arg) { return arg; } -int main(void) { pthread_t tid; return pthread_create (&tid, 0, func, 0) == 0 ? 0 : 1; } +int main(void) { pthread_t tid; return pthread_create(&tid, 0, func, 0) == 0 ? 0 : 1; } EOF _pthreads=no if ! hpux ; then @@ -3195,15 +3195,15 @@ int main(void) { iconv_t icdsc; char *tocode="UTF-8"; char *fromcode="cp1250"; - if ((icdsc = iconv_open (tocode, fromcode)) != (iconv_t)(-1)) { - while ((numread = read (0, inbuffer, INBUFSIZE))) { + if ((icdsc = iconv_open(tocode, fromcode)) != (iconv_t)(-1)) { + while ((numread = read(0, inbuffer, INBUFSIZE))) { char *iptr=inbuffer; char *optr=outbuffer; size_t inleft=numread; size_t outleft=OUTBUFSIZE; if (iconv(icdsc, (const char **)&iptr, &inleft, &optr, &outleft) != (size_t)(-1)) { - write (1, outbuffer, OUTBUFSIZE - outleft); + write(1, outbuffer, OUTBUFSIZE - outleft); } } if (iconv_close(icdsc) == -1) @@ -3619,7 +3619,6 @@ EOF _ld_extra="$_ld_extra -framework CoreAudio -framework AudioUnit -framework AudioToolbox" _coreaudio=yes _def_coreaudio='#define CONFIG_COREAUDIO 1' - _aosrc="$_aosrc ao_macosx.c" _aomodules="macosx $_aomodules" else _coreaudio=no @@ -3640,7 +3639,6 @@ EOF _ld_extra="$_ld_extra -framework Carbon -framework QuickTime" _quartz=yes _def_quartz='#define CONFIG_QUARTZ 1' - _vosrc="$_vosrc vo_quartz.c" _vomodules="quartz $_vomodules" _def_quicktime='#define CONFIG_QUICKTIME 1' else @@ -3655,7 +3653,6 @@ cat > $TMPC <<EOF int main(void) { return 0; } EOF if cc_check -framework Carbon -framework QuartzCore -framework OpenGL; then - _vosrc="$_vosrc vo_macosx.m" _vomodules="macosx $_vomodules" _ld_extra="$_ld_extra -framework Cocoa -framework QuartzCore -framework OpenGL" _def_corevideo='#define CONFIG_COREVIDEO 1' @@ -3803,7 +3800,6 @@ echores "$_smb" echocheck "tdfxfb" if test "$_tdfxfb" = yes ; then _def_tdfxfb='#define CONFIG_TDFXFB 1' - _vosrc="$_vosrc vo_tdfxfb.c" _vomodules="tdfxfb $_vomodules" else _def_tdfxfb='#undef CONFIG_TDFXFB' @@ -3814,7 +3810,6 @@ echores "$_tdfxfb" echocheck "s3fb" if test "$_s3fb" = yes ; then _def_s3fb='#define CONFIG_S3FB 1' - _vosrc="$_vosrc vo_s3fb.c" _vomodules="s3fb $_vomodules" else _def_s3fb='#undef CONFIG_S3FB' @@ -3825,7 +3820,6 @@ echores "$_s3fb" echocheck "wii" if test "$_wii" = yes ; then _def_wii='#define CONFIG_WII 1' - _vosrc="$_vosrc vo_wii.c" _vomodules="wii $_vomodules" else _def_wii='#undef CONFIG_WII' @@ -3836,7 +3830,6 @@ echores "$_wii" echocheck "tdfxvid" if test "$_tdfxvid" = yes ; then _def_tdfxvid='#define CONFIG_TDFX_VID 1' - _vosrc="$_vosrc vo_tdfx_vid.c" _vomodules="tdfx_vid $_vomodules" else _def_tdfxvid='#undef CONFIG_TDFX_VID' @@ -3863,7 +3856,6 @@ EOF fi if test "$_xvr100" = yes ; then _def_xvr100='#define CONFIG_XVR100 1' - _vosrc="$_vosrc vo_xvr100.c" _vomodules="xvr100 $_vomodules" else _def_tdfxvid='#undef CONFIG_XVR100' @@ -3874,7 +3866,6 @@ echores "$_xvr100" echocheck "tga" if test "$_tga" = yes ; then _def_tga='#define CONFIG_TGA 1' - _vosrc="$_vosrc vo_tga.c" _vomodules="tga $_vomodules" else _def_tga='#undef CONFIG_TGA' @@ -3886,7 +3877,6 @@ echores "$_tga" echocheck "md5sum support" if test "$_md5sum" = yes; then _def_md5sum="#define CONFIG_MD5SUM" - _vosrc="$_vosrc vo_md5sum.c" _vomodules="md5sum $_vomodules" else _def_md5sum="#undef CONFIG_MD5SUM" @@ -3898,7 +3888,6 @@ echores "$_md5sum" echocheck "yuv4mpeg support" if test "$_yuv4mpeg" = yes; then _def_yuv4mpeg="#define CONFIG_YUV4MPEG" - _vosrc="$_vosrc vo_yuv4mpeg.c" _vomodules="yuv4mpeg $_vomodules" else _def_yuv4mpeg="#undef CONFIG_YUV4MPEG" @@ -3910,7 +3899,6 @@ echores "$_yuv4mpeg" echocheck "bl" if test "$_bl" = yes ; then _def_bl='#define CONFIG_BL 1' - _vosrc="$_vosrc vo_bl.c" _vomodules="bl $_vomodules" else _def_bl='#undef CONFIG_BL' @@ -3968,7 +3956,6 @@ echores "$_directfb" if test "$_directfb" = yes ; then _def_directfb='#define CONFIG_DIRECTFB 1' - _vosrc="$_vosrc vo_directfb2.c" _vomodules="directfb $_vomodules" _libs_mplayer="$_libs_mplayer -ldirectfb" else @@ -3976,7 +3963,6 @@ else _novomodules="directfb $_novomodules" fi if test "$_dfbmga" = yes; then - _vosrc="$_vosrc vo_dfbmga.c" _vomodules="dfbmga $_vomodules" _def_dfbmga='#define CONFIG_DFBMGA 1' else @@ -4028,7 +4014,6 @@ EOF fi if test "$_x11" = yes ; then _def_x11='#define CONFIG_X11 1' - _vosrc="$_vosrc x11_common.c vo_x11.c vo_xover.c" _vomodules="x11 xover $_vomodules" else _x11=no @@ -4110,7 +4095,6 @@ fi if test "$_xv" = yes ; then _def_xv='#define CONFIG_XV 1' _libs_mplayer="$_libs_mplayer -lXv" - _vosrc="$_vosrc vo_xv.c" _vomodules="xv $_vomodules" else _def_xv='#undef CONFIG_XV' @@ -4138,7 +4122,6 @@ fi if test "$_xvmc" = yes ; then _def_xvmc='#define HAVE_XVMC 1' _libs_mplayer="$_libs_mplayer -lXvMC -l$_xvmclib" - _vosrc="$_vosrc vo_xvmc.c" _vomodules="xvmc $_vomodules" _res_comment="using $_xvmclib" else @@ -4249,7 +4232,6 @@ fi if test "$_dga" = yes ; then _def_dga='#define CONFIG_DGA 1' _libs_mplayer="$_libs_mplayer -lXxf86dga" - _vosrc="$_vosrc vo_dga.c" _vomodules="dga $_vomodules" else _novomodules="dga $_novomodules" @@ -4260,7 +4242,6 @@ echores "$_dga" echocheck "3dfx" if test "$_3dfx" = yes && test "$_dga" = yes ; then _def_3dfx='#define CONFIG_3DFX 1' - _vosrc="$_vosrc vo_3dfx.c" _vomodules="3dfx $_vomodules" else _def_3dfx='#undef CONFIG_3DFX' @@ -4309,10 +4290,8 @@ else fi if test "$_gl" = yes ; then _def_gl='#define CONFIG_GL 1' - _vosrc="$_vosrc vo_gl.c vo_gl2.c gl_common.c" if test "$_gl_win32" = yes ; then _def_gl_win32='#define GL_WIN32 1' - _vosrc="$_vosrc w32_common.c" _res_comment="win32 version" fi _vomodules="opengl $_vomodules" @@ -4366,7 +4345,6 @@ echores "$_vidix" if test "$_vidix" = yes ; then _def_vidix='#define CONFIG_VIDIX 1' - _vosrc="$_vosrc vo_cvidix.c" _vomodules="cvidix $_vomodules" test "$_vidix_drivers" || _vidix_drivers="cyberblade ivtv mach64 mga mga_crtc2 nvidia pm2 pm3 radeon rage128 s3 sh_veu sis unichrome" test $_ivtv = "yes" || _vidix_drivers=`echo $_vidix_drivers | sed s/ivtv//` @@ -4402,14 +4380,14 @@ else fi if test "$_vidix" = yes && win32; then - _vosrc="$_vosrc vo_winvidix.c" + winvidix=yes _vomodules="winvidix $_vomodules" _libs_mplayer="$_libs_mplayer -lgdi32" else _novomodules="winvidix $_novomodules" fi if test "$_vidix" = yes && test "$_x11" = yes; then - _vosrc="$_vosrc vo_xvidix.c" + xvidix=yes _vomodules="xvidix $_vomodules" else _novomodules="xvidix $_novomodules" @@ -4422,7 +4400,6 @@ if test "$_mga" = auto ; then fi if test "$_mga" = yes ; then _def_mga='#define CONFIG_MGA 1' - _vosrc="$_vosrc vo_mga.c" _vomodules="mga $_vomodules" else _def_mga='#undef CONFIG_MGA' @@ -4438,7 +4415,6 @@ if test "$_xmga" = auto ; then fi if test "$_xmga" = yes ; then _def_xmga='#define CONFIG_XMGA 1' - _vosrc="$_vosrc vo_xmga.c" _vomodules="xmga $_vomodules" else _def_xmga='#undef CONFIG_XMGA' @@ -4459,7 +4435,6 @@ fi if test "$_ggi" = yes ; then _def_ggi='#define CONFIG_GGI 1' _libs_mplayer="$_libs_mplayer -lggi" - _vosrc="$_vosrc vo_ggi.c" _vomodules="ggi $_vomodules" else _def_ggi='#undef CONFIG_GGI' @@ -4514,7 +4489,6 @@ if test "$_aa" = yes ; then if cygwin ; then _libs_mplayer="$_libs_mplayer `aalib-config --libs | cut -d " " -f 2,5,6`" fi - _vosrc="$_vosrc vo_aa.c" _vomodules="aa $_vomodules" else _def_aa='#undef CONFIG_AA' @@ -4541,7 +4515,6 @@ if test "$_caca" = yes ; then _def_caca='#define CONFIG_CACA 1' _inc_extra="$_inc_extra `caca-config --cflags`" _libs_mplayer="$_libs_mplayer `caca-config --libs`" - _vosrc="$_vosrc vo_caca.c" _vomodules="caca $_vomodules" else _def_caca='#undef CONFIG_CACA' @@ -4562,7 +4535,6 @@ fi if test "$_svga" = yes ; then _def_svga='#define CONFIG_SVGALIB 1' _libs_mplayer="$_libs_mplayer -lvga" - _vosrc="$_vosrc vo_svga.c" _vomodules="svga $_vomodules" else _def_svga='#undef CONFIG_SVGALIB' @@ -4578,7 +4550,6 @@ if test "$_fbdev" = auto ; then fi if test "$_fbdev" = yes ; then _def_fbdev='#define CONFIG_FBDEV 1' - _vosrc="$_vosrc vo_fbdev.c vo_fbdev2.c" _vomodules="fbdev $_vomodules" else _def_fbdev='#undef CONFIG_FBDEV' @@ -4696,7 +4667,6 @@ echores "$_png" if test "$_png" = yes ; then _def_png='#define CONFIG_PNG 1' _ld_extra="$_ld_extra -lpng -lz" - _vosrc="$_vosrc vo_png.c" _vomodules="png $_vomodules" else _def_png='#undef CONFIG_PNG' @@ -4746,7 +4716,6 @@ echores "$_jpeg" if test "$_jpeg" = yes ; then _def_jpeg='#define CONFIG_JPEG 1' - _vosrc="$_vosrc vo_jpeg.c" _vomodules="jpeg $_vomodules" _ld_extra="$_ld_extra -ljpeg" else @@ -4758,8 +4727,7 @@ fi echocheck "PNM support" if test "$_pnm" = yes; then - _def_pnm="#define CONFIG_PNM" - _vosrc="$_vosrc vo_pnm.c" + _def_pnm="#define CONFIG_PNM 1" _vomodules="pnm $_vomodules" else _def_pnm="#undef CONFIG_PNM" @@ -4805,7 +4773,6 @@ fi if test "$_gif" = yes ; then _def_gif='#define CONFIG_GIF 1' - _vosrc="$_vosrc vo_gif89a.c" _codecmodules="gif $_codecmodules" _vomodules="gif89a $_vomodules" _res_comment="old version, some encoding functions disabled" @@ -4870,7 +4837,6 @@ fi if test "$_vesa" = yes ; then _def_vesa='#define CONFIG_VESA 1' _libs_mplayer="$_libs_mplayer -lvbe -llrmi" - _vosrc="$_vosrc vo_vesa.c vesa_lvo.c gtf.c" _vomodules="vesa $_vomodules" else _def_vesa='#undef CONFIG_VESA' @@ -4928,9 +4894,7 @@ if test "$_sdl" = yes ; then _libs_mplayer="$_libs_mplayer `$_sdlconfig --libs`" _inc_extra="$_inc_extra `$_sdlconfig --cflags | sed s/-D_GNU_SOURCE=1//`" fi - _vosrc="$_vosrc vo_sdl.c" _vomodules="sdl $_vomodules" - _aosrc="$_aosrc ao_sdl.c" _aomodules="sdl $_aomodules" _res_comment="using $_sdlconfig" else @@ -4956,7 +4920,6 @@ fi if test "$_win32waveout" = yes ; then _def_win32waveout='#define CONFIG_WIN32WAVEOUT 1' _libs_mplayer="$_libs_mplayer -lwinmm" - _aosrc="$_aosrc ao_win32.c" _aomodules="win32 $_aomodules" else _def_win32waveout='#undef CONFIG_WIN32WAVEOUT' @@ -4977,7 +4940,6 @@ fi if test "$_direct3d" = yes ; then _def_direct3d='#define CONFIG_DIRECT3D 1' _libs_mplayer="$_libs_mplayer -ld3d9" - _vosrc="$_vosrc vo_direct3d.c w32_common.c" _vomodules="direct3d $_vomodules" else _def_direct3d='#undef CONFIG_DIRECT3D' @@ -4999,9 +4961,7 @@ fi if test "$_directx" = yes ; then _def_directx='#define CONFIG_DIRECTX 1' _libs_mplayer="$_libs_mplayer -lgdi32" - _vosrc="$_vosrc vo_directx.c" _vomodules="directx $_vomodules" - _aosrc="$_aosrc ao_dsound.c" _aomodules="dsound $_aomodules" else _def_directx='#undef CONFIG_DIRECTX' @@ -5025,7 +4985,6 @@ fi if test "$_nas" = yes ; then _def_nas='#define CONFIG_NAS 1' _libs_mplayer="$_libs_mplayer -laudio -lXt" - _aosrc="$_aosrc ao_nas.c" _aomodules="nas $_aomodules" else _noaomodules="nas $_noaomodules" @@ -5047,8 +5006,6 @@ EOF fi if test "$_dxr2" = yes; then _def_dxr2='#define CONFIG_DXR2 1' - _vosrc="$_vosrc vo_dxr2.c" - _aosrc="$_aosrc ao_dxr2.c" _aomodules="dxr2 $_aomodules" _vomodules="dxr2 $_vomodules" else @@ -5069,7 +5026,6 @@ EOF fi if test "$_dxr3" = yes ; then _def_dxr3='#define CONFIG_DXR3 1' - _vosrc="$_vosrc vo_dxr3.c" _vomodules="dxr3 $_vomodules" else _def_dxr3='#undef CONFIG_DXR3' @@ -5090,8 +5046,8 @@ if test "$_ivtv" = auto ; then int main(void) { struct ivtv_cfg_stop_decode sd; struct ivtv_cfg_start_decode sd1; -ioctl (0, IVTV_IOC_START_DECODE, &sd1); -ioctl (0, IVTV_IOC_STOP_DECODE, &sd); +ioctl(0, IVTV_IOC_START_DECODE, &sd1); +ioctl(0, IVTV_IOC_STOP_DECODE, &sd); return 0; } EOF _ivtv=no @@ -5099,9 +5055,7 @@ EOF fi if test "$_ivtv" = yes ; then _def_ivtv='#define CONFIG_IVTV 1' - _vosrc="$_vosrc vo_ivtv.c" _vomodules="ivtv $_vomodules" - _aosrc="$_aosrc ao_ivtv.c" _aomodules="ivtv $_aomodules" else _def_ivtv='#undef CONFIG_IVTV' @@ -5134,9 +5088,7 @@ EOF fi if test "$_v4l2" = yes ; then _def_v4l2='#define CONFIG_V4L2_DECODER 1' - _vosrc="$_vosrc vo_v4l2.c" _vomodules="v4l2 $_vomodules" - _aosrc="$_aosrc ao_v4l2.c" _aomodules="v4l2 $_aomodules" else _def_v4l2='#undef CONFIG_V4L2_DECODER' @@ -5164,7 +5116,6 @@ EOF fi if test "$_ossaudio" = yes ; then _def_ossaudio='#define CONFIG_OSS_AUDIO 1' - _aosrc="$_aosrc ao_oss.c" _aomodules="oss $_aomodules" if test "$_linux_devfs" = yes; then _def_ossaudio_devdsp='#define PATH_DEV_DSP "/dev/sound/dsp"' @@ -5216,7 +5167,6 @@ fi if test "$_arts" = yes ; then _def_arts='#define CONFIG_ARTS 1' - _aosrc="$_aosrc ao_arts.c" _aomodules="arts $_aomodules" _libs_mplayer="$_libs_mplayer `artsc-config --libs`" _inc_extra="$_inc_extra `artsc-config --cflags`" @@ -5243,7 +5193,6 @@ echores "$_esd" if test "$_esd" = yes ; then _def_esd='#define CONFIG_ESD 1' - _aosrc="$_aosrc ao_esd.c" _aomodules="esd $_aomodules" _libs_mplayer="$_libs_mplayer `esd-config --libs`" _inc_extra="$_inc_extra `esd-config --cflags`" @@ -5278,7 +5227,6 @@ echores "$_pulse" if test "$_pulse" = yes ; then _def_pulse='#define CONFIG_PULSE 1' - _aosrc="$_aosrc ao_pulse.c" _aomodules="pulse $_aomodules" _libs_mplayer="$_libs_mplayer `$_pkg_config --libs libpulse`" _inc_extra="$_inc_extra `$_pkg_config --cflags libpulse`" @@ -5308,7 +5256,6 @@ fi if test "$_jack" = yes ; then _def_jack='#define CONFIG_JACK 1' - _aosrc="$_aosrc ao_jack.c" _aomodules="jack $_aomodules" else _noaomodules="jack $_noaomodules" @@ -5338,7 +5285,6 @@ EOF fi if test "$_openal" = yes ; then _def_openal='#define CONFIG_OPENAL 1' - _aosrc="$_aosrc ao_openal.c" _aomodules="openal $_aomodules" else _noaomodules="openal $_noaomodules" @@ -5410,14 +5356,12 @@ if test "$_alsaver" ; then _alsa=yes if test "$_alsaver" = '0.5.x' ; then _alsa5=yes - _aosrc="$_aosrc ao_alsa5.c" _aomodules="alsa5 $_aomodules" _def_alsa5='#define CONFIG_ALSA5 1' def_sys_asoundlib_h='#define HAVE_SYS_ASOUNDLIB_H 1' _res_comment="using alsa 0.5.x and sys/asoundlib.h" elif test "$_alsaver" = '0.9.x-sys' ; then _alsa9=yes - _aosrc="$_aosrc ao_alsa.c" _aomodules="alsa $_aomodules" _def_alsa='#define CONFIG_ALSA 1' _def_alsa9='#define CONFIG_ALSA9 1' @@ -5425,7 +5369,6 @@ if test "$_alsaver" ; then _res_comment="using alsa 0.9.x and sys/asoundlib.h" elif test "$_alsaver" = '0.9.x-alsa' ; then _alsa9=yes - _aosrc="$_aosrc ao_alsa.c" _aomodules="alsa $_aomodules" _def_alsa='#define CONFIG_ALSA 1' _def_alsa9='#define CONFIG_ALSA9 1' @@ -5433,7 +5376,6 @@ if test "$_alsaver" ; then _res_comment="using alsa 0.9.x and alsa/asoundlib.h" elif test "$_alsaver" = '1.0.x-sys' ; then _alsa1x=yes - _aosrc="$_aosrc ao_alsa.c" _aomodules="alsa $_aomodules" _def_alsa='#define CONFIG_ALSA 1' _def_alsa1x="#define CONFIG_ALSA1X 1" @@ -5441,7 +5383,6 @@ if test "$_alsaver" ; then _res_comment="using alsa 1.0.x and sys/asoundlib.h" elif test "$_alsaver" = '1.0.x-alsa' ; then _alsa1x=yes - _aosrc="$_aosrc ao_alsa.c" _aomodules="alsa $_aomodules" _def_alsa='#define CONFIG_ALSA 1' _def_alsa1x="#define CONFIG_ALSA1X 1" @@ -5470,7 +5411,6 @@ EOF fi if test "$_sunaudio" = yes ; then _def_sunaudio='#define CONFIG_SUN_AUDIO 1' - _aosrc="$_aosrc ao_sun.c" _aomodules="sun $_aomodules" else _def_sunaudio='#undef CONFIG_SUN_AUDIO' @@ -5508,7 +5448,6 @@ fi if test "$_sgiaudio" = "yes" ; then _def_sgiaudio='#define CONFIG_SGI_AUDIO 1' _libs_mplayer="$_libs_mplayer -laudio" - _aosrc="$_aosrc ao_sgi.c" _aomodules="sgi $_aomodules" else _def_sgiaudio='#undef CONFIG_SGI_AUDIO' @@ -5755,7 +5694,7 @@ int main(void) { FT_Library library; FT_Int major=-1,minor=-1,patch=-1; int err=FT_Init_FreeType(&library); - if(err){ + if (err) { printf("Couldn't initialize freetype2 lib, err code: %d\n",err); exit(err); } @@ -5763,7 +5702,7 @@ int main(void) { printf("freetype2 header version: %d.%d.%d library version: %d.%d.%d\n", FREETYPE_MAJOR,FREETYPE_MINOR,FREETYPE_PATCH, (int)major,(int)minor,(int)patch ); - if(major!=FREETYPE_MAJOR || minor!=FREETYPE_MINOR){ + if (major!=FREETYPE_MAJOR || minor!=FREETYPE_MINOR) { printf("Library and header version mismatch! Fix it in your distribution!\n"); exit(1); } @@ -5797,7 +5736,7 @@ if test "$_fontconfig" = auto ; then #include <fontconfig/fontconfig.h> int main(void) { int err = FcInit(); - if(err == FcFalse){ + if (err == FcFalse) { printf("Couldn't initialize fontconfig lib\n"); exit(err); } @@ -5863,7 +5802,7 @@ if test "$_fribidi" = auto ; then #define FRIBIDI_CHARSET_UTF8 FRIBIDI_CHAR_SET_UTF8 #include <fribidi/fribidi.h> int main(void) { - if(fribidi_parse_charset("UTF-8") != FRIBIDI_CHAR_SET_UTF8) { + if (fribidi_parse_charset("UTF-8") != FRIBIDI_CHAR_SET_UTF8) { printf("Fribidi headers are not consistents with the library!\n"); exit(1); } @@ -6120,20 +6059,20 @@ int main(void) { int r; double t; - theora_info_init (&inf); - theora_comment_init (&tc); + theora_info_init(&inf); + theora_comment_init(&tc); return 0; /* we don't want to execute this kind of nonsense; just for making sure * that compilation works... */ memset(&op, 0, sizeof(op)); - r = theora_decode_header (&inf, &tc, &op); - r = theora_decode_init (&st, &inf); - t = theora_granule_time (&st, op.granulepos); - r = theora_decode_packetin (&st, &op); - r = theora_decode_YUVout (&st, &yuv); - theora_clear (&st); + r = theora_decode_header(&inf, &tc, &op); + r = theora_decode_init(&st, &inf); + t = theora_granule_time(&st, op.granulepos); + r = theora_decode_packetin(&st, &op); + r = theora_decode_YUVout(&st, &yuv); + theora_clear(&st); return 0; } @@ -6228,7 +6167,7 @@ if test "$_libdca" = auto ; then cat > $TMPC << EOF #include <inttypes.h> #include <dts.h> -int main(void) { dts_init (0); return 0; } +int main(void) { dts_init(0); return 0; } EOF for _ld_dca in -ldts -ldca ; do cc_check $_ld_dca $_ld_lm && _ld_extra="$_ld_extra $_ld_dca" \ @@ -6998,7 +6937,6 @@ fi if test "$_zr" = yes ; then if test "$_libavcodec_a" = yes ; then _def_zr='#define CONFIG_ZR 1' - _vosrc="$_vosrc vo_zr2.c vo_zr.c jpeg_enc.c" _vomodules="zr zr2 $_vomodules" else _res_comment="libavcodec (static) is required by zr, sorry" @@ -7439,7 +7377,7 @@ echocheck "byte order" if test "$_big_endian" = auto ; then cat > $TMPC <<EOF short ascii_name[] = { (('M'<<8)|'P'),(('l'<<8)|'a'),(('y'<<8)|'e'),(('r'<<8)|'B'), - (('i'<<8)|'g'),(('E'<<8)|'n'),(('d'<<8)|'i'),(('a'<<8)|'n'),0}; + (('i'<<8)|'g'),(('E'<<8)|'n'),(('d'<<8)|'i'),(('a'<<8)|'n'),0}; int main(void) { return (int)ascii_name; } EOF if cc_check ; then @@ -7975,9 +7913,6 @@ GETCH = $_getch HELP_FILE = $_mp_help TIMER = $_timer -AO_SRCS = $_aosrc -VO_SRCS = $_vosrc - EXESUF = $_exesuf $_target_arch @@ -7997,32 +7932,52 @@ NEED_SWAB = $_need_swab NEED_VSSCANF = $_need_vsscanf # features +3DFX = $_3dfx +AA = $_aa ALSA1X = $_alsa1x ALSA9 = $_alsa9 +ALSA5 = $_alsa5 APPLE_IR = $_apple_ir APPLE_REMOTE = $_apple_remote +ARTS = $_arts AUDIO_INPUT = $_audio_input BITMAP_FONT = $_bitmap_font +BL = $_bl +CACA = $_caca CDDA = $_cdda CDDB = $_cddb COREAUDIO = $_coreaudio COREVIDEO = $_corevideo +DFBMGA = $_dfbmga +DGA = $_dga +DIRECT3D = $_direct3d +DIRECTFB = $_directfb +DIRECTX = $_directx DVBIN = $_dvbin DVDNAV = $_dvdnav DVDREAD = $_dvdread DVDREAD_INTERNAL = $_dvdread_internal +DXR2 = $_dxr2 +DXR3 = $_dxr3 +ESD = $_esd FAAC=$_faac FAAD = $_faad FAAD_INTERNAL = $_faad_internal +FBDEV = $_fbdev FREETYPE = $_freetype FTP = $_ftp GIF = $_gif +GGI = $_ggi +GL = $_gl +GL_WIN32 = $_gl_win32 GUI = $_gui GUI_GTK = $_gui_gtk GUI_WIN32 = $_gui_win32 HAVE_POSIX_SELECT = $_posix_select HAVE_SYS_MMAN_H = $_mman HAVE_XVMC = $_xvmc +IVTV = $_ivtv +JACK = $_jack JOYSTICK = $_joystick JPEG = $_jpeg LADSPA = $_ladspa @@ -8046,15 +8001,21 @@ LIRC = $_lirc LIVE555 = $_live MACOSX_BUNDLE = $_macosx_bundle MACOSX_FINDER = $_macosx_finder +MD5SUM = $_md5sum +MGA = $_mga MNG = $_mng MP3LAME = $_mp3lame MP3LIB = $_mp3lib MUSEPACK = $_musepack +NAS = $_nas NATIVE_RTSP = $_native_rtsp NETWORK = $_network +OPENAL = $_openal OSS = $_ossaudio PE_EXECUTABLE = $_pe_executable PNG = $_png +PNM = $_pnm +PULSE = $_pulse PVR = $_pvr QTX_CODECS = $_qtx QTX_CODECS_WIN32 = $_qtx_codecs_win32 @@ -8063,8 +8024,16 @@ QUARTZ = $_quartz RADIO=$_radio RADIO_CAPTURE=$_radio_capture REAL_CODECS = $_real +S3FB = $_s3fb +SDL = $_sdl SPEEX = $_speex STREAM_CACHE = $_stream_cache +SGIAUDIO = $_sgiaudio +SUNAUDIO = $_sunaudio +SVGA = $_svga +TDFXFB = $_tdfxfb +TDFXVID = $_tdfxvid +TGA = $_tga TOOLAME=$_toolame TREMOR_INTERNAL = $_tremor_internal TV = $_tv @@ -8076,7 +8045,9 @@ TV_V4L1 = $_tv_v4l1 TV_V4L2 = $_tv_v4l2 TWOLAME=$_twolame UNRAR_EXEC = $_unrar_exec +V4L2 = $_v4l2 VCD = $_vcd +VESA = $_vesa VIDIX = $_vidix VIDIX_PCIDB = $_vidix_pcidb_val VIDIX_CYBERBLADE=$_vidix_drv_cyberblade @@ -8094,13 +8065,22 @@ VIDIX_SH_VEU=$_vidix_drv_sh_veu VIDIX_SIS=$_vidix_drv_sis VIDIX_UNICHROME=$_vidix_drv_unichrome VSTREAM = $_vstream +WII = $_wii WIN32DLL = $_win32dll +WIN32WAVEOUT = $_win32waveout WIN32_EMULATION = $_win32_emulation +WINVIDIX = $winvidix +X11 = $_x11 X264 = $_x264 XANIM_CODECS = $_xanim +XMGA = $_xmga XMMS_PLUGINS = $_xmms +XV = $_xv XVID4 = $_xvid -ZORAN = $_zr +XVIDIX = $xvidix +XVMC = $_xvmc +YUV4MPEG = $_yuv4mpeg +ZR = $_zr # FFmpeg LIBAVUTIL = $_libavutil @@ -8307,6 +8287,7 @@ $_def_runtime_cpudetection $_def_sighandler $_def_sortsub $_def_stream_cache +$_def_pthread_cache /* CPU stuff */ diff --git a/etc/codecs.conf b/etc/codecs.conf index 83348738e2..1786822d62 100644 --- a/etc/codecs.conf +++ b/etc/codecs.conf @@ -144,6 +144,7 @@ videocodec ffmpeg2 fourcc AVmp fourcc VCR2 fourcc mp2v,mpgv + fourcc PIM2 driver ffmpeg dll "mpeg2video" out YV12,I420,IYUV @@ -157,6 +158,7 @@ videocodec ffmpeg12 format 0x10000002 ; MPEG-2 fourcc mpg1,mpg2,MPG2 fourcc PIM1 ; Pinnacle hardware-MPEG-1 + fourcc PIM2 ; Pinnacle hardware-MPEG-2 fourcc VCR2 fourcc "DVR " fourcc hdv2 @@ -194,6 +196,7 @@ videocodec mpeg12 fourcc hdv2 fourcc mpg1 fourcc PIM1 ; Pinnacle hardware-MPEG-1 + fourcc PIM2 ; Pinnacle hardware-MPEG-2 fourcc VCR2 fourcc mpg2,MPG2 fourcc MPEG @@ -230,6 +233,7 @@ videocodec ffmpeg12mc fourcc hdv1 fourcc hdv2 fourcc PIM1 ; Pinnacle hardware-MPEG-1 + fourcc PIM2 ; Pinnacle hardware-MPEG-2 fourcc VCR2 fourcc MPEG fourcc hdv3 ; HDV 1080i50 @@ -671,7 +675,7 @@ videocodec ffindeo2 videocodec ffflv info "FFmpeg Flash video" status working - fourcc FLV1 + fourcc FLV1,flv driver ffmpeg dll flv out YV12 @@ -713,6 +717,7 @@ videocodec ffmp41 status working fourcc DIV1,div1 mpg4 fourcc MPG4,mpg4 + fourcc MP41 driver ffmpeg dll msmpeg4v1 out YV12,I420,IYUV @@ -793,6 +798,9 @@ videocodec ffodivx fourcc m4cc,M4CC fourcc hdx4,HDX4 fourcc FVFW,fvfw + fourcc FFDS + fourcc DCOD,MVXM,EM4A,PM4V + fourcc M4T3 driver ffmpeg dll mpeg4 ;opendivx out YV12,I420,IYUV @@ -840,6 +848,9 @@ videocodec xvid fourcc SEDG ; diskless camcorder Samsung Miniket VP-M110 fourcc SMP4,smp4 ; Samsung SMP4 video codec fourcc VIDM ; vidm 4.01 codec + fourcc FFDS + fourcc DCOD,MVXM,EM4A,PM4V + fourcc M4T3 format 0x10000004 ; mpeg 4 es driver xvid out YV12 @@ -1042,6 +1053,7 @@ videocodec ffmjpeg fourcc LJPG ; lossless JPEG fourcc dmb1 ; MJPEG by Matrox Rainbow Runner fourcc MJLS ; JPEG-LS custom FOURCC for avi - encoder + fourcc MMJP driver ffmpeg dll mjpeg out 444P @@ -1848,6 +1860,15 @@ videocodec tm20 guid 0x4cb63e61, 0xc611, 0x11D0, 0x83, 0xaa, 0x00, 0x00, 0x92, 0x90, 0x01, 0x84 out BGR32,BGR24,BGR16 flip +videocodec sif1 + info "sif1 alpha4" + status working + fourcc SIF1 + driver dshow + dll "Sif1Dec.ax" + guid 0x31666973, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xAA, 0x00, 0x38, 0x9B, 0x71 + out BGR32 + videocodec ffamv info "Modified MJPEG, used in AMV files" status working @@ -1872,6 +1893,14 @@ videocodec sp5x dll "sp5x_32.dll" out BGR24,BGR15 flip +videocodec bt411 + info "Brooktree 411 codec" + status working + fourcc BT20,Y41P + driver vfwex + dll "btvvc32.drv" + out BGR24 + videocodec vivd2 info "SoftMedia ViVD V2 codec VfW" status working @@ -1908,10 +1937,10 @@ videocodec wnv1 videocodec vdom info "VDOWave codec" status working - fourcc VDOM + fourcc VDOM,VDOW driver vfw dll "vdowave.drv" ; Need also VDODEC32.dll and DECVW_32.DLL - out BGR24 + out BGR24 flip videocodec lsv info "Vianet Lsvx Video Decoder" @@ -3173,6 +3202,7 @@ audiocodec mp3 format 0x50 ; layer-1 && layer-2 format 0x55 ; layer-3 format 0x5500736d ; "ms\0\x55" older mp3 fcc (MOV files) + format 0x5000736d ; "ms\0\x50" older mp2 fcc (MOV files) fourcc ".mp3" ; CBR/VBR MP3 (MOV files) fourcc "MP3 " ; used in .nsv files fourcc "LAME" ; used in mythtv .nuv files @@ -191,14 +191,14 @@ extern char * skinMPlayerDir; extern char * skinMPlayerDir_obsolete; extern char * skinName; -extern void appInitStruct( listItems * item ); -extern void appClearItem( wItem * item ); -extern void appCopy( listItems * item1,listItems * item2 ); -extern int appFindMessage( unsigned char * str ); -extern int appFindKey( unsigned char * name ); - -extern void btnModify( int event,float state ); -extern float btnGetValue( int event ); -extern void btnSet( int event,int set ); +void appInitStruct( listItems * item ); +void appClearItem( wItem * item ); +void appCopy( listItems * item1, listItems * item2 ); +int appFindMessage( unsigned char * str ); +int appFindKey( unsigned char * name ); + +void btnModify( int event, float state ); +float btnGetValue( int event ); +void btnSet( int event, int set ); #endif /* MPLAYER_GUI_APP_H */ @@ -99,8 +99,8 @@ gtkASS_t gtkASS; // --- extern int stop_xscreensaver; -extern int m_config_parse_config_file(m_config_t* config, char *conffile); extern int disable_gui_conf; +int m_config_parse_config_file(m_config_t* config, char *conffile); static m_config_t * gui_conf; static const m_option_t gui_opts[] = @@ -73,7 +73,7 @@ typedef struct { extern gtkASS_t gtkASS; #endif -extern int cfg_read( void ); -extern int cfg_write( void ); +int cfg_read( void ); +int cfg_write( void ); #endif /* MPLAYER_GUI_CFG_H */ diff --git a/gui/interface.h b/gui/interface.h index a739d2c640..63398867fc 100644 --- a/gui/interface.h +++ b/gui/interface.h @@ -162,13 +162,13 @@ extern guiInterface_t guiIntfStruct; extern int use_gui; -extern void guiInit( void ); -extern void guiDone( void ); -extern int guiGetEvent( int type,char * arg ); -extern void guiEventHandling( void ); -extern void guiLoadFont( void ); -extern void guiLoadSubtitle( char * name ); -extern void guiMessageBox(int level, char * str); +void guiInit( void ); +void guiDone( void ); +int guiGetEvent( int type,char * arg ); +void guiEventHandling( void ); +void guiLoadFont( void ); +void guiLoadSubtitle( char * name ); +void guiMessageBox(int level, char * str); typedef struct plItem { @@ -223,13 +223,13 @@ extern char * fsHistory[fsPersistant_MaxPos]; extern float gtkEquChannels[6][10]; -extern void * gtkSet( int cmd,float param, void * vparam ); +void * gtkSet( int cmd, float param, void * vparam ); -extern char * gstrdup( const char * str ); -extern int gstrcmp( const char * a,const char * b ); -extern void gfree( void ** p ); -extern void gaddlist( char *** list,const char * entry ); -extern char * gstrchr( char * str,int c ); +char * gstrdup( const char * str ); +int gstrcmp( const char * a, const char * b ); +void gfree( void ** p ); +void gaddlist( char *** list, const char * entry ); +char * gstrchr( char * str, int c ); #define guiSetFilename( s,n ) { gfree( (void **)&s ); s=gstrdup( n ); } diff --git a/gui/mplayer/gmplayer.h b/gui/mplayer/gmplayer.h index 213f14e70b..636e6ab570 100644 --- a/gui/mplayer/gmplayer.h +++ b/gui/mplayer/gmplayer.h @@ -29,23 +29,23 @@ extern int mainVisible; extern int mplMainAutoPlay; extern int mplMiddleMenu; -extern void mplInit( void * disp ); +void mplInit( void * disp ); -extern void mplMainDraw( void ); -extern void mplEventHandling( int msg,float param ); -extern void mplMainMouseHandle( int Button,int X,int Y,int RX,int RY ); -extern void mplMainKeyHandle( int KeyCode,int Type,int Key ); -extern void mplDandDHandler(int num,char** files); +void mplMainDraw( void ); +void mplEventHandling( int msg, float param ); +void mplMainMouseHandle( int Button, int X, int Y, int RX, int RY ); +void mplMainKeyHandle( int KeyCode, int Type, int Key ); +void mplDandDHandler(int num, char** files); -extern void mplSubDraw( void ); -extern void mplSubMouseHandle( int Button,int X,int Y,int RX,int RY ); +void mplSubDraw( void ); +void mplSubMouseHandle( int Button, int X, int Y, int RX, int RY ); -extern void mplMenuInit( void ); -extern void mplHideMenu( int mx,int my,int w ); -extern void mplShowMenu( int mx,int my ); -extern void mplMenuMouseHandle( int X,int Y,int RX,int RY ); +void mplMenuInit( void ); +void mplHideMenu( int mx, int my, int w ); +void mplShowMenu( int mx, int my ); +void mplMenuMouseHandle( int X, int Y, int RX, int RY ); -extern void mplPBInit( void ); -extern void mplPBShow( int x, int y ); +void mplPBInit( void ); +void mplPBShow( int x, int y ); #endif /* MPLAYER_GUI_GMPLAYER_H */ diff --git a/gui/mplayer/gtk/about.h b/gui/mplayer/gtk/about.h index 7487259147..68997ac51b 100644 --- a/gui/mplayer/gtk/about.h +++ b/gui/mplayer/gtk/about.h @@ -23,7 +23,7 @@ extern GtkWidget * About; -extern GtkWidget * create_About( void ); -extern void ShowAboutBox( void ); +GtkWidget * create_About( void ); +void ShowAboutBox( void ); #endif /* MPLAYER_GUI_ABOUT_H */ diff --git a/gui/mplayer/gtk/eq.h b/gui/mplayer/gtk/eq.h index 01750b8a51..8d4d5f117f 100644 --- a/gui/mplayer/gtk/eq.h +++ b/gui/mplayer/gtk/eq.h @@ -23,7 +23,7 @@ extern GtkWidget * Equalizer; -extern GtkWidget * create_Equalizer( void ); -extern void ShowEqualizer( void ); +GtkWidget * create_Equalizer( void ); +void ShowEqualizer( void ); #endif /* MPLAYER_GUI_EQ_H */ diff --git a/gui/mplayer/gtk/fs.c b/gui/mplayer/gtk/fs.c index fb774dead8..b182594df7 100644 --- a/gui/mplayer/gtk/fs.c +++ b/gui/mplayer/gtk/fs.c @@ -43,7 +43,7 @@ #ifndef __linux__ #define get_current_dir_name() getcwd(NULL, PATH_MAX) #else -extern char * get_current_dir_name( void ); +char * get_current_dir_name( void ); #endif gchar * fsSelectedFile = NULL; diff --git a/gui/mplayer/gtk/fs.h b/gui/mplayer/gtk/fs.h index 5e00eb7b07..bb0dfe2afd 100644 --- a/gui/mplayer/gtk/fs.h +++ b/gui/mplayer/gtk/fs.h @@ -31,9 +31,9 @@ extern GtkWidget * fsFileSelect; -extern void HideFileSelect( void ); -extern void ShowFileSelect( int type, int modal ); +void HideFileSelect( void ); +void ShowFileSelect( int type, int modal ); -extern GtkWidget * create_FileSelect( void ); +GtkWidget * create_FileSelect( void ); #endif /* MPLAYER_GUI_FS_H */ diff --git a/gui/mplayer/gtk/gtk_common.h b/gui/mplayer/gtk/gtk_common.h index 34137c9bbb..eff9887e1f 100644 --- a/gui/mplayer/gtk/gtk_common.h +++ b/gui/mplayer/gtk/gtk_common.h @@ -22,20 +22,20 @@ #include <gdk/gdkkeysyms.h> #include <gtk/gtk.h> -extern GtkWidget * AddDialogFrame( GtkWidget * parent ); -extern GtkWidget * AddFrame( const char * title,int type,GtkWidget * parent,int add ); -extern GtkWidget * AddLabel( const char * title,GtkWidget * parent ); -extern GtkWidget * AddVBox( GtkWidget * parent,int type ); -extern GtkWidget * AddHBox( GtkWidget * parent,int type ); -extern GtkWidget * AddCheckButton( const char * title, GtkWidget * parent ); -extern GtkWidget * AddRadioButton( const char * title,GSList ** group,GtkWidget * parent ); -extern GtkWidget * AddSpinButton( const char * title,GtkAdjustment * adj,GtkWidget * parent ); -extern GtkWidget * AddButton( const char * title,GtkWidget * parent ); -extern GtkWidget * AddHSeparator( GtkWidget * parent ); -extern GtkWidget * AddHButtonBox( GtkWidget * parent ); -extern GtkWidget * AddHScaler( GtkAdjustment * adj,GtkWidget * parent,int digit ); -extern GtkWidget * AddVScaler( GtkAdjustment * adj,GtkWidget * parent,int digit ); -extern GtkWidget * AddComboBox( GtkWidget * parent ); -extern void WidgetDestroy( GtkWidget * widget,GtkWidget ** widget_pointer ); +GtkWidget * AddDialogFrame( GtkWidget * parent ); +GtkWidget * AddFrame( const char * title, int type, GtkWidget * parent, int add ); +GtkWidget * AddLabel( const char * title, GtkWidget * parent ); +GtkWidget * AddVBox( GtkWidget * parent, int type ); +GtkWidget * AddHBox( GtkWidget * parent, int type ); +GtkWidget * AddCheckButton( const char * title, GtkWidget * parent ); +GtkWidget * AddRadioButton( const char * title, GSList ** group, GtkWidget * parent ); +GtkWidget * AddSpinButton( const char * title, GtkAdjustment * adj, GtkWidget * parent ); +GtkWidget * AddButton( const char * title, GtkWidget * parent ); +GtkWidget * AddHSeparator( GtkWidget * parent ); +GtkWidget * AddHButtonBox( GtkWidget * parent ); +GtkWidget * AddHScaler( GtkAdjustment * adj, GtkWidget * parent, int digit ); +GtkWidget * AddVScaler( GtkAdjustment * adj, GtkWidget * parent, int digit ); +GtkWidget * AddComboBox( GtkWidget * parent ); +void WidgetDestroy( GtkWidget * widget, GtkWidget ** widget_pointer ); #endif /* MPLAYER_GUI_GTK_COMMON_H */ diff --git a/gui/mplayer/gtk/gtk_url.h b/gui/mplayer/gtk/gtk_url.h index 5398692091..814c053bd4 100644 --- a/gui/mplayer/gtk/gtk_url.h +++ b/gui/mplayer/gtk/gtk_url.h @@ -24,7 +24,7 @@ extern GtkWidget * URL; extern int gtkVURLDialogBox; -extern void ShowURLDialogBox( void ); -extern GtkWidget * create_URL( void ); +void ShowURLDialogBox( void ); +GtkWidget * create_URL( void ); #endif /* MPLAYER_GUI_GTK_URL_H */ diff --git a/gui/mplayer/gtk/mb.h b/gui/mplayer/gtk/mb.h index 8274d212ce..75b0a2cc62 100644 --- a/gui/mplayer/gtk/mb.h +++ b/gui/mplayer/gtk/mb.h @@ -23,7 +23,7 @@ extern GtkWidget * MessageBox; -extern GtkWidget * create_MessageBox( int type ); -extern void ShowMessageBox( const char * msg ); +GtkWidget * create_MessageBox( int type ); +void ShowMessageBox( const char * msg ); #endif /* MPLAYER_GUI_MB_H */ diff --git a/gui/mplayer/gtk/menu.h b/gui/mplayer/gtk/menu.h index 1cdeac3a77..a5e86d70ee 100644 --- a/gui/mplayer/gtk/menu.h +++ b/gui/mplayer/gtk/menu.h @@ -23,9 +23,9 @@ extern GtkWidget * DVDSubMenu; -extern GtkWidget * AddMenuItem( GtkWidget *window1, const char * immagine_xpm, GtkWidget * SubMenu,const char * label,int Number ); -extern GtkWidget * AddSubMenu( GtkWidget *window1, const char * immagine_xpm, GtkWidget * Menu,const char * label ); -extern GtkWidget * AddSeparator( GtkWidget * Menu ); -extern GtkWidget * create_PopUpMenu( void ); +GtkWidget * AddMenuItem( GtkWidget *window1, const char * immagine_xpm, GtkWidget * SubMenu, const char * label, int Number ); +GtkWidget * AddSubMenu( GtkWidget *window1, const char * immagine_xpm, GtkWidget * Menu, const char * label ); +GtkWidget * AddSeparator( GtkWidget * Menu ); +GtkWidget * create_PopUpMenu( void ); #endif /* MPLAYER_GUI_MENU_H */ diff --git a/gui/mplayer/gtk/opts.h b/gui/mplayer/gtk/opts.h index fa9a28abba..b503c4811b 100644 --- a/gui/mplayer/gtk/opts.h +++ b/gui/mplayer/gtk/opts.h @@ -25,9 +25,9 @@ extern GtkWidget * AudioConfig; extern GtkWidget * Preferences; extern GtkWidget * prEFontName; -extern GtkWidget * create_Preferences( void ); -extern GtkWidget * create_AudioConfig( void ); +GtkWidget * create_Preferences( void ); +GtkWidget * create_AudioConfig( void ); -extern void ShowPreferences( void ); +void ShowPreferences( void ); #endif /* MPLAYER_GUI_OPTS_H */ diff --git a/gui/mplayer/gtk/pl.h b/gui/mplayer/gtk/pl.h index 008fcda0ab..003c589847 100644 --- a/gui/mplayer/gtk/pl.h +++ b/gui/mplayer/gtk/pl.h @@ -21,9 +21,9 @@ #include <gtk/gtk.h> -extern void ShowPlayList( void ); -extern void HidePlayList( void ); +void ShowPlayList( void ); +void HidePlayList( void ); -extern GtkWidget * create_PlayList (void); +GtkWidget * create_PlayList (void); #endif /* MPLAYER_GUI_PL_H */ diff --git a/gui/mplayer/gtk/sb.h b/gui/mplayer/gtk/sb.h index 25cea9e597..b9f37a8c48 100644 --- a/gui/mplayer/gtk/sb.h +++ b/gui/mplayer/gtk/sb.h @@ -24,7 +24,7 @@ extern char * sbSelectedSkin; extern GtkWidget * SkinBrowser; -extern void ShowSkinBrowser( void ); -extern GtkWidget * create_SkinBrowser( void ); +void ShowSkinBrowser( void ); +GtkWidget * create_SkinBrowser( void ); #endif /* MPLAYER_GUI_SB_H */ diff --git a/gui/mplayer/gui_common.c b/gui/mplayer/gui_common.c index 957e85d3b1..d6df8b0f39 100644 --- a/gui/mplayer/gui_common.c +++ b/gui/mplayer/gui_common.c @@ -48,7 +48,7 @@ #include "play.h" #include "widgets.h" -extern unsigned int GetTimerMS( void ); +unsigned int GetTimerMS( void ); static inline void TranslateFilename( int c,char * tmp,size_t tmplen ) { diff --git a/gui/mplayer/gui_common.h b/gui/mplayer/gui_common.h index f5791b02c5..d067d39618 100644 --- a/gui/mplayer/gui_common.h +++ b/gui/mplayer/gui_common.h @@ -29,9 +29,9 @@ #include "gui/bitmap.h" #include "gui/wm/ws.h" -extern char * Translate( char * str ); -extern void PutImage( txSample * bf,int x,int y,int max,int ofs ); -extern void SimplePotmeterPutImage( txSample * bf,int x,int y,float frac ); -extern void Render( wsTWindow * window,wItem * Items,int nrItems,char * db,int size ); +char * Translate( char * str ); +void PutImage( txSample * bf,int x, int y, int max, int ofs ); +void SimplePotmeterPutImage( txSample * bf, int x, int y, float frac ); +void Render( wsTWindow * window, wItem * Items, int nrItems, char * db, int size ); #endif /* MPLAYER_GUI_GUI_COMMON_H */ diff --git a/gui/mplayer/mw.c b/gui/mplayer/mw.c index 6f8866c640..1d9dfbedc8 100644 --- a/gui/mplayer/mw.c +++ b/gui/mplayer/mw.c @@ -53,7 +53,7 @@ #include "play.h" #include "widgets.h" -extern unsigned int GetTimerMS( void ); +unsigned int GetTimerMS( void ); unsigned char * mplDrawBuffer = NULL; int mplMainRender = 1; diff --git a/gui/mplayer/pb.c b/gui/mplayer/pb.c index 80532f6db7..65f28289fe 100644 --- a/gui/mplayer/pb.c +++ b/gui/mplayer/pb.c @@ -48,8 +48,8 @@ #include "widgets.h" #include "gui_common.h" -extern unsigned int GetTimerMS( void ); -extern unsigned int GetTimer( void ); +unsigned int GetTimerMS( void ); +unsigned int GetTimer( void ); unsigned char * mplPBDrawBuffer = NULL; int mplPBVisible = 0; diff --git a/gui/mplayer/play.h b/gui/mplayer/play.h index 9fed1cf1ca..a96476e530 100644 --- a/gui/mplayer/play.h +++ b/gui/mplayer/play.h @@ -23,29 +23,29 @@ extern int mplGotoTheNext; -extern void mplEnd( void ); -extern void mplFullScreen( void ); -extern void mplPlay( void ); -extern void mplPause( void ); -extern void mplState( void ); -extern void mplPrev( void ); -extern void mplNext( void ); -extern void mplCurr( void ); - -extern void mplIncAudioBufDelay( void ); -extern void mplDecAudioBufDelay( void ); - -extern void mplRelSeek( float s ); -extern void mplAbsSeek( float s ); -extern float mplGetPosition( void ); - -extern void mplPlayFork( void ); -extern void mplSigHandler( int s ); -extern void mplPlayerThread( void ); - -extern void ChangeSkin( char * name ); -extern void EventHandling( void ); - -extern void mplSetFileName( char * dir,char * name,int type ); +void mplEnd( void ); +void mplFullScreen( void ); +void mplPlay( void ); +void mplPause( void ); +void mplState( void ); +void mplPrev( void ); +void mplNext( void ); +void mplCurr( void ); + +void mplIncAudioBufDelay( void ); +void mplDecAudioBufDelay( void ); + +void mplRelSeek( float s ); +void mplAbsSeek( float s ); +float mplGetPosition( void ); + +void mplPlayFork( void ); +void mplSigHandler( int s ); +void mplPlayerThread( void ); + +void ChangeSkin( char * name ); +void EventHandling( void ); + +void mplSetFileName( char * dir, char * name, int type ); #endif /* MPLAYER_GUI_PLAY_H */ diff --git a/gui/mplayer/widgets.h b/gui/mplayer/widgets.h index 811c599e9b..4a6ee40dfe 100644 --- a/gui/mplayer/widgets.h +++ b/gui/mplayer/widgets.h @@ -60,21 +60,21 @@ extern GdkBitmap * gtkIconMask; extern Pixmap guiIcon; extern Pixmap guiIconMask; -extern void widgetsCreate( void ); +void widgetsCreate( void ); -extern void gtkInit( void ); -extern void gtkAddIcon( GtkWidget * window ); +void gtkInit( void ); +void gtkAddIcon( GtkWidget * window ); -extern int gtkFillSkinList( gchar * dir ); -extern void gtkClearList( GtkWidget * list ); -extern void gtkSetDefaultToCList( GtkWidget * list,char * item ); -extern int gtkFindCList( GtkWidget * list,char * item ); +int gtkFillSkinList( gchar * dir ); +void gtkClearList( GtkWidget * list ); +void gtkSetDefaultToCList( GtkWidget * list, char * item ); +int gtkFindCList( GtkWidget * list, char * item ); -extern void gtkEventHandling( void ); +void gtkEventHandling( void ); -extern void gtkShow( int type,char * param ); -extern void gtkMessageBox( int type,const gchar * str ); -extern void gtkSetLayer( GtkWidget * wdg ); -extern void gtkActive( GtkWidget * wdg ); +void gtkShow( int type, char * param ); +void gtkMessageBox( int type, const gchar * str ); +void gtkSetLayer( GtkWidget * wdg ); +void gtkActive( GtkWidget * wdg ); #endif /* MPLAYER_GUI_WIDGETS_H */ diff --git a/gui/skin/cut.h b/gui/skin/cut.h index faee5d5826..a468c7862e 100644 --- a/gui/skin/cut.h +++ b/gui/skin/cut.h @@ -19,9 +19,9 @@ #ifndef MPLAYER_GUI_CUT_H #define MPLAYER_GUI_CUT_H -extern void cutItem( char * in,char * out,char sep,int num ); -extern int cutItemToInt( char * in,char sep,int num ); -extern float cutItemToFloat( char * in,char sep,int num ); -extern void cutChunk( char * in,char * s1 ); +void cutItem( char * in, char * out, char sep, int num ); +int cutItemToInt( char * in, char sep, int num ); +float cutItemToFloat( char * in, char sep, int num ); +void cutChunk( char * in, char * s1 ); #endif /* MPLAYER_GUI_CUT_H */ diff --git a/gui/skin/font.h b/gui/skin/font.h index 9ef605c0b7..46c3b36acc 100644 --- a/gui/skin/font.h +++ b/gui/skin/font.h @@ -42,13 +42,13 @@ typedef struct extern txSample Bitmap; extern bmpFont * Fonts[26]; -extern int fntAddNewFont( char * name ); -extern void fntFreeFont( void ); -extern int fntFindID( char * name ); -extern int fntTextHeight( int id,char * str ); -extern int fntTextWidth( int id,char * str ); - -extern int fntRead( char * path,char * fname ); -extern txSample * fntRender( wItem * item,int px,const char * fmt,... ); +int fntAddNewFont( char * name ); +void fntFreeFont( void ); +int fntFindID( char * name ); +int fntTextHeight( int id, char * str ); +int fntTextWidth( int id, char * str ); + +int fntRead( char * path, char * fname ); +txSample * fntRender( wItem * item, int px, const char * fmt, ... ); #endif /* MPLAYER_GUI_FONT_H */ diff --git a/gui/skin/skin.h b/gui/skin/skin.h index 5c8ffefe3f..20005f2ca8 100644 --- a/gui/skin/skin.h +++ b/gui/skin/skin.h @@ -23,13 +23,13 @@ extern listItems * skinAppMPlayer; -extern int skinRead( char * dname ); -extern int skinBPRead( char * fname, txSample * bf ); +int skinRead( char * dname ); +int skinBPRead( char * fname, txSample * bf ); // --- -extern char * trimleft( char * in ); -extern char * strswap( char * in,char what,char whereof ); -extern char * trim( char * in ); +char * trimleft( char * in ); +char * strswap( char * in, char what, char whereof ); +char * trim( char * in ); #endif /* MPLAYER_GUI_SKIN_H */ diff --git a/gui/win32/dialogs.c b/gui/win32/dialogs.c index b750fb9caf..60a8d8c759 100644 --- a/gui/win32/dialogs.c +++ b/gui/win32/dialogs.c @@ -40,8 +40,8 @@ extern int vo_gamma_brightness; extern int vo_gamma_saturation; extern int vo_gamma_contrast; extern int vo_gamma_hue; -extern int set_video_colors(sh_video_t *sh_video, const char *item, int value); -extern int get_video_colors(sh_video_t *sh_video, const char *item, int *value); +int set_video_colors(sh_video_t *sh_video, const char *item, int value); +int get_video_colors(sh_video_t *sh_video, const char *item, int *value); guiInterface_t guiIntfStruct; int addurl = 0; diff --git a/gui/win32/gui.c b/gui/win32/gui.c index 35268938a6..d9d86f58a3 100644 --- a/gui/win32/gui.c +++ b/gui/win32/gui.c @@ -54,9 +54,9 @@ #endif /* Globals / Externs */ -extern void renderinfobox(skin_t *skin, window_priv_t *priv); -extern void renderwidget(skin_t *skin, image *dest, widget *item, int state); -extern void print_version(void); +void renderinfobox(skin_t *skin, window_priv_t *priv); +void renderwidget(skin_t *skin, image *dest, widget *item, int state); +void print_version(void); float sub_aspect; DWORD oldtime; @@ -1086,7 +1086,7 @@ static int GetDesktopBitsPerPixel(void) } /* unloads a skin and destroys its windows */ -extern int destroy_window(gui_t *gui) +int destroy_window(gui_t *gui) { RECT rd; unsigned int i; @@ -1311,7 +1311,7 @@ static int window_render(gui_t *gui, HWND hWnd, HDC hdc, window_priv_t *priv, wi } /* creates the sub (AKA video) window,*/ -extern int create_subwindow(gui_t *gui, char *skindir) +int create_subwindow(gui_t *gui, char *skindir) { HINSTANCE instance = GetModuleHandle(NULL); WNDCLASS wc; @@ -1392,7 +1392,7 @@ extern int create_subwindow(gui_t *gui, char *skindir) } /* loads/updates a skin and creates windows for it */ -extern int create_window(gui_t *gui, char *skindir) +int create_window(gui_t *gui, char *skindir) { HINSTANCE instance = GetModuleHandle(NULL); WNDCLASS wc; diff --git a/gui/win32/gui.h b/gui/win32/gui.h index 66d78b0cff..d8578dc96f 100644 --- a/gui/win32/gui.h +++ b/gui/win32/gui.h @@ -99,23 +99,23 @@ struct gui_t #define wsMovable 2 #define wsSizeable 4 -extern gui_t *create_gui(char *skindir, char *skinName, void (*playercontrol)(int event)); -extern int destroy_window(gui_t *gui); -extern int create_window(gui_t *gui, char *skindir); -extern int create_subwindow(gui_t *gui, char *skindir); -extern int parse_filename(char *file, play_tree_t *playtree, m_config_t *mconfig, int clear); -extern void capitalize(char *filename); -extern int import_playtree_playlist_into_gui(play_tree_t *my_playtree, m_config_t *config); +gui_t *create_gui(char *skindir, char *skinName, void (*playercontrol)(int event)); +int destroy_window(gui_t *gui); +int create_window(gui_t *gui, char *skindir); +int create_subwindow(gui_t *gui, char *skindir); +int parse_filename(char *file, play_tree_t *playtree, m_config_t *mconfig, int clear); +void capitalize(char *filename); +int import_playtree_playlist_into_gui(play_tree_t *my_playtree, m_config_t *config); /* Dialogs */ -extern void display_playlistwindow(gui_t *gui); -extern void update_playlistwindow(void); -extern int display_openfilewindow(gui_t *gui, int add); -extern void display_openurlwindow(gui_t *gui, int add); -extern void display_skinbrowser(gui_t *gui); -extern void display_chapterselwindow(gui_t *gui); -extern void display_eqwindow(gui_t *gui); -extern void display_prefswindow(gui_t *gui); -extern void display_opensubtitlewindow(gui_t *gui); +void display_playlistwindow(gui_t *gui); +void update_playlistwindow(void); +int display_openfilewindow(gui_t *gui, int add); +void display_openurlwindow(gui_t *gui, int add); +void display_skinbrowser(gui_t *gui); +void display_chapterselwindow(gui_t *gui); +void display_eqwindow(gui_t *gui); +void display_prefswindow(gui_t *gui); +void display_opensubtitlewindow(gui_t *gui); #endif /* MPLAYER_GUI_GUI_H */ diff --git a/gui/win32/playlist.h b/gui/win32/playlist.h index 52aad4144b..8a3fddd41c 100644 --- a/gui/win32/playlist.h +++ b/gui/win32/playlist.h @@ -55,7 +55,7 @@ struct playlist_t #define SORT_BYTITLE 3 #define SORT_BYDURATION 4 -extern playlist_t *create_playlist(void); -extern BOOL adddirtoplaylist(playlist_t *playlist, const char* path, BOOL recursive); +playlist_t *create_playlist(void); +BOOL adddirtoplaylist(playlist_t *playlist, const char* path, BOOL recursive); #endif /* MPLAYER_GUI_PLAYLIST_H */ diff --git a/gui/win32/skinload.h b/gui/win32/skinload.h index e9fac91090..69019d9638 100644 --- a/gui/win32/skinload.h +++ b/gui/win32/skinload.h @@ -110,7 +110,7 @@ struct skin_t image *(*pngRead)(skin_t *skin, unsigned char *fname); }; -extern skin_t *loadskin(char *skindir, int desktopbpp); +skin_t *loadskin(char *skindir, int desktopbpp); // --- Widget types --- diff --git a/gui/win32/wincfg.c b/gui/win32/wincfg.c index 05d04db32d..245bbc0be2 100644 --- a/gui/win32/wincfg.c +++ b/gui/win32/wincfg.c @@ -55,7 +55,7 @@ int gui_sub_pos_y = -1; /* External functions */ extern char *proc_priority; -extern int m_config_parse_config_file(m_config_t *config, char *conffile); +int m_config_parse_config_file(m_config_t *config, char *conffile); static m_config_t *gui_conf; static const m_option_t gui_opts[] = diff --git a/gui/wm/ws.h b/gui/wm/ws.h index 73321c6ae9..93cc71244d 100644 --- a/gui/wm/ws.h +++ b/gui/wm/ws.h @@ -208,15 +208,15 @@ extern int wsUseXShm; // ---------------------------------------------------------------------------------------------- extern unsigned long wsKeyTable[512]; -extern void wsXDone( void ); -extern void wsXInit( void* disp ); +void wsXDone( void ); +void wsXInit( void* disp ); -extern int wsGetDepthOnScreen( void ); +int wsGetDepthOnScreen( void ); -extern void wsDoExit( void ); -extern void wsMainLoop( void ); -extern Bool wsEvents( Display * display,XEvent * Event,XPointer arg ); -extern void wsHandleEvents( void ); +void wsDoExit( void ); +void wsMainLoop( void ); +Bool wsEvents( Display * display, XEvent * Event, XPointer arg ); +void wsHandleEvents( void ); // ---------------------------------------------------------------------------------------------- // wsCrateWindow: create a new window on the screen. @@ -226,49 +226,49 @@ extern void wsHandleEvents( void ); // cV : mouse cursor visible // D : "decoration", visible titlebar, etc ... // ---------------------------------------------------------------------------------------------- -extern void wsCreateWindow( wsTWindow * win,int X,int Y,int wX,int hY,int bW,int cV,unsigned char D,char * label ); -extern void wsDestroyWindow( wsTWindow * win ); -extern void wsMoveWindow( wsTWindow * win,int b,int x, int y ); -extern void wsResizeWindow( wsTWindow * win,int sx, int sy ); -extern void wsIconify( wsTWindow win ); -extern void wsMoveTopWindow( Display * wsDisplay,Window win ); -extern void wsSetBackground( wsTWindow * win,int color ); -extern void wsSetForegroundRGB( wsTWindow * win,int r,int g,int b ); -extern void wsSetBackgroundRGB( wsTWindow * win,int r,int g,int b ); -#define wsClearWindow( win ) XClearWindow( wsDisplay,win.WindowID ) -extern void wsSetTitle( wsTWindow * win,char * name ); -extern void wsVisibleWindow( wsTWindow * win,int show ); -extern void wsWindowDecoration( wsTWindow * win,long d ); -extern void wsSetLayer( Display * wsDisplay,Window win, int layer ); -extern void wsFullScreen( wsTWindow * win ); -extern void wsPostRedisplay( wsTWindow * win ); -extern void wsSetShape( wsTWindow * win,char * data ); -extern void wsSetIcon( Display * dsp,Window win,Pixmap icon,Pixmap mask ); +void wsCreateWindow( wsTWindow * win, int X, int Y, int wX, int hY, int bW, int cV, unsigned char D, char * label ); +void wsDestroyWindow( wsTWindow * win ); +void wsMoveWindow( wsTWindow * win, int b, int x, int y ); +void wsResizeWindow( wsTWindow * win, int sx, int sy ); +void wsIconify( wsTWindow win ); +void wsMoveTopWindow( Display * wsDisplay, Window win ); +void wsSetBackground( wsTWindow * win, int color ); +void wsSetForegroundRGB( wsTWindow * win, int r, int g, int b ); +void wsSetBackgroundRGB( wsTWindow * win, int r, int g, int b ); +#define wsClearWindow( win ) XClearWindow( wsDisplay, win.WindowID ) +void wsSetTitle( wsTWindow * win, char * name ); +void wsVisibleWindow( wsTWindow * win, int show ); +void wsWindowDecoration( wsTWindow * win, long d ); +void wsSetLayer( Display * wsDisplay, Window win, int layer ); +void wsFullScreen( wsTWindow * win ); +void wsPostRedisplay( wsTWindow * win ); +void wsSetShape( wsTWindow * win, char * data ); +void wsSetIcon( Display * dsp, Window win, Pixmap icon, Pixmap mask ); // ---------------------------------------------------------------------------------------------- // Draw string at x,y with fc ( foreground color ) and bc ( background color ). // ---------------------------------------------------------------------------------------------- -extern void wsDrawString( wsTWindow win,int x,int y,char * str,int fc,int bc ); -extern int wsTextWidth( wsTWindow win,char * str ); +void wsDrawString( wsTWindow win, int x, int y, char * str, int fc, int bc ); +int wsTextWidth( wsTWindow win, char * str ); // ---------------------------------------------------------------------------------------------- // Show / hide mouse cursor. // ---------------------------------------------------------------------------------------------- -extern void wsVisibleMouse( wsTWindow * win,int m ); -extern void wsSetMousePosition( wsTWindow * win,int x, int y ); +void wsVisibleMouse( wsTWindow * win, int m ); +void wsSetMousePosition( wsTWindow * win, int x, int y ); // ---------------------------------------------------------------------------------------------- // Image handling // ---------------------------------------------------------------------------------------------- -extern void wsCreateImage( wsTWindow * win,int Width,int Height ); -extern void wsConvert( wsTWindow * win,unsigned char * Image,unsigned int Size ); -extern void wsPutImage( wsTWindow * win ); -extern void wsResizeImage( wsTWindow * win,int Width,int Height ); -extern void wsDestroyImage( wsTWindow * win ); -extern int wsGetOutMask( void ); - -extern void wsScreenSaverOn( Display *mDisplay ); -extern void wsScreenSaverOff( Display * mDisplay ); +void wsCreateImage( wsTWindow * win, int Width, int Height ); +void wsConvert( wsTWindow * win, unsigned char * Image, unsigned int Size ); +void wsPutImage( wsTWindow * win ); +void wsResizeImage( wsTWindow * win, int Width, int Height ); +void wsDestroyImage( wsTWindow * win ); +int wsGetOutMask( void ); + +void wsScreenSaverOn( Display *mDisplay ); +void wsScreenSaverOff( Display * mDisplay ); #define wgIsRect( X,Y,tX,tY,bX,bY ) ( ( (X) > (tX) )&&( (Y) > (tY) )&&( (X) < (bX) )&&( (Y) < (bY) ) ) diff --git a/input/input.h b/input/input.h index f033c31f0c..99fab98e77 100644 --- a/input/input.h +++ b/input/input.h @@ -209,7 +209,7 @@ typedef int (*mp_cmd_func_t)(int fd,char* dest,int size); typedef void (*mp_close_func_t)(int fd); // Set this to grab all incoming key codes -extern int (*mp_input_key_cb)(int code); +int (*mp_input_key_cb)(int code); // Should return 1 if the command was processed typedef int (*mp_input_cmd_filter)(mp_cmd_t* cmd, int paused, void* ctx); diff --git a/libaf/af_format.h b/libaf/af_format.h index 1e29f3d437..dee7503dc2 100644 --- a/libaf/af_format.h +++ b/libaf/af_format.h @@ -85,11 +85,11 @@ #define AF_FORMAT_UNKNOWN (-1) -extern int af_str2fmt(const char *str); -extern int af_str2fmt_short(const char *str); -extern int af_fmt2bits(int format); -extern int af_bits2fmt(int bits); -extern char* af_fmt2str(int format, char* str, int size); -extern const char* af_fmt2str_short(int format); +int af_str2fmt(const char *str); +int af_str2fmt_short(const char *str); +int af_fmt2bits(int format); +int af_bits2fmt(int bits); +char* af_fmt2str(int format, char* str, int size); +const char* af_fmt2str_short(int format); #endif /* MPLAYER_AF_FORMAT_H */ diff --git a/libaf/filter.h b/libaf/filter.h index 0993f86cce..fe92be8e9c 100644 --- a/libaf/filter.h +++ b/libaf/filter.h @@ -44,28 +44,27 @@ #define ODD 0x00000010 // Make filter HP // Exported functions -extern FLOAT_TYPE af_filter_fir(unsigned int n, const FLOAT_TYPE* w, const FLOAT_TYPE* x); +FLOAT_TYPE af_filter_fir(unsigned int n, const FLOAT_TYPE* w, const FLOAT_TYPE* x); -extern FLOAT_TYPE* af_filter_pfir(unsigned int n, unsigned int k, - unsigned int xi, const FLOAT_TYPE** w, - const FLOAT_TYPE** x, FLOAT_TYPE* y, - unsigned int s); +FLOAT_TYPE* af_filter_pfir(unsigned int n, unsigned int k, + unsigned int xi, const FLOAT_TYPE** w, + const FLOAT_TYPE** x, FLOAT_TYPE* y, + unsigned int s); -//extern int af_filter_updateq(unsigned int n, unsigned int xi, -// FLOAT_TYPE* xq, FLOAT_TYPE* in); -extern int af_filter_updatepq(unsigned int n, unsigned int k, unsigned int xi, - FLOAT_TYPE** xq, const FLOAT_TYPE* in, unsigned int s); +//int af_filter_updateq(unsigned int n, unsigned int xi, +// FLOAT_TYPE* xq, FLOAT_TYPE* in); +int af_filter_updatepq(unsigned int n, unsigned int k, unsigned int xi, + FLOAT_TYPE** xq, const FLOAT_TYPE* in, unsigned int s); -extern int af_filter_design_fir(unsigned int n, FLOAT_TYPE* w, const FLOAT_TYPE* fc, - unsigned int flags, FLOAT_TYPE opt); +int af_filter_design_fir(unsigned int n, FLOAT_TYPE* w, const FLOAT_TYPE* fc, + unsigned int flags, FLOAT_TYPE opt); -extern int af_filter_design_pfir(unsigned int n, unsigned int k, const FLOAT_TYPE* w, - FLOAT_TYPE** pw, FLOAT_TYPE g, - unsigned int flags); +int af_filter_design_pfir(unsigned int n, unsigned int k, const FLOAT_TYPE* w, + FLOAT_TYPE** pw, FLOAT_TYPE g, unsigned int flags); -extern int af_filter_szxform(const FLOAT_TYPE* a, const FLOAT_TYPE* b, FLOAT_TYPE Q, - FLOAT_TYPE fc, FLOAT_TYPE fs, FLOAT_TYPE *k, - FLOAT_TYPE *coef); +int af_filter_szxform(const FLOAT_TYPE* a, const FLOAT_TYPE* b, FLOAT_TYPE Q, + FLOAT_TYPE fc, FLOAT_TYPE fs, FLOAT_TYPE *k, + FLOAT_TYPE *coef); /* Add new data to circular queue designed to be used with a FIR filter. xq is the circular queue, in pointing at the new sample, xi diff --git a/libaf/window.h b/libaf/window.h index 51afb349ac..fb4b1cefae 100644 --- a/libaf/window.h +++ b/libaf/window.h @@ -22,12 +22,12 @@ #ifndef MPLAYER_WINDOW_H #define MPLAYER_WINDOW_H -extern void af_window_boxcar(int n, FLOAT_TYPE* w); -extern void af_window_triang(int n, FLOAT_TYPE* w); -extern void af_window_hanning(int n, FLOAT_TYPE* w); -extern void af_window_hamming(int n, FLOAT_TYPE* w); -extern void af_window_blackman(int n, FLOAT_TYPE* w); -extern void af_window_flattop(int n, FLOAT_TYPE* w); -extern void af_window_kaiser(int n, FLOAT_TYPE* w, FLOAT_TYPE b); +void af_window_boxcar(int n, FLOAT_TYPE* w); +void af_window_triang(int n, FLOAT_TYPE* w); +void af_window_hanning(int n, FLOAT_TYPE* w); +void af_window_hamming(int n, FLOAT_TYPE* w); +void af_window_blackman(int n, FLOAT_TYPE* w); +void af_window_flattop(int n, FLOAT_TYPE* w); +void af_window_kaiser(int n, FLOAT_TYPE* w, FLOAT_TYPE b); #endif /* MPLAYER_WINDOW_H */ diff --git a/libao2/ao_dxr2.c b/libao2/ao_dxr2.c index dc0e762362..b58323613d 100644 --- a/libao2/ao_dxr2.c +++ b/libao2/ao_dxr2.c @@ -157,7 +157,7 @@ static int get_space(void){ static void dxr2_send_lpcm_packet(unsigned char* data,int len,int id,unsigned int timestamp,int freq_id) { - extern int write_dxr2(const unsigned char *data, int len); + int write_dxr2(const unsigned char *data, int len); if(dxr2_fd < 0) { mp_msg(MSGT_AO,MSGL_ERR,"DXR2 fd is not valid\n"); @@ -176,7 +176,7 @@ static void dxr2_send_lpcm_packet(unsigned char* data,int len,int id,unsigned in // it should round it down to outburst*n // return: number of bytes played static int play(void* data,int len,int flags){ - extern int write_dxr2(const unsigned char *data, int len); + int write_dxr2(const unsigned char *data, int len); // MPEG and AC3 don't work :-( if(ao_data.format==AF_FORMAT_MPEG2) diff --git a/libao2/ao_ivtv.c b/libao2/ao_ivtv.c index 0c7ec22384..71b58c0637 100644 --- a/libao2/ao_ivtv.c +++ b/libao2/ao_ivtv.c @@ -147,7 +147,7 @@ get_space (void) static int play (void *data, int len, int flags) { - extern int ivtv_write (const unsigned char *data, int len); + int ivtv_write (const unsigned char *data, int len); if (ao_data.format != AF_FORMAT_MPEG2) return 0; diff --git a/libao2/ao_v4l2.c b/libao2/ao_v4l2.c index 4f57d81944..eca46f01ac 100644 --- a/libao2/ao_v4l2.c +++ b/libao2/ao_v4l2.c @@ -144,7 +144,7 @@ get_space (void) static int play (void *data, int len, int flags) { - extern int v4l2_write (const unsigned char *data, int len); + int v4l2_write (const unsigned char *data, int len); if (ao_data.format != AF_FORMAT_MPEG2) return 0; diff --git a/libass/ass_mp.c b/libass/ass_mp.c index ae6d3943e0..40da63c348 100644 --- a/libass/ass_mp.c +++ b/libass/ass_mp.c @@ -71,7 +71,7 @@ extern char* sub_cp; static char* sub_cp = 0; #endif -extern void process_force_style(ass_track_t* track); +void process_force_style(ass_track_t* track); ass_track_t* ass_default_track(ass_library_t* library) { ass_track_t* track = ass_new_track(library); diff --git a/libmpcodecs/ad_acm.c b/libmpcodecs/ad_acm.c index 8480da3f2e..3f3ad99d44 100644 --- a/libmpcodecs/ad_acm.c +++ b/libmpcodecs/ad_acm.c @@ -38,7 +38,7 @@ static int init(sh_audio_t *sh_audio) return 1; } -extern void print_wave_header(WAVEFORMATEX *h, int verbose_level); +void print_wave_header(WAVEFORMATEX *h, int verbose_level); static int preinit(sh_audio_t *sh_audio) { diff --git a/libmpcodecs/ad_twin.c b/libmpcodecs/ad_twin.c index 51b260d061..64dc4bbf78 100644 --- a/libmpcodecs/ad_twin.c +++ b/libmpcodecs/ad_twin.c @@ -88,7 +88,7 @@ static int load_dll( char *libname ) TvqGetNumFixedBitsPerFrame; } -extern void print_wave_header(WAVEFORMATEX *h, int verbose_level); +void print_wave_header(WAVEFORMATEX *h, int verbose_level); static int init_vqf_audio_codec(sh_audio_t *sh_audio){ WAVEFORMATEX *in_fmt=sh_audio->wf; vqf_priv_t*priv=sh_audio->context; diff --git a/libmpcodecs/dec_audio.h b/libmpcodecs/dec_audio.h index 0c65752202..c505a0539b 100644 --- a/libmpcodecs/dec_audio.h +++ b/libmpcodecs/dec_audio.h @@ -4,14 +4,14 @@ #include "libmpdemux/stheader.h" // dec_audio.c: -extern void afm_help(void); -extern int init_best_audio_codec(sh_audio_t *sh_audio,char** audio_codec_list,char** audio_fm_list); -extern int decode_audio(sh_audio_t *sh_audio, int minlen); -extern void resync_audio_stream(sh_audio_t *sh_audio); -extern void skip_audio_frame(sh_audio_t *sh_audio); -extern void uninit_audio(sh_audio_t *sh_audio); +void afm_help(void); +int init_best_audio_codec(sh_audio_t *sh_audio, char** audio_codec_list, char** audio_fm_list); +int decode_audio(sh_audio_t *sh_audio, int minlen); +void resync_audio_stream(sh_audio_t *sh_audio); +void skip_audio_frame(sh_audio_t *sh_audio); +void uninit_audio(sh_audio_t *sh_audio); -extern int init_audio_filters(sh_audio_t *sh_audio, int in_samplerate, - int *out_samplerate, int *out_channels, int *out_format); +int init_audio_filters(sh_audio_t *sh_audio, int in_samplerate, + int *out_samplerate, int *out_channels, int *out_format); #endif /* MPLAYER_DEC_AUDIO_H */ diff --git a/libmpcodecs/dec_video.h b/libmpcodecs/dec_video.h index 271d08850e..42aa56ecb5 100644 --- a/libmpcodecs/dec_video.h +++ b/libmpcodecs/dec_video.h @@ -6,23 +6,23 @@ struct osd_state; // dec_video.c: -extern void vfm_help(void); +void vfm_help(void); -extern int init_best_video_codec(sh_video_t *sh_video,char** video_codec_list,char** video_fm_list); -extern void uninit_video(sh_video_t *sh_video); +int init_best_video_codec(sh_video_t *sh_video, char** video_codec_list, char** video_fm_list); +void uninit_video(sh_video_t *sh_video); -extern void *decode_video(sh_video_t *sh_video,unsigned char *start,int in_size,int drop_frame, double pts); -extern int filter_video(sh_video_t *sh_video, void *frame, double pts, - struct osd_state *osd); +void *decode_video(sh_video_t *sh_video, unsigned char *start, int in_size, int drop_frame, double pts); +int filter_video(sh_video_t *sh_video, void *frame, double pts, + struct osd_state *osd); -extern int get_video_quality_max(sh_video_t *sh_video); -extern void set_video_quality(sh_video_t *sh_video,int quality); +int get_video_quality_max(sh_video_t *sh_video); +void set_video_quality(sh_video_t *sh_video, int quality); -extern int get_video_colors(sh_video_t *sh_video,const char *item,int *value); -extern int set_video_colors(sh_video_t *sh_video,const char *item,int value); -extern int set_rectangle(sh_video_t *sh_video,int param,int value); -extern void resync_video_stream(sh_video_t *sh_video); -extern int get_current_video_decoder_lag(sh_video_t *sh_video); +int get_video_colors(sh_video_t *sh_video, const char *item, int *value); +int set_video_colors(sh_video_t *sh_video, const char *item, int value); +int set_rectangle(sh_video_t *sh_video, int param, int value); +void resync_video_stream(sh_video_t *sh_video); +int get_current_video_decoder_lag(sh_video_t *sh_video); extern int divx_quality; diff --git a/libmpcodecs/vd_vfw.c b/libmpcodecs/vd_vfw.c index e74007803e..afe17f7c6a 100644 --- a/libmpcodecs/vd_vfw.c +++ b/libmpcodecs/vd_vfw.c @@ -134,7 +134,7 @@ static int control(sh_video_t *sh,int cmd,void* arg,...){ return CONTROL_UNKNOWN; } -extern void print_video_header(BITMAPINFOHEADER *h, int verbose_level); +void print_video_header(BITMAPINFOHEADER *h, int verbose_level); // init driver static int init(sh_video_t *sh){ diff --git a/libmpdemux/demux_asf.c b/libmpdemux/demux_asf.c index 7d8bd82a1a..8a20415530 100644 --- a/libmpdemux/demux_asf.c +++ b/libmpdemux/demux_asf.c @@ -18,8 +18,8 @@ // defined at asfheader.c: -extern int asf_check_header(demuxer_t *demuxer); -extern int read_asf_header(demuxer_t *demuxer,struct asf_priv* asf); +int asf_check_header(demuxer_t *demuxer); +int read_asf_header(demuxer_t *demuxer,struct asf_priv* asf); // based on asf file-format doc by Eugene [http://divx.euro.ru] @@ -531,7 +531,7 @@ static int demux_asf_fill_buffer(demuxer_t *demux, demux_stream_t *ds){ #include "stheader.h" -extern void skip_audio_frame(sh_audio_t *sh_audio); +void skip_audio_frame(sh_audio_t *sh_audio); static void demux_seek_asf(demuxer_t *demuxer,float rel_seek_secs,float audio_delay,int flags){ struct asf_priv* asf = demuxer->priv; diff --git a/libmpdemux/demux_audio.c b/libmpdemux/demux_audio.c index f75a4d6da6..53a41c1401 100644 --- a/libmpdemux/demux_audio.c +++ b/libmpdemux/demux_audio.c @@ -45,7 +45,7 @@ typedef struct mp3_hdr { struct mp3_hdr *next; } mp3_hdr_t; -extern void print_wave_header(WAVEFORMATEX *h, int verbose_level); +void print_wave_header(WAVEFORMATEX *h, int verbose_level); int hr_mp3_seek = 0; diff --git a/libmpdemux/demux_avi.c b/libmpdemux/demux_avi.c index ea0774c553..765463168d 100644 --- a/libmpdemux/demux_avi.c +++ b/libmpdemux/demux_avi.c @@ -14,8 +14,8 @@ #include "aviheader.h" -extern demuxer_t* init_avi_with_ogg(demuxer_t* demuxer); -extern int demux_ogg_open(demuxer_t* demuxer); +demuxer_t* init_avi_with_ogg(demuxer_t* demuxer); +int demux_ogg_open(demuxer_t* demuxer); extern const demuxer_desc_t demuxer_desc_avi_ni; extern const demuxer_desc_t demuxer_desc_avi_nini; diff --git a/libmpdemux/demux_lavf.c b/libmpdemux/demux_lavf.c index 0e33e38d1c..1179369847 100644 --- a/libmpdemux/demux_lavf.c +++ b/libmpdemux/demux_lavf.c @@ -77,8 +77,8 @@ typedef struct lavf_priv_t{ int cur_program; }lavf_priv_t; -extern void print_wave_header(WAVEFORMATEX *h, int verbose_level); -extern void print_video_header(BITMAPINFOHEADER *h, int verbose_level); +void print_wave_header(WAVEFORMATEX *h, int verbose_level); +void print_video_header(BITMAPINFOHEADER *h, int verbose_level); static int mp_read(void *opaque, uint8_t *buf, int size) { stream_t *stream = opaque; diff --git a/libmpdemux/demux_mpg.c b/libmpdemux/demux_mpg.c index 74c35ebcf7..489821f878 100644 --- a/libmpdemux/demux_mpg.c +++ b/libmpdemux/demux_mpg.c @@ -879,7 +879,7 @@ do{ return 1; } -extern void skip_audio_frame(sh_audio_t *sh_audio); +void skip_audio_frame(sh_audio_t *sh_audio); static void demux_seek_mpg(demuxer_t *demuxer,float rel_seek_secs,float audio_delay, int flags){ demux_stream_t *d_audio=demuxer->audio; diff --git a/libmpdemux/demux_ogg.c b/libmpdemux/demux_ogg.c index 3a096cc5a0..013bff5a76 100644 --- a/libmpdemux/demux_ogg.c +++ b/libmpdemux/demux_ogg.c @@ -30,7 +30,7 @@ #ifdef CONFIG_OGGTHEORA #include <theora/theora.h> -extern int _ilog (unsigned int); /* defined in many places in theora/lib/ */ +int _ilog (unsigned int); /* defined in many places in theora/lib/ */ #endif #define BLOCK_SIZE 4096 @@ -607,11 +607,11 @@ static void demux_ogg_scan_stream(demuxer_t* demuxer) { } -extern void print_wave_header(WAVEFORMATEX *h, int verbose_level); -extern void print_video_header(BITMAPINFOHEADER *h, int verbose_level); +void print_wave_header(WAVEFORMATEX *h, int verbose_level); +void print_video_header(BITMAPINFOHEADER *h, int verbose_level); /* defined in demux_mov.c */ -extern unsigned int store_ughvlc(unsigned char *s, unsigned int v); +unsigned int store_ughvlc(unsigned char *s, unsigned int v); /** \brief Change the current subtitle stream and return its ID. diff --git a/libmpdemux/demux_real.c b/libmpdemux/demux_real.c index 88e6574d6e..b6b54f7c03 100644 --- a/libmpdemux/demux_real.c +++ b/libmpdemux/demux_real.c @@ -1085,7 +1085,7 @@ discard: return 0; } -extern void print_wave_header(WAVEFORMATEX *h, int verbose_level); +void print_wave_header(WAVEFORMATEX *h, int verbose_level); static demuxer_t* demux_open_real(demuxer_t* demuxer) { diff --git a/libmpdemux/demux_realaud.c b/libmpdemux/demux_realaud.c index eedaf1e135..57226fa2d3 100644 --- a/libmpdemux/demux_realaud.c +++ b/libmpdemux/demux_realaud.c @@ -141,7 +141,7 @@ static int demux_ra_fill_buffer(demuxer_t *demuxer, demux_stream_t *dsds) -extern void print_wave_header(WAVEFORMATEX *h, int verbose_level); +void print_wave_header(WAVEFORMATEX *h, int verbose_level); diff --git a/libmpdemux/demux_ts.c b/libmpdemux/demux_ts.c index d6202a223f..c0924d9ecf 100644 --- a/libmpdemux/demux_ts.c +++ b/libmpdemux/demux_ts.c @@ -1107,7 +1107,7 @@ static void demux_close_ts(demuxer_t * demuxer) } -extern unsigned char mp_getbits(unsigned char*, unsigned int, unsigned char); +unsigned char mp_getbits(unsigned char*, unsigned int, unsigned char); #define getbits mp_getbits static int mp4_parse_sl_packet(pmt_t *pmt, uint8_t *buf, uint16_t packet_len, int pid, ES_stream_t *pes_es) @@ -3085,7 +3085,7 @@ static int ts_parse(demuxer_t *demuxer , ES_stream_t *es, unsigned char *packet, } -extern void skip_audio_frame(sh_audio_t *sh_audio); +void skip_audio_frame(sh_audio_t *sh_audio); static void reset_fifos(demuxer_t *demuxer, int a, int v, int s) { diff --git a/libmpdemux/demux_ty.c b/libmpdemux/demux_ty.c index b63590daab..2b51fb6006 100644 --- a/libmpdemux/demux_ty.c +++ b/libmpdemux/demux_ty.c @@ -47,7 +47,7 @@ #include "libavutil/avstring.h" #include "libavutil/intreadwrite.h" -extern void skip_audio_frame( sh_audio_t *sh_audio ); +void skip_audio_frame( sh_audio_t *sh_audio ); extern int sub_justify; // 2/c0: audio data diff --git a/libmpdemux/demuxer.c b/libmpdemux/demuxer.c index 87c2429402..6c3792b1d9 100644 --- a/libmpdemux/demuxer.c +++ b/libmpdemux/demuxer.c @@ -35,8 +35,8 @@ #endif #endif -extern void resync_video_stream(sh_video_t *sh_video); -extern void resync_audio_stream(sh_audio_t *sh_audio); +void resync_video_stream(sh_video_t *sh_video); +void resync_audio_stream(sh_audio_t *sh_audio); // Demuxer list extern const demuxer_desc_t demuxer_desc_rawaudio; diff --git a/libmpdemux/demuxer.h b/libmpdemux/demuxer.h index 993c30b904..e8b62a1004 100644 --- a/libmpdemux/demuxer.h +++ b/libmpdemux/demuxer.h @@ -397,16 +397,16 @@ int demux_ogg_num_subs(demuxer_t *demuxer); int demux_ogg_sub_id(demuxer_t *demuxer, int index); #endif -extern int demuxer_get_current_time(demuxer_t *demuxer); -extern double demuxer_get_time_length(demuxer_t *demuxer); -extern int demuxer_get_percent_pos(demuxer_t *demuxer); -extern int demuxer_switch_audio(demuxer_t *demuxer, int index); -extern int demuxer_switch_video(demuxer_t *demuxer, int index); +int demuxer_get_current_time(demuxer_t *demuxer); +double demuxer_get_time_length(demuxer_t *demuxer); +int demuxer_get_percent_pos(demuxer_t *demuxer); +int demuxer_switch_audio(demuxer_t *demuxer, int index); +int demuxer_switch_video(demuxer_t *demuxer, int index); -extern int demuxer_type_by_filename(char* filename); +int demuxer_type_by_filename(char* filename); -extern void demuxer_help(void); -extern int get_demuxer_type_from_name(char *demuxer_name, int *force); +void demuxer_help(void); +int get_demuxer_type_from_name(char *demuxer_name, int *force); int demuxer_add_attachment(demuxer_t* demuxer, const char* name, const char* type, const void* data, size_t size); diff --git a/libmpdemux/muxer_mpeg.c b/libmpdemux/muxer_mpeg.c index d2f67e2a54..7e88686483 100644 --- a/libmpdemux/muxer_mpeg.c +++ b/libmpdemux/muxer_mpeg.c @@ -2048,7 +2048,7 @@ static int analyze_mpa(muxer_stream_t *s) return layer; //actual layer with the highest score } -extern int aac_parse_frame(uint8_t *buf, int *srate, int *num); +int aac_parse_frame(uint8_t *buf, int *srate, int *num); static int parse_audio(muxer_stream_t *s, int finalize, unsigned int *nf, double *timer, double delay, int drop) { diff --git a/libswscale/rgb2rgb.h b/libswscale/rgb2rgb.h index 5cc6a2dc03..df912c8533 100644 --- a/libswscale/rgb2rgb.h +++ b/libswscale/rgb2rgb.h @@ -48,25 +48,25 @@ extern void (*rgb32tobgr32)(const uint8_t *src, uint8_t *dst, long src_size); extern void (*rgb32tobgr16)(const uint8_t *src, uint8_t *dst, long src_size); extern void (*rgb32tobgr15)(const uint8_t *src, uint8_t *dst, long src_size); -extern void rgb24to32 (const uint8_t *src, uint8_t *dst, long src_size); -extern void rgb32to24 (const uint8_t *src, uint8_t *dst, long src_size); -extern void rgb16tobgr32(const uint8_t *src, uint8_t *dst, long src_size); -extern void rgb16to24 (const uint8_t *src, uint8_t *dst, long src_size); -extern void rgb16tobgr16(const uint8_t *src, uint8_t *dst, long src_size); -extern void rgb16tobgr15(const uint8_t *src, uint8_t *dst, long src_size); -extern void rgb15tobgr32(const uint8_t *src, uint8_t *dst, long src_size); -extern void rgb15to24 (const uint8_t *src, uint8_t *dst, long src_size); -extern void rgb15tobgr16(const uint8_t *src, uint8_t *dst, long src_size); -extern void rgb15tobgr15(const uint8_t *src, uint8_t *dst, long src_size); -extern void bgr8torgb8 (const uint8_t *src, uint8_t *dst, long src_size); - - -extern void palette8topacked32(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette); -extern void palette8topacked24(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette); -extern void palette8torgb16(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette); -extern void palette8tobgr16(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette); -extern void palette8torgb15(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette); -extern void palette8tobgr15(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette); +void rgb24to32 (const uint8_t *src, uint8_t *dst, long src_size); +void rgb32to24 (const uint8_t *src, uint8_t *dst, long src_size); +void rgb16tobgr32(const uint8_t *src, uint8_t *dst, long src_size); +void rgb16to24 (const uint8_t *src, uint8_t *dst, long src_size); +void rgb16tobgr16(const uint8_t *src, uint8_t *dst, long src_size); +void rgb16tobgr15(const uint8_t *src, uint8_t *dst, long src_size); +void rgb15tobgr32(const uint8_t *src, uint8_t *dst, long src_size); +void rgb15to24 (const uint8_t *src, uint8_t *dst, long src_size); +void rgb15tobgr16(const uint8_t *src, uint8_t *dst, long src_size); +void rgb15tobgr15(const uint8_t *src, uint8_t *dst, long src_size); +void bgr8torgb8 (const uint8_t *src, uint8_t *dst, long src_size); + + +void palette8topacked32(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette); +void palette8topacked24(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette); +void palette8torgb16(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette); +void palette8tobgr16(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette); +void palette8torgb15(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette); +void palette8tobgr15(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette); /** * Height should be a multiple of 2 and width should be a multiple of 16. diff --git a/libswscale/swscale_bfin.c b/libswscale/swscale_bfin.c index 3e63bbd638..002960e82c 100644 --- a/libswscale/swscale_bfin.c +++ b/libswscale/swscale_bfin.c @@ -40,13 +40,13 @@ #define L1CODE #endif -extern int ff_bfin_uyvytoyv12 (const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst, - long width, long height, - long lumStride, long chromStride, long srcStride) L1CODE; +int ff_bfin_uyvytoyv12 (const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst, + long width, long height, + long lumStride, long chromStride, long srcStride) L1CODE; -extern int ff_bfin_yuyvtoyv12 (const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst, - long width, long height, - long lumStride, long chromStride, long srcStride) L1CODE; +int ff_bfin_yuyvtoyv12 (const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst, + long width, long height, + long lumStride, long chromStride, long srcStride) L1CODE; static int uyvytoyv12_unscaled (SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t* dst[], int dstStride[]) diff --git a/libswscale/yuv2rgb_bfin.c b/libswscale/yuv2rgb_bfin.c index 1500a96b25..e70a5db247 100644 --- a/libswscale/yuv2rgb_bfin.c +++ b/libswscale/yuv2rgb_bfin.c @@ -41,14 +41,14 @@ #define L1CODE #endif -extern void ff_bfin_yuv2rgb555_line (uint8_t *Y, uint8_t *U, uint8_t *V, uint8_t *out, - int w, uint32_t *coeffs) L1CODE; +void ff_bfin_yuv2rgb555_line (uint8_t *Y, uint8_t *U, uint8_t *V, uint8_t *out, + int w, uint32_t *coeffs) L1CODE; -extern void ff_bfin_yuv2rgb565_line (uint8_t *Y, uint8_t *U, uint8_t *V, uint8_t *out, - int w, uint32_t *coeffs) L1CODE; +void ff_bfin_yuv2rgb565_line (uint8_t *Y, uint8_t *U, uint8_t *V, uint8_t *out, + int w, uint32_t *coeffs) L1CODE; -extern void ff_bfin_yuv2rgb24_line (uint8_t *Y, uint8_t *U, uint8_t *V, uint8_t *out, - int w, uint32_t *coeffs) L1CODE; +void ff_bfin_yuv2rgb24_line (uint8_t *Y, uint8_t *U, uint8_t *V, uint8_t *out, + int w, uint32_t *coeffs) L1CODE; typedef void (* ltransform_t)(uint8_t *Y, uint8_t *U, uint8_t *V, uint8_t *out, int w, uint32_t *coeffs); diff --git a/libvo/aspect.h b/libvo/aspect.h index b803b99490..5fa313d7ff 100644 --- a/libvo/aspect.h +++ b/libvo/aspect.h @@ -3,8 +3,8 @@ /* Stuff for correct aspect scaling. */ struct vo; -extern void panscan_init(struct vo *vo); -extern void panscan_calc(struct vo *vo); +void panscan_init(struct vo *vo); +void panscan_calc(struct vo *vo); void aspect_save_orig(struct vo *vo, int orgw, int orgh); diff --git a/libvo/fastmemcpy.h b/libvo/fastmemcpy.h index 3ac32e3a71..be0b752558 100644 --- a/libvo/fastmemcpy.h +++ b/libvo/fastmemcpy.h @@ -28,8 +28,8 @@ /* || defined(HAVE_SSE) || defined(HAVE_SSE2) */ #include <stddef.h> -extern void * fast_memcpy(void * to, const void * from, size_t len); -extern void * mem2agpcpy(void * to, const void * from, size_t len); +void * fast_memcpy(void * to, const void * from, size_t len); +void * mem2agpcpy(void * to, const void * from, size_t len); #else /* HAVE_MMX/MMX2/3DNOW/SSE/SSE2 */ #define mem2agpcpy(a,b,c) memcpy(a,b,c) diff --git a/libvo/gl_common.c b/libvo/gl_common.c index cd75bdb706..0df3e2e74a 100644 --- a/libvo/gl_common.c +++ b/libvo/gl_common.c @@ -187,10 +187,10 @@ int glFindFormat(uint32_t fmt, int *bpp, GLint *gl_texfmt, int dummy1; GLenum dummy2; GLint dummy3; - if (bpp == NULL) bpp = &dummy1; - if (gl_texfmt == NULL) gl_texfmt = &dummy3; - if (gl_format == NULL) gl_format = &dummy2; - if (gl_type == NULL) gl_type = &dummy2; + if (!bpp) bpp = &dummy1; + if (!gl_texfmt) gl_texfmt = &dummy3; + if (!gl_format) gl_format = &dummy2; + if (!gl_type) gl_type = &dummy2; *bpp = IMGFMT_IS_BGR(fmt)?IMGFMT_BGR_DEPTH(fmt):IMGFMT_RGB_DEPTH(fmt); *gl_texfmt = 3; @@ -572,7 +572,7 @@ static void glSetupYUVCombiners(float uvcos, float uvsin) { if (i < 2) mp_msg(MSGT_VO, MSGL_ERR, "[gl] 2 general combiners needed for YUV combiner support (found %i)\n", i); - glGetIntegerv (GL_MAX_TEXTURE_UNITS, &i); + glGetIntegerv(GL_MAX_TEXTURE_UNITS, &i); if (i < 3) mp_msg(MSGT_VO, MSGL_ERR, "[gl] 3 texture units needed for YUV combiner support (found %i)\n", i); @@ -1469,7 +1469,7 @@ int setGlWindow(int *vinfo, HGLRC *context, HWND win) // set context if (!wglMakeCurrent(windc, new_context)) { - mp_msg (MSGT_VO, MSGL_FATAL, "[gl] Could not set GL context!\n"); + mp_msg(MSGT_VO, MSGL_FATAL, "[gl] Could not set GL context!\n"); if (!keep_context) { wglDeleteContext(new_context); } @@ -1598,9 +1598,9 @@ int setGlWindow(XVisualInfo **vinfo, GLXContext *context, Window win) // set context if (!glXMakeCurrent(mDisplay, vo_window, new_context)) { - mp_msg (MSGT_VO, MSGL_FATAL, "[gl] Could not set GLX context!\n"); + mp_msg(MSGT_VO, MSGL_FATAL, "[gl] Could not set GLX context!\n"); if (!keep_context) { - glXDestroyContext (mDisplay, new_context); + glXDestroyContext(mDisplay, new_context); XFree(new_vinfo); } return SET_WINDOW_FAILED; diff --git a/libvo/osd.h b/libvo/osd.h index c376d8d49c..897f79faa3 100644 --- a/libvo/osd.h +++ b/libvo/osd.h @@ -5,14 +5,14 @@ // Generic alpha renderers for all YUV modes and RGB depths. // These are "reference implementations", should be optimized later (MMX, etc) -extern void vo_draw_alpha_init(void); // build tables +void vo_draw_alpha_init(void); // build tables -extern void vo_draw_alpha_yv12(int w,int h, unsigned char* src, unsigned char *srca, int srcstride, unsigned char* dstbase,int dststride); -extern void vo_draw_alpha_yuy2(int w,int h, unsigned char* src, unsigned char *srca, int srcstride, unsigned char* dstbase,int dststride); -extern void vo_draw_alpha_uyvy(int w,int h, unsigned char* src, unsigned char *srca, int srcstride, unsigned char* dstbase,int dststride); -extern void vo_draw_alpha_rgb24(int w,int h, unsigned char* src, unsigned char *srca, int srcstride, unsigned char* dstbase,int dststride); -extern void vo_draw_alpha_rgb32(int w,int h, unsigned char* src, unsigned char *srca, int srcstride, unsigned char* dstbase,int dststride); -extern void vo_draw_alpha_rgb15(int w,int h, unsigned char* src, unsigned char *srca, int srcstride, unsigned char* dstbase,int dststride); -extern void vo_draw_alpha_rgb16(int w,int h, unsigned char* src, unsigned char *srca, int srcstride, unsigned char* dstbase,int dststride); +void vo_draw_alpha_yv12(int w, int h, unsigned char* src, unsigned char *srca, int srcstride, unsigned char* dstbase, int dststride); +void vo_draw_alpha_yuy2(int w, int h, unsigned char* src, unsigned char *srca, int srcstride, unsigned char* dstbase, int dststride); +void vo_draw_alpha_uyvy(int w, int h, unsigned char* src, unsigned char *srca, int srcstride, unsigned char* dstbase, int dststride); +void vo_draw_alpha_rgb24(int w, int h, unsigned char* src, unsigned char *srca, int srcstride, unsigned char* dstbase, int dststride); +void vo_draw_alpha_rgb32(int w, int h, unsigned char* src, unsigned char *srca, int srcstride, unsigned char* dstbase, int dststride); +void vo_draw_alpha_rgb15(int w, int h, unsigned char* src, unsigned char *srca, int srcstride, unsigned char* dstbase, int dststride); +void vo_draw_alpha_rgb16(int w, int h, unsigned char* src, unsigned char *srca, int srcstride, unsigned char* dstbase, int dststride); #endif /* MPLAYER_OSD_H */ diff --git a/libvo/sub.c b/libvo/sub.c index c7d3fb516e..423a3f84d9 100644 --- a/libvo/sub.c +++ b/libvo/sub.c @@ -640,8 +640,6 @@ inline static void vo_update_text_progbar(mp_osd_obj_t* obj,int dxs,int dys){ subtitle* vo_sub=NULL; -// vo_draw_text_sub(int dxs,int dys,void (*draw_alpha)(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride)) - inline static void vo_update_text_sub(struct osd_state *osd, mp_osd_obj_t* obj,int dxs,int dys){ unsigned char *t; int c,i,j,l,x,y,font,prevc,counter; @@ -1036,7 +1034,7 @@ void *vo_vobsub=NULL; static int draw_alpha_init_flag=0; -extern void vo_draw_alpha_init(void); +void vo_draw_alpha_init(void); mp_osd_obj_t* vo_osd_list=NULL; diff --git a/libvo/sub.h b/libvo/sub.h index a1e7acd3c4..879e81e33a 100644 --- a/libvo/sub.h +++ b/libvo/sub.h @@ -107,9 +107,6 @@ extern int spu_alignment; extern int spu_aamode; extern float spu_gaussvar; -//extern void vo_draw_text_osd(int dxs,int dys,void (*draw_alpha)(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride)); -//extern void vo_draw_text_progbar(int dxs,int dys,void (*draw_alpha)(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride)); -//extern void vo_draw_text_sub(int dxs,int dys,void (*draw_alpha)(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride)); void osd_draw_text(struct osd_state *osd, int dxs, int dys, void (*draw_alpha)(void *ctx, int x0, int y0, int w, int h, unsigned char* src, unsigned char *srca, diff --git a/libvo/video_out.h b/libvo/video_out.h index 7ad09a74a8..cc9544f4fb 100644 --- a/libvo/video_out.h +++ b/libvo/video_out.h @@ -291,9 +291,9 @@ typedef struct { float max; } range_t; -extern float range_max(range_t *r); -extern int in_range(range_t *r, float f); -extern range_t *str2range(char *s); +float range_max(range_t *r); +int in_range(range_t *r, float f); +range_t *str2range(char *s); extern char *monitor_hfreq_str; extern char *monitor_vfreq_str; extern char *monitor_dotclock_str; diff --git a/libvo/vo_aa.c b/libvo/vo_aa.c index 3b3d5f8f50..1be77fd93e 100644 --- a/libvo/vo_aa.c +++ b/libvo/vo_aa.c @@ -234,7 +234,7 @@ config(uint32_t width, uint32_t height, uint32_t d_width, /* nothing will change its size, be we need some values initialized */ resize(); - /* now init out own 'font' (to use vo_draw_text_sub without edit them) */ + /* now init our own 'font' */ if(!vo_font_save) vo_font_save = vo_font; if(vo_font == vo_font_save) { vo_font=malloc(sizeof(font_desc_t));//if(!desc) return NULL; diff --git a/libvo/vo_direct3d.c b/libvo/vo_direct3d.c index 4e3dc875cb..b631f22f14 100644 --- a/libvo/vo_direct3d.c +++ b/libvo/vo_direct3d.c @@ -202,7 +202,7 @@ static int create_d3d_surfaces(void) priv->d3d_device, priv->src_width, priv->src_height, priv->movie_src_fmt, D3DPOOL_DEFAULT, &priv->d3d_surface, NULL))) { mp_msg(MSGT_VO, MSGL_ERR, - "<vo_direct3d><INFO>IDirect3D9_CreateOffscreenPlainSurface Failed.\n"); + "<vo_direct3d><INFO>IDirect3D9_CreateOffscreenPlainSurface Failed.\n"); return 0; } diff --git a/libvo/vo_gl.c b/libvo/vo_gl.c index b478a803ad..792376c8bb 100644 --- a/libvo/vo_gl.c +++ b/libvo/vo_gl.c @@ -140,8 +140,8 @@ static void resize(int x,int y){ panscan_calc(); new_w += vo_panscan_x; new_h += vo_panscan_y; - scale_x = (GLdouble) new_w / (GLdouble) x; - scale_y = (GLdouble) new_h / (GLdouble) y; + scale_x = (GLdouble)new_w / (GLdouble)x; + scale_y = (GLdouble)new_h / (GLdouble)y; glScaled(scale_x, scale_y, 1); ass_border_x = (vo_screenwidth - new_w) / 2; ass_border_y = (vo_screenheight - new_h) / 2; @@ -270,7 +270,7 @@ static void genEOSD(mp_eosd_images_t *imgs) { int tinytexcur = 0; int smalltexcur = 0; GLuint *curtex; - GLint scale_type = (scaled_osd) ? GL_LINEAR : GL_NEAREST; + GLint scale_type = scaled_osd ? GL_LINEAR : GL_NEAREST; ass_image_t *img = imgs->imgs; ass_image_t *i; @@ -521,7 +521,7 @@ static void create_osd_texture(int x0, int y0, int w, int h, { // initialize to 8 to avoid special-casing on alignment int sx = 8, sy = 8; - GLint scale_type = (scaled_osd) ? GL_LINEAR : GL_NEAREST; + GLint scale_type = scaled_osd ? GL_LINEAR : GL_NEAREST; if (w <= 0 || h <= 0 || stride < w) { mp_msg(MSGT_VO, MSGL_V, "Invalid dimensions OSD for part!\n"); @@ -587,8 +587,8 @@ static void draw_osd(void) if (vo_osd_changed(0)) { int osd_h, osd_w; clearOSD(); - osd_w = (scaled_osd) ? image_width : vo_dwidth; - osd_h = (scaled_osd) ? image_height : vo_dheight; + osd_w = scaled_osd ? image_width : vo_dwidth; + osd_h = scaled_osd ? image_height : vo_dheight; vo_draw_text(osd_w, osd_h, create_osd_texture); } if (vo_doublebuffering) do_render_osd(); @@ -635,7 +635,7 @@ static void do_render_osd(void) { glCallLists(osdtexCnt, GL_UNSIGNED_INT, osdDispList); } // set rendering parameters back to defaults - glDisable (GL_BLEND); + glDisable(GL_BLEND); if (!scaled_osd) glPopMatrix(); BindTexture(gl_target, 0); @@ -664,7 +664,7 @@ static void redraw(void) { //static inline uint32_t draw_slice_x11(uint8_t *src[], uint32_t slice_num) static int draw_slice(uint8_t *src[], int stride[], int w,int h,int x,int y) { - mpi_flipped = (stride[0] < 0); + mpi_flipped = stride[0] < 0; glUploadTex(gl_target, gl_format, gl_type, src[0], stride[0], x, y, w, h, slice_height); if (image_format == IMGFMT_YV12) { @@ -705,7 +705,7 @@ static uint32_t get_image(mp_image_t *mpi) { gl_bufferptr = MapBuffer(GL_PIXEL_UNPACK_BUFFER, GL_WRITE_ONLY); mpi->planes[0] = gl_bufferptr; BindBuffer(GL_PIXEL_UNPACK_BUFFER, 0); - if (mpi->planes[0] == NULL) { + if (!mpi->planes[0]) { if (!err_shown) mp_msg(MSGT_VO, MSGL_ERR, "[gl] could not acquire buffer for dr\n" "Expect a _major_ speed penalty\n"); @@ -768,7 +768,7 @@ static uint32_t draw_image(mp_image_t *mpi) { } stride[0] = mpi->stride[0]; stride[1] = mpi->stride[1]; stride[2] = mpi->stride[2]; planes[0] = mpi->planes[0]; planes[1] = mpi->planes[1]; planes[2] = mpi->planes[2]; - mpi_flipped = (stride[0] < 0); + mpi_flipped = stride[0] < 0; if (mpi->flags & MP_IMGFLAG_DIRECT) { intptr_t base = (intptr_t)planes[0]; if (mpi_flipped) @@ -825,7 +825,7 @@ query_format(uint32_t format) VFCAP_HWSCALE_UP | VFCAP_HWSCALE_DOWN | VFCAP_ACCEPT_STRIDE; if (use_osd) caps |= VFCAP_OSD | VFCAP_EOSD | (scaled_osd ? 0 : VFCAP_EOSD_UNSCALED); - if ((format == IMGFMT_RGB24) || (format == IMGFMT_RGBA)) + if (format == IMGFMT_RGB24 || format == IMGFMT_RGBA) return caps; if (use_yuv && format == IMGFMT_YV12) return caps; @@ -843,7 +843,7 @@ query_format(uint32_t format) static void uninit(void) { - if ( !vo_config_count ) return; + if (!vo_config_count) return; uninitGl(); releaseGlContext(&gl_vinfo, &gl_context); if (custom_prog) free(custom_prog); @@ -960,11 +960,11 @@ static int preinit(const char *arg) gl_target = GL_TEXTURE_2D; yuvconvtype = use_yuv | lscale << YUV_LUM_SCALER_SHIFT | cscale << YUV_CHROM_SCALER_SHIFT; if (many_fmts) - mp_msg (MSGT_VO, MSGL_INFO, "[gl] using extended formats. " + mp_msg(MSGT_VO, MSGL_INFO, "[gl] using extended formats. " "Use -vo gl:nomanyfmts if playback fails.\n"); - mp_msg (MSGT_VO, MSGL_V, "[gl] Using %d as slice height " + mp_msg(MSGT_VO, MSGL_V, "[gl] Using %d as slice height " "(0 means image height).\n", slice_height); - if( !vo_init() ) return -1; // Can't open X11 + if (!vo_init()) return -1; // Can't open X11 return 0; } @@ -997,7 +997,7 @@ static int control(uint32_t request, void *data) int_pause = (request == VOCTRL_PAUSE); return VO_TRUE; case VOCTRL_QUERY_FORMAT: - return query_format(*((uint32_t*)data)); + return query_format(*(uint32_t*)data); case VOCTRL_GET_IMAGE: return get_image(data); case VOCTRL_DRAW_IMAGE: @@ -1039,7 +1039,7 @@ static int control(uint32_t request, void *data) return VO_TRUE; case VOCTRL_SET_PANSCAN: if (!use_aspect) return VO_NOTIMPL; - resize (vo_dwidth, vo_dheight); + resize(vo_dwidth, vo_dheight); return VO_TRUE; case VOCTRL_GET_EQUALIZER: if (image_format == IMGFMT_YV12) { diff --git a/libvo/vo_winvidix.c b/libvo/vo_winvidix.c index 2a8959fa5c..d5aae17f34 100644 --- a/libvo/vo_winvidix.c +++ b/libvo/vo_winvidix.c @@ -55,7 +55,7 @@ static float window_aspect; static vidix_grkey_t gr_key; -extern void set_video_eq( int cap ); +void set_video_eq(int cap); static LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) diff --git a/libvo/vo_xvidix.c b/libvo/vo_xvidix.c index 49c656ecb3..f8528348a6 100644 --- a/libvo/vo_xvidix.c +++ b/libvo/vo_xvidix.c @@ -68,7 +68,7 @@ static uint32_t window_width, window_height; static uint32_t drwX, drwY, drwWidth, drwHeight, drwBorderWidth, drwDepth, drwcX, drwcY, dwidth, dheight; -extern void set_video_eq(int cap); +void set_video_eq(int cap); static void set_window(int force_update) diff --git a/libvo/w32_common.c b/libvo/w32_common.c index 7f25182387..c2502d3f47 100644 --- a/libvo/w32_common.c +++ b/libvo/w32_common.c @@ -178,6 +178,11 @@ int vo_w32_check_events(void) { } if (WinID >= 0) { RECT r; + GetClientRect(vo_window, &r); + if (r.right != vo_dwidth || r.bottom != vo_dheight) { + vo_dwidth = r.right; vo_dheight = r.bottom; + event_flags |= VO_EVENT_RESIZE; + } GetClientRect(WinID, &r); if (r.right != vo_dwidth || r.bottom != vo_dheight) MoveWindow(vo_window, 0, 0, r.right, r.bottom, FALSE); @@ -383,10 +388,13 @@ int vo_w32_config(uint32_t width, uint32_t height, uint32_t flags) { o_dwidth = width; o_dheight = height; - prev_width = vo_dwidth = width; - prev_height = vo_dheight = height; - prev_x = vo_dx; - prev_y = vo_dy; + if (WinID < 0) { + // the desired size is ignored in wid mode, it always matches the window size. + prev_width = vo_dwidth = width; + prev_height = vo_dheight = height; + prev_x = vo_dx; + prev_y = vo_dy; + } vo_fs = flags & VOFLAG_FULLSCREEN; vo_vm = flags & VOFLAG_MODESWITCHING; diff --git a/libvo/w32_common.h b/libvo/w32_common.h index 219e7d454d..41c0712470 100644 --- a/libvo/w32_common.h +++ b/libvo/w32_common.h @@ -7,14 +7,14 @@ extern HWND vo_w32_window; extern int vo_vm; -extern int vo_w32_init(void); -extern void vo_w32_uninit(void); -extern void vo_w32_ontop(void); -extern void vo_w32_border(void); -extern void vo_w32_fullscreen(void); -extern int vo_w32_check_events(void); -extern int vo_w32_config(uint32_t, uint32_t, uint32_t); -extern void destroyRenderingContext(void); -extern void w32_update_xinerama_info(void); +int vo_w32_init(void); +void vo_w32_uninit(void); +void vo_w32_ontop(void); +void vo_w32_border(void); +void vo_w32_fullscreen(void); +int vo_w32_check_events(void); +int vo_w32_config(uint32_t, uint32_t, uint32_t); +void destroyRenderingContext(void); +void w32_update_xinerama_info(void); #endif /* MPLAYER_W32_COMMON_H */ diff --git a/loader/dmo/DMO_AudioDecoder.c b/loader/dmo/DMO_AudioDecoder.c index 0b83d48f4c..033133c6fc 100644 --- a/loader/dmo/DMO_AudioDecoder.c +++ b/loader/dmo/DMO_AudioDecoder.c @@ -31,7 +31,7 @@ struct DMO_AudioDecoder #include "mp_msg.h" typedef long STDCALL (*GETCLASS) (GUID*, GUID*, void**); -extern void print_wave_header(WAVEFORMATEX *h, int verbose_level); +void print_wave_header(WAVEFORMATEX *h, int verbose_level); DMO_AudioDecoder * DMO_AudioDecoder_Open(char* dllname, GUID* guid, WAVEFORMATEX* wf,int out_channels) //DMO_AudioDecoder * DMO_AudioDecoder_Create(const CodecInfo * info, const WAVEFORMATEX* wf) diff --git a/loader/elfdll.c b/loader/elfdll.c index 7636871f94..fe71cbd911 100644 --- a/loader/elfdll.c +++ b/loader/elfdll.c @@ -33,8 +33,8 @@ extern modref_list* local_wm; /*------------------ HACKS -----------------*/ -extern DWORD fixup_imports(WINE_MODREF *wm); -extern void dump_exports(HMODULE hModule); +DWORD fixup_imports(WINE_MODREF *wm); +void dump_exports(HMODULE hModule); /*---------------- END HACKS ---------------*/ //char *extra_ld_library_path = "/usr/lib/win32"; diff --git a/loader/ext.h b/loader/ext.h index 17cbf64f57..dbe54ee1c1 100644 --- a/loader/ext.h +++ b/loader/ext.h @@ -8,12 +8,12 @@ #include "wine/windef.h" -extern LPVOID FILE_dommap( int unix_handle, LPVOID start, - DWORD size_high, DWORD size_low, - DWORD offset_high, DWORD offset_low, - int prot, int flags ); -extern int FILE_munmap( LPVOID start, DWORD size_high, DWORD size_low ); -extern int wcsnicmp(const unsigned short* s1, const unsigned short* s2, int n); -extern int __vprintf( const char *format, ... ); +LPVOID FILE_dommap( int unix_handle, LPVOID start, + DWORD size_high, DWORD size_low, + DWORD offset_high, DWORD offset_low, + int prot, int flags ); +int FILE_munmap( LPVOID start, DWORD size_high, DWORD size_low ); +int wcsnicmp( const unsigned short* s1, const unsigned short* s2, int n ); +int __vprintf( const char *format, ... ); #endif /* MPLAYER_EXT_H */ diff --git a/loader/registry.c b/loader/registry.c index b17f734d13..50912aa4dd 100644 --- a/loader/registry.c +++ b/loader/registry.c @@ -24,7 +24,7 @@ //#undef TRACE //#define TRACE printf -extern char *get_path ( const char * ); +char *get_path(const char*); // ...can be set before init_registry() call char* regpathname = NULL; diff --git a/loader/win32.c b/loader/win32.c index 576e3bd945..96ab76f691 100644 --- a/loader/win32.c +++ b/loader/win32.c @@ -1159,7 +1159,7 @@ static HANDLE WINAPI expHeapCreate(long flags, long init_size, long max_size) // we will silently ignore this second call... static void* heapfreehack = 0; static int heapfreehackshown = 0; -//extern void trapbug(void); +//void trapbug(void); static void* WINAPI expHeapAlloc(HANDLE heap, int flags, int size) { void* z; diff --git a/loader/win32.h b/loader/win32.h index 8f72352a6e..1e90827da0 100644 --- a/loader/win32.h +++ b/loader/win32.h @@ -21,7 +21,7 @@ #endif #endif -extern void my_garbagecollection(void); +void my_garbagecollection(void); typedef struct { UINT uDriverSignature; @@ -37,7 +37,7 @@ typedef DRVR *LPDRVR; typedef struct tls_s tls_t; -extern void* LookupExternal(const char* library, int ordinal); -extern void* LookupExternalByName(const char* library, const char* name); +void* LookupExternal(const char* library, int ordinal); +void* LookupExternalByName(const char* library, const char* name); #endif /* MPLAYER_WIN32_H */ diff --git a/loader/wine/debugtools.h b/loader/wine/debugtools.h index d9eab67902..aaefdb7dd6 100644 --- a/loader/wine/debugtools.h +++ b/loader/wine/debugtools.h @@ -37,17 +37,17 @@ enum DEBUG_CLASS { DBCL_FIXME, DBCL_ERR, DBCL_WARN, DBCL_TRACE, DBCL_COUNT }; /* These function return a printable version of a string, including quotes. The string will be valid for some time, but not indefinitely as strings are re-used. */ -extern LPCSTR debugstr_an (LPCSTR s, int n); -extern LPCSTR debugstr_wn (LPCWSTR s, int n); -extern LPCSTR debugres_a (LPCSTR res); -extern LPCSTR debugres_w (LPCWSTR res); -extern LPCSTR debugstr_guid( const struct GUID *id ); -extern LPCSTR debugstr_hex_dump (const void *ptr, int len); -extern int dbg_header_err( const char *dbg_channel, const char *func ); -extern int dbg_header_warn( const char *dbg_channel, const char *func ); -extern int dbg_header_fixme( const char *dbg_channel, const char *func ); -extern int dbg_header_trace( const char *dbg_channel, const char *func ); -extern int dbg_vprintf( const char *format, va_list args ); +LPCSTR debugstr_an( LPCSTR s, int n ); +LPCSTR debugstr_wn( LPCWSTR s, int n ); +LPCSTR debugres_a( LPCSTR res ); +LPCSTR debugres_w( LPCWSTR res ); +LPCSTR debugstr_guid( const struct GUID *id ); +LPCSTR debugstr_hex_dump( const void *ptr, int len ); +int dbg_header_err( const char *dbg_channel, const char *func ); +int dbg_header_warn( const char *dbg_channel, const char *func ); +int dbg_header_fixme( const char *dbg_channel, const char *func ); +int dbg_header_trace( const char *dbg_channel, const char *func ); +int dbg_vprintf( const char *format, va_list args ); static inline LPCSTR debugstr_a( LPCSTR s ) { return debugstr_an( s, 80 ); } static inline LPCSTR debugstr_w( LPCWSTR s ) { return debugstr_wn( s, 80 ); } diff --git a/loader/wine/heap.h b/loader/wine/heap.h index 592bf8259c..477f0e1acc 100644 --- a/loader/wine/heap.h +++ b/loader/wine/heap.h @@ -14,12 +14,12 @@ extern HANDLE SystemHeap; extern HANDLE SegptrHeap; -extern int HEAP_IsInsideHeap( HANDLE heap, DWORD flags, LPCVOID ptr ); -extern SEGPTR HEAP_GetSegptr( HANDLE heap, DWORD flags, LPCVOID ptr ); -extern LPSTR HEAP_strdupA( HANDLE heap, DWORD flags, LPCSTR str ); -extern LPWSTR HEAP_strdupW( HANDLE heap, DWORD flags, LPCWSTR str ); -extern LPWSTR HEAP_strdupAtoW( HANDLE heap, DWORD flags, LPCSTR str ); -extern LPSTR HEAP_strdupWtoA( HANDLE heap, DWORD flags, LPCWSTR str ); +int HEAP_IsInsideHeap( HANDLE heap, DWORD flags, LPCVOID ptr ); +SEGPTR HEAP_GetSegptr( HANDLE heap, DWORD flags, LPCVOID ptr ); +LPSTR HEAP_strdupA( HANDLE heap, DWORD flags, LPCSTR str ); +LPWSTR HEAP_strdupW( HANDLE heap, DWORD flags, LPCWSTR str ); +LPWSTR HEAP_strdupAtoW( HANDLE heap, DWORD flags, LPCSTR str ); +LPSTR HEAP_strdupWtoA( HANDLE heap, DWORD flags, LPCWSTR str ); /* SEGPTR helper macros */ diff --git a/loader/wine/ldt.h b/loader/wine/ldt.h index 89d2a6b692..fb4c5351ff 100644 --- a/loader/wine/ldt.h +++ b/loader/wine/ldt.h @@ -30,11 +30,11 @@ typedef struct extern "C" { #endif -extern void LDT_BytesToEntry( const unsigned long *buffer, ldt_entry *content); -extern void LDT_EntryToBytes( unsigned long *buffer, const ldt_entry *content); -extern int LDT_GetEntry( int entry, ldt_entry *content ); -extern int LDT_SetEntry( int entry, const ldt_entry *content ); -extern void LDT_Print( int start, int length ); +void LDT_BytesToEntry( const unsigned long *buffer, ldt_entry *content ); +void LDT_EntryToBytes( unsigned long *buffer, const ldt_entry *content ); +int LDT_GetEntry( int entry, ldt_entry *content ); +int LDT_SetEntry( int entry, const ldt_entry *content ); +void LDT_Print( int start, int length ); /* This structure is used to build the local copy of the LDT. */ diff --git a/loader/wine/module.h b/loader/wine/module.h index 0642f4bd5c..cba53f61a1 100644 --- a/loader/wine/module.h +++ b/loader/wine/module.h @@ -139,11 +139,11 @@ typedef struct modref_list_t /* module.c */ -extern FARPROC MODULE_GetProcAddress( HMODULE hModule, LPCSTR function, WIN_BOOL snoop ); -extern WINE_MODREF *MODULE32_LookupHMODULE( HMODULE hModule ); -extern WINE_MODREF *MODULE_FindModule( LPCSTR path ); +FARPROC MODULE_GetProcAddress( HMODULE hModule, LPCSTR function, WIN_BOOL snoop ); +WINE_MODREF *MODULE32_LookupHMODULE( HMODULE hModule ); +WINE_MODREF *MODULE_FindModule( LPCSTR path ); /* resource.c */ -extern INT WINAPI AccessResource(HMODULE,HRSRC); +INT WINAPI AccessResource( HMODULE, HRSRC ); #endif /* MPLAYER_MODULE_H */ diff --git a/loader/wine/pe_image.h b/loader/wine/pe_image.h index 6f3ac6b498..1c28bc12d0 100644 --- a/loader/wine/pe_image.h +++ b/loader/wine/pe_image.h @@ -25,32 +25,32 @@ typedef struct { } PE_MODREF; struct wine_modref; -extern int PE_unloadImage(HMODULE hModule); -extern FARPROC PE_FindExportedFunction(struct wine_modref *wm, LPCSTR funcName, WIN_BOOL snoop); -extern WIN_BOOL PE_EnumResourceTypesA(HMODULE,ENUMRESTYPEPROCA,LONG); -extern WIN_BOOL PE_EnumResourceTypesW(HMODULE,ENUMRESTYPEPROCW,LONG); -extern WIN_BOOL PE_EnumResourceNamesA(HMODULE,LPCSTR,ENUMRESNAMEPROCA,LONG); -extern WIN_BOOL PE_EnumResourceNamesW(HMODULE,LPCWSTR,ENUMRESNAMEPROCW,LONG); -extern WIN_BOOL PE_EnumResourceLanguagesA(HMODULE,LPCSTR,LPCSTR,ENUMRESLANGPROCA,LONG); -extern WIN_BOOL PE_EnumResourceLanguagesW(HMODULE,LPCWSTR,LPCWSTR,ENUMRESLANGPROCW,LONG); -extern HRSRC PE_FindResourceExW(struct wine_modref*, LPCWSTR, LPCWSTR, WORD); -extern DWORD PE_SizeofResource(HMODULE,HRSRC); -extern struct wine_modref *PE_LoadLibraryExA(LPCSTR, DWORD); -extern void PE_UnloadLibrary(struct wine_modref *); -extern HGLOBAL PE_LoadResource(struct wine_modref *wm, HRSRC); -extern HMODULE PE_LoadImage( int hFile, LPCSTR filename, WORD *version ); -extern struct wine_modref *PE_CreateModule( HMODULE hModule, LPCSTR filename, - DWORD flags, WIN_BOOL builtin ); -extern WIN_BOOL PE_CreateProcess( HANDLE hFile, LPCSTR filename, LPCSTR cmd_line, LPCSTR env, - LPSECURITY_ATTRIBUTES psa, LPSECURITY_ATTRIBUTES tsa, - WIN_BOOL inherit, DWORD flags, LPSTARTUPINFOA startup, - LPPROCESS_INFORMATION info ); +int PE_unloadImage(HMODULE hModule); +FARPROC PE_FindExportedFunction(struct wine_modref *wm, LPCSTR funcName, WIN_BOOL snoop); +WIN_BOOL PE_EnumResourceTypesA(HMODULE, ENUMRESTYPEPROCA, LONG); +WIN_BOOL PE_EnumResourceTypesW(HMODULE, ENUMRESTYPEPROCW, LONG); +WIN_BOOL PE_EnumResourceNamesA(HMODULE, LPCSTR, ENUMRESNAMEPROCA, LONG); +WIN_BOOL PE_EnumResourceNamesW(HMODULE, LPCWSTR, ENUMRESNAMEPROCW, LONG); +WIN_BOOL PE_EnumResourceLanguagesA(HMODULE, LPCSTR, LPCSTR, ENUMRESLANGPROCA, LONG); +WIN_BOOL PE_EnumResourceLanguagesW(HMODULE, LPCWSTR, LPCWSTR, ENUMRESLANGPROCW, LONG); +HRSRC PE_FindResourceExW(struct wine_modref*, LPCWSTR, LPCWSTR, WORD); +DWORD PE_SizeofResource(HMODULE, HRSRC); +struct wine_modref *PE_LoadLibraryExA(LPCSTR, DWORD); +void PE_UnloadLibrary(struct wine_modref *); +HGLOBAL PE_LoadResource(struct wine_modref *wm, HRSRC); +HMODULE PE_LoadImage(int hFile, LPCSTR filename, WORD *version); +struct wine_modref *PE_CreateModule(HMODULE hModule, LPCSTR filename, + DWORD flags, WIN_BOOL builtin); +WIN_BOOL PE_CreateProcess(HANDLE hFile, LPCSTR filename, LPCSTR cmd_line, LPCSTR env, + LPSECURITY_ATTRIBUTES psa, LPSECURITY_ATTRIBUTES tsa, + WIN_BOOL inherit, DWORD flags, LPSTARTUPINFOA startup, + LPPROCESS_INFORMATION info); -extern void PE_InitTls(void); -extern WIN_BOOL PE_InitDLL(struct wine_modref *wm, DWORD type, LPVOID lpReserved); +void PE_InitTls(void); +WIN_BOOL PE_InitDLL(struct wine_modref *wm, DWORD type, LPVOID lpReserved); -extern PIMAGE_RESOURCE_DIRECTORY GetResDirEntryA(PIMAGE_RESOURCE_DIRECTORY,LPCSTR,DWORD,WIN_BOOL); -extern PIMAGE_RESOURCE_DIRECTORY GetResDirEntryW(PIMAGE_RESOURCE_DIRECTORY,LPCWSTR,DWORD,WIN_BOOL); +PIMAGE_RESOURCE_DIRECTORY GetResDirEntryA(PIMAGE_RESOURCE_DIRECTORY, LPCSTR, DWORD, WIN_BOOL); +PIMAGE_RESOURCE_DIRECTORY GetResDirEntryW(PIMAGE_RESOURCE_DIRECTORY, LPCWSTR, DWORD, WIN_BOOL); typedef DWORD CALLBACK (*DLLENTRYPROC)(HMODULE,DWORD,LPVOID); @@ -74,8 +74,8 @@ typedef struct { ELF_STDCALL_STUB *stubs; } ELF_MODREF; -extern struct wine_modref *ELF_LoadLibraryExA( LPCSTR libname, DWORD flags); -extern void ELF_UnloadLibrary(struct wine_modref *); -extern FARPROC ELF_FindExportedFunction(struct wine_modref *wm, LPCSTR funcName); +struct wine_modref *ELF_LoadLibraryExA( LPCSTR libname, DWORD flags); +void ELF_UnloadLibrary(struct wine_modref *); +FARPROC ELF_FindExportedFunction(struct wine_modref *wm, LPCSTR funcName); #endif /* MPLAYER_PE_IMAGE_H */ diff --git a/loader/wine/winnt.h b/loader/wine/winnt.h index 19594e71b1..dd0f0b05c5 100644 --- a/loader/wine/winnt.h +++ b/loader/wine/winnt.h @@ -1071,15 +1071,15 @@ typedef struct NT_TIB struct TEB; /* #if defined(__i386__) && defined(__GNUC__) -extern inline struct TEB * WINAPI NtCurrentTeb(void); -extern inline struct TEB * WINAPI NtCurrentTeb(void) +inline struct TEB * WINAPI NtCurrentTeb(void); +inline struct TEB * WINAPI NtCurrentTeb(void) { struct TEB *teb; __asm__(".byte 0x64\n\tmovl (0x18),%0" : "=r" (teb)); return teb; } #else -extern struct TEB * WINAPI NtCurrentTeb(void); +struct TEB * WINAPI NtCurrentTeb(void); #endif */ diff --git a/loader/wrapper.h b/loader/wrapper.h index 2e8e3ac213..346f9e0e64 100644 --- a/loader/wrapper.h +++ b/loader/wrapper.h @@ -11,10 +11,10 @@ typedef int (*wrapper_func_t)(void *stack_base, int stack_size, reg386_t *reg, extern wrapper_func_t report_entry, report_ret; -extern void (*wrapper_target)(void); +void (*wrapper_target)(void); -extern int wrapper(void); -extern int null_call(void); +int wrapper(void); +int null_call(void); #endif /* MPLAYER_WRAPPER_H */ diff --git a/mencoder.c b/mencoder.c index e578509450..052cfdbcde 100644 --- a/mencoder.c +++ b/mencoder.c @@ -363,7 +363,7 @@ static void exit_sighandler(int x){ static muxer_t* muxer=NULL; -extern void print_wave_header(WAVEFORMATEX *h, int verbose_level); +void print_wave_header(WAVEFORMATEX *h, int verbose_level); int main(int argc,char* argv[]){ @@ -26,7 +26,7 @@ void mixer_mute(mixer_t *mixer); void mixer_getbalance(mixer_t *mixer, float *bal); void mixer_setbalance(mixer_t *mixer, float bal); -//extern void mixer_setbothvolume( int v ); +//void mixer_setbothvolume(int v); #define mixer_setbothvolume(m, v) mixer_setvolume(m, v, v) #endif /* MPLAYER_MIXER_H */ diff --git a/mp3lib/mp3.h b/mp3lib/mp3.h index f6f5a4dea7..daeda20856 100644 --- a/mp3lib/mp3.h +++ b/mp3lib/mp3.h @@ -2,18 +2,18 @@ /* decoder level: */ #ifdef CONFIG_FAKE_MONO -extern void MP3_Init(int fakemono); +void MP3_Init(int fakemono); #else -extern void MP3_Init(); +void MP3_Init(); #endif -extern int MP3_Open(char *filename,int buffsize); -extern void MP3_SeekFrame(int num,int dir); -extern void MP3_SeekForward(int num); -extern int MP3_PrintTAG(void); -extern int MP3_DecodeFrame(unsigned char *hova,short single); -extern int MP3_FillBuffers(void); -extern void MP3_PrintHeader(void); -extern void MP3_Close(void); +int MP3_Open(char *filename, int buffsize); +void MP3_SeekFrame(int num, int dir); +void MP3_SeekForward(int num); +int MP3_PrintTAG(void); +int MP3_DecodeFrame(unsigned char *hova, short single); +int MP3_FillBuffers(void); +void MP3_PrintHeader(void); +void MP3_Close(void); /* public variables: */ extern int MP3_eof; // set if EOF reached extern int MP3_pause; // lock playing @@ -28,8 +28,8 @@ extern int MP3_channels; extern int MP3_bps; /* player level: */ -extern int MP3_OpenDevice(char *devname); /* devname can be NULL for default) */ -extern void MP3_Play(void); -extern void MP3_Stop(void); -extern void MP3_CloseDevice(void); +int MP3_OpenDevice(char *devname); /* devname can be NULL for default) */ +void MP3_Play(void); +void MP3_Stop(void); +void MP3_CloseDevice(void); diff --git a/mp3lib/mpg123.h b/mp3lib/mpg123.h index 2ecd5a47db..2cbef31bdd 100644 --- a/mp3lib/mpg123.h +++ b/mp3lib/mpg123.h @@ -116,13 +116,13 @@ struct III_sideinfo extern real mp3lib_decwin[(512+32)]; extern real *mp3lib_pnts[]; -extern int synth_1to1_pent( real *,int,short * ); -extern int synth_1to1_MMX( real *,int,short * ); -extern int synth_1to1_MMX_s(real *, int, short *, short *, int *); +int synth_1to1_pent( real *, int, short * ); +int synth_1to1_MMX( real *, int, short * ); +int synth_1to1_MMX_s(real *, int, short *, short *, int *); -extern void dct36_3dnow(real *,real *,real *,real *,real *); -extern void dct36_3dnowex(real *,real *,real *,real *,real *); -extern void dct36_sse(real *,real *,real *,real *,real *); +void dct36_3dnow(real *, real *, real *, real *, real *); +void dct36_3dnowex(real *, real *, real *, real *, real *); +void dct36_sse(real *, real *, real *, real *, real *); typedef int (*synth_func_t)( real *,int,short * ); typedef void (*dct36_func_t)(real *,real *,real *,real *,real *); diff --git a/mp3lib/sr1.c b/mp3lib/sr1.c index 65a749ed10..49feb45343 100644 --- a/mp3lib/sr1.c +++ b/mp3lib/sr1.c @@ -51,7 +51,7 @@ static long outscale = 32768; #include "tabinit.c" #if 1 -extern int mplayer_audio_read(char *buf,int size); +int mplayer_audio_read(char *buf,int size); LOCAL int mp3_read(char *buf,int size){ // int len=fread(buf,1,size,mp3_file); @@ -61,7 +61,7 @@ LOCAL int mp3_read(char *buf,int size){ return len; } #else -extern int mp3_read(char *buf,int size); +int mp3_read(char *buf,int size); #endif /* * Modified for use with MPlayer, for details see the changelog at @@ -386,11 +386,11 @@ static int _has_mmx = 0; // used by layer2.c, layer3.c to pre-scale coeffs /******************************************************************************/ /* It's hidden from gcc in assembler */ -extern void dct64_MMX(short *, short *, real *); -extern void dct64_MMX_3dnow(short *, short *, real *); -extern void dct64_MMX_3dnowex(short *, short *, real *); -extern void dct64_sse(short *, short *, real *); -extern void dct64_altivec(real *, real *, real *); +void dct64_MMX(short *, short *, real *); +void dct64_MMX_3dnow(short *, short *, real *); +void dct64_MMX_3dnowex(short *, short *, real *); +void dct64_sse(short *, short *, real *); +void dct64_altivec(real *, real *, real *); void (*dct64_MMX_func)(short *, short *, real *); #include "layer2.c" @@ -38,6 +38,12 @@ enum stop_play_reason { PT_STOP, }; +typedef enum { + EXIT_NONE, + EXIT_QUIT, + EXIT_EOF, + EXIT_ERROR +} exit_reason_t; typedef struct MPContext { struct MPOpts opts; @@ -129,7 +135,7 @@ void uninit_player(struct MPContext *mpctx, unsigned int mask); void reinit_audio_chain(struct MPContext *mpctx); void init_vo_spudec(struct MPContext *mpctx); double playing_audio_pts(struct MPContext *mpctx); -void exit_player_with_rc(struct MPContext *mpctx, const char* how, int rc); +void exit_player_with_rc(struct MPContext *mpctx, exit_reason_t how, int rc); void add_subtitles(struct MPContext *mpctx, char *filename, float fps, int noerr); int reinit_video_chain(struct MPContext *mpctx); @@ -8,7 +8,7 @@ #ifdef CONFIG_ICONV #include <iconv.h> #include <errno.h> -extern char* get_term_charset(void); +char* get_term_charset(void); #endif #if defined(FOR_MENCODER) @@ -128,8 +128,8 @@ char *heartbeat_cmd; #include "playtree.h" #include "playtreeparser.h" -extern int import_playtree_playlist_into_gui(play_tree_t* my_playtree, m_config_t* config); -extern int import_initial_playtree_into_gui(play_tree_t* my_playtree, m_config_t* config, int enqueue); +int import_playtree_playlist_into_gui(play_tree_t* my_playtree, m_config_t* config); +int import_initial_playtree_into_gui(play_tree_t* my_playtree, m_config_t* config, int enqueue); //**************************************************************************// // Config @@ -300,7 +300,7 @@ char* current_module=NULL; // for debugging #ifdef CONFIG_MENU #include "m_struct.h" #include "libmenu/menu.h" -extern void vf_menu_pause_update(struct vf_instance* vf); +void vf_menu_pause_update(struct vf_instance* vf); extern vf_info_t vf_info_menu; static const vf_info_t* const libmenu_vfs[] = { &vf_info_menu, @@ -645,8 +645,8 @@ void uninit_player(struct MPContext *mpctx, unsigned int mask){ current_module=NULL; } -void exit_player_with_rc(struct MPContext *mpctx, const char* how, int rc){ - +void exit_player_with_rc(struct MPContext *mpctx, exit_reason_t how, int rc) +{ if (mpctx->user_muted && !mpctx->edl_muted) mixer_mute(&mpctx->mixer); uninit_player(mpctx, INITIALIZED_ALL); #if defined(__MINGW32__) || defined(__CYGWIN__) @@ -692,13 +692,28 @@ void exit_player_with_rc(struct MPContext *mpctx, const char* how, int rc){ talloc_free(mpctx->key_fifo); if(edl_records != NULL) free(edl_records); // free mem allocated for EDL - if(how) mp_msg(MSGT_CPLAYER,MSGL_INFO,MSGTR_ExitingHow,how); + switch(how) { + case EXIT_QUIT: + mp_msg(MSGT_CPLAYER,MSGL_INFO,MSGTR_ExitingHow,MSGTR_Exit_quit); + mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_EXIT=QUIT\n"); + break; + case EXIT_EOF: + mp_msg(MSGT_CPLAYER,MSGL_INFO,MSGTR_ExitingHow,MSGTR_Exit_eof); + mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_EXIT=EOF\n"); + break; + case EXIT_ERROR: + mp_msg(MSGT_CPLAYER,MSGL_INFO,MSGTR_ExitingHow,MSGTR_Exit_error); + mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_EXIT=ERROR\n"); + break; + default: + mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_EXIT=NONE\n"); + } mp_msg(MSGT_CPLAYER,MSGL_DBG2,"max framesize was %d bytes\n",max_framesize); exit(rc); } -static void exit_player(struct MPContext *mpctx, const char* how) +static void exit_player(struct MPContext *mpctx, exit_reason_t how) { exit_player_with_rc(mpctx, how, 1); } @@ -798,7 +813,7 @@ char *conffile; int conffile_fd; if (!disable_system_conf && m_config_parse_config_file(conf, MPLAYER_CONFDIR "/mplayer.conf") < 0) - exit_player(mpctx, NULL); + exit_player(mpctx, EXIT_NONE); if ((conffile = get_path("")) == NULL) { mp_msg(MSGT_CPLAYER,MSGL_WARN,MSGTR_NoHomeDir); } else { @@ -818,7 +833,7 @@ if ((conffile = get_path("")) == NULL) { } if (!disable_user_conf && m_config_parse_config_file(conf, conffile) < 0) - exit_player(mpctx, NULL); + exit_player(mpctx, EXIT_NONE); free(conffile); } } @@ -930,7 +945,7 @@ static int libmpdemux_was_interrupted(struct MPContext *mpctx, int stop_play) if((cmd = mp_input_get_cmd(mpctx->input, 0,0,0)) != NULL) { switch(cmd->id) { case MP_CMD_QUIT: - exit_player_with_rc(mpctx, MSGTR_Exit_quit, (cmd->nargs > 0)? cmd->args[0].v.i : 0); + exit_player_with_rc(mpctx, EXIT_QUIT, (cmd->nargs > 0)? cmd->args[0].v.i : 0); case MP_CMD_PLAY_TREE_STEP: { stop_play = (cmd->args[0].v.i > 0) ? PT_NEXT_ENTRY : PT_PREV_ENTRY; mpctx->play_tree_step = (cmd->args[0].v.i == 0) ? 1 : cmd->args[0].v.i; @@ -1562,7 +1577,7 @@ if(mpctx->sh_audio){ // output: &ao_data.samplerate, &ao_data.channels, &ao_data.format)){ mp_msg(MSGT_CPLAYER,MSGL_ERR,MSGTR_AudioFilterChainPreinitError); - exit_player(mpctx, MSGTR_Exit_error); + exit_player(mpctx, EXIT_ERROR); } #endif current_module="ao2_init"; @@ -2692,7 +2707,7 @@ if(!codecs_file || !parse_codec_cfg(codecs_file)){ if(!parse_codec_cfg(mem_ptr=get_path("codecs.conf"))){ if(!parse_codec_cfg(MPLAYER_CONFDIR "/codecs.conf")){ if(!parse_codec_cfg(NULL)){ - exit_player_with_rc(mpctx, NULL, 0); + exit_player_with_rc(mpctx, EXIT_NONE, 0); } mp_msg(MSGT_CPLAYER,MSGL_V,MSGTR_BuiltinCodecsConf); } @@ -2757,18 +2772,18 @@ if(!codecs_file || !parse_codec_cfg(codecs_file)){ } if(opt_exit) - exit_player(mpctx, NULL); + exit_player(mpctx, EXIT_NONE); if (player_idle_mode && use_gui) { mp_msg(MSGT_CPLAYER, MSGL_FATAL, MSGTR_NoIdleAndGui); - exit_player_with_rc(mpctx, NULL, 1); + exit_player_with_rc(mpctx, EXIT_NONE, 1); } if(!mpctx->filename && !player_idle_mode){ if(!use_gui){ // no file/vcd/dvd -> show HELP: mp_msg(MSGT_CPLAYER, MSGL_INFO, help_text); - exit_player_with_rc(mpctx, NULL, 0); + exit_player_with_rc(mpctx, EXIT_NONE, 0); } else gui_no_filename=1; } @@ -3022,7 +3037,7 @@ while (player_idle_mode && !mpctx->filename) { entry = parse_playlist_file(mpctx->mconfig, cmd->args[0].v.s); break; case MP_CMD_QUIT: - exit_player_with_rc(mpctx, MSGTR_Exit_quit, (cmd->nargs > 0)? cmd->args[0].v.i : 0); + exit_player_with_rc(mpctx, EXIT_QUIT, (cmd->nargs > 0)? cmd->args[0].v.i : 0); break; case MP_CMD_GET_PROPERTY: case MP_CMD_SET_PROPERTY: @@ -3173,14 +3188,14 @@ if(stream_dump_type==5){ current_module="dumpstream"; if(mpctx->stream->type==STREAMTYPE_STREAM && mpctx->stream->fd<0){ mp_msg(MSGT_CPLAYER,MSGL_FATAL,MSGTR_DumpstreamFdUnavailable); - exit_player(mpctx, MSGTR_Exit_error); + exit_player(mpctx, EXIT_ERROR); } stream_reset(mpctx->stream); stream_seek(mpctx->stream,mpctx->stream->start_pos); f=fopen(stream_dump_name,"wb"); if(!f){ mp_msg(MSGT_CPLAYER,MSGL_FATAL,MSGTR_CantOpenDumpfile); - exit_player(mpctx, MSGTR_Exit_error); + exit_player(mpctx, EXIT_ERROR); } if (dvd_chapter > 1) { int chapter = dvd_chapter - 1; @@ -3191,7 +3206,7 @@ if(stream_dump_type==5){ if(len>0) { if(fwrite(buf,len,1,f) != 1) { mp_msg(MSGT_MENCODER,MSGL_FATAL,MSGTR_ErrorWritingFile,stream_dump_name); - exit_player(mpctx, MSGTR_Exit_error); + exit_player(mpctx, EXIT_ERROR); } } if(dvd_last_chapter > 0) { @@ -3203,10 +3218,10 @@ if(stream_dump_type==5){ } if(fclose(f)) { mp_msg(MSGT_MENCODER,MSGL_FATAL,MSGTR_ErrorWritingFile,stream_dump_name); - exit_player(mpctx, MSGTR_Exit_error); + exit_player(mpctx, EXIT_ERROR); } mp_msg(MSGT_CPLAYER,MSGL_INFO,MSGTR_CoreDumped); - exit_player_with_rc(mpctx, MSGTR_Exit_eof, 0); + exit_player_with_rc(mpctx, EXIT_EOF, 0); } #ifdef CONFIG_DVDREAD @@ -3368,7 +3383,7 @@ if((stream_dump_type)&&(stream_dump_type<4)){ } if(!ds){ mp_msg(MSGT_CPLAYER,MSGL_FATAL,MSGTR_DumpSelectedStreamMissing); - exit_player(mpctx, MSGTR_Exit_error); + exit_player(mpctx, EXIT_ERROR); } // disable other streams: if(mpctx->d_audio && mpctx->d_audio!=ds) {ds_free_packs(mpctx->d_audio); mpctx->d_audio->id=-2; } @@ -3378,7 +3393,7 @@ if((stream_dump_type)&&(stream_dump_type<4)){ f=fopen(stream_dump_name,"wb"); if(!f){ mp_msg(MSGT_CPLAYER,MSGL_FATAL,MSGTR_CantOpenDumpfile); - exit_player(mpctx, MSGTR_Exit_error); + exit_player(mpctx, EXIT_ERROR); } while(!ds->eof){ unsigned char* start; @@ -3394,7 +3409,7 @@ if((stream_dump_type)&&(stream_dump_type<4)){ } fclose(f); mp_msg(MSGT_CPLAYER,MSGL_INFO,MSGTR_CoreDumped); - exit_player_with_rc(mpctx, MSGTR_Exit_eof, 0); + exit_player_with_rc(mpctx, EXIT_EOF, 0); } mpctx->sh_audio=mpctx->d_audio->sh; @@ -4061,7 +4076,7 @@ if(use_gui || mpctx->playtree_iter != NULL || player_idle_mode){ } -exit_player_with_rc(mpctx, MSGTR_Exit_eof, 0); +exit_player_with_rc(mpctx, EXIT_EOF, 0); return 1; } @@ -48,6 +48,6 @@ static inline void exit_player_bad(const char *how) struct MPContext; -extern void update_set_of_subtitles(struct MPContext *mpctx); +void update_set_of_subtitles(struct MPContext *mpctx); #endif /* MPLAYER_MPLAYER_H */ diff --git a/osdep/getch2.c b/osdep/getch2.c index 797c02b8dc..403519913a 100644 --- a/osdep/getch2.c +++ b/osdep/getch2.c @@ -62,10 +62,10 @@ static int getch2_key_db=0; #if 0 #include <termcap.h> #else - extern int tgetent (char *BUFFER, char *TERMTYPE); - extern int tgetnum (char *NAME); - extern int tgetflag (char *NAME); - extern char *tgetstr (char *NAME, char **AREA); +int tgetent(char *BUFFER, char *TERMTYPE); +int tgetnum(char *NAME); +int tgetflag(char *NAME); +char *tgetstr(char *NAME, char **AREA); #endif static char term_buffer[4096]; diff --git a/osdep/getch2.h b/osdep/getch2.h index 852206bd8e..a85969207c 100644 --- a/osdep/getch2.h +++ b/osdep/getch2.h @@ -12,21 +12,21 @@ extern int screen_height; extern char * erase_to_end_of_line; /* Get screen-size using IOCTL call. */ -extern void get_screen_size(void); +void get_screen_size(void); /* Load key definitions from the TERMCAP database. 'termtype' can be NULL */ -extern int load_termcap(char *termtype); +int load_termcap(char *termtype); /* Enable and disable STDIN line-buffering */ -extern void getch2_enable(void); -extern void getch2_disable(void); +void getch2_enable(void); +void getch2_disable(void); /* Read a character or a special key code (see keycodes.h) */ struct mp_fifo; -extern void getch2(struct mp_fifo *fifo); +void getch2(struct mp_fifo *fifo); /* slave cmd function for Windows and OS/2 */ -extern int mp_input_slave_cmd_func(int fd,char* dest,int size); +int mp_input_slave_cmd_func(int fd,char* dest,int size); #if defined(__MINGW32__) || defined(__OS2__) #define USE_SELECT 0 diff --git a/parser-mpcmd.c b/parser-mpcmd.c index 5d15dc3e55..b0562fb86c 100644 --- a/parser-mpcmd.c +++ b/parser-mpcmd.c @@ -77,7 +77,7 @@ m_config_parse_mp_command_line(m_config_t *config, int argc, char **argv) int opt_exit = 0; // flag indicating whether mplayer should exit without playing anything play_tree_t *last_parent, *last_entry = NULL, *root; #ifdef CONFIG_MACOSX_FINDER - extern play_tree_t *macosx_finder_args(m_config_t *, int , char **); + play_tree_t *macosx_finder_args(m_config_t *, int , char **); #endif #ifdef MP_DEBUG diff --git a/stream/cache2.h b/stream/cache2.h index 4eb201e177..8403c05aff 100644 --- a/stream/cache2.h +++ b/stream/cache2.h @@ -3,7 +3,7 @@ #include "stream.h" -extern void cache_uninit(stream_t *s); +void cache_uninit(stream_t *s); int cache_do_control(stream_t *stream, int cmd, void *arg); #endif /* MPLAYER_CACHE2_H */ diff --git a/stream/cookies.h b/stream/cookies.h index f1619110ce..f4c2a0525e 100644 --- a/stream/cookies.h +++ b/stream/cookies.h @@ -10,7 +10,7 @@ #include "http.h" -extern void cookies_set(HTTP_header_t * http_hdr, const char *hostname, - const char *url); +void cookies_set(HTTP_header_t * http_hdr, const char *hostname, + const char *url); #endif /* MPLAYER_COOKIES_H */ diff --git a/stream/dvbin.h b/stream/dvbin.h index 172cd1299d..84c9d2c625 100644 --- a/stream/dvbin.h +++ b/stream/dvbin.h @@ -108,9 +108,9 @@ typedef struct { #define TUNER_CBL 3 #define TUNER_ATSC 4 -extern int dvb_step_channel(stream_t *, int); -extern int dvb_set_channel(stream_t *, int, int); -extern dvb_config_t *dvb_get_config(void); -extern void dvb_free_config(dvb_config_t *config); +int dvb_step_channel(stream_t *, int); +int dvb_set_channel(stream_t *, int, int); +dvb_config_t *dvb_get_config(void); +void dvb_free_config(dvb_config_t *config); #endif /* MPLAYER_DVBIN_H */ diff --git a/stream/http.c b/stream/http.c index fa8b4e9d35..67b719269f 100644 --- a/stream/http.c +++ b/stream/http.c @@ -31,7 +31,7 @@ extern const mime_struct_t mime_type_table[]; extern int stream_cache_size; extern int network_bandwidth; -extern int http_seek(stream_t *stream, off_t pos); +int http_seek(stream_t *stream, off_t pos); typedef struct { unsigned metaint; diff --git a/stream/stream_cdda.c b/stream/stream_cdda.c index fb6f2e9358..a7555dc7b4 100644 --- a/stream/stream_cdda.c +++ b/stream/stream_cdda.c @@ -88,9 +88,9 @@ const m_option_t cdda_opts[] = { {NULL, NULL, 0, 0, 0, 0, NULL} }; -extern int cdd_identify(const char *dev); -extern int cddb_resolve(const char *dev, char **xmcd_file); -extern cd_info_t* cddb_parse_xmcd(char *xmcd_file); +int cdd_identify(const char *dev); +int cddb_resolve(const char *dev, char **xmcd_file); +cd_info_t* cddb_parse_xmcd(char *xmcd_file); static int seek(stream_t* s,off_t pos); static int fill_buffer(stream_t* s, char* buffer, int max_len); diff --git a/stream/stream_dvb.c b/stream/stream_dvb.c index 78bc8a9309..d2c5b4b06e 100644 --- a/stream/stream_dvb.c +++ b/stream/stream_dvb.c @@ -105,13 +105,13 @@ const m_option_t dvbin_opts_conf[] = { -extern int dvb_set_ts_filt(int fd, uint16_t pid, dmx_pes_type_t pestype); -extern int dvb_demux_stop(int fd); -extern int dvb_get_tuner_type(int fd); +int dvb_set_ts_filt(int fd, uint16_t pid, dmx_pes_type_t pestype); +int dvb_demux_stop(int fd); +int dvb_get_tuner_type(int fd); int dvb_open_devices(dvb_priv_t *priv, int n, int demux_cnt); int dvb_fix_demuxes(dvb_priv_t *priv, int cnt); -extern int dvb_tune(dvb_priv_t *priv, int freq, char pol, int srate, int diseqc, int tone, +int dvb_tune(dvb_priv_t *priv, int freq, char pol, int srate, int diseqc, int tone, fe_spectral_inversion_t specInv, fe_modulation_t modulation, fe_guard_interval_t guardInterval, fe_transmit_mode_t TransmissionMode, fe_bandwidth_t bandWidth, fe_code_rate_t HP_CodeRate, fe_code_rate_t LP_CodeRate, fe_hierarchy_t hier, int timeout); diff --git a/vidix/dha.h b/vidix/dha.h index 501215172d..c590103308 100644 --- a/vidix/dha.h +++ b/vidix/dha.h @@ -56,29 +56,29 @@ typedef struct pciinfo_s }pciinfo_t; /* needed for mga_vid */ -extern int pci_config_read(unsigned char bus, unsigned char dev, unsigned char func, +int pci_config_read(unsigned char bus, unsigned char dev, unsigned char func, unsigned char cmd, int len, unsigned long *val); /* Fill array pci_list which must have size MAX_PCI_DEVICES and return 0 if sucessful */ -extern int pci_scan(pciinfo_t *pci_list,unsigned *num_card); +int pci_scan(pciinfo_t *pci_list,unsigned *num_card); /* Enables/disables accessing to IO space from application side. Should return 0 if o'k or errno on error. */ -extern int enable_app_io( void ); -extern int disable_app_io( void ); +int enable_app_io(void); +int disable_app_io(void); -extern unsigned char INPORT8(unsigned idx); -extern unsigned short INPORT16(unsigned idx); -extern unsigned INPORT32(unsigned idx); +unsigned char INPORT8(unsigned idx); +unsigned short INPORT16(unsigned idx); +unsigned INPORT32(unsigned idx); #define INPORT(idx) INPORT32(idx) -extern void OUTPORT8(unsigned idx,unsigned char val); -extern void OUTPORT16(unsigned idx,unsigned short val); -extern void OUTPORT32(unsigned idx,unsigned val); +void OUTPORT8(unsigned idx, unsigned char val); +void OUTPORT16(unsigned idx, unsigned short val); +void OUTPORT32(unsigned idx, unsigned val); #define OUTPORT(idx,val) OUTPORT32(idx,val) -extern void * map_phys_mem(unsigned long base, unsigned long size); -extern void unmap_phys_mem(void *ptr, unsigned long size); +void * map_phys_mem(unsigned long base, unsigned long size); +void unmap_phys_mem(void *ptr, unsigned long size); /* These are the region types */ #define MTRR_TYPE_UNCACHABLE 0 @@ -86,6 +86,6 @@ extern void unmap_phys_mem(void *ptr, unsigned long size); #define MTRR_TYPE_WRTHROUGH 4 #define MTRR_TYPE_WRPROT 5 #define MTRR_TYPE_WRBACK 6 -extern int mtrr_set_type(unsigned base,unsigned size,int type); +int mtrr_set_type(unsigned base, unsigned size, int type); #endif /* MPLAYER_DHA_H */ diff --git a/vidix/pci_db2c.awk b/vidix/pci_db2c.awk index 3d10297652..897ce8e312 100644 --- a/vidix/pci_db2c.awk +++ b/vidix/pci_db2c.awk @@ -158,8 +158,8 @@ function print_name_struct(out_file) print "\tconst char *\tname;" >out_file print "\tconst struct device_id_s *\tdev_list;" >out_file print "};" >out_file - print "extern const char *pci_vendor_name(unsigned short id);">out_file - print "extern const char *pci_device_name(unsigned short vendor_id, unsigned short device_id);">out_file + print "const char *pci_vendor_name(unsigned short id);">out_file + print "const char *pci_device_name(unsigned short vendor_id, unsigned short device_id);">out_file print "">out_file return } diff --git a/vidix/sis_vid.c b/vidix/sis_vid.c index 1028a6c5db..a2d1d98919 100644 --- a/vidix/sis_vid.c +++ b/vidix/sis_vid.c @@ -167,7 +167,7 @@ static unsigned short sis_card_ids[] = { /** function declarations **/ -extern void sis_init_video_bridge(void); +void sis_init_video_bridge(void); static void set_overlay(SISOverlayPtr pOverlay, int index); diff --git a/vidix/sysdep/AsmMacros_alpha.h b/vidix/sysdep/AsmMacros_alpha.h index 2cc8d01544..5ae5e07a82 100644 --- a/vidix/sysdep/AsmMacros_alpha.h +++ b/vidix/sysdep/AsmMacros_alpha.h @@ -66,12 +66,12 @@ #include <sys/io.h> #elif defined (__FreeBSD__) #include <sys/types.h> -extern void outb(u_int32_t port, u_int8_t val); -extern void outw(u_int32_t port, u_int16_t val); -extern void outl(u_int32_t port, u_int32_t val); -extern u_int8_t inb(u_int32_t port); -extern u_int16_t inw(u_int32_t port); -extern u_int32_t inl(u_int32_t port); +void outb(u_int32_t port, u_int8_t val); +void outw(u_int32_t port, u_int16_t val); +void outl(u_int32_t port, u_int32_t val); +u_int8_t inb(u_int32_t port); +u_int16_t inw(u_int32_t port); +u_int32_t inl(u_int32_t port); #else #error This stuff is not ported on your system #endif diff --git a/vidix/sysdep/pci_win32.c b/vidix/sysdep/pci_win32.c index ffa4d2238f..d01cdfd30e 100644 --- a/vidix/sysdep/pci_win32.c +++ b/vidix/sysdep/pci_win32.c @@ -31,7 +31,7 @@ #include "vidix/dhahelperwin/dhahelper.h" static HANDLE hDriver; -extern int IsWinNT(); +int IsWinNT(); @@ -1,30 +1,30 @@ #ifndef MPLAYER_VOBSUB_H #define MPLAYER_VOBSUB_H -extern void *vobsub_open(const char *subname, const char *const ifo, const int force, void** spu); -extern void vobsub_reset(void *vob); -extern int vobsub_parse_ifo(void* this, const char *const name, unsigned int *palette, unsigned int *width, unsigned int *height, int force, int sid, char *langid); -extern int vobsub_get_packet(void *vobhandle, float pts,void** data, int* timestamp); -extern int vobsub_get_next_packet(void *vobhandle, void** data, int* timestamp); -extern void vobsub_close(void *this); -extern unsigned int vobsub_get_indexes_count(void * /* vobhandle */); -extern char *vobsub_get_id(void * /* vobhandle */, unsigned int /* index */); +void *vobsub_open(const char *subname, const char *const ifo, const int force, void** spu); +void vobsub_reset(void *vob); +int vobsub_parse_ifo(void* this, const char *const name, unsigned int *palette, unsigned int *width, unsigned int *height, int force, int sid, char *langid); +int vobsub_get_packet(void *vobhandle, float pts,void** data, int* timestamp); +int vobsub_get_next_packet(void *vobhandle, void** data, int* timestamp); +void vobsub_close(void *this); +unsigned int vobsub_get_indexes_count(void * /* vobhandle */); +char *vobsub_get_id(void * /* vobhandle */, unsigned int /* index */); /// Get vobsub id by its index in the valid streams. -extern int vobsub_get_id_by_index(void *vobhandle, unsigned int index); +int vobsub_get_id_by_index(void *vobhandle, unsigned int index); /// Get index in the valid streams by vobsub id. -extern int vobsub_get_index_by_id(void *vobhandle, int id); +int vobsub_get_index_by_id(void *vobhandle, int id); /// Convert palette value in idx file to yuv. unsigned int vobsub_palette_to_yuv(unsigned int pal); /// Convert rgb value to yuv. unsigned int vobsub_rgb_to_yuv(unsigned int rgb); -extern void *vobsub_out_open(const char *basename, const unsigned int *palette, unsigned int orig_width, unsigned int orig_height, const char *id, unsigned int index); -extern void vobsub_out_output(void *me, const unsigned char *packet, int len, double pts); -extern void vobsub_out_close(void *me); -extern int vobsub_set_from_lang(void *vobhandle, unsigned char * lang); -extern void vobsub_seek(void * vobhandle, float pts); +void *vobsub_out_open(const char *basename, const unsigned int *palette, unsigned int orig_width, unsigned int orig_height, const char *id, unsigned int index); +void vobsub_out_output(void *me, const unsigned char *packet, int len, double pts); +void vobsub_out_close(void *me); +int vobsub_set_from_lang(void *vobhandle, unsigned char * lang); +void vobsub_seek(void * vobhandle, float pts); #endif /* MPLAYER_VOBSUB_H */ |