changeset 30653:3d23e24c5c60

Declare externally used variables from vd.c as extern in vd.h. This saves declaring them as extern all over the place.
author diego
date Mon, 22 Feb 2010 09:51:44 +0000
parents a2dddda6eb2f
children a98060c8bdd5
files cfg-common-opts.h cfg-common.h cfg-mplayer.h gui/cfg.c gui/interface.c gui/mplayer/gmplayer.h gui/mplayer/play.c libmpcodecs/vd.h libmpcodecs/vf_ass.c libmpcodecs/vf_crop.c libmpcodecs/vf_expand.c libmpcodecs/vf_filmdint.c libmpcodecs/vf_scale.c libvo/vo_directx.c
diffstat 14 files changed, 18 insertions(+), 31 deletions(-) [+]
line wrap: on
line diff
--- a/cfg-common-opts.h	Sun Feb 21 23:36:36 2010 +0000
+++ b/cfg-common-opts.h	Mon Feb 22 09:51:44 2010 +0000
@@ -20,7 +20,7 @@
 #define MPLAYER_CFG_COMMON_OPTS_H
 
 #include "config.h"
-
+#include "libmpcodecs/vd.h"
 #include "osdep/priority.h"
 
 // ------------------------- common options --------------------
--- a/cfg-common.h	Sun Feb 21 23:36:36 2010 +0000
+++ b/cfg-common.h	Mon Feb 22 09:51:44 2010 +0000
@@ -28,11 +28,6 @@
 extern int mp_msg_color;
 extern int mp_msg_module;
 
-// codec/filter opts: (defined at libmpcodecs/vd.c)
-extern float screen_size_xy;
-extern int softzoom;
-extern int flip;
-
 /* defined in codec-cfg.c */
 extern char * codecs_file;
 
--- a/cfg-mplayer.h	Sun Feb 21 23:36:36 2010 +0000
+++ b/cfg-mplayer.h	Mon Feb 22 09:51:44 2010 +0000
@@ -24,6 +24,7 @@
  */
 
 #include "cfg-common.h"
+#include "libmpcodecs/vd.h"
 #include "libvo/vo_zr.h"
 
 extern int key_fifo_size;
@@ -39,11 +40,6 @@
 /* only used at startup (setting these values from configfile) */
 extern char *vo_geometry;
 
-extern int opt_screen_size_x;
-extern int opt_screen_size_y;
-extern int fullscreen;
-extern int vidmode;
-
 extern char *ao_outputfilename;
 extern int ao_pcm_waveheader;
 
--- a/gui/cfg.c	Sun Feb 21 23:36:36 2010 +0000
+++ b/gui/cfg.c	Mon Feb 22 09:51:44 2010 +0000
@@ -28,6 +28,7 @@
 #include "m_config.h"
 #include "m_option.h"
 #include "get_path.h"
+#include "libmpcodecs/vd.h"
 #include "libvo/sub.h"
 #include "libvo/video_out.h"
 #include "stream/stream.h"
--- a/gui/interface.c	Sun Feb 21 23:36:36 2010 +0000
+++ b/gui/interface.c	Mon Feb 22 09:51:44 2010 +0000
@@ -39,6 +39,7 @@
 #include "get_path.h"
 #include "mp_core.h"
 #include "mplayer.h"
+#include "libmpcodecs/vd.h"
 #include "libvo/x11_common.h"
 #include "libvo/video_out.h"
 #include "libvo/font_load.h"
--- a/gui/mplayer/gmplayer.h	Sun Feb 21 23:36:36 2010 +0000
+++ b/gui/mplayer/gmplayer.h	Mon Feb 22 09:51:44 2010 +0000
@@ -31,8 +31,6 @@
 
 extern char          * dvd_device;
 extern char          * cdrom_device;
-extern int             fullscreen;
-extern int             flip;
 
 void mplInit( void * disp );
 
--- a/gui/mplayer/play.c	Sun Feb 21 23:36:36 2010 +0000
+++ b/gui/mplayer/play.c	Mon Feb 22 09:51:44 2010 +0000
@@ -26,6 +26,7 @@
 
 #include "config.h"
 #include "help_mp.h"
+#include "libmpcodecs/vd.h"
 #include "libvo/x11_common.h"
 #include "libvo/video_out.h"
 #include "input/input.h"
--- a/libmpcodecs/vd.h	Sun Feb 21 23:36:36 2010 +0000
+++ b/libmpcodecs/vd.h	Mon Feb 22 09:51:44 2010 +0000
@@ -38,8 +38,15 @@
 // NULL terminated array of all drivers
 extern const vd_functions_t * const mpcodecs_vd_drivers[];
 
+extern int flip;
+extern int fullscreen;
+extern int opt_screen_size_x;
+extern int opt_screen_size_y;
+extern int softzoom;
 extern int vd_use_slices;
+extern int vidmode;
 extern float movie_aspect;
+extern float screen_size_xy;
 
 #define VDCTRL_QUERY_FORMAT 3 /* test for availabilty of a format */
 #define VDCTRL_QUERY_MAX_PP_LEVEL 4 /* test for postprocessing support (max level) */
--- a/libmpcodecs/vf_ass.c	Sun Feb 21 23:36:36 2010 +0000
+++ b/libmpcodecs/vf_ass.c	Mon Feb 22 09:51:44 2010 +0000
@@ -34,6 +34,7 @@
 
 #include "img_format.h"
 #include "mp_image.h"
+#include "vd.h"
 #include "vf.h"
 
 #include "libvo/fastmemcpy.h"
@@ -67,9 +68,6 @@
 	unsigned char* dirty_rows;
 } vf_priv_dflt;
 
-extern int opt_screen_size_x;
-extern int opt_screen_size_y;
-
 extern ass_track_t* ass_track;
 extern float sub_delay;
 extern int sub_visibility;
--- a/libmpcodecs/vf_crop.c	Sun Feb 21 23:36:36 2010 +0000
+++ b/libmpcodecs/vf_crop.c	Mon Feb 22 09:51:44 2010 +0000
@@ -26,6 +26,7 @@
 
 #include "img_format.h"
 #include "mp_image.h"
+#include "vd.h"
 #include "vf.h"
 
 #include "m_option.h"
@@ -39,9 +40,6 @@
   -1,-1
 };
 
-extern int opt_screen_size_x;
-extern int opt_screen_size_y;
-
 //===========================================================================//
 
 static int config(struct vf_instance *vf,
--- a/libmpcodecs/vf_expand.c	Sun Feb 21 23:36:36 2010 +0000
+++ b/libmpcodecs/vf_expand.c	Mon Feb 22 09:51:44 2010 +0000
@@ -28,6 +28,7 @@
 
 #include "img_format.h"
 #include "mp_image.h"
+#include "vd.h"
 #include "vf.h"
 
 #include "libvo/fastmemcpy.h"
@@ -70,9 +71,6 @@
   0
 };
 
-extern int opt_screen_size_x;
-extern int opt_screen_size_y;
-
 //===========================================================================//
 #ifdef OSD_SUPPORT
 
--- a/libmpcodecs/vf_filmdint.c	Sun Feb 21 23:36:36 2010 +0000
+++ b/libmpcodecs/vf_filmdint.c	Mon Feb 22 09:51:44 2010 +0000
@@ -27,6 +27,7 @@
 
 #include "img_format.h"
 #include "mp_image.h"
+#include "vd.h"
 #include "vf.h"
 #include "cmmx.h"
 
@@ -97,9 +98,6 @@
 static const struct frame_stats ppzs = {PPZ,PPZ,PPZ,PPZ,PPZ,PPZ,PPZ,0,0,9999};
 static const struct frame_stats pprs = {PPR,PPR,PPR,PPR,PPR,PPR,PPR,0,0,9999};
 
-extern int opt_screen_size_x;
-extern int opt_screen_size_y;
-
 #ifndef MIN
 #define        MIN(a,b) (((a)<(b))?(a):(b))
 #endif
--- a/libmpcodecs/vf_scale.c	Sun Feb 21 23:36:36 2010 +0000
+++ b/libmpcodecs/vf_scale.c	Mon Feb 22 09:51:44 2010 +0000
@@ -27,6 +27,7 @@
 
 #include "img_format.h"
 #include "mp_image.h"
+#include "vd.h"
 #include "vf.h"
 #include "fmt-conversion.h"
 #include "mpbswap.h"
@@ -58,10 +59,6 @@
   NULL
 };
 
-extern int opt_screen_size_x;
-extern int opt_screen_size_y;
-extern float screen_size_xy;
-
 //===========================================================================//
 
 void sws_getFlagsAndFilterFromCmdLine(int *flags, SwsFilter **srcFilterParam, SwsFilter **dstFilterParam);
--- a/libvo/vo_directx.c	Sun Feb 21 23:36:36 2010 +0000
+++ b/libvo/vo_directx.c	Mon Feb 22 09:51:44 2010 +0000
@@ -31,6 +31,7 @@
 #include "video_out_internal.h"
 #include "fastmemcpy.h"
 #include "input/input.h"
+#include "libmpcodecs/vd.h"
 #include "osdep/keycodes.h"
 #include "input/mouse.h"
 #include "mp_msg.h"
@@ -90,8 +91,6 @@
 static BOOL (WINAPI* myGetMonitorInfo)(HMONITOR, LPMONITORINFO) = NULL;
 static RECT last_rect = {0xDEADC0DE, 0xDEADC0DE, 0xDEADC0DE, 0xDEADC0DE};
 
-extern int vidmode;
-
 /*****************************************************************************
  * DirectDraw GUIDs.
  * Defining them here allows us to get rid of the dxguid library during