summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrathann <rathann@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-03-29 17:16:11 +0000
committerrathann <rathann@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-03-29 17:16:11 +0000
commit259cfbe7e23f353d15291875b70663517e973377 (patch)
tree3fd490d7182022d324b120a4bebb9433144d2f42
parent929e2c51efc4e9d7b6dcd61dbd3b9c60a27dacd7 (diff)
downloadmpv-259cfbe7e23f353d15291875b70663517e973377.tar.bz2
mpv-259cfbe7e23f353d15291875b70663517e973377.tar.xz
Code cleanup: don't include a .c file in mplayer.c and fix a few
"implicit declaration of function ‘mplayer_put_key’" warnings Based on Attila's suggestions. Approved by Uoti and Ivan. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22841 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--Gui/win32/gui.c1
-rw-r--r--Makefile1
-rw-r--r--cfg-mplayer.h2
-rw-r--r--libvo/vo_aa.c3
-rw-r--r--libvo/vo_caca.c1
-rw-r--r--libvo/vo_dfbmga.c3
-rw-r--r--libvo/vo_directfb2.c3
-rw-r--r--libvo/vo_directx.c2
-rw-r--r--libvo/vo_ggi.c2
-rw-r--r--libvo/vo_quartz.c2
-rw-r--r--libvo/vo_sdl.c2
-rw-r--r--libvo/vo_winvidix.c2
-rw-r--r--libvo/w32_common.c2
-rw-r--r--libvo/x11_common.c3
-rw-r--r--mp_fifo.c (renamed from fifo.c)5
-rw-r--r--mplayer.c2
16 files changed, 20 insertions, 16 deletions
diff --git a/Gui/win32/gui.c b/Gui/win32/gui.c
index 7b1aa864bb..d079c82c5e 100644
--- a/Gui/win32/gui.c
+++ b/Gui/win32/gui.c
@@ -28,6 +28,7 @@
#include <shlobj.h>
#include <version.h>
#include <mplayer.h>
+#include <mp_fifo.h>
#include <mp_msg.h>
#include <help_mp.h>
#include <input/input.h>
diff --git a/Makefile b/Makefile
index be48613058..5aac1332d4 100644
--- a/Makefile
+++ b/Makefile
@@ -41,6 +41,7 @@ SRCS_COMMON-$(UNRARLIB) += unrarlib.c
SRCS_MPLAYER = mplayer.c \
m_property.c \
+ mp_fifo.c \
mp_msg.c \
mixer.c \
parser-mpcmd.c \
diff --git a/cfg-mplayer.h b/cfg-mplayer.h
index 8d8136231a..05a95eede1 100644
--- a/cfg-mplayer.h
+++ b/cfg-mplayer.h
@@ -4,6 +4,8 @@
#include "cfg-common.h"
+extern int key_fifo_size;
+extern unsigned doubleclick_time;
extern int noconsolecontrols;
#if defined(HAVE_FBDEV)||defined(HAVE_VESA)
diff --git a/libvo/vo_aa.c b/libvo/vo_aa.c
index 3229d13cbb..6e9f9d5b4d 100644
--- a/libvo/vo_aa.c
+++ b/libvo/vo_aa.c
@@ -37,6 +37,7 @@
#include "subopt-helper.h"
#include "help_mp.h"
#include "mp_msg.h"
+#include "mp_fifo.h"
#define MESSAGE_DURATION 3
@@ -83,8 +84,6 @@ static struct SwsContext *sws=NULL;
/* our version of the playmodes :) */
-extern void mplayer_put_key(int code);
-
/* to disable stdout outputs when curses/linux mode */
extern int quiet;
diff --git a/libvo/vo_caca.c b/libvo/vo_caca.c
index 86c46fa7e7..31a260a7c9 100644
--- a/libvo/vo_caca.c
+++ b/libvo/vo_caca.c
@@ -26,6 +26,7 @@
#include "osdep/keycodes.h"
#include "mp_msg.h"
+#include "mp_fifo.h"
#include <caca.h>
#ifdef CACA_API_VERSION_1
diff --git a/libvo/vo_dfbmga.c b/libvo/vo_dfbmga.c
index 8e4e861c92..17187b880e 100644
--- a/libvo/vo_dfbmga.c
+++ b/libvo/vo_dfbmga.c
@@ -39,6 +39,7 @@
#include "sub.h"
#include "mp_msg.h"
#include "aspect.h"
+#include "mp_fifo.h"
static vo_info_t info = {
"DirectFB / Matrox G200/G400/G450/G550",
@@ -1425,8 +1426,6 @@ control( uint32_t request, void *data, ... )
return VO_NOTIMPL;
}
-extern void mplayer_put_key( int code );
-
#include "osdep/keycodes.h"
static void
diff --git a/libvo/vo_directfb2.c b/libvo/vo_directfb2.c
index 7be855a58d..376a011d1e 100644
--- a/libvo/vo_directfb2.c
+++ b/libvo/vo_directfb2.c
@@ -47,6 +47,7 @@
#include "mp_msg.h"
#include "aspect.h"
#include "subopt-helper.h"
+#include "mp_fifo.h"
#ifndef min
#define min(x,y) (((x)<(y))?(x):(y))
@@ -892,8 +893,6 @@ static int config(uint32_t s_width, uint32_t s_height, uint32_t d_width,
return 0;
}
-extern void mplayer_put_key(int code);
-
#include "osdep/keycodes.h"
static void check_events(void)
diff --git a/libvo/vo_directx.c b/libvo/vo_directx.c
index 9794a4ccfc..c57b0efbe1 100644
--- a/libvo/vo_directx.c
+++ b/libvo/vo_directx.c
@@ -34,6 +34,7 @@
#include "mp_msg.h"
#include "aspect.h"
#include "geometry.h"
+#include "mp_fifo.h"
#ifdef HAVE_NEW_GUI
#include "Gui/interface.h"
@@ -85,7 +86,6 @@ static float window_aspect;
static BOOL (WINAPI* myGetMonitorInfo)(HMONITOR, LPMONITORINFO) = NULL;
static RECT last_rect = {0xDEADC0DE, 0xDEADC0DE, 0xDEADC0DE, 0xDEADC0DE};
-extern void mplayer_put_key(int code); //let mplayer handel the keyevents
extern void vo_draw_text(int dxs,int dys,void (*draw_alpha)(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride));
extern int vidmode;
diff --git a/libvo/vo_ggi.c b/libvo/vo_ggi.c
index 8129ab51a5..6213ec6e69 100644
--- a/libvo/vo_ggi.c
+++ b/libvo/vo_ggi.c
@@ -26,6 +26,7 @@
#include "video_out_internal.h"
#include "fastmemcpy.h"
+#include "mp_fifo.h"
#include <ggi/ggi.h>
@@ -471,7 +472,6 @@ static int control(uint32_t request, void *data, ...)
/* EVENT handling */
#include "osdep/keycodes.h"
-extern void mplayer_put_key(int code);
static void check_events(void)
{
diff --git a/libvo/vo_quartz.c b/libvo/vo_quartz.c
index 05dce549a9..b9546dc80d 100644
--- a/libvo/vo_quartz.c
+++ b/libvo/vo_quartz.c
@@ -30,6 +30,7 @@
#include "aspect.h"
#include "mp_msg.h"
#include "m_option.h"
+#include "mp_fifo.h"
#include "input/input.h"
#include "input/mouse.h"
@@ -128,7 +129,6 @@ enum
#include "osdep/keycodes.h"
-extern void mplayer_put_key(int code);
extern void vo_draw_text(int dxs,int dys,void (*draw_alpha)(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride));
//PROTOTYPE/////////////////////////////////////////////////////////////////
diff --git a/libvo/vo_sdl.c b/libvo/vo_sdl.c
index 0f8f74046c..415c43de17 100644
--- a/libvo/vo_sdl.c
+++ b/libvo/vo_sdl.c
@@ -125,6 +125,7 @@
#include "input/input.h"
#include "input/mouse.h"
#include "subopt-helper.h"
+#include "mp_fifo.h"
static vo_info_t info =
{
@@ -1160,7 +1161,6 @@ static int draw_slice(uint8_t *image[], int stride[], int w,int h,int x,int y)
**/
#include "osdep/keycodes.h"
-extern void mplayer_put_key(int code);
#define shift_key (event.key.keysym.mod==(KMOD_LSHIFT||KMOD_RSHIFT))
static void check_events (void)
diff --git a/libvo/vo_winvidix.c b/libvo/vo_winvidix.c
index 6cefdd5a3d..0cf9a95cb6 100644
--- a/libvo/vo_winvidix.c
+++ b/libvo/vo_winvidix.c
@@ -22,11 +22,11 @@
#include "aspect.h"
#include "mp_msg.h"
+#include "mp_fifo.h"
#include "vosub_vidix.h"
#include "vidix/vidixlib.h"
-extern void mplayer_put_key(int code);
static vo_info_t info =
{
diff --git a/libvo/w32_common.c b/libvo/w32_common.c
index db7ff26eae..b0e62ec529 100644
--- a/libvo/w32_common.c
+++ b/libvo/w32_common.c
@@ -10,8 +10,8 @@
#include "video_out.h"
#include "aspect.h"
#include "w32_common.h"
+#include "mp_fifo.h"
-extern void mplayer_put_key(int code);
extern int enable_mouse_movements;
#ifndef MONITOR_DEFAULTTOPRIMARY
diff --git a/libvo/x11_common.c b/libvo/x11_common.c
index 3b2b821c0d..42f1bfd143 100644
--- a/libvo/x11_common.c
+++ b/libvo/x11_common.c
@@ -6,6 +6,7 @@
#include "config.h"
#include "mp_msg.h"
+#include "mp_fifo.h"
#include "x11_common.h"
#ifdef X11_FULLSCREEN
@@ -557,8 +558,6 @@ void vo_uninit(void)
#include "osdep/keycodes.h"
#include "wskeys.h"
-extern void mplayer_put_key(int code);
-
#ifdef XF86XK_AudioPause
static void vo_x11_putkey_ext(int keysym)
{
diff --git a/fifo.c b/mp_fifo.c
index bf365f66b4..5d0159dfd8 100644
--- a/fifo.c
+++ b/mp_fifo.c
@@ -1,3 +1,6 @@
+#include <stdlib.h>
+#include "osdep/timer.h"
+#include "input/input.h"
#include "input/mouse.h"
@@ -33,7 +36,7 @@ int mplayer_get_key(int fd){
}
-static unsigned doubleclick_time = 300;
+unsigned doubleclick_time = 300;
static void put_double(int code) {
if (code >= MOUSE_BTN0 && code <= MOUSE_BTN9)
diff --git a/mplayer.c b/mplayer.c
index b1e94802a3..61c79ce5d2 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -188,7 +188,7 @@ static int max_framesize=0;
//**************************************************************************//
// Common FIFO functions, and keyboard/event FIFO code
-#include "fifo.c"
+#include "mp_fifo.h"
int noconsolecontrols=0;
//**************************************************************************//