diff options
-rw-r--r-- | deadbeef.h | 3 | ||||
-rw-r--r-- | plugins/aac/aac.c | 8 | ||||
-rw-r--r-- | plugins/adplug/plugin.c | 2 | ||||
-rw-r--r-- | plugins/ao/plugin.c | 16 | ||||
-rw-r--r-- | plugins/cdda/cdda.c | 3 | ||||
-rw-r--r-- | plugins/dca/dcaplug.c | 6 | ||||
-rw-r--r-- | plugins/dumb/cdumb.c | 3 | ||||
-rw-r--r-- | plugins/ffap/ffap.c | 3 | ||||
-rw-r--r-- | plugins/ffmpeg/ffmpeg.c | 3 | ||||
-rw-r--r-- | plugins/flac/flac.c | 3 | ||||
-rw-r--r-- | plugins/gme/cgme.c | 1 | ||||
-rw-r--r-- | plugins/mpgmad/mpgmad.c | 47 | ||||
-rw-r--r-- | plugins/musepack/musepack.c | 2 | ||||
-rw-r--r-- | plugins/shn/shn.c | 3 | ||||
-rw-r--r-- | plugins/sid/plugin.c | 3 | ||||
-rw-r--r-- | plugins/sndfile/sndfile.c | 3 | ||||
-rw-r--r-- | plugins/tta/ttaplug.c | 2 | ||||
-rw-r--r-- | plugins/vorbis/vorbis.c | 4 | ||||
-rw-r--r-- | plugins/vtx/vtx.c | 4 | ||||
-rw-r--r-- | plugins/wavpack/wavpack.c | 3 | ||||
-rw-r--r-- | plugins/wildmidi/wildmidiplug.c | 2 | ||||
-rw-r--r-- | streamer.c | 1 |
22 files changed, 16 insertions, 109 deletions
@@ -851,9 +851,6 @@ typedef struct DB_decoder_s { // NULL terminated array of all supported prefixes (UADE support needs that) // e.g. "mod.song_title" const char **prefixes; - - // NULL terminated array of all file type names - const char **filetypes; } DB_decoder_t; // output plugin diff --git a/plugins/aac/aac.c b/plugins/aac/aac.c index 6e52c53a..95563f51 100644 --- a/plugins/aac/aac.c +++ b/plugins/aac/aac.c @@ -1175,7 +1175,7 @@ aac_insert (DB_playItem_t *after, const char *fname) { if (fp->vfs->is_streaming ()) { trace ("streaming aac (%s)\n", fname); - ftype = plugin.filetypes[0]; + ftype = "RAW AAC"; } else { int skip = deadbeef->junk_get_leading_size (fp); @@ -1206,10 +1206,10 @@ aac_insert (DB_playItem_t *after, const char *fname) { return NULL; } else if (res == 0) { - ftype = plugin.filetypes[1]; + ftype = "MP4 AAC"; } else if (res == 1) { - ftype = plugin.filetypes[0]; + ftype = "RAW AAC"; } } @@ -1310,7 +1310,6 @@ aac_insert (DB_playItem_t *after, const char *fname) { } static const char * exts[] = { "aac", "mp4", "m4a", NULL }; -static const char *filetypes[] = { "RAW AAC", "MP4 AAC", NULL }; // define plugin interface static DB_decoder_t plugin = { @@ -1355,7 +1354,6 @@ static DB_decoder_t plugin = { #else #endif .exts = exts, - .filetypes = filetypes }; DB_plugin_t * diff --git a/plugins/adplug/plugin.c b/plugins/adplug/plugin.c index 0b53da31..4f2bb551 100644 --- a/plugins/adplug/plugin.c +++ b/plugins/adplug/plugin.c @@ -23,7 +23,6 @@ #include "../../deadbeef.h" extern const char *adplug_exts[]; -extern const char *adplug_filetypes[]; DB_fileinfo_t * adplug_open (uint32_t hints); @@ -85,6 +84,5 @@ DB_decoder_t adplug_plugin = { .seek_sample = adplug_seek_sample, .insert = adplug_insert, .exts = adplug_exts, - .filetypes = adplug_filetypes }; diff --git a/plugins/ao/plugin.c b/plugins/ao/plugin.c index bafcc20e..6b489f45 100644 --- a/plugins/ao/plugin.c +++ b/plugins/ao/plugin.c @@ -32,7 +32,6 @@ DB_functions_t *deadbeef; static DB_decoder_t plugin; static const char * exts[] = { "psf", "psf2", "spu", "ssf", "qsf", "dsf", "minipsf", "minipsf2", "minissf", "miniqsf", "minidsf", NULL }; -static const char *filetypes[] = { "PSF", "PSF2", "SPU", "SSF", "QSF", "DSF", NULL }; typedef struct { DB_fileinfo_t info; @@ -260,26 +259,26 @@ aoplug_insert (DB_playItem_t *after, const char *fname) { if (*ext == '.') { ext++; if (!strcasecmp (ext, "psf") || !strcasecmp (ext, "minipsf")) { - deadbeef->pl_add_meta (it, ":FILETYPE", filetypes[0]); + deadbeef->pl_add_meta (it, ":FILETYPE", "PSF"); } else if (!strcasecmp (ext, "psf2") || !strcasecmp (ext, "minipsf2")) { - deadbeef->pl_add_meta (it, ":FILETYPE", filetypes[1]); + deadbeef->pl_add_meta (it, ":FILETYPE", "PSF2"); } else if (!strcasecmp (ext, "spu")) { - deadbeef->pl_add_meta (it, ":FILETYPE", filetypes[2]); + deadbeef->pl_add_meta (it, ":FILETYPE", "SPU"); } else if (!strcasecmp (ext, "ssf") || !strcasecmp (ext, "minissf")) { - deadbeef->pl_add_meta (it, ":FILETYPE", filetypes[3]); + deadbeef->pl_add_meta (it, ":FILETYPE", "SSF"); } else if (!strcasecmp (ext, "qsf") || !strcasecmp (ext, "miniqsf")) { - deadbeef->pl_add_meta (it, ":FILETYPE", filetypes[4]); + deadbeef->pl_add_meta (it, ":FILETYPE", "QSF"); } else if (!strcasecmp (ext, "dsf") || !strcasecmp (ext, "minidsf")) { - deadbeef->pl_add_meta (it, ":FILETYPE", filetypes[5]); + deadbeef->pl_add_meta (it, ":FILETYPE", "DSF"); } } else { - deadbeef->pl_add_meta (it, ":FILETYPE", filetypes[0]); + deadbeef->pl_add_meta (it, ":FILETYPE", "PSF"); } float duration = 120; @@ -383,7 +382,6 @@ static DB_decoder_t plugin = { .seek_sample = aoplug_seek_sample, .insert = aoplug_insert, .exts = exts, - .filetypes = filetypes }; DB_plugin_t * diff --git a/plugins/cdda/cdda.c b/plugins/cdda/cdda.c index 9df88719..8bd8f296 100644 --- a/plugins/cdda/cdda.c +++ b/plugins/cdda/cdda.c @@ -613,8 +613,6 @@ cda_get_actions (DB_playItem_t *unused) } static const char *exts[] = { "cda", "nrg", NULL }; -static const char *filetypes[] = { "cdda", NULL }; - static const char settings_dlg[] = "property \"Use CDDB/FreeDB\" checkbox cdda.freedb.enable 1;\n" "property \"Prefer CD-Text over CDDB\" checkbox cdda.prefer_cdtext 1;\n" @@ -662,7 +660,6 @@ static DB_decoder_t plugin = { .seek_sample = cda_seek_sample, .insert = cda_insert, .exts = exts, - .filetypes = filetypes, }; DB_plugin_t * diff --git a/plugins/dca/dcaplug.c b/plugins/dca/dcaplug.c index af0f5e5e..6262d763 100644 --- a/plugins/dca/dcaplug.c +++ b/plugins/dca/dcaplug.c @@ -51,7 +51,6 @@ #define trace(fmt,...) static const char * exts[] = { "wav", "dts", "cpt", NULL }; -static const char *filetypes[] = { "DTS WAV", "DTS", NULL }; enum { FT_DTSWAV, @@ -640,13 +639,13 @@ dts_insert (DB_playItem_t *after, const char *fname) { double dur = -1; // WAV format if ((offset = dts_open_wav (fp, &fmt, &totalsamples)) != -1) { - filetype = filetypes[FT_DTSWAV]; + filetype = "DTS WAV"; dur = (float)totalsamples / fmt.nSamplesPerSec; } else { // try raw DTS @ 48KHz offset = 0; - filetype = filetypes[FT_DTS]; + filetype = "DTS"; //fprintf (stderr, "dca: unrecognized format in %s\n", fname); //goto error; } @@ -760,7 +759,6 @@ static DB_decoder_t plugin = { .seek_sample = dts_seek_sample, .insert = dts_insert, .exts = exts, - .filetypes = filetypes }; DB_plugin_t * diff --git a/plugins/dumb/cdumb.c b/plugins/dumb/cdumb.c index b5367640..03c9db94 100644 --- a/plugins/dumb/cdumb.c +++ b/plugins/dumb/cdumb.c @@ -869,8 +869,6 @@ cgme_stop (void) { return 0; } -static const char *filetypes[] = { "IT", "XM", "S3M", "STM", "669", "PTM", "PSM", "MTM", "RIFF", "ASY", "MOD", NULL }; - static const char settings_dlg[] = "property \"Resampling quality (0..2, higher is better)\" entry dumb.resampling_quality 2;\n" "property \"8-bit output (default is 16)\" checkbox dumb.8bitoutput 0;\n" @@ -918,7 +916,6 @@ static DB_decoder_t plugin = { .insert = cdumb_insert, .read_metadata = cdumb_read_metadata, .exts = exts, - .filetypes = filetypes }; DB_plugin_t * diff --git a/plugins/ffap/ffap.c b/plugins/ffap/ffap.c index 7abf0103..1dc98d72 100644 --- a/plugins/ffap/ffap.c +++ b/plugins/ffap/ffap.c @@ -1956,7 +1956,7 @@ static int ffap_write_metadata (DB_playItem_t *it) { } static const char *exts[] = { "ape", NULL }; -static const char *filetypes[] = { "APE", NULL }; + // define plugin interface static DB_decoder_t plugin = { DB_PLUGIN_SET_API_VERSION @@ -1997,7 +1997,6 @@ static DB_decoder_t plugin = { .read_metadata = ffap_read_metadata, .write_metadata = ffap_write_metadata, .exts = exts, - .filetypes = filetypes }; #if HAVE_SSE2 && !ARCH_UNKNOWN diff --git a/plugins/ffmpeg/ffmpeg.c b/plugins/ffmpeg/ffmpeg.c index 8082b1d2..b212b3a3 100644 --- a/plugins/ffmpeg/ffmpeg.c +++ b/plugins/ffmpeg/ffmpeg.c @@ -71,8 +71,6 @@ enum { FT_UNKNOWN = 5 }; -static const char *filetypes[] = { "FFMPEG", NULL }; - #define FF_PROTOCOL_NAME "deadbeef" typedef struct { @@ -818,7 +816,6 @@ static DB_decoder_t plugin = { .insert = ffmpeg_insert, .read_metadata = ffmpeg_read_metadata, .exts = (const char **)exts, - .filetypes = filetypes }; DB_plugin_t * diff --git a/plugins/flac/flac.c b/plugins/flac/flac.c index 6c136e9d..678837b9 100644 --- a/plugins/flac/flac.c +++ b/plugins/flac/flac.c @@ -921,8 +921,6 @@ error: static const char *exts[] = { "flac", "oga", NULL }; -static const char *filetypes[] = { "FLAC", "OggFLAC", NULL }; - // define plugin interface static DB_decoder_t plugin = { DB_PLUGIN_SET_API_VERSION @@ -961,7 +959,6 @@ static DB_decoder_t plugin = { .read_metadata = cflac_read_metadata, .write_metadata = cflac_write_metadata, .exts = exts, - .filetypes = filetypes }; DB_plugin_t * diff --git a/plugins/gme/cgme.c b/plugins/gme/cgme.c index f6753556..dee03081 100644 --- a/plugins/gme/cgme.c +++ b/plugins/gme/cgme.c @@ -445,7 +445,6 @@ static DB_decoder_t plugin = { .seek = cgme_seek, .insert = cgme_insert, .exts = exts, - .filetypes = exts }; DB_plugin_t * diff --git a/plugins/mpgmad/mpgmad.c b/plugins/mpgmad/mpgmad.c index 9b1c59e4..4f88af02 100644 --- a/plugins/mpgmad/mpgmad.c +++ b/plugins/mpgmad/mpgmad.c @@ -785,6 +785,7 @@ cmp3_set_extra_properties (buffer_t *buffer) { snprintf (s, sizeof (s), "MPEG%s layer%d", versions[buffer->version-1], buffer->layer); deadbeef->pl_replace_meta (buffer->it, ":MPEG_VERSION", s); deadbeef->pl_replace_meta (buffer->it, ":XING_HEADER", buffer->have_xing_header ? "Yes" : "No"); + deadbeef->pl_replace_meta (buffer->it, ":FILETYPE", "MP3"); } static int @@ -1297,10 +1298,6 @@ cmp3_seek (DB_fileinfo_t *_info, float time) { return cmp3_seek_sample (_info, sample); } -static const char *filetypes[] = { - "MPEG 1.0 layer I", "MPEG 1.0 layer II", "MPEG 1.0 layer III", "MPEG 2.0 layer I", "MPEG 2.0 layer II", "MPEG 2.0 layer III", "MPEG 2.5 layer I", "MPEG 2.5 layer II", "MPEG 2.5 layer III", NULL -}; - static DB_playItem_t * cmp3_insert (DB_playItem_t *after, const char *fname) { trace ("cmp3_insert %s\n", fname); @@ -1334,46 +1331,6 @@ cmp3_insert (DB_playItem_t *after, const char *fname) { return NULL; } - const char *ftype = NULL; - if (buffer.version == 1) { - switch (buffer.layer) { - case 1: - ftype = filetypes[0]; - break; - case 2: - ftype = filetypes[1]; - break; - case 3: - ftype = filetypes[2]; - break; - } - } - else if (buffer.version == 2) { - switch (buffer.layer) { - case 1: - ftype = filetypes[3]; - break; - case 2: - ftype = filetypes[4]; - break; - case 3: - ftype = filetypes[5]; - break; - } - } - else { - switch (buffer.layer) { - case 1: - ftype = filetypes[6]; - break; - case 2: - ftype = filetypes[7]; - break; - case 3: - ftype = filetypes[8]; - break; - } - } DB_playItem_t *it = deadbeef->pl_item_alloc_init (fname, plugin.plugin.id); deadbeef->rewind (fp); @@ -1391,7 +1348,6 @@ cmp3_insert (DB_playItem_t *after, const char *fname) { cmp3_set_extra_properties (&buffer); deadbeef->pl_set_item_duration (it, buffer.duration); - deadbeef->pl_replace_meta (it, ":FILETYPE", ftype); deadbeef->fclose (fp); // FIXME! bad numsamples passed to cue @@ -1503,7 +1459,6 @@ static DB_decoder_t plugin = { .read_metadata = cmp3_read_metadata, .write_metadata = cmp3_write_metadata, .exts = exts, - .filetypes = filetypes }; DB_plugin_t * diff --git a/plugins/musepack/musepack.c b/plugins/musepack/musepack.c index 7f34c624..e6b22c00 100644 --- a/plugins/musepack/musepack.c +++ b/plugins/musepack/musepack.c @@ -521,7 +521,6 @@ musepack_stop (void) { } static const char * exts[] = { "mpc", "mpp", "mp+", NULL }; -static const char *filetypes[] = { "MusePack", NULL }; // define plugin interface static DB_decoder_t plugin = { @@ -564,7 +563,6 @@ static DB_decoder_t plugin = { .read_metadata = musepack_read_metadata, .write_metadata = musepack_write_metadata, .exts = exts, - .filetypes = filetypes }; DB_plugin_t * diff --git a/plugins/shn/shn.c b/plugins/shn/shn.c index 4a90583c..04b00575 100644 --- a/plugins/shn/shn.c +++ b/plugins/shn/shn.c @@ -1786,8 +1786,6 @@ void write_and_wait(shn_file *this_shn,int block_size) #endif static const char * exts[] = { "shn", NULL }; -static const char *filetypes[] = { "Shorten", NULL }; - static const char settings_dlg[] = "property \"Relative seek table path\" entry shn.relative_seektable_path seektables;\n" @@ -1834,7 +1832,6 @@ static DB_decoder_t plugin = { .seek_sample = shn_seek_sample, .insert = shn_insert, .exts = exts, - .filetypes = filetypes }; DB_plugin_t * diff --git a/plugins/sid/plugin.c b/plugins/sid/plugin.c index ff350da6..6c4705b5 100644 --- a/plugins/sid/plugin.c +++ b/plugins/sid/plugin.c @@ -19,8 +19,6 @@ #include "csid.h" static const char *exts[] = { "sid",NULL }; -const char *filetypes[] = { "SID", NULL }; - static const char settings_dlg[] = "property \"Enable HVSC Songlength DB\" checkbox hvsc_enable 0;\n" "property \"Songlengths.txt (from HVSC)\" file hvsc_path \"\";\n" @@ -74,6 +72,5 @@ DB_decoder_t sid_plugin = { // .numvoices = csid_numvoices, // .mutevoice = csid_mutevoice, .exts = exts, - .filetypes = filetypes, }; diff --git a/plugins/sndfile/sndfile.c b/plugins/sndfile/sndfile.c index bc7eaf1a..e8a6231e 100644 --- a/plugins/sndfile/sndfile.c +++ b/plugins/sndfile/sndfile.c @@ -374,8 +374,6 @@ sndfile_insert (DB_playItem_t *after, const char *fname) { #define EXT_MAX 100 static char *exts[EXT_MAX] = {NULL}; -static const char *filetypes[] = { "WAV", NULL }; - static void sndfile_init_exts (void) { @@ -476,7 +474,6 @@ static DB_decoder_t plugin = { .seek_sample = sndfile_seek_sample, .insert = sndfile_insert, .exts = (const char **)exts, - .filetypes = filetypes, .plugin.start = sndfile_start, .plugin.stop = sndfile_stop, .plugin.configdialog = settings_dlg, diff --git a/plugins/tta/ttaplug.c b/plugins/tta/ttaplug.c index 20a0c8a5..95bac3c5 100644 --- a/plugins/tta/ttaplug.c +++ b/plugins/tta/ttaplug.c @@ -302,7 +302,6 @@ tta_stop (void) { } static const char * exts[] = { "tta", NULL }; -static const char *filetypes[] = { "TTA", NULL }; // define plugin interface static DB_decoder_t plugin = { @@ -346,7 +345,6 @@ static DB_decoder_t plugin = { .read_metadata = tta_read_metadata, .write_metadata = tta_write_metadata, .exts = exts, - .filetypes = filetypes }; DB_plugin_t * diff --git a/plugins/vorbis/vorbis.c b/plugins/vorbis/vorbis.c index ee1871a4..5f94a474 100644 --- a/plugins/vorbis/vorbis.c +++ b/plugins/vorbis/vorbis.c @@ -763,7 +763,6 @@ error: static const char * exts[] = { "ogg", "ogx", NULL }; -static const char *filetypes[] = { "OggVorbis", NULL }; // define plugin interface static DB_decoder_t plugin = { @@ -805,8 +804,7 @@ static DB_decoder_t plugin = { .insert = cvorbis_insert, .read_metadata = cvorbis_read_metadata, .write_metadata = cvorbis_write_metadata, - .exts = exts, - .filetypes = filetypes + .exts = exts }; DB_plugin_t * diff --git a/plugins/vtx/vtx.c b/plugins/vtx/vtx.c index 41b1fe73..891caec3 100644 --- a/plugins/vtx/vtx.c +++ b/plugins/vtx/vtx.c @@ -31,7 +31,6 @@ static DB_decoder_t plugin; static DB_functions_t *deadbeef; static const char * exts[] = { "vtx", NULL }; -static const char *filetypes[] = { "VTX", NULL }; #define AY_FRAME_SIZE 14 @@ -259,7 +258,7 @@ vtx_insert (DB_playItem_t *after, const char *fname) { trace ("vtx: datasize: %d\n", hdr->regdata_size); DB_playItem_t *it = deadbeef->pl_item_alloc_init (fname, plugin.plugin.id); - deadbeef->pl_add_meta (it, ":FILETYPE", filetypes[0]); + deadbeef->pl_add_meta (it, ":FILETYPE", "VTX"); int numframes = hdr->regdata_size / AY_FRAME_SIZE; // int totalsamples = numframes * hdr->playerFreq; @@ -338,7 +337,6 @@ static DB_decoder_t plugin = { .seek_sample = vtx_seek_sample, .insert = vtx_insert, .exts = exts, - .filetypes = filetypes }; DB_plugin_t * diff --git a/plugins/wavpack/wavpack.c b/plugins/wavpack/wavpack.c index 15973421..1f3dd130 100644 --- a/plugins/wavpack/wavpack.c +++ b/plugins/wavpack/wavpack.c @@ -409,8 +409,6 @@ wv_write_metadata (DB_playItem_t *it) { } static const char *exts[] = { "wv", NULL }; -static const char *filetypes[] = { "wv", NULL }; - // define plugin interface static DB_decoder_t plugin = { DB_PLUGIN_SET_API_VERSION @@ -459,7 +457,6 @@ static DB_decoder_t plugin = { .read_metadata = wv_read_metadata, .write_metadata = wv_write_metadata, .exts = exts, - .filetypes = filetypes }; DB_plugin_t * diff --git a/plugins/wildmidi/wildmidiplug.c b/plugins/wildmidi/wildmidiplug.c index 87aee260..5ddb3c97 100644 --- a/plugins/wildmidi/wildmidiplug.c +++ b/plugins/wildmidi/wildmidiplug.c @@ -177,7 +177,6 @@ wildmidi_load (DB_functions_t *api) { } static const char *exts[] = { "mid",NULL }; -const char *filetypes[] = { "MID", NULL }; static const char settings_dlg[] = "property \"Timidity++ bank configuration file\" file wildmidi.config \"" DEFAULT_TIMIDITY_CONFIG "\";\n" @@ -223,5 +222,4 @@ DB_decoder_t wmidi_plugin = { .seek_sample = wmidi_seek_sample, .insert = wmidi_insert, .exts = exts, - .filetypes = filetypes, }; @@ -661,7 +661,6 @@ streamer_set_current (playItem_t *it) { if (!strcmp (decoders[i]->plugin.id, plug)) { pl_replace_meta (it, ":DECODER", decoders[i]->plugin.id); strncpy (decoder_id, decoders[i]->plugin.id, sizeof (decoder_id)); - pl_replace_meta (it, ":FILETYPE", decoders[i]->filetypes[0]); trace ("\033[0;34mfound plugin %s\033[37;0m\n", plug); } } |