From 48bd03dd912321b8bfa12b8b201d2f0b3aa43ae0 Mon Sep 17 00:00:00 2001 From: Martin Herkt Date: Thu, 24 Apr 2014 18:44:46 +0200 Subject: 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. --- DOCS/man/en/changes.rst | 1 + DOCS/man/en/options.rst | 24 +++++++------------ audio/decode/dec_audio.c | 3 --- common/msg.c | 11 +++------ common/msg.h | 4 +--- demux/demux.c | 5 ---- options/options.c | 1 - options/options.h | 1 - player/loadfile.c | 26 --------------------- player/playloop.c | 3 --- stream/stream_bluray.c | 11 --------- stream/stream_dvd.c | 61 ------------------------------------------------ stream/stream_dvdnav.c | 4 +--- video/decode/dec_video.c | 1 - 14 files changed, 15 insertions(+), 141 deletions(-) diff --git a/DOCS/man/en/changes.rst b/DOCS/man/en/changes.rst index 36ea47b3ef..e06f779ec9 100644 --- a/DOCS/man/en/changes.rst +++ b/DOCS/man/en/changes.rst @@ -167,6 +167,7 @@ Command Line Switches ``-fsmode-dontuse`` (removed) ``-fstype`` ``--x11-fstype`` ``-hardframedrop`` ``--framedrop=hard`` + ``-identify`` (removed; use TOOLS/mpv_identify.sh) ``-lavdopts ...`` ``--vd-lavc-...`` ``-lavfdopts`` ``--demuxer-lavf-...`` ``-lircconf`` ``--input-lirc-conf`` diff --git a/DOCS/man/en/options.rst b/DOCS/man/en/options.rst index c9e514e457..3bd9cd27e1 100644 --- a/DOCS/man/en/options.rst +++ b/DOCS/man/en/options.rst @@ -1151,9 +1151,6 @@ OPTIONS ``mpv --hwdec=vdpau --vo=vdpau --hwdec-codecs=h264,mpeg2video`` Enable vdpau decoding for h264 and mpeg2 only. -``--identify`` - Deprecated. Use ``TOOLS/mpv_identify.sh``. - ``--idle`` 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 @@ -1389,18 +1386,15 @@ OPTIONS Available levels: - :no: complete silence - :fatal: fatal messages only - :error: error messages - :warn: warning messages - :info: informational messages - :status: status messages (default) - :v: verbose messages - :debug: 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. + :no: complete silence + :fatal: fatal messages only + :error: error messages + :warn: warning messages + :info: informational messages + :status: status messages (default) + :v: verbose messages + :debug: debug messages + :trace: very noisy debug messages ``--msg-module`` Prepend module name to each console message. diff --git a/audio/decode/dec_audio.c b/audio/decode/dec_audio.c index 46009c6fdd..70476a940d 100644 --- a/audio/decode/dec_audio.c +++ b/audio/decode/dec_audio.c @@ -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", d_audio->decoded.rate, d_audio->decoded.channels.num, 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 { MP_ERR(d_audio, "Failed to initialize an audio decoder for codec '%s'.\n", d_audio->header->codec ? d_audio->header->codec : ""); 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. diff --git a/demux/demux.c b/demux/demux.c index c6d3b9d9d2..5dcd7a31ea 100644 --- a/demux/demux.c +++ b/demux/demux.c @@ -764,12 +764,7 @@ static int demux_info_print(demuxer_t *demuxer) mp_info(demuxer->glog, "File tags:\n"); for (n = 0; n < info->num_keys; 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; } diff --git a/options/options.c b/options/options.c index dc3bce5f68..21a2f4014d 100644 --- a/options/options.c +++ b/options/options.c @@ -221,7 +221,6 @@ const m_option_t mp_opts[] = { OPT_FLAG("msg-color", msg_color, CONF_GLOBAL | CONF_PRE_PARSE), OPT_FLAG("msg-module", msg_module, CONF_GLOBAL), OPT_FLAG("msg-time", msg_time, CONF_GLOBAL), - OPT_FLAG("identify", msg_identify, CONF_GLOBAL), #if HAVE_PRIORITY {"priority", &proc_priority, CONF_TYPE_STRING, 0, 0, 0, NULL}, #endif diff --git a/options/options.h b/options/options.h index cd714a7c78..2ceaa02965 100644 --- a/options/options.h +++ b/options/options.h @@ -47,7 +47,6 @@ typedef struct MPOpts { char *msglevels; char *dump_stats; int verbose; - int msg_identify; int msg_color; int msg_module; int msg_time; diff --git a/player/loadfile.c b/player/loadfile.c index f750d8917c..6319d092ce 100644 --- a/player/loadfile.c +++ b/player/loadfile.c @@ -221,36 +221,10 @@ static void print_stream(struct MPContext *mpctx, struct track *t) // legacy compatibility if (!iid) 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) { - 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; if (demuxer->num_editions > 1) { for (int n = 0; n < demuxer->num_editions; n++) { diff --git a/player/playloop.c b/player/playloop.c index 67da087475..16d79ea09d 100644 --- a/player/playloop.c +++ b/player/playloop.c @@ -103,9 +103,6 @@ void pause_player(struct MPContext *mpctx) if (mpctx->num_sources) print_status(mpctx); - if (!mpctx->opts->quiet) - MP_SMODE(mpctx, "ID_PAUSED\n"); - end: mp_notify(mpctx, mpctx->opts->pause ? MPV_EVENT_PAUSE : MPV_EVENT_UNPAUSE, 0); } diff --git a/stream/stream_bluray.c b/stream/stream_bluray.c index 3300777658..f2b741e941 100644 --- a/stream/stream_bluray.c +++ b/stream/stream_bluray.c @@ -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; // for BLURAY_TITLE_TOP_MENU ++b->num_titles; // for BLURAY_TITLE_FIRST_PLAY - MP_SMODE(s, "ID_BLURAY_TITLES=%d\n", b->num_titles); } else { /* check for available titles on disc */ 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) { MP_ERR(s, "Can't find any Blu-ray-compatible title here.\n"); destruct(b); @@ -768,10 +766,6 @@ static int bluray_stream_open(stream_t *s, int mode) const int sec = ti->duration / 90000; 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 */ if (ti->duration > max_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_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) s->fill_buffer = bdnav_stream_fill_buffer; else diff --git a/stream/stream_dvd.c b/stream/stream_dvd.c index c724832c1b..0394a2640c 100644 --- a/stream/stream_dvd.c +++ b/stream/stream_dvd.c @@ -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) { if(!vts_file || !tt_srpt) @@ -768,34 +742,6 @@ static int open_s(stream_t *stream, int mode) return STREAM_UNSUPPORTED; } 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. */ @@ -806,7 +752,6 @@ static int open_s(stream_t *stream, int mode) DVDClose( dvd ); return STREAM_UNSUPPORTED; } - MP_SMODE(stream, "ID_DVD_CURRENT_TITLE=%d\n", dvd_title); --dvd_title; // remap 1.. -> 0.. /** * Make sure the angle number is valid for this title. @@ -897,9 +842,6 @@ static int open_s(stream_t *stream, int mode) tmp, 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++; } @@ -937,9 +879,6 @@ static int open_s(stream_t *stream, int mode) sub_stream->id = pgc->subp_control[i] >> 8 & 31; 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++; } MP_INFO(stream, "number of subtitles on disk: %d\n",d->nr_of_subtitles); diff --git a/stream/stream_dvdnav.c b/stream/stream_dvdnav.c index 5a08e22c6f..504aa065e1 100644 --- a/stream/stream_dvdnav.c +++ b/stream/stream_dvdnav.c @@ -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) MP_ERR(stream, "stream_dvdnav, failed to set PGC positioning\n"); /* report the title?! */ - if (dvdnav_get_title_string(priv->dvdnav, &title_str) == DVDNAV_STATUS_OK) - MP_SMODE(stream, "ID_DVD_VOLUME_ID=%s\n", title_str); + dvdnav_get_title_string(priv->dvdnav, &title_str); return priv; } @@ -712,7 +711,6 @@ static int open_s(stream_t *stream, int mode) p->track, dvdnav_err_to_string(priv->dvdnav)); return STREAM_UNSUPPORTED; } - MP_SMODE(stream, "ID_DVD_CURRENT_TITLE=%d\n", p->track); } else { if (dvdnav_menu_call(priv->dvdnav, DVD_MENU_Root) != DVDNAV_STATUS_OK) dvdnav_menu_call(priv->dvdnav, DVD_MENU_Title); diff --git a/video/decode/dec_video.c b/video/decode/dec_video.c index f092e82a2e..ed2cf7f5eb 100644 --- a/video/decode/dec_video.c +++ b/video/decode/dec_video.c @@ -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) { MP_VERBOSE(d_video, "Aspect ratio is %.2f:1 - " "scaling to correct movie aspect.\n", sh->aspect); - MP_SMODE(d_video, "ID_VIDEO_ASPECT=%1.4f\n", sh->aspect); } else { p.d_w = p.w; p.d_h = p.h; -- cgit v1.2.3