From af0c41e162725b0edcd6c3d066a2dbef05a3b896 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 7 Jul 2013 23:54:11 +0200 Subject: Remove old demuxers Delete demux_avi, demux_asf, demux_mpg, demux_ts. libavformat does better than them (except in rare corner cases), and the demuxers have a bad influence on the rest of the code. Often they don't output proper packets, and require additional audio and video parsing. Most work only in --no-correct-pts mode. Remove them to facilitate further cleanups. --- core/options.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'core/options.c') diff --git a/core/options.c b/core/options.c index b00f79c003..c0e64b0dcd 100644 --- a/core/options.c +++ b/core/options.c @@ -25,6 +25,7 @@ #include #include +#include #include "core/options.h" #include "config.h" @@ -369,12 +370,9 @@ const m_option_t mp_opts[] = { OPT_FLAG("pause", pause, 0), OPT_FLAG("keep-open", keep_open, 0), - // AVI specific: force non-interleaved mode - {"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}, + OPT_FLAG_CONSTANTS("idx", index_mode, 0, -1, 1), + OPT_FLAG_STORE("forceidx", index_mode, 0, 2), // select audio/video/subtitle stream OPT_TRACKCHOICE("aid", audio_id), @@ -419,9 +417,6 @@ const m_option_t mp_opts[] = { // ------------------------- a-v sync options -------------------- - // AVI specific: A-V sync mode (bps vs. interleaving) - {"bps", &pts_from_bps, CONF_TYPE_FLAG, 0, 0, 1, NULL}, - // set A-V sync correction speed (0=disables it): OPT_FLOATRANGE("mc", default_max_pts_correction, 0, 0, 100), @@ -804,6 +799,8 @@ const struct MPOpts mp_default_opts = { .hwdec_codecs = "all", + .index_mode = -1, + .ad_lavc_param = { .ac3drc = 1., .downmix = 1, -- cgit v1.2.3 From 9bb7935ce186d55aaaafd708e7559345082ecabc Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 8 Jul 2013 21:59:44 +0200 Subject: options: remove --ignore-start This was used only with demux_avi. --- core/options.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'core/options.c') diff --git a/core/options.c b/core/options.c index c0e64b0dcd..d676cb4948 100644 --- a/core/options.c +++ b/core/options.c @@ -430,9 +430,6 @@ const m_option_t mp_opts[] = { // set a-v distance OPT_FLOATRANGE("audio-delay", audio_delay, 0, -100.0, 100.0), - // ignore header-specified delay (dwStart) - OPT_FLAG("ignore-start", ignore_start, 0), - // ------------------------- codec/vfilter options -------------------- {"af*", &af_cfg.list, CONF_TYPE_STRING_LIST, 0, 0, 0, NULL}, -- cgit v1.2.3 From 3269bd178020c5d821e8b2d1fd807a38d63e93ce Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 12 Jul 2013 21:58:11 +0200 Subject: demux: rewrite probing and demuxer initialization Get rid of the strange and messy reliance on DEMUXER_TYPE_ constants. Instead of having two open functions for the demuxer callbacks (which somehow are both optional, but you can also decide to implement both...), just have one function. This function takes a parameter that tells the demuxer how strictly it should check for the file headers. This is a nice simplification and allows more flexibility. Remove the file extension code. This literally did nothing (anymore). Change demux_lavf so that we check our other builtin demuxers first before libavformat tries to guess by file extension. --- core/options.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'core/options.c') diff --git a/core/options.c b/core/options.c index d676cb4948..2298d112b8 100644 --- a/core/options.c +++ b/core/options.c @@ -399,7 +399,6 @@ const m_option_t mp_opts[] = { OPT_STRING("demuxer", demuxer_name, 0), OPT_STRING("audio-demuxer", audio_demuxer_name, 0), OPT_STRING("sub-demuxer", sub_demuxer_name, 0), - OPT_FLAG("extbased", extension_parsing, 0), {"mf", (void *) mfopts_conf, CONF_TYPE_SUBCONFIG, 0,0,0, NULL}, #ifdef CONFIG_RADIO @@ -777,7 +776,6 @@ const struct MPOpts mp_default_opts = { .sub_visibility = 1, .sub_pos = 100, .sub_speed = 1.0, - .extension_parsing = 1, .audio_output_channels = MP_CHMAP_INIT_STEREO, .audio_output_format = -1, // AF_FORMAT_UNKNOWN .playback_speed = 1., -- cgit v1.2.3