mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-25 04:10:20 +00:00
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:
@@ -25,6 +25,7 @@
|
|||||||
#include "encode_lavc.h"
|
#include "encode_lavc.h"
|
||||||
#include "common/global.h"
|
#include "common/global.h"
|
||||||
#include "common/msg.h"
|
#include "common/msg.h"
|
||||||
|
#include "common/msg_control.h"
|
||||||
#include "video/vfcap.h"
|
#include "video/vfcap.h"
|
||||||
#include "options/options.h"
|
#include "options/options.h"
|
||||||
#include "osdep/timer.h"
|
#include "osdep/timer.h"
|
||||||
|
|||||||
@@ -34,7 +34,8 @@
|
|||||||
#include "osdep/terminal.h"
|
#include "osdep/terminal.h"
|
||||||
#include "osdep/io.h"
|
#include "osdep/io.h"
|
||||||
|
|
||||||
#include "common/msg.h"
|
#include "msg.h"
|
||||||
|
#include "msg_control.h"
|
||||||
|
|
||||||
/* maximum message length of mp_msg */
|
/* maximum message length of mp_msg */
|
||||||
#define MSGSIZE_MAX 6144
|
#define MSGSIZE_MAX 6144
|
||||||
|
|||||||
12
common/msg.h
12
common/msg.h
@@ -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_TRACE(obj, ...) MP_MSG(obj, MSGL_TRACE, __VA_ARGS__)
|
||||||
#define MP_SMODE(obj, ...) MP_MSG(obj, MSGL_SMODE, __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 */
|
#endif /* MPLAYER_MP_MSG_H */
|
||||||
|
|||||||
18
common/msg_control.h
Normal file
18
common/msg_control.h
Normal 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
|
||||||
@@ -38,6 +38,7 @@
|
|||||||
#include "talloc.h"
|
#include "talloc.h"
|
||||||
#include "common/common.h"
|
#include "common/common.h"
|
||||||
#include "common/msg.h"
|
#include "common/msg.h"
|
||||||
|
#include "common/msg_control.h"
|
||||||
#include "m_option.h"
|
#include "m_option.h"
|
||||||
#include "m_config.h"
|
#include "m_config.h"
|
||||||
|
|
||||||
|
|||||||
@@ -27,6 +27,7 @@
|
|||||||
|
|
||||||
#include "common/global.h"
|
#include "common/global.h"
|
||||||
#include "common/msg.h"
|
#include "common/msg.h"
|
||||||
|
#include "common/msg_control.h"
|
||||||
#include "m_option.h"
|
#include "m_option.h"
|
||||||
#include "m_config.h"
|
#include "m_config.h"
|
||||||
#include "options.h"
|
#include "options.h"
|
||||||
|
|||||||
@@ -30,6 +30,8 @@
|
|||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "talloc.h"
|
#include "talloc.h"
|
||||||
|
#include "common/msg.h"
|
||||||
|
#include "common/msg_control.h"
|
||||||
#include "command.h"
|
#include "command.h"
|
||||||
#include "osdep/timer.h"
|
#include "osdep/timer.h"
|
||||||
#include "common/common.h"
|
#include "common/common.h"
|
||||||
|
|||||||
@@ -41,6 +41,7 @@
|
|||||||
#include "options/m_property.h"
|
#include "options/m_property.h"
|
||||||
#include "common/common.h"
|
#include "common/common.h"
|
||||||
#include "common/msg.h"
|
#include "common/msg.h"
|
||||||
|
#include "common/msg_control.h"
|
||||||
#include "common/global.h"
|
#include "common/global.h"
|
||||||
#include "options/parse_configfile.h"
|
#include "options/parse_configfile.h"
|
||||||
#include "options/parse_commandline.h"
|
#include "options/parse_commandline.h"
|
||||||
|
|||||||
@@ -27,6 +27,7 @@
|
|||||||
#include "talloc.h"
|
#include "talloc.h"
|
||||||
|
|
||||||
#include "common/msg.h"
|
#include "common/msg.h"
|
||||||
|
#include "common/msg_control.h"
|
||||||
#include "options/options.h"
|
#include "options/options.h"
|
||||||
#include "common/common.h"
|
#include "common/common.h"
|
||||||
#include "options/m_property.h"
|
#include "options/m_property.h"
|
||||||
|
|||||||
Reference in New Issue
Block a user