diff options
74 files changed, 438 insertions, 497 deletions
diff --git a/DOCS/man/en/changes.rst b/DOCS/man/en/changes.rst index a11942ce5b..5febb3afd2 100644 --- a/DOCS/man/en/changes.rst +++ b/DOCS/man/en/changes.rst @@ -101,6 +101,8 @@ Command line switches -subdelay --sub-delay -subpos --sub-pos -forcedsubsonly --sub-forced-only + -ni --avi-ni + -benchmark --untimed (no stats) =================================== =================================== input.conf and slave commands diff --git a/DOCS/man/en/options.rst b/DOCS/man/en/options.rst index 3db799590e..56d8305c95 100644 --- a/DOCS/man/en/options.rst +++ b/DOCS/man/en/options.rst @@ -19,11 +19,6 @@ *NOTE*: See ``--ac=help`` for a full list of available codecs. ---adapter=<value> - Set the graphics card that will receive the image. You can get a list of - available cards when you run this option with ``-v``. Currently only works - with the directx video output driver. - --af=<filter1[=parameter1:parameter2:...],filter2,...> Specify a list of audio filters to apply to the audio stream. See :ref:`audio_filters` for details and descriptions of the available filters. @@ -352,9 +347,6 @@ the start of the next one then keep playing video normally over the chapter change instead of doing a seek. ---codecpath=<dir> - Specify a directory for binary codecs. - --codecs-file=<filename> Override the standard search path and use the specified file instead of the builtin codecs.conf. @@ -751,15 +743,6 @@ --help Show short summary of options. ---hr-mp3-seek - Only affects the internal ``audio`` demuxer, which is not used by default - for mp3 files any more. The equivalent functionality is always enabled - with the now default libavformat demuxer for mp3. Hi-res MP3 seeking. - Enabled when playing from an external MP3 file, as we need to seek to the - very exact position to keep A/V sync. Can be slow especially when seeking - backwards since it has to rewind to the beginning to find an exact frame - position. - --hr-seek=<no|absolute|yes> Select when to use precise seeks that are not limited to keyframes. Such seeks require decoding video from the previous keyframe up to the target @@ -1101,15 +1084,6 @@ --list-properties Print a list of the available properties. ---loadidx=<filename> - The file from which to read the video index data saved by ``--saveidx``. - This index will be used for seeking, overriding any index data contained - in the AVI itself. mpv will not prevent you from loading an index file - generated from a different AVI, but this is sure to cause unfavorable - results. - - *NOTE*: This option is obsolete now that MPlayer has OpenDML support. - --loop=<number|inf|no> Loops playback <number> times. ``inf`` means forever and ``no`` disables looping. @@ -1202,7 +1176,7 @@ --name Set the window class name for X11-based video output methods. ---ni +--avi-ni (Internal AVI demuxer which is not used by default only) Force usage of non-interleaved AVI parser (fixes playback of some bad AVI files). @@ -1552,12 +1526,6 @@ grayscale output with this option. Not supported by all video output drivers. ---saveidx=<filename> - Force index rebuilding and dump the index to <filename>. Currently this - only works with AVI files. - - *NOTE*: This option is obsolete now that MPlayer has OpenDML support. - --sb=<n> Seek to byte position. Useful for playback from CD-ROM images or VOB files with junk at the beginning. See also ``--ss``. diff --git a/cfg-mplayer.h b/cfg-mplayer.h index 4ba1a75ca9..51360dbf85 100644 --- a/cfg-mplayer.h +++ b/cfg-mplayer.h @@ -104,7 +104,7 @@ const m_option_t tvopts_conf[]={ {"chanlist", &stream_tv_defaults.chanlist, CONF_TYPE_STRING, 0, 0, 0, NULL}, {"norm", &stream_tv_defaults.norm, CONF_TYPE_STRING, 0, 0, 0, NULL}, {"automute", &stream_tv_defaults.automute, CONF_TYPE_INT, CONF_RANGE, 0, 255, NULL}, -#if defined(CONFIG_TV_V4L2) || defined(CONFIG_TV_DSHOW) +#if defined(CONFIG_TV_V4L2) {"normid", &stream_tv_defaults.normid, CONF_TYPE_INT, 0, 0, 0, NULL}, #endif {"width", &stream_tv_defaults.width, CONF_TYPE_INT, 0, 0, 4096, NULL}, @@ -118,7 +118,7 @@ const m_option_t tvopts_conf[]={ {"hue", &stream_tv_defaults.hue, CONF_TYPE_INT, CONF_RANGE, -100, 100, NULL}, {"saturation", &stream_tv_defaults.saturation, CONF_TYPE_INT, CONF_RANGE, -100, 100, NULL}, {"gain", &stream_tv_defaults.gain, CONF_TYPE_INT, CONF_RANGE, -1, 100, NULL}, -#if defined(CONFIG_TV_V4L2) || defined(CONFIG_TV_DSHOW) +#if defined(CONFIG_TV_V4L2) {"buffersize", &stream_tv_defaults.buffer_size, CONF_TYPE_INT, CONF_RANGE, 16, 1024, NULL}, {"amode", &stream_tv_defaults.amode, CONF_TYPE_INT, CONF_RANGE, 0, 3, NULL}, {"volume", &stream_tv_defaults.volume, CONF_TYPE_INT, CONF_RANGE, 0, 65535, NULL}, @@ -139,12 +139,6 @@ const m_option_t tvopts_conf[]={ #endif /* defined(CONFIG_TV_V4L2) */ {"adevice", &stream_tv_defaults.adevice, CONF_TYPE_STRING, 0, 0, 0, NULL}, {"audioid", &stream_tv_defaults.audio_id, CONF_TYPE_INT, CONF_RANGE, 0, 9, NULL}, -#ifdef CONFIG_TV_DSHOW - {"hidden_video_renderer", &stream_tv_defaults.hidden_video_renderer, CONF_TYPE_FLAG, 0, 0, 1, NULL}, - {"hidden_vp_renderer", &stream_tv_defaults.hidden_vp_renderer, CONF_TYPE_FLAG, 0, 0, 1, NULL}, - {"system_clock", &stream_tv_defaults.system_clock, CONF_TYPE_FLAG, 0, 0, 1, NULL}, - {"normalize_audio_chunks", &stream_tv_defaults.normalize_audio_chunks, CONF_TYPE_FLAG, 0, 0, 1, NULL}, -#endif {NULL, NULL, 0, 0, 0, 0, NULL} }; #endif /* CONFIG_TV */ @@ -318,7 +312,6 @@ const m_option_t msgl_config[]={ }; extern const m_option_t lavc_decode_opts_conf[]; -extern const m_option_t xvid_dec_opts[]; const m_option_t common_opts[] = { // ------------------------- common options -------------------- @@ -392,13 +385,11 @@ const m_option_t common_opts[] = { {"endpos", &end_at, CONF_TYPE_TIME_SIZE, 0, 0, 0, NULL}, // AVI specific: force non-interleaved mode - {"ni", &force_ni, CONF_TYPE_FLAG, 0, 0, 1, NULL}, + {"avi-ni", &force_ni, CONF_TYPE_FLAG, 0, 0, 1, NULL}, // AVI and Ogg only: (re)build index at startup {"idx", &index_mode, CONF_TYPE_FLAG, 0, -1, 1, NULL}, {"forceidx", &index_mode, CONF_TYPE_FLAG, 0, -1, 2, NULL}, - {"saveidx", &index_file_save, CONF_TYPE_STRING, 0, 0, 0, NULL}, - {"loadidx", &index_file_load, CONF_TYPE_STRING, 0, 0, 0, NULL}, // select audio/video/subtitle stream OPT_TRACKCHOICE("aid", audio_id), @@ -410,8 +401,6 @@ const m_option_t common_opts[] = { OPT_STRINGLIST("alang", audio_lang, 0), OPT_STRINGLIST("slang", sub_lang, 0), - OPT_MAKE_FLAGS("hr-mp3-seek", hr_mp3_seek, 0), - OPT_STRING("quvi-format", quvi_format, 0), { "rawaudio", (void *)&demux_rawaudio_opts, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL}, @@ -504,9 +493,6 @@ const m_option_t common_opts[] = { {"lavdopts", (void *) lavc_decode_opts_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL}, {"lavfdopts", (void *) lavfdopts_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL}, -#ifdef CONFIG_XVID4 - {"xvidopts", (void *)xvid_dec_opts, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL}, -#endif {"codecs-file", &codecs_file, CONF_TYPE_STRING, 0, 0, 0, NULL}, // ------------------------- subtitles options -------------------- @@ -640,7 +626,6 @@ const m_option_t mplayer_opts[]={ {"grabpointer", &vo_grabpointer, CONF_TYPE_FLAG, 0, 0, 1, NULL}, OPT_INTRANGE("cursor-autohide-delay", cursor_autohide_delay, 0, -2, 30000), - {"adapter", &vo_adapter_num, CONF_TYPE_INT, CONF_RANGE, 0, 5, NULL}, {"refreshrate",&vo_refresh_rate,CONF_TYPE_INT,CONF_RANGE, 0,100, NULL}, {"wid", &WinID, CONF_TYPE_INT64, 0, 0, 0, NULL}, #ifdef CONFIG_X11 @@ -167,15 +167,26 @@ static int mp_property_path(m_option_t *prop, int action, void *arg, return m_property_strdup_ro(prop, action, arg, mpctx->filename); } +static int mp_property_filename(m_option_t *prop, int action, void *arg, + MPContext *mpctx) +{ + if (!mpctx->filename) + return M_PROPERTY_UNAVAILABLE; + char *f = (char *)mp_basename(mpctx->filename); + return m_property_strdup_ro(prop, action, arg, (*f) ? f : mpctx->filename); +} + static int mp_property_media_title(m_option_t *prop, int action, void *arg, MPContext *mpctx) { - char *name = mpctx->filename; + char *name = NULL; if (mpctx->resolve_result) name = mpctx->resolve_result->title; - if (!name) - return M_PROPERTY_UNAVAILABLE; - return m_property_strdup_ro(prop, action, arg, name); + if (name && name[0]) { + return m_property_strdup_ro(prop, action, arg, name); + } else { + return mp_property_filename(prop, action, arg, mpctx); + } } static int mp_property_stream_path(m_option_t *prop, int action, void *arg, @@ -187,16 +198,6 @@ static int mp_property_stream_path(m_option_t *prop, int action, void *arg, return m_property_strdup_ro(prop, action, arg, stream->url); } -/// filename without path (RO) -static int mp_property_filename(m_option_t *prop, int action, void *arg, - MPContext *mpctx) -{ - if (!mpctx->filename) - return M_PROPERTY_UNAVAILABLE; - char *f = (char *)mp_basename(mpctx->filename); - return m_property_strdup_ro(prop, action, arg, (*f) ? f : mpctx->filename); -} - /// Demuxer name (RO) static int mp_property_demuxer(m_option_t *prop, int action, void *arg, MPContext *mpctx) @@ -578,15 +579,17 @@ static int mp_property_audio_delay(m_option_t *prop, int action, { if (!(mpctx->sh_audio && mpctx->sh_video)) return M_PROPERTY_UNAVAILABLE; + float delay = audio_delay; switch (action) { case M_PROPERTY_PRINT: - *(char **)arg = format_delay(audio_delay); + *(char **)arg = format_delay(delay); return M_PROPERTY_OK; case M_PROPERTY_SET: - mpctx->delay -= audio_delay - *(float *)arg; + audio_delay = *(float *)arg; + mpctx->delay -= audio_delay - delay; return M_PROPERTY_OK; } - return M_PROPERTY_NOT_IMPLEMENTED; + return mp_property_generic_option(prop, action, arg, mpctx); } /// Audio codec tag (RO) @@ -854,13 +857,15 @@ static int mp_property_fullscreen(m_option_t *prop, int action, void *arg, static int mp_property_deinterlace(m_option_t *prop, int action, void *arg, MPContext *mpctx) { - vf_instance_t *vf; if (!mpctx->sh_video || !mpctx->sh_video->vfilter) return M_PROPERTY_UNAVAILABLE; - vf = mpctx->sh_video->vfilter; + vf_instance_t *vf = mpctx->sh_video->vfilter; + int enabled = 0; + if (vf->control(vf, VFCTRL_GET_DEINTERLACE, &enabled) != CONTROL_OK) + return M_PROPERTY_UNAVAILABLE; switch (action) { case M_PROPERTY_GET: - vf->control(vf, VFCTRL_GET_DEINTERLACE, arg); + *(int *)arg = !!enabled; return M_PROPERTY_OK; case M_PROPERTY_SET: vf->control(vf, VFCTRL_SET_DEINTERLACE, arg); @@ -2941,7 +2941,7 @@ echores "$_lcms2" # Test with > against Libav 0.8 versions which will NOT work rather than # specify minimum version, to allow (future) point releases to possibly work. -all_libav_libs="libavutil > 51.21.0:libavcodec > 53.34.0:libavformat > 53.20.0:libswscale >= 2.0.0" +all_libav_libs="libavutil > 51.26.0:libavcodec > 54.00.0:libavformat > 53.20.0:libswscale >= 2.0.0" echocheck "Libav ($all_libav_libs)" if test "$ffmpeg" = auto ; then IFS=":" # shell should not be used for programming diff --git a/etc/codecs.conf b/etc/codecs.conf index 9d4e8c9e0c..9442ec34ad 100644 --- a/etc/codecs.conf +++ b/etc/codecs.conf @@ -324,14 +324,6 @@ videocodec fftga driver ffmpeg dll targa -videocodec mtga - info "TGA image" - status working - comment "Only 24bpp and 32bpp RGB TGA files supported" - fourcc mtga,MTGA - driver mtga - out BGR32,BGR24 - videocodec ffsgi info "FFmpeg SGI image" status working diff --git a/etc/input.conf b/etc/input.conf index b6102b6867..d310951ad9 100644 --- a/etc/input.conf +++ b/etc/input.conf @@ -68,8 +68,6 @@ I show_text "${filename}" # display filename in osd P show_progress z add sub-delay -0.1 # subtract 100 ms delay from subs x add sub-delay +0.1 # add -g sub_step -1 # immediately display next subtitle -y sub_step +1 # previous 9 add volume -1 / add volume -1 0 add volume 1 @@ -173,3 +171,5 @@ JOY_BTN3 add volume -1 #? add sub-scale +0.1 # increase subtitle font size #? add sub-scale -0.1 # decrease subtitle font size +#? sub_step -1 # immediately display next subtitle +#? sub_step +1 # previous diff --git a/fmt-conversion.c b/fmt-conversion.c index 9f14565317..81ab7a45fb 100644 --- a/fmt-conversion.c +++ b/fmt-conversion.c @@ -101,7 +101,10 @@ static const struct { {IMGFMT_444P, PIX_FMT_YUVJ444P}, {IMGFMT_440P, PIX_FMT_YUVJ440P}, + // ffmpeg only +#if LIBAVUTIL_VERSION_MICRO >= 100 {IMGFMT_BGR0, PIX_FMT_BGR0}, +#endif {IMGFMT_VDPAU_MPEG1, PIX_FMT_VDPAU_MPEG1}, {IMGFMT_VDPAU_MPEG2, PIX_FMT_VDPAU_MPEG2}, diff --git a/input/input.c b/input/input.c index 8b59501da0..6643747e4d 100644 --- a/input/input.c +++ b/input/input.c @@ -1257,7 +1257,7 @@ static mp_cmd_t *interpret_key(struct input_ctx *ictx, int code) code &= ~KEY_MODIFIER_SHIFT; if (code & MP_KEY_DOWN) { - if (ictx->num_key_down > MP_MAX_KEY_DOWN) { + if (ictx->num_key_down >= MP_MAX_KEY_DOWN) { mp_tmsg(MSGT_INPUT, MSGL_ERR, "Too many key down events " "at the same time\n"); return NULL; @@ -1722,13 +1722,12 @@ static int parse_config(struct input_ctx *ictx, bool builtin, bstr data, static int parse_config_file(struct input_ctx *ictx, char *file) { - struct bstr res = {0}; stream_t *s = open_stream(file, NULL, NULL); if (!s) { mp_msg(MSGT_INPUT, MSGL_V, "Can't open input config file %s.\n", file); return 0; } - res = stream_read_complete(s, NULL, 1000000, 0); + bstr res = stream_read_complete(s, NULL, 1000000, 0); free_stream(s); mp_msg(MSGT_INPUT, MSGL_V, "Parsing input config file %s\n", file); int n_binds = parse_config(ictx, false, res, file); diff --git a/libaf/af_hrtf.c b/libaf/af_hrtf.c index d8ec33e11b..4edf224de9 100644 --- a/libaf/af_hrtf.c +++ |