[MPlayer-dev-eng] [PATCH] fifo.c revisited

Dominik 'Rathann' Mierzejewski dominik at rangers.eu.org
Sun Mar 25 20:11:55 CEST 2007


I posted a similar patch back in October, but there was no reaction. I'm going
to commit this one on Tuesday evening if there are no objections.

This requires
svn mv fifo.c mp_fifo.c
first.

Regards,
R.

-- 
MPlayer developer and RPMs maintainer: http://mplayerhq.hu http://rpm.livna.org
There should be a science of discontent. People need hard times and
oppression to develop psychic muscles.
	-- from "Collected Sayings of Muad'Dib" by the Princess Irulan
-------------- next part --------------
--- mplayer-export-2007-03-25/mplayer.c.putkey	2007-03-21 09:24:20.000000000 +0100
+++ mplayer-export-2007-03-25/mplayer.c	2007-03-25 19:51:28.000000000 +0200
@@ -188,7 +188,7 @@
 //**************************************************************************//
 
 // Common FIFO functions, and keyboard/event FIFO code
-#include "fifo.c"
+#include "mp_fifo.h"
 int noconsolecontrols=0;
 //**************************************************************************//
 
--- mplayer-export-2007-03-25/libvo/vo_quartz.c.putkey	2006-12-01 16:04:46.000000000 +0100
+++ mplayer-export-2007-03-25/libvo/vo_quartz.c	2007-03-25 19:51:28.000000000 +0200
@@ -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 @@
 
 #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/////////////////////////////////////////////////////////////////
--- mplayer-export-2007-03-25/libvo/w32_common.c.putkey	2007-03-04 14:20:51.000000000 +0100
+++ mplayer-export-2007-03-25/libvo/w32_common.c	2007-03-25 19:51:28.000000000 +0200
@@ -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
--- mplayer-export-2007-03-25/libvo/vo_aa.c.putkey	2006-11-22 20:21:16.000000000 +0100
+++ mplayer-export-2007-03-25/libvo/vo_aa.c	2007-03-25 19:51:28.000000000 +0200
@@ -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 @@
 
 /* our version of the playmodes :) */
 
-extern void mplayer_put_key(int code);
-
 /* to disable stdout outputs when curses/linux mode */
 extern int quiet;
 
--- mplayer-export-2007-03-25/libvo/vo_caca.c.putkey	2006-11-22 20:21:16.000000000 +0100
+++ mplayer-export-2007-03-25/libvo/vo_caca.c	2007-03-25 19:51:28.000000000 +0200
@@ -26,6 +26,7 @@
 
 #include "osdep/keycodes.h"
 #include "mp_msg.h"
+#include "mp_fifo.h"
 
 #include <caca.h>
 #ifdef CACA_API_VERSION_1
--- mplayer-export-2007-03-25/libvo/vo_sdl.c.putkey	2007-01-21 12:05:21.000000000 +0100
+++ mplayer-export-2007-03-25/libvo/vo_sdl.c	2007-03-25 19:51:28.000000000 +0200
@@ -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 @@
  **/
 
 #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)
--- mplayer-export-2007-03-25/libvo/vo_winvidix.c.putkey	2005-11-02 22:50:55.000000000 +0100
+++ mplayer-export-2007-03-25/libvo/vo_winvidix.c	2007-03-25 19:51:28.000000000 +0200
@@ -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 = 
 {
--- mplayer-export-2007-03-25/libvo/vo_directx.c.putkey	2007-03-06 12:34:06.000000000 +0100
+++ mplayer-export-2007-03-25/libvo/vo_directx.c	2007-03-25 19:51:28.000000000 +0200
@@ -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 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;
 
--- mplayer-export-2007-03-25/libvo/vo_directfb2.c.putkey	2007-03-25 19:51:28.000000000 +0200
+++ mplayer-export-2007-03-25/libvo/vo_directfb2.c	2007-03-25 19:51:28.000000000 +0200
@@ -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))
@@ -893,8 +894,6 @@
 return 0;
 }
 
-extern void mplayer_put_key(int code);
-
 #include "osdep/keycodes.h"
 
 static void check_events(void)
--- mplayer-export-2007-03-25/libvo/vo_dfbmga.c.putkey	2006-10-17 15:23:13.000000000 +0200
+++ mplayer-export-2007-03-25/libvo/vo_dfbmga.c	2007-03-25 19:51:28.000000000 +0200
@@ -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 @@
      return VO_NOTIMPL;
 }
 
-extern void mplayer_put_key( int code );
-
 #include "osdep/keycodes.h"
 
 static void
--- mplayer-export-2007-03-25/libvo/vo_ggi.c.putkey	2005-09-13 10:47:46.000000000 +0200
+++ mplayer-export-2007-03-25/libvo/vo_ggi.c	2007-03-25 19:51:28.000000000 +0200
@@ -26,6 +26,7 @@
 #include "video_out_internal.h"
 
 #include "fastmemcpy.h"
+#include "mp_fifo.h"
 
 #include <ggi/ggi.h>
 
@@ -471,7 +472,6 @@
 
 /* EVENT handling */
 #include "osdep/keycodes.h"
-extern void mplayer_put_key(int code);
 
 static void check_events(void)
 {
--- mplayer-export-2007-03-25/libvo/x11_common.c.putkey	2007-03-25 19:51:28.000000000 +0200
+++ mplayer-export-2007-03-25/libvo/x11_common.c	2007-03-25 19:51:28.000000000 +0200
@@ -6,6 +6,7 @@
 
 #include "config.h"
 #include "mp_msg.h"
+#include "mp_fifo.h"
 #include "x11_common.h"
 
 #ifdef X11_FULLSCREEN
@@ -556,8 +557,6 @@
 #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)
 {
--- mplayer-export-2007-03-25/Makefile.putkey	2007-03-24 21:29:43.000000000 +0100
+++ mplayer-export-2007-03-25/Makefile	2007-03-25 19:51:28.000000000 +0200
@@ -41,6 +41,7 @@
 
 SRCS_MPLAYER = mplayer.c \
                m_property.c \
+               mp_fifo.c \
                mp_msg.c \
                mixer.c \
                parser-mpcmd.c \
--- mplayer-export-2007-03-25/Gui/win32/gui.c.putkey	2007-03-10 15:33:28.000000000 +0100
+++ mplayer-export-2007-03-25/Gui/win32/gui.c	2007-03-25 19:51:28.000000000 +0200
@@ -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>
--- mplayer-export-2007-03-25/cfg-mplayer.h.putkey	2007-03-04 14:26:43.000000000 +0100
+++ mplayer-export-2007-03-25/cfg-mplayer.h	2007-03-25 19:51:28.000000000 +0200
@@ -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)
--- /dev/null	2007-03-24 13:11:17.684115515 +0100
+++ mplayer-export-2007-03-25/mp_fifo.h	2007-03-25 19:52:35.000000000 +0200
@@ -0,0 +1,7 @@
+#ifndef MP_FIFO_H
+#define MP_FIFO_H
+
+int mplayer_get_key(int fd);
+void mplayer_put_key(int code);
+
+#endif
--- mplayer-export-2007-03-25/mp_fifo.c.putkey	2007-02-24 08:28:07.000000000 +0100
+++ mplayer-export-2007-03-25/mp_fifo.c	2007-03-25 19:51:28.000000000 +0200
@@ -1,3 +1,6 @@
+#include <stdlib.h>
+#include "osdep/timer.h"
+#include "input/input.h"
 #include "input/mouse.h"
 
 
@@ -33,7 +36,7 @@
 }
 
 
-static unsigned doubleclick_time = 300;
+unsigned doubleclick_time = 300;
 
 static void put_double(int code) {
   if (code >= MOUSE_BTN0 && code <= MOUSE_BTN9)


More information about the MPlayer-dev-eng mailing list