summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorMartin Herkt <lachs0r@srsfckn.biz>2014-04-24 18:44:46 +0200
committerMartin Herkt <lachs0r@srsfckn.biz>2014-05-04 02:46:11 +0200
commit48bd03dd912321b8bfa12b8b201d2f0b3aa43ae0 (patch)
tree56178a31524ea7276dc1a26a83a678917a783249 /common
parent81c076b2f8c8b0da0ebcf1c8aadf4c7dfb5e5d22 (diff)
downloadmpv-48bd03dd912321b8bfa12b8b201d2f0b3aa43ae0.tar.bz2
mpv-48bd03dd912321b8bfa12b8b201d2f0b3aa43ae0.tar.xz
options: remove deprecated --identify
Also remove MSGL_SMODE and friends. Note: The indent in options.rst was added to work around a bug in ReportLab that causes the PDF manual build to fail.
Diffstat (limited to 'common')
-rw-r--r--common/msg.c11
-rw-r--r--common/msg.h4
2 files changed, 4 insertions, 11 deletions
diff --git a/common/msg.c b/common/msg.c
index 0b61234bea..11fee518d2 100644
--- a/common/msg.c
+++ b/common/msg.c
@@ -48,7 +48,6 @@ struct mp_log_root {
// --- protected by mp_msg_lock
char *msglevels;
bool use_terminal; // make accesses to stderr/stdout
- bool smode; // slave mode compatibility glue
bool module;
bool show_time;
bool termosd; // use terminal control codes for status line
@@ -107,9 +106,6 @@ static void update_loglevel(struct mp_log *log)
log->terminal_level = -1;
if (log->root->use_terminal) {
log->level = MSGL_STATUS + log->root->verbose; // default log level
- // Stupid exception for the remains of -identify
- if (match_mod(log->verbose_prefix, bstr0("identify")))
- log->level = -1;
bstr s = bstr0(log->root->msglevels);
bstr mod;
int level;
@@ -136,7 +132,7 @@ bool mp_msg_test(struct mp_log *log, int lev)
return false;
if (log->reload_counter != log->root->reload_counter)
update_loglevel(log);
- return lev <= log->level || (log->root->smode && lev == MSGL_SMODE);
+ return lev <= log->level;
}
// Reposition cursor and clear lines for outputting the status line. In certain
@@ -232,14 +228,14 @@ static void print_msg_on_terminal(struct mp_log *log, int lev, char *text)
struct mp_log_root *root = log->root;
FILE *stream = (root->force_stderr || lev == MSGL_STATUS) ? stderr : stdout;
- if (!(lev <= log->terminal_level || (root->smode && lev == MSGL_SMODE)))
+ if (!(lev <= log->terminal_level))
return;
bool header = root->header;
const char *prefix = log->prefix;
char *terminate = NULL;
- if ((lev >= MSGL_V && lev != MSGL_SMODE) || root->verbose || root->module)
+ if ((lev >= MSGL_V) || root->verbose || root->module)
prefix = log->verbose_prefix;
if (lev == MSGL_STATUS) {
@@ -423,7 +419,6 @@ void mp_msg_update_msglevels(struct mpv_global *global)
root->verbose = opts->verbose;
root->module = opts->msg_module;
- root->smode = opts->msg_identify;
root->use_terminal = opts->use_terminal;
root->show_time = opts->msg_time;
if (root->use_terminal) {
diff --git a/common/msg.h b/common/msg.h
index 61997e946d..80aec2f5b3 100644
--- a/common/msg.h
+++ b/common/msg.h
@@ -42,9 +42,8 @@ enum {
MSGL_DEBUG, // -v -v
MSGL_TRACE, // -v -v -v
MSGL_STATS, // dumping fine grained stats (--dump-stats)
- MSGL_SMODE, // old slave mode (-identify)
- MSGL_MAX = MSGL_SMODE,
+ MSGL_MAX = MSGL_STATS,
};
struct mp_log *mp_log_new(void *talloc_ctx, struct mp_log *parent,
@@ -77,7 +76,6 @@ bool mp_msg_test(struct mp_log *log, int lev);
#define MP_VERBOSE(obj, ...) MP_MSG(obj, MSGL_V, __VA_ARGS__)
#define MP_DBG(obj, ...) MP_MSG(obj, MSGL_DEBUG, __VA_ARGS__)
#define MP_TRACE(obj, ...) MP_MSG(obj, MSGL_TRACE, __VA_ARGS__)
-#define MP_SMODE(obj, ...) MP_MSG(obj, MSGL_SMODE, __VA_ARGS__)
// This is a bit special. See TOOLS/stats-conv.py what rules text passed
// to these functions should follow. Also see --dump-stats.