msg: move special declarations to msg_control.h

While almost everything uses msg.h, the moved definitions are rarely
needed by anything.
This commit is contained in:
wm4 2014-01-16 21:24:39 +01:00
parent 5b14db5ab1
commit 99ee43b33b
9 changed files with 27 additions and 13 deletions

View File

@ -25,6 +25,7 @@
#include "encode_lavc.h"
#include "common/global.h"
#include "common/msg.h"
#include "common/msg_control.h"
#include "video/vfcap.h"
#include "options/options.h"
#include "osdep/timer.h"

View File

@ -34,7 +34,8 @@
#include "osdep/terminal.h"
#include "osdep/io.h"
#include "common/msg.h"
#include "msg.h"
#include "msg_control.h"
/* maximum message length of mp_msg */
#define MSGSIZE_MAX 6144

View File

@ -76,16 +76,4 @@ bool mp_msg_test(struct mp_log *log, int lev);
#define MP_TRACE(obj, ...) MP_MSG(obj, MSGL_TRACE, __VA_ARGS__)
#define MP_SMODE(obj, ...) MP_MSG(obj, MSGL_SMODE, __VA_ARGS__)
struct mpv_global;
void mp_msg_init(struct mpv_global *global);
void mp_msg_uninit(struct mpv_global *global);
void mp_msg_update_msglevels(struct mpv_global *global);
void mp_msg_mute(struct mpv_global *global, bool mute);
void mp_msg_force_stderr(struct mpv_global *global, bool force_stderr);
void mp_msg_flush_status_line(struct mpv_global *global);
bool mp_msg_has_status_line(struct mpv_global *global);
struct bstr;
int mp_msg_split_msglevel(struct bstr *s, struct bstr *out_mod, int *out_level);
#endif /* MPLAYER_MP_MSG_H */

18
common/msg_control.h Normal file
View File

@ -0,0 +1,18 @@
#ifndef MP_MSG_CONTROL_H
#define MP_MSG_CONTROL_H
#include <stdbool.h>
struct mpv_global;
void mp_msg_init(struct mpv_global *global);
void mp_msg_uninit(struct mpv_global *global);
void mp_msg_update_msglevels(struct mpv_global *global);
void mp_msg_mute(struct mpv_global *global, bool mute);
void mp_msg_force_stderr(struct mpv_global *global, bool force_stderr);
void mp_msg_flush_status_line(struct mpv_global *global);
bool mp_msg_has_status_line(struct mpv_global *global);
struct bstr;
int mp_msg_split_msglevel(struct bstr *s, struct bstr *out_mod, int *out_level);
#endif

View File

@ -38,6 +38,7 @@
#include "talloc.h"
#include "common/common.h"
#include "common/msg.h"
#include "common/msg_control.h"
#include "m_option.h"
#include "m_config.h"

View File

@ -27,6 +27,7 @@
#include "common/global.h"
#include "common/msg.h"
#include "common/msg_control.h"
#include "m_option.h"
#include "m_config.h"
#include "options.h"

View File

@ -30,6 +30,8 @@
#include "config.h"
#include "talloc.h"
#include "common/msg.h"
#include "common/msg_control.h"
#include "command.h"
#include "osdep/timer.h"
#include "common/common.h"

View File

@ -41,6 +41,7 @@
#include "options/m_property.h"
#include "common/common.h"
#include "common/msg.h"
#include "common/msg_control.h"
#include "common/global.h"
#include "options/parse_configfile.h"
#include "options/parse_commandline.h"

View File

@ -27,6 +27,7 @@
#include "talloc.h"
#include "common/msg.h"
#include "common/msg_control.h"
#include "options/options.h"
#include "common/common.h"
#include "options/m_property.h"