mirror of https://github.com/mpv-player/mpv
codecs: remove unused family field
MPlayer used this to distinguish multiple decoder wrappers (such as libavcodec vs. binary codec loader vs. builtin decoders). It lost meaning in mpv as non-libavcodec things were dropped. Now it doesn't serve any purpose anymore. Parsing was removed quite a while ago, and the recent filter change removed any use of the internal family field. Get rid of it.
This commit is contained in:
parent
4b567aeac8
commit
8b3306924d
|
@ -2104,9 +2104,6 @@ Property list
|
|||
List of decoders supported. This lists decoders which can be passed to
|
||||
``--vd`` and ``--ad``.
|
||||
|
||||
``family``
|
||||
Decoder driver. Usually ``lavc`` for libavcodec.
|
||||
|
||||
``codec``
|
||||
Canonical codec name, which identifies the format the decoder can
|
||||
handle.
|
||||
|
@ -2127,7 +2124,6 @@ Property list
|
|||
|
||||
MPV_FORMAT_NODE_ARRAY
|
||||
MPV_FORMAT_NODE_MAP (for each decoder entry)
|
||||
"family" MPV_FORMAT_STRING
|
||||
"codec" MPV_FORMAT_STRING
|
||||
"driver" MPV_FORMAT_STRING
|
||||
"description" MPV_FORMAT_STRING
|
||||
|
|
|
@ -378,7 +378,7 @@ struct mp_decoder_list *select_spdif_codec(const char *codec, const char *pref)
|
|||
const char *suffix_name = dts_hd_allowed ? "dts_hd" : codec;
|
||||
char name[80];
|
||||
snprintf(name, sizeof(name), "spdif_%s", suffix_name);
|
||||
mp_add_decoder(list, "spdif", codec, name,
|
||||
mp_add_decoder(list, codec, name,
|
||||
"libavformat/spdifenc audio pass-through decoder");
|
||||
return list;
|
||||
}
|
||||
|
|
|
@ -227,7 +227,7 @@ void mp_add_lavc_decoders(struct mp_decoder_list *list, enum AVMediaType type)
|
|||
if (!cur)
|
||||
break;
|
||||
if (av_codec_is_decoder(cur) && cur->type == type) {
|
||||
mp_add_decoder(list, "lavc", mp_codec_from_av_codec_id(cur->id),
|
||||
mp_add_decoder(list, mp_codec_from_av_codec_id(cur->id),
|
||||
cur->name, cur->long_name);
|
||||
}
|
||||
}
|
||||
|
@ -242,7 +242,7 @@ void mp_add_lavc_encoders(struct mp_decoder_list *list)
|
|||
if (!cur)
|
||||
break;
|
||||
if (av_codec_is_encoder(cur)) {
|
||||
mp_add_decoder(list, "lavc", mp_codec_from_av_codec_id(cur->id),
|
||||
mp_add_decoder(list, mp_codec_from_av_codec_id(cur->id),
|
||||
cur->name, cur->long_name);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,11 +21,10 @@
|
|||
#include "common/msg.h"
|
||||
#include "codecs.h"
|
||||
|
||||
void mp_add_decoder(struct mp_decoder_list *list, const char *family,
|
||||
const char *codec, const char *decoder, const char *desc)
|
||||
void mp_add_decoder(struct mp_decoder_list *list, const char *codec,
|
||||
const char *decoder, const char *desc)
|
||||
{
|
||||
struct mp_decoder_entry entry = {
|
||||
.family = talloc_strdup(list, family),
|
||||
.codec = talloc_strdup(list, codec),
|
||||
.decoder = talloc_strdup(list, decoder),
|
||||
.desc = talloc_strdup(list, desc),
|
||||
|
@ -40,7 +39,7 @@ static void add_new(struct mp_decoder_list *to, struct mp_decoder_entry *entry,
|
|||
{
|
||||
if (!entry || (codec && strcmp(entry->codec, codec) != 0))
|
||||
return;
|
||||
mp_add_decoder(to, entry->family, entry->codec, entry->decoder, entry->desc);
|
||||
mp_add_decoder(to, entry->codec, entry->decoder, entry->desc);
|
||||
}
|
||||
|
||||
// Select a decoder from the given list for the given codec. The selection
|
||||
|
@ -72,11 +71,6 @@ struct mp_decoder_list *mp_select_decoders(struct mp_log *log,
|
|||
stop = true;
|
||||
break;
|
||||
}
|
||||
if (bstr_find0(entry, ":") >= 0) {
|
||||
mp_err(log, "Codec family selection was removed. "
|
||||
"Pass the codec name directly.\n");
|
||||
break;
|
||||
}
|
||||
for (int n = 0; n < all->num_entries; n++) {
|
||||
struct mp_decoder_entry *cur = &all->entries[n];
|
||||
if (bstr_equals0(entry, cur->decoder))
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
struct mp_log;
|
||||
|
||||
struct mp_decoder_entry {
|
||||
const char *family; // decoder module (e.g. ad_lavc => "lavc")
|
||||
const char *codec; // name of the codec (e.g. "mp3")
|
||||
const char *decoder; // decoder name (e.g. "mp3float")
|
||||
const char *desc; // human readable description
|
||||
|
@ -32,8 +31,8 @@ struct mp_decoder_list {
|
|||
int num_entries;
|
||||
};
|
||||
|
||||
void mp_add_decoder(struct mp_decoder_list *list, const char *family,
|
||||
const char *codec, const char *decoder, const char *desc);
|
||||
void mp_add_decoder(struct mp_decoder_list *list, const char *codec,
|
||||
const char *decoder, const char *desc);
|
||||
|
||||
struct mp_decoder_list *mp_select_decoders(struct mp_log *log,
|
||||
struct mp_decoder_list *all,
|
||||
|
|
|
@ -3538,7 +3538,6 @@ static int get_decoder_entry(int item, int action, void *arg, void *ctx)
|
|||
struct mp_decoder_entry *c = &codecs->entries[item];
|
||||
|
||||
struct m_sub_property props[] = {
|
||||
{"family", SUB_PROP_STR(c->family)},
|
||||
{"codec", SUB_PROP_STR(c->codec)},
|
||||
{"driver" , SUB_PROP_STR(c->decoder)},
|
||||
{"description", SUB_PROP_STR(c->desc)},
|
||||
|
|
Loading…
Reference in New Issue