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.
This commit is contained in:
Martin Herkt 2014-04-24 18:44:46 +02:00
parent 81c076b2f8
commit 48bd03dd91
14 changed files with 15 additions and 141 deletions

View File

@ -167,6 +167,7 @@ Command Line Switches
``-fsmode-dontuse`` (removed) ``-fsmode-dontuse`` (removed)
``-fstype`` ``--x11-fstype`` ``-fstype`` ``--x11-fstype``
``-hardframedrop`` ``--framedrop=hard`` ``-hardframedrop`` ``--framedrop=hard``
``-identify`` (removed; use TOOLS/mpv_identify.sh)
``-lavdopts ...`` ``--vd-lavc-...`` ``-lavdopts ...`` ``--vd-lavc-...``
``-lavfdopts`` ``--demuxer-lavf-...`` ``-lavfdopts`` ``--demuxer-lavf-...``
``-lircconf`` ``--input-lirc-conf`` ``-lircconf`` ``--input-lirc-conf``

View File

@ -1151,9 +1151,6 @@ OPTIONS
``mpv --hwdec=vdpau --vo=vdpau --hwdec-codecs=h264,mpeg2video`` ``mpv --hwdec=vdpau --vo=vdpau --hwdec-codecs=h264,mpeg2video``
Enable vdpau decoding for h264 and mpeg2 only. Enable vdpau decoding for h264 and mpeg2 only.
``--identify``
Deprecated. Use ``TOOLS/mpv_identify.sh``.
``--idle`` ``--idle``
Makes mpv wait idly instead of quitting when there is no file to play. Makes mpv wait idly instead of quitting when there is no file to play.
Mostly useful in slave mode, where mpv can be controlled through input Mostly useful in slave mode, where mpv can be controlled through input
@ -1389,18 +1386,15 @@ OPTIONS
Available levels: Available levels:
:no: complete silence :no: complete silence
:fatal: fatal messages only :fatal: fatal messages only
:error: error messages :error: error messages
:warn: warning messages :warn: warning messages
:info: informational messages :info: informational messages
:status: status messages (default) :status: status messages (default)
:v: verbose messages :v: verbose messages
:debug: debug messages :debug: debug messages
:trace: very noisy debug messages :trace: very noisy debug messages
One special case is the ``identify`` module name. This is silenced by
default, and can be enabled with the ``-identify`` option.
``--msg-module`` ``--msg-module``
Prepend module name to each console message. Prepend module name to each console message.

View File

@ -168,9 +168,6 @@ int audio_init_best_codec(struct dec_audio *d_audio, char *audio_decoders)
MP_VERBOSE(d_audio, "AUDIO: %d Hz, %d ch, %s\n", MP_VERBOSE(d_audio, "AUDIO: %d Hz, %d ch, %s\n",
d_audio->decoded.rate, d_audio->decoded.channels.num, d_audio->decoded.rate, d_audio->decoded.channels.num,
af_fmt_to_str(d_audio->decoded.format)); af_fmt_to_str(d_audio->decoded.format));
MP_SMODE(d_audio, "ID_AUDIO_BITRATE=%d\nID_AUDIO_RATE=%d\n" "ID_AUDIO_NCH=%d\n",
d_audio->i_bps * 8, d_audio->decoded.rate,
d_audio->decoded.channels.num);
} else { } else {
MP_ERR(d_audio, "Failed to initialize an audio decoder for codec '%s'.\n", MP_ERR(d_audio, "Failed to initialize an audio decoder for codec '%s'.\n",
d_audio->header->codec ? d_audio->header->codec : "<unknown>"); d_audio->header->codec ? d_audio->header->codec : "<unknown>");

View File

@ -48,7 +48,6 @@ struct mp_log_root {
// --- protected by mp_msg_lock // --- protected by mp_msg_lock
char *msglevels; char *msglevels;
bool use_terminal; // make accesses to stderr/stdout bool use_terminal; // make accesses to stderr/stdout
bool smode; // slave mode compatibility glue
bool module; bool module;
bool show_time; bool show_time;
bool termosd; // use terminal control codes for status line 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; log->terminal_level = -1;
if (log->root->use_terminal) { if (log->root->use_terminal) {
log->level = MSGL_STATUS + log->root->verbose; // default log level 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 s = bstr0(log->root->msglevels);
bstr mod; bstr mod;
int level; int level;
@ -136,7 +132,7 @@ bool mp_msg_test(struct mp_log *log, int lev)
return false; return false;
if (log->reload_counter != log->root->reload_counter) if (log->reload_counter != log->root->reload_counter)
update_loglevel(log); 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 // 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; struct mp_log_root *root = log->root;
FILE *stream = (root->force_stderr || lev == MSGL_STATUS) ? stderr : stdout; 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; return;
bool header = root->header; bool header = root->header;
const char *prefix = log->prefix; const char *prefix = log->prefix;
char *terminate = NULL; 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; prefix = log->verbose_prefix;
if (lev == MSGL_STATUS) { if (lev == MSGL_STATUS) {
@ -423,7 +419,6 @@ void mp_msg_update_msglevels(struct mpv_global *global)
root->verbose = opts->verbose; root->verbose = opts->verbose;
root->module = opts->msg_module; root->module = opts->msg_module;
root->smode = opts->msg_identify;
root->use_terminal = opts->use_terminal; root->use_terminal = opts->use_terminal;
root->show_time = opts->msg_time; root->show_time = opts->msg_time;
if (root->use_terminal) { if (root->use_terminal) {

View File

@ -42,9 +42,8 @@ enum {
MSGL_DEBUG, // -v -v MSGL_DEBUG, // -v -v
MSGL_TRACE, // -v -v -v MSGL_TRACE, // -v -v -v
MSGL_STATS, // dumping fine grained stats (--dump-stats) 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, 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_VERBOSE(obj, ...) MP_MSG(obj, MSGL_V, __VA_ARGS__)
#define MP_DBG(obj, ...) MP_MSG(obj, MSGL_DEBUG, __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_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 // This is a bit special. See TOOLS/stats-conv.py what rules text passed
// to these functions should follow. Also see --dump-stats. // to these functions should follow. Also see --dump-stats.

View File

@ -764,12 +764,7 @@ static int demux_info_print(demuxer_t *demuxer)
mp_info(demuxer->glog, "File tags:\n"); mp_info(demuxer->glog, "File tags:\n");
for (n = 0; n < info->num_keys; n++) { for (n = 0; n < info->num_keys; n++) {
mp_info(demuxer->glog, " %s: %s\n", info->keys[n], info->values[n]); mp_info(demuxer->glog, " %s: %s\n", info->keys[n], info->values[n]);
mp_msg(demuxer->glog, MSGL_SMODE, "ID_CLIP_INFO_NAME%d=%s\n", n,
info->keys[n]);
mp_msg(demuxer->glog, MSGL_SMODE, "ID_CLIP_INFO_VALUE%d=%s\n", n,
info->values[n]);
} }
mp_msg(demuxer->glog, MSGL_SMODE, "ID_CLIP_INFO_N=%d\n", n);
return 0; return 0;
} }

View File

@ -221,7 +221,6 @@ const m_option_t mp_opts[] = {
OPT_FLAG("msg-color", msg_color, CONF_GLOBAL | CONF_PRE_PARSE), OPT_FLAG("msg-color", msg_color, CONF_GLOBAL | CONF_PRE_PARSE),
OPT_FLAG("msg-module", msg_module, CONF_GLOBAL), OPT_FLAG("msg-module", msg_module, CONF_GLOBAL),
OPT_FLAG("msg-time", msg_time, CONF_GLOBAL), OPT_FLAG("msg-time", msg_time, CONF_GLOBAL),
OPT_FLAG("identify", msg_identify, CONF_GLOBAL),
#if HAVE_PRIORITY #if HAVE_PRIORITY
{"priority", &proc_priority, CONF_TYPE_STRING, 0, 0, 0, NULL}, {"priority", &proc_priority, CONF_TYPE_STRING, 0, 0, 0, NULL},
#endif #endif

View File

@ -47,7 +47,6 @@ typedef struct MPOpts {
char *msglevels; char *msglevels;
char *dump_stats; char *dump_stats;
int verbose; int verbose;
int msg_identify;
int msg_color; int msg_color;
int msg_module; int msg_module;
int msg_time; int msg_time;

View File

@ -221,36 +221,10 @@ static void print_stream(struct MPContext *mpctx, struct track *t)
// legacy compatibility // legacy compatibility
if (!iid) if (!iid)
return; return;
int id = t->user_tid;
MP_SMODE(mpctx, "ID_%s_ID=%d\n", iid, id);
if (t->title)
MP_SMODE(mpctx, "ID_%s_%d_NAME=%s\n", iid, id, t->title);
if (t->lang)
MP_SMODE(mpctx, "ID_%s_%d_LANG=%s\n", iid, id, t->lang);
} }
static void print_file_properties(struct MPContext *mpctx) static void print_file_properties(struct MPContext *mpctx)
{ {
MP_SMODE(mpctx, "ID_FILENAME=%s\n", mpctx->filename);
MP_SMODE(mpctx,
"ID_LENGTH=%.2f\n", get_time_length(mpctx));
int chapter_count = get_chapter_count(mpctx);
if (chapter_count >= 0) {
MP_SMODE(mpctx, "ID_CHAPTERS=%d\n", chapter_count);
for (int i = 0; i < chapter_count; i++) {
MP_SMODE(mpctx, "ID_CHAPTER_ID=%d\n", i);
// print in milliseconds
double time = chapter_start_time(mpctx, i) * 1000.0;
MP_SMODE(mpctx, "ID_CHAPTER_%d_START=%"PRId64"\n",
i, (int64_t)(time < 0 ? -1 : time));
char *name = chapter_name(mpctx, i);
if (name) {
MP_SMODE(mpctx, "ID_CHAPTER_%d_NAME=%s\n", i,
name);
talloc_free(name);
}
}
}
struct demuxer *demuxer = mpctx->master_demuxer; struct demuxer *demuxer = mpctx->master_demuxer;
if (demuxer->num_editions > 1) { if (demuxer->num_editions > 1) {
for (int n = 0; n < demuxer->num_editions; n++) { for (int n = 0; n < demuxer->num_editions; n++) {

View File

@ -103,9 +103,6 @@ void pause_player(struct MPContext *mpctx)
if (mpctx->num_sources) if (mpctx->num_sources)
print_status(mpctx); print_status(mpctx);
if (!mpctx->opts->quiet)
MP_SMODE(mpctx, "ID_PAUSED\n");
end: end:
mp_notify(mpctx, mpctx->opts->pause ? MPV_EVENT_PAUSE : MPV_EVENT_UNPAUSE, 0); mp_notify(mpctx, mpctx->opts->pause ? MPV_EVENT_PAUSE : MPV_EVENT_UNPAUSE, 0);
} }

View File

@ -747,11 +747,9 @@ static int bluray_stream_open(stream_t *s, int mode)
b->num_titles = disc_info->num_hdmv_titles + disc_info->num_bdj_titles; b->num_titles = disc_info->num_hdmv_titles + disc_info->num_bdj_titles;
++b->num_titles; // for BLURAY_TITLE_TOP_MENU ++b->num_titles; // for BLURAY_TITLE_TOP_MENU
++b->num_titles; // for BLURAY_TITLE_FIRST_PLAY ++b->num_titles; // for BLURAY_TITLE_FIRST_PLAY
MP_SMODE(s, "ID_BLURAY_TITLES=%d\n", b->num_titles);
} else { } else {
/* check for available titles on disc */ /* check for available titles on disc */
b->num_titles = bd_get_titles(bd, TITLES_RELEVANT, 0); b->num_titles = bd_get_titles(bd, TITLES_RELEVANT, 0);
MP_SMODE(s, "ID_BLURAY_TITLES=%d\n", b->num_titles);
if (!b->num_titles) { if (!b->num_titles) {
MP_ERR(s, "Can't find any Blu-ray-compatible title here.\n"); MP_ERR(s, "Can't find any Blu-ray-compatible title here.\n");
destruct(b); destruct(b);
@ -768,10 +766,6 @@ static int bluray_stream_open(stream_t *s, int mode)
const int sec = ti->duration / 90000; const int sec = ti->duration / 90000;
const int msec = (ti->duration - sec) % 1000; const int msec = (ti->duration - sec) % 1000;
MP_SMODE(s, "ID_BLURAY_TITLE_%d_CHAPTERS=%d\n", i, ti->chapter_count);
MP_SMODE(s, "ID_BLURAY_TITLE_%d_ANGLE=%d\n", i, ti->angle_count);
MP_SMODE(s, "ID_BLURAY_TITLE_%d_LENGTH=%d.%03d\n", i, sec, msec);
/* try to guess which title may contain the main movie */ /* try to guess which title may contain the main movie */
if (ti->duration > max_duration) { if (ti->duration > max_duration) {
max_duration = ti->duration; max_duration = ti->duration;
@ -801,11 +795,6 @@ static int bluray_stream_open(stream_t *s, int mode)
select_initial_title(s, title_guess); select_initial_title(s, title_guess);
select_initial_angle(s); select_initial_angle(s);
if (b->current_title >= 0)
MP_SMODE(s, "ID_BLURAY_CURRENT_TITLE=%d\n", b->current_title);
if (b->current_angle >= 0)
MP_SMODE(s, "ID_BLURAY_CURRENT_ANGLE=%d\n", b->current_angle + 1);
if (b->use_nav) if (b->use_nav)
s->fill_buffer = bdnav_stream_fill_buffer; s->fill_buffer = bdnav_stream_fill_buffer;
else else

View File

@ -345,32 +345,6 @@ static int mp_get_titleset_length(ifo_handle_t *vts_file, tt_srpt_t *tt_srpt, in
} }
static int mp_describe_titleset(stream_t *stream, dvd_reader_t *dvd, tt_srpt_t *tt_srpt, int vts_no)
{
ifo_handle_t *vts_file;
int title_no, msec=0;
vts_file = ifoOpen(dvd, vts_no);
if(!vts_file)
return 0;
if(!vts_file->vtsi_mat || !vts_file->vts_pgcit)
{
ifoClose(vts_file);
return 0;
}
for(title_no = 0; title_no < tt_srpt->nr_of_srpts; title_no++)
{
if (tt_srpt->title[title_no].title_set_nr != vts_no)
continue;
msec = mp_get_titleset_length(vts_file, tt_srpt, title_no);
MP_SMODE(stream, "ID_DVD_TITLE_%d_LENGTH=%d.%03d\n", title_no, msec / 1000, msec % 1000);
}
ifoClose(vts_file);
return 1;
}
static int get_num_chapter(ifo_handle_t *vts_file, tt_srpt_t *tt_srpt, int title_no) static int get_num_chapter(ifo_handle_t *vts_file, tt_srpt_t *tt_srpt, int title_no)
{ {
if(!vts_file || !tt_srpt) if(!vts_file || !tt_srpt)
@ -768,34 +742,6 @@ static int open_s(stream_t *stream, int mode)
return STREAM_UNSUPPORTED; return STREAM_UNSUPPORTED;
} }
tt_srpt = vmg_file->tt_srpt; tt_srpt = vmg_file->tt_srpt;
if (mp_msg_test(stream->log, MSGL_SMODE))
{
int title_no; ///< title number
MP_SMODE(stream, "ID_DVD_TITLES=%d\n", tt_srpt->nr_of_srpts);
for (title_no = 0; title_no < tt_srpt->nr_of_srpts; title_no++)
{
MP_SMODE(stream, "ID_DVD_TITLE_%d_CHAPTERS=%d\n", title_no, tt_srpt->title[title_no].nr_of_ptts);
MP_SMODE(stream, "ID_DVD_TITLE_%d_ANGLES=%d\n", title_no, tt_srpt->title[title_no].nr_of_angles);
}
}
if (mp_msg_test(stream->log, MSGL_SMODE))
{
char volid[32];
unsigned char discid [16]; ///< disk ID, a 128 bit MD5 sum
int vts_no; ///< video title set number
for (vts_no = 1; vts_no <= vmg_file->vts_atrt->nr_of_vtss; vts_no++)
mp_describe_titleset(stream, dvd, tt_srpt, vts_no);
if (DVDDiscID(dvd, discid) >= 0)
{
int i;
MP_SMODE(stream, "ID_DVD_DISC_ID=");
for (i = 0; i < 16; i ++)
MP_SMODE(stream, "%02X", discid[i]);
MP_SMODE(stream, "\n");
}
if (DVDUDFVolumeInfo(dvd, volid, sizeof(volid), NULL, 0) >= 0 || DVDISOVolumeInfo(dvd, volid, sizeof(volid), NULL, 0) >= 0)
MP_SMODE(stream, "ID_DVD_VOLUME_ID=%s\n", volid);
}
/** /**
* Make sure our title number is valid. * Make sure our title number is valid.
*/ */
@ -806,7 +752,6 @@ static int open_s(stream_t *stream, int mode)
DVDClose( dvd ); DVDClose( dvd );
return STREAM_UNSUPPORTED; return STREAM_UNSUPPORTED;
} }
MP_SMODE(stream, "ID_DVD_CURRENT_TITLE=%d\n", dvd_title);
--dvd_title; // remap 1.. -> 0.. --dvd_title; // remap 1.. -> 0..
/** /**
* Make sure the angle number is valid for this title. * Make sure the angle number is valid for this title.
@ -897,9 +842,6 @@ static int open_s(stream_t *stream, int mode)
tmp, tmp,
audio_stream->id audio_stream->id
); );
MP_SMODE(stream, "ID_AUDIO_ID=%d\n", audio_stream->id);
if(language && tmp[0])
MP_SMODE(stream, "ID_AID_%d_LANG=%s\n", audio_stream->id, tmp);
d->nr_of_channels++; d->nr_of_channels++;
} }
@ -937,9 +879,6 @@ static int open_s(stream_t *stream, int mode)
sub_stream->id = pgc->subp_control[i] >> 8 & 31; sub_stream->id = pgc->subp_control[i] >> 8 & 31;
MP_INFO(stream, "subtitle ( sid ): %d language: %s\n", sub_stream->id, tmp); MP_INFO(stream, "subtitle ( sid ): %d language: %s\n", sub_stream->id, tmp);
MP_SMODE(stream, "ID_SUBTITLE_ID=%d\n", sub_stream->id);
if(language && tmp[0])
MP_SMODE(stream, "ID_SID_%d_LANG=%s\n", sub_stream->id, tmp);
d->nr_of_subtitles++; d->nr_of_subtitles++;
} }
MP_INFO(stream, "number of subtitles on disk: %d\n",d->nr_of_subtitles); MP_INFO(stream, "number of subtitles on disk: %d\n",d->nr_of_subtitles);

View File

@ -659,8 +659,7 @@ static struct priv *new_dvdnav_stream(stream_t *stream, char *filename)
if (dvdnav_set_PGC_positioning_flag(priv->dvdnav, 1) != DVDNAV_STATUS_OK) if (dvdnav_set_PGC_positioning_flag(priv->dvdnav, 1) != DVDNAV_STATUS_OK)
MP_ERR(stream, "stream_dvdnav, failed to set PGC positioning\n"); MP_ERR(stream, "stream_dvdnav, failed to set PGC positioning\n");
/* report the title?! */ /* report the title?! */
if (dvdnav_get_title_string(priv->dvdnav, &title_str) == DVDNAV_STATUS_OK) dvdnav_get_title_string(priv->dvdnav, &title_str);
MP_SMODE(stream, "ID_DVD_VOLUME_ID=%s\n", title_str);
return priv; return priv;
} }
@ -712,7 +711,6 @@ static int open_s(stream_t *stream, int mode)
p->track, dvdnav_err_to_string(priv->dvdnav)); p->track, dvdnav_err_to_string(priv->dvdnav));
return STREAM_UNSUPPORTED; return STREAM_UNSUPPORTED;
} }
MP_SMODE(stream, "ID_DVD_CURRENT_TITLE=%d\n", p->track);
} else { } else {
if (dvdnav_menu_call(priv->dvdnav, DVD_MENU_Root) != DVDNAV_STATUS_OK) if (dvdnav_menu_call(priv->dvdnav, DVD_MENU_Root) != DVDNAV_STATUS_OK)
dvdnav_menu_call(priv->dvdnav, DVD_MENU_Title); dvdnav_menu_call(priv->dvdnav, DVD_MENU_Title);

View File

@ -410,7 +410,6 @@ int video_reconfig_filters(struct dec_video *d_video,
if (abs(p.d_w - p.w) >= 4 || abs(p.d_h - p.h) >= 4) { if (abs(p.d_w - p.w) >= 4 || abs(p.d_h - p.h) >= 4) {
MP_VERBOSE(d_video, "Aspect ratio is %.2f:1 - " MP_VERBOSE(d_video, "Aspect ratio is %.2f:1 - "
"scaling to correct movie aspect.\n", sh->aspect); "scaling to correct movie aspect.\n", sh->aspect);
MP_SMODE(d_video, "ID_VIDEO_ASPECT=%1.4f\n", sh->aspect);
} else { } else {
p.d_w = p.w; p.d_w = p.w;
p.d_h = p.h; p.d_h = p.h;