summaryrefslogtreecommitdiffstats
path: root/mpvcore
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-10-30 21:47:14 +0100
committerwm4 <wm4@nowhere>2013-10-30 22:19:31 +0100
commit2ccc3721ef9fc0acf39203e6709fa638a79222ae (patch)
treeb4e4ad1b44b0baa0f3ce7c9696213dcabce3699f /mpvcore
parentfdd1b8cac13b7504e11db7e63f20d86e0f2e1cb2 (diff)
downloadmpv-2ccc3721ef9fc0acf39203e6709fa638a79222ae.tar.bz2
mpv-2ccc3721ef9fc0acf39203e6709fa638a79222ae.tar.xz
player: merge mp_osd.h into mp_core.h
Just doing this because mp_osd.h and osd.c is not consistent. There are some other header files (command.h and screenshot.h), but since I don't feel too good about inflating mp_core.h, I'm not merging them, at least not yet.
Diffstat (limited to 'mpvcore')
-rw-r--r--mpvcore/player/command.c1
-rw-r--r--mpvcore/player/mp_core.h32
-rw-r--r--mpvcore/player/mp_osd.h54
-rw-r--r--mpvcore/player/osd.c2
-rw-r--r--mpvcore/player/playloop.c1
-rw-r--r--mpvcore/player/screenshot.c1
-rw-r--r--mpvcore/player/sub.c1
7 files changed, 33 insertions, 59 deletions
diff --git a/mpvcore/player/command.c b/mpvcore/player/command.c
index f1a2453ca9..29352ee3f3 100644
--- a/mpvcore/player/command.c
+++ b/mpvcore/player/command.c
@@ -45,7 +45,6 @@
#include "mpvcore/m_config.h"
#include "video/filter/vf.h"
#include "video/decode/vd.h"
-#include "mp_osd.h"
#include "video/out/vo.h"
#include "video/csputils.h"
#include "audio/mixer.h"
diff --git a/mpvcore/player/mp_core.h b/mpvcore/player/mp_core.h
index d5b1bb2995..05909543f4 100644
--- a/mpvcore/player/mp_core.h
+++ b/mpvcore/player/mp_core.h
@@ -21,6 +21,7 @@
#include <stdbool.h>
+#include "compat/compiler.h"
#include "mpvcore/options.h"
#include "demux/demux.h"
@@ -77,6 +78,28 @@ enum mp_osd_seek_info {
OSD_SEEK_INFO_EDITION = 8,
};
+
+enum {
+ OSD_MSG_TEXT = 1,
+ OSD_MSG_SUB_DELAY,
+ OSD_MSG_SPEED,
+ OSD_MSG_OSD_STATUS,
+ OSD_MSG_BAR,
+ OSD_MSG_PAUSE,
+ OSD_MSG_RADIO_CHANNEL,
+ OSD_MSG_TV_CHANNEL,
+
+ // Base id for messages generated from the commmand to property bridge.
+ OSD_MSG_PROPERTY = 0x100,
+ OSD_MSG_SUB_BASE = 0x1000,
+
+ // other constants
+ MAX_OSD_LEVEL = 3,
+ MAX_TERM_OSD_LEVEL = 1,
+ OSD_LEVEL_INVISIBLE = 4,
+ OSD_BAR_SEEK = 256,
+};
+
enum seek_type {
MPSEEK_NONE = 0,
MPSEEK_RELATIVE,
@@ -358,6 +381,15 @@ void stream_dump(struct MPContext *mpctx);
// osd.c
void write_status_line(struct MPContext *mpctx, const char *line);
void print_status(struct MPContext *mpctx);
+void set_osd_bar(struct MPContext *mpctx, int type, const char* name,
+ double min, double max, double val);
+void set_osd_msg(struct MPContext *mpctx, int id, int level, int time,
+ const char* fmt, ...) PRINTF_ATTRIBUTE(5,6);
+void set_osd_tmsg(struct MPContext *mpctx, int id, int level, int time,
+ const char* fmt, ...) PRINTF_ATTRIBUTE(5,6);
+void rm_osd_msg(struct MPContext *mpctx, int id);
+void set_osd_function(struct MPContext *mpctx, int osd_function);
+void set_osd_subtitle(struct MPContext *mpctx, const char *text);
// playloop.c
void pause_player(struct MPContext *mpctx);
diff --git a/mpvcore/player/mp_osd.h b/mpvcore/player/mp_osd.h
deleted file mode 100644
index 914b8c68c9..0000000000
--- a/mpvcore/player/mp_osd.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * This file is part of MPlayer.
- *
- * MPlayer is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * MPlayer is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with MPlayer; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#ifndef MPLAYER_MP_OSD_H
-#define MPLAYER_MP_OSD_H
-
-#include "compat/compiler.h"
-
-#define OSD_MSG_TEXT 1
-#define OSD_MSG_SUB_DELAY 2
-#define OSD_MSG_SPEED 3
-#define OSD_MSG_OSD_STATUS 4
-#define OSD_MSG_BAR 5
-#define OSD_MSG_PAUSE 6
-#define OSD_MSG_RADIO_CHANNEL 7
-#define OSD_MSG_TV_CHANNEL 8
-/// Base id for messages generated from the commmand to property bridge.
-#define OSD_MSG_PROPERTY 0x100
-#define OSD_MSG_SUB_BASE 0x1000
-
-#define MAX_OSD_LEVEL 3
-#define MAX_TERM_OSD_LEVEL 1
-#define OSD_LEVEL_INVISIBLE 4
-
-#define OSD_BAR_SEEK 256
-
-struct MPContext;
-
-void set_osd_bar(struct MPContext *mpctx, int type,const char* name,double min,double max,double val);
-void set_osd_msg(struct MPContext *mpctx, int id, int level, int time, const char* fmt, ...) PRINTF_ATTRIBUTE(5,6);
-void set_osd_tmsg(struct MPContext *mpctx, int id, int level, int time, const char* fmt, ...) PRINTF_ATTRIBUTE(5,6);
-void rm_osd_msg(struct MPContext *mpctx, int id);
-
-// osd_function is the symbol appearing in the video status, such as OSD_PLAY
-void set_osd_function(struct MPContext *mpctx, int osd_function);
-
-void set_osd_subtitle(struct MPContext *mpctx, const char *text);
-
-#endif /* MPLAYER_MP_OSD_H */
diff --git a/mpvcore/player/osd.c b/mpvcore/player/osd.c
index f9b8fdad87..c7964c03f9 100644
--- a/mpvcore/player/osd.c
+++ b/mpvcore/player/osd.c
@@ -38,7 +38,6 @@
#include "sub/sub.h"
#include "mp_core.h"
-#include "mp_osd.h"
#include "command.h"
#define saddf(var, ...) (*(var) = talloc_asprintf_append((*var), __VA_ARGS__))
@@ -368,6 +367,7 @@ static void set_osd_bar_chapters(struct MPContext *mpctx, int type)
}
}
+// osd_function is the symbol appearing in the video status, such as OSD_PLAY
void set_osd_function(struct MPContext *mpctx, int osd_function)
{
struct MPOpts *opts = mpctx->opts;
diff --git a/mpvcore/player/playloop.c b/mpvcore/player/playloop.c
index bdce1cf74d..8efb6d6693 100644
--- a/mpvcore/player/playloop.c
+++ b/mpvcore/player/playloop.c
@@ -47,7 +47,6 @@
#include "video/out/vo.h"
#include "mp_core.h"
-#include "mp_osd.h"
#include "screenshot.h"
#include "command.h"
diff --git a/mpvcore/player/screenshot.c b/mpvcore/player/screenshot.c
index bafb3012fb..aeb15c0fd7 100644
--- a/mpvcore/player/screenshot.c
+++ b/mpvcore/player/screenshot.c
@@ -30,7 +30,6 @@
#include "command.h"
#include "mpvcore/bstr.h"
#include "mpvcore/mp_msg.h"
-#include "mp_osd.h"
#include "mpvcore/path.h"
#include "video/mp_image.h"
#include "video/decode/dec_video.h"
diff --git a/mpvcore/player/sub.c b/mpvcore/player/sub.c
index 42724486c9..d85abcc2c4 100644
--- a/mpvcore/player/sub.c
+++ b/mpvcore/player/sub.c
@@ -35,7 +35,6 @@
#include "video/mp_image.h"
#include "mp_core.h"
-#include "mp_osd.h"
void uninit_subs(struct demuxer *demuxer)
{