From 206c222c80983a8f30d628e8b3575d7ae02f07b3 Mon Sep 17 00:00:00 2001 From: waker Date: Tue, 26 Oct 2010 21:43:32 +0200 Subject: fixed playback of mp3 icy streams with Xing/Info frames in them --- plugins/mpgmad/mpgmad.c | 192 ++++++++++++++++++++++++------------------------ 1 file changed, 97 insertions(+), 95 deletions(-) (limited to 'plugins/mpgmad/mpgmad.c') diff --git a/plugins/mpgmad/mpgmad.c b/plugins/mpgmad/mpgmad.c index 098d672a..13544238 100644 --- a/plugins/mpgmad/mpgmad.c +++ b/plugins/mpgmad/mpgmad.c @@ -372,108 +372,110 @@ cmp3_scan_stream (buffer_t *buffer, int sample) { if (sample <= 0 && !got_xing_header) { size_t framepos = deadbeef->ftell (buffer->file); -// trace ("trying to read xing header at pos %d\n", framepos); - if (ver == 1) { - deadbeef->fseek (buffer->file, 32, SEEK_CUR); - } - else { - deadbeef->fseek (buffer->file, 17, SEEK_CUR); - } - const char xing[] = "Xing"; - const char info[] = "Info"; - char magic[4]; - if (deadbeef->fread (magic, 1, 4, buffer->file) != 4) { - trace ("cmp3_scan_stream: EOF while checking for Xing header\n"); - return -1; // EOF - } - -// trace ("xing magic: %c%c%c%c\n", magic[0], magic[1], magic[2], magic[3]); - - if (!strncmp (xing, magic, 4) || !strncmp (info, magic, 4)) { - trace ("xing/info frame found\n"); - buffer->startoffset += packetlength; - // read flags - uint32_t flags; - uint8_t buf[4]; - if (deadbeef->fread (buf, 1, 4, buffer->file) != 4) { - trace ("cmp3_scan_stream: EOF while parsing Xing header\n"); + if (!buffer->file->vfs->streaming) { + // trace ("trying to read xing header at pos %d\n", framepos); + if (ver == 1) { + deadbeef->fseek (buffer->file, 32, SEEK_CUR); + } + else { + deadbeef->fseek (buffer->file, 17, SEEK_CUR); + } + const char xing[] = "Xing"; + const char info[] = "Info"; + char magic[4]; + if (deadbeef->fread (magic, 1, 4, buffer->file) != 4) { + trace ("cmp3_scan_stream: EOF while checking for Xing header\n"); return -1; // EOF } - flags = extract_i32 (buf); - if (flags & FRAMES_FLAG) { - // read number of frames + + // trace ("xing magic: %c%c%c%c\n", magic[0], magic[1], magic[2], magic[3]); + + if (!strncmp (xing, magic, 4) || !strncmp (info, magic, 4)) { + trace ("xing/info frame found\n"); + buffer->startoffset += packetlength; + // read flags + uint32_t flags; + uint8_t buf[4]; if (deadbeef->fread (buf, 1, 4, buffer->file) != 4) { trace ("cmp3_scan_stream: EOF while parsing Xing header\n"); return -1; // EOF } - uint32_t nframes = extract_i32 (buf); - buffer->duration = (float)nframes * (float)samples_per_frame / (float)samplerate; - trace ("xing totalsamples: %d, nframes: %d, samples_per_frame: %d\n", nframes*samples_per_frame, nframes, samples_per_frame); - if (nframes <= 0 || samples_per_frame <= 0) { - trace ("bad xing header\n"); - continue; + flags = extract_i32 (buf); + if (flags & FRAMES_FLAG) { + // read number of frames + if (deadbeef->fread (buf, 1, 4, buffer->file) != 4) { + trace ("cmp3_scan_stream: EOF while parsing Xing header\n"); + return -1; // EOF + } + uint32_t nframes = extract_i32 (buf); + buffer->duration = (float)nframes * (float)samples_per_frame / (float)samplerate; + trace ("xing totalsamples: %d, nframes: %d, samples_per_frame: %d\n", nframes*samples_per_frame, nframes, samples_per_frame); + if (nframes <= 0 || samples_per_frame <= 0) { + trace ("bad xing header\n"); + continue; + } + buffer->totalsamples = nframes * samples_per_frame; + buffer->samplerate = samplerate; + } + if (flags & BYTES_FLAG) { + deadbeef->fseek (buffer->file, 4, SEEK_CUR); + } + if (flags & TOC_FLAG) { + deadbeef->fseek (buffer->file, 100, SEEK_CUR); + } + if (flags & VBR_SCALE_FLAG) { + deadbeef->fseek (buffer->file, 4, SEEK_CUR); + } + // lame header + if (deadbeef->fread (buf, 1, 4, buffer->file) != 4) { + trace ("cmp3_scan_stream: EOF while reading LAME header\n"); + return -1; // EOF + } + // trace ("tell=%x, %c%c%c%c\n", deadbeef->ftell(buffer->file), buf[0], buf[1], buf[2], buf[3]); + if (!memcmp (buf, "LAME", 4)) { + trace ("lame header found\n"); + deadbeef->fseek (buffer->file, 6, SEEK_CUR); + + // FIXME: that can be optimized by single read + uint8_t lpf; + deadbeef->fread (&lpf, 1, 1, buffer->file); + //3 floats: replay gain + deadbeef->fread (buf, 1, 4, buffer->file); + // float rg_peaksignalamp = extract_f32 (buf); + deadbeef->fread (buf, 1, 2, buffer->file); + // uint16_t rg_radio = extract_i16 (buf); + + deadbeef->fread (buf, 1, 2, buffer->file); + // uint16_t rg_audiophile = extract_i16 (buf); + + // skip + deadbeef->fseek (buffer->file, 2, SEEK_CUR); + deadbeef->fread (buf, 1, 3, buffer->file); + uint32_t startdelay = (((uint32_t)buf[0]) << 4) | ((((uint32_t)buf[1]) & 0xf0)>>4); + uint32_t enddelay = ((((uint32_t)buf[1])&0x0f)<<8) | ((uint32_t)buf[2]); + // skip + deadbeef->fseek (buffer->file, 1, SEEK_CUR); + // mp3gain + uint8_t mp3gain; + deadbeef->fread (&mp3gain, 1, 1, buffer->file); + // skip + deadbeef->fseek (buffer->file, 2, SEEK_CUR); + // musiclen + deadbeef->fread (buf, 1, 4, buffer->file); + // uint32_t musiclen = extract_i32 (buf); + + //trace ("lpf: %d, peaksignalamp: %f, radiogain: %d, audiophile: %d, startdelay: %d, enddelay: %d, mp3gain: %d, musiclen: %d\n", lpf, rg_peaksignalamp, rg_radio, rg_audiophile, startdelay, enddelay, mp3gain, musiclen); + // skip crc + //deadbeef->fseek (buffer->file, 4, SEEK_CUR); + buffer->startdelay = startdelay; + buffer->enddelay = enddelay; + trace ("lame totalsamples: %d\n", buffer->totalsamples); + } + if (sample <= 0 && (flags&FRAMES_FLAG)) { + buffer->totalsamples -= buffer->enddelay; + deadbeef->fseek (buffer->file, framepos+packetlength-4, SEEK_SET); + return 0; } - buffer->totalsamples = nframes * samples_per_frame; - buffer->samplerate = samplerate; - } - if (flags & BYTES_FLAG) { - deadbeef->fseek (buffer->file, 4, SEEK_CUR); - } - if (flags & TOC_FLAG) { - deadbeef->fseek (buffer->file, 100, SEEK_CUR); - } - if (flags & VBR_SCALE_FLAG) { - deadbeef->fseek (buffer->file, 4, SEEK_CUR); - } - // lame header - if (deadbeef->fread (buf, 1, 4, buffer->file) != 4) { - trace ("cmp3_scan_stream: EOF while reading LAME header\n"); - return -1; // EOF - } -// trace ("tell=%x, %c%c%c%c\n", deadbeef->ftell(buffer->file), buf[0], buf[1], buf[2], buf[3]); - if (!memcmp (buf, "LAME", 4)) { - trace ("lame header found\n"); - deadbeef->fseek (buffer->file, 6, SEEK_CUR); - - // FIXME: that can be optimized by single read - uint8_t lpf; - deadbeef->fread (&lpf, 1, 1, buffer->file); - //3 floats: replay gain - deadbeef->fread (buf, 1, 4, buffer->file); - // float rg_peaksignalamp = extract_f32 (buf); - deadbeef->fread (buf, 1, 2, buffer->file); - // uint16_t rg_radio = extract_i16 (buf); - - deadbeef->fread (buf, 1, 2, buffer->file); - // uint16_t rg_audiophile = extract_i16 (buf); - - // skip - deadbeef->fseek (buffer->file, 2, SEEK_CUR); - deadbeef->fread (buf, 1, 3, buffer->file); - uint32_t startdelay = (((uint32_t)buf[0]) << 4) | ((((uint32_t)buf[1]) & 0xf0)>>4); - uint32_t enddelay = ((((uint32_t)buf[1])&0x0f)<<8) | ((uint32_t)buf[2]); - // skip - deadbeef->fseek (buffer->file, 1, SEEK_CUR); - // mp3gain - uint8_t mp3gain; - deadbeef->fread (&mp3gain, 1, 1, buffer->file); - // skip - deadbeef->fseek (buffer->file, 2, SEEK_CUR); - // musiclen - deadbeef->fread (buf, 1, 4, buffer->file); -// uint32_t musiclen = extract_i32 (buf); - - //trace ("lpf: %d, peaksignalamp: %f, radiogain: %d, audiophile: %d, startdelay: %d, enddelay: %d, mp3gain: %d, musiclen: %d\n", lpf, rg_peaksignalamp, rg_radio, rg_audiophile, startdelay, enddelay, mp3gain, musiclen); - // skip crc - //deadbeef->fseek (buffer->file, 4, SEEK_CUR); - buffer->startdelay = startdelay; - buffer->enddelay = enddelay; - trace ("lame totalsamples: %d\n", buffer->totalsamples); - } - if (sample <= 0 && (flags&FRAMES_FLAG)) { - buffer->totalsamples -= buffer->enddelay; - deadbeef->fseek (buffer->file, framepos+packetlength-4, SEEK_SET); - return 0; } } if (sample == 0) { -- cgit v1.2.3 From ba90064d6b33270032bc4664a809d51bff5b9d4a Mon Sep 17 00:00:00 2001 From: waker Date: Tue, 2 Nov 2010 22:04:13 +0100 Subject: bumped all plugins to version 1.0; updated portable build packaging script --- plugins/aac/aac.c | 4 ++-- plugins/adplug/plugin.c | 4 ++-- plugins/alsa/alsa.c | 4 ++-- plugins/ao/plugin.c | 4 ++-- plugins/artwork/artwork.c | 2 ++ plugins/cdda/cdda.c | 4 ++-- plugins/dca/dcaplug.c | 4 ++-- plugins/dumb/cdumb.c | 4 ++-- plugins/ffap/ffap.c | 4 ++-- plugins/ffmpeg/ffmpeg.c | 4 ++-- plugins/flac/flac.c | 4 ++-- plugins/gme/cgme.c | 4 ++-- plugins/gtkui/gtkui.c | 4 ++-- plugins/hotkeys/hotkeys.c | 2 ++ plugins/lastfm/lastfm.c | 4 ++-- plugins/mms/mmsplug.c | 4 ++-- plugins/mpgmad/mpgmad.c | 4 ++-- plugins/musepack/musepack.c | 4 ++-- plugins/nullout/nullout.c | 4 ++-- plugins/oss/oss.c | 4 ++-- plugins/shellexec/shellexec.c | 2 ++ plugins/shn/shn.c | 4 ++-- plugins/sid/plugin.c | 4 ++-- plugins/sndfile/sndfile.c | 4 ++-- plugins/supereq/supereq.c | 2 ++ plugins/tta/ttaplug.c | 4 ++-- plugins/vfs_curl/vfs_curl.c | 4 ++-- plugins/vorbis/vorbis.c | 4 ++-- plugins/vtx/vtx.c | 4 ++-- plugins/wavpack/wavpack.c | 4 ++-- plugins/wildmidi/wildmidiplug.c | 4 ++-- portable_build.sh | 2 +- portable_package.sh | 41 ++++++++++++++++++++++++++++++++++++++++- 33 files changed, 103 insertions(+), 56 deletions(-) (limited to 'plugins/mpgmad/mpgmad.c') diff --git a/plugins/aac/aac.c b/plugins/aac/aac.c index f7925b82..25143849 100644 --- a/plugins/aac/aac.c +++ b/plugins/aac/aac.c @@ -1123,8 +1123,8 @@ static const char *filetypes[] = { "RAW AAC", "MP4 AAC", NULL }; // define plugin interface static DB_decoder_t plugin = { DB_PLUGIN_SET_API_VERSION - .plugin.version_major = 0, - .plugin.version_minor = 1, + .plugin.version_major = 1, + .plugin.version_minor = 0, .plugin.type = DB_PLUGIN_DECODER, .plugin.id = "aac", .plugin.name = "AAC decoder based on FAAD2", diff --git a/plugins/adplug/plugin.c b/plugins/adplug/plugin.c index c4e8e04c..80acc38d 100644 --- a/plugins/adplug/plugin.c +++ b/plugins/adplug/plugin.c @@ -47,8 +47,8 @@ adplug_stop (void); // define plugin interface DB_decoder_t adplug_plugin = { DB_PLUGIN_SET_API_VERSION - .plugin.version_major = 0, - .plugin.version_minor = 1, + .plugin.version_major = 1, + .plugin.version_minor = 0, .plugin.type = DB_PLUGIN_DECODER, .plugin.id = "adplug", .plugin.name = "Adplug player", diff --git a/plugins/alsa/alsa.c b/plugins/alsa/alsa.c index a9cfd0de..e6d04032 100644 --- a/plugins/alsa/alsa.c +++ b/plugins/alsa/alsa.c @@ -668,8 +668,8 @@ static const char settings_dlg[] = // define plugin interface static DB_output_t plugin = { DB_PLUGIN_SET_API_VERSION - .plugin.version_major = 0, - .plugin.version_minor = 1, + .plugin.version_major = 1, + .plugin.version_minor = 0, .plugin.nostop = 1, .plugin.type = DB_PLUGIN_OUTPUT, .plugin.name = "ALSA output plugin", diff --git a/plugins/ao/plugin.c b/plugins/ao/plugin.c index 2e29c4e0..f54a0417 100644 --- a/plugins/ao/plugin.c +++ b/plugins/ao/plugin.c @@ -336,8 +336,8 @@ aoplug_stop (void) { static DB_decoder_t plugin = { DB_PLUGIN_SET_API_VERSION - .plugin.version_major = 0, - .plugin.version_minor = 1, + .plugin.version_major = 1, + .plugin.version_minor = 0, .plugin.type = DB_PLUGIN_DECODER, .plugin.id = "psf", .plugin.name = "Audio Overload plugin", diff --git a/plugins/artwork/artwork.c b/plugins/artwork/artwork.c index 469ec8bb..6786b27a 100644 --- a/plugins/artwork/artwork.c +++ b/plugins/artwork/artwork.c @@ -736,6 +736,8 @@ static const char settings_dlg[] = static DB_artwork_plugin_t plugin = { .plugin.plugin.api_vmajor = DB_API_VERSION_MAJOR, .plugin.plugin.api_vminor = DB_API_VERSION_MINOR, + .plugin.plugin.version_major = 1, + .plugin.plugin.version_minor = 0, .plugin.plugin.type = DB_PLUGIN_MISC, .plugin.plugin.id = "cover_loader", .plugin.plugin.name = "Album Artwork", diff --git a/plugins/cdda/cdda.c b/plugins/cdda/cdda.c index 2ed54b51..8317bad4 100644 --- a/plugins/cdda/cdda.c +++ b/plugins/cdda/cdda.c @@ -581,8 +581,8 @@ static const char settings_dlg[] = // define plugin interface static DB_decoder_t plugin = { DB_PLUGIN_SET_API_VERSION - .plugin.version_major = 0, - .plugin.version_minor = 1, + .plugin.version_major = 1, + .plugin.version_minor = 0, .plugin.type = DB_PLUGIN_DECODER, .plugin.id = "cda", .plugin.name = "Audio CD player", diff --git a/plugins/dca/dcaplug.c b/plugins/dca/dcaplug.c index 9d7f251f..bcd782a1 100644 --- a/plugins/dca/dcaplug.c +++ b/plugins/dca/dcaplug.c @@ -644,8 +644,8 @@ dts_stop (void) { // define plugin interface static DB_decoder_t plugin = { DB_PLUGIN_SET_API_VERSION - .plugin.version_major = 0, - .plugin.version_minor = 1, + .plugin.version_major = 1, + .plugin.version_minor = 0, .plugin.type = DB_PLUGIN_DECODER, .plugin.id = "dts", .plugin.name = "dts decoder", diff --git a/plugins/dumb/cdumb.c b/plugins/dumb/cdumb.c index b8189eeb..b3f6bb2a 100644 --- a/plugins/dumb/cdumb.c +++ b/plugins/dumb/cdumb.c @@ -815,8 +815,8 @@ static const char settings_dlg[] = // define plugin interface static DB_decoder_t plugin = { DB_PLUGIN_SET_API_VERSION - .plugin.version_major = 0, - .plugin.version_minor = 1, + .plugin.version_major = 1, + .plugin.version_minor = 0, .plugin.type = DB_PLUGIN_DECODER, .plugin.id = "stddumb", .plugin.name = "DUMB module player", diff --git a/plugins/ffap/ffap.c b/plugins/ffap/ffap.c index deaa06dc..c65e4fc9 100644 --- a/plugins/ffap/ffap.c +++ b/plugins/ffap/ffap.c @@ -1899,8 +1899,8 @@ static const char *filetypes[] = { "APE", NULL }; // define plugin interface static DB_decoder_t plugin = { DB_PLUGIN_SET_API_VERSION - .plugin.version_major = 0, - .plugin.version_minor = 1, + .plugin.version_major = 1, + .plugin.version_minor = 0, .plugin.type = DB_PLUGIN_DECODER, .plugin.id = "ffap", .plugin.name = "Monkey's Audio (APE) decoder", diff --git a/plugins/ffmpeg/ffmpeg.c b/plugins/ffmpeg/ffmpeg.c index f27e403b..3433889c 100644 --- a/plugins/ffmpeg/ffmpeg.c +++ b/plugins/ffmpeg/ffmpeg.c @@ -714,8 +714,8 @@ ffmpeg_read_metadata (DB_playItem_t *it) { // define plugin interface static DB_decoder_t plugin = { DB_PLUGIN_SET_API_VERSION - .plugin.version_major = 0, - .plugin.version_minor = 1, + .plugin.version_major = 1, + .plugin.version_minor = 0, .plugin.type = DB_PLUGIN_DECODER, .plugin.id = "ffmpeg", .plugin.name = "FFMPEG audio player", diff --git a/plugins/flac/flac.c b/plugins/flac/flac.c index 00cdf598..1de1f443 100644 --- a/plugins/flac/flac.c +++ b/plugins/flac/flac.c @@ -837,8 +837,8 @@ static const char *filetypes[] = { "FLAC", "OggFLAC", NULL }; // define plugin interface static DB_decoder_t plugin = { DB_PLUGIN_SET_API_VERSION - .plugin.version_major = 0, - .plugin.version_minor = 1, + .plugin.version_major = 1, + .plugin.version_minor = 0, .plugin.type = DB_PLUGIN_DECODER, .plugin.id = "stdflac", .plugin.name = "FLAC decoder", diff --git a/plugins/gme/cgme.c b/plugins/gme/cgme.c index 27880d3f..1d4bdaed 100644 --- a/plugins/gme/cgme.c +++ b/plugins/gme/cgme.c @@ -253,8 +253,8 @@ static const char settings_dlg[] = // define plugin interface static DB_decoder_t plugin = { DB_PLUGIN_SET_API_VERSION - .plugin.version_major = 0, - .plugin.version_minor = 1, + .plugin.version_major = 1, + .plugin.version_minor = 0, .plugin.type = DB_PLUGIN_DECODER, .plugin.id = "stdgme", .plugin.name = "Game_Music_Emu decoder", diff --git a/plugins/gtkui/gtkui.c b/plugins/gtkui/gtkui.c index 246dea63..f468f0c5 100644 --- a/plugins/gtkui/gtkui.c +++ b/plugins/gtkui/gtkui.c @@ -1214,8 +1214,8 @@ static const char settings_dlg[] = // define plugin interface static DB_gui_t plugin = { DB_PLUGIN_SET_API_VERSION - .plugin.version_major = 0, - .plugin.version_minor = 1, + .plugin.version_major = 1, + .plugin.version_minor = 0, .plugin.nostop = 1, .plugin.type = DB_PLUGIN_MISC, .plugin.name = "Standard GTK2 user interface", diff --git a/plugins/hotkeys/hotkeys.c b/plugins/hotkeys/hotkeys.c index 2be24387..906fb74c 100644 --- a/plugins/hotkeys/hotkeys.c +++ b/plugins/hotkeys/hotkeys.c @@ -693,6 +693,8 @@ hotkeys_get_actions (DB_playItem_t *it) static DB_hotkeys_plugin_t plugin = { .misc.plugin.api_vmajor = DB_API_VERSION_MAJOR, .misc.plugin.api_vminor = DB_API_VERSION_MINOR, + .misc.plugin.version_major = 1, + .misc.plugin.version_minor = 0, .misc.plugin.type = DB_PLUGIN_MISC, .misc.plugin.id = "hotkeys", .misc.plugin.name = "Global hotkeys support", diff --git a/plugins/lastfm/lastfm.c b/plugins/lastfm/lastfm.c index 4a234e8f..5ebe1745 100644 --- a/plugins/lastfm/lastfm.c +++ b/plugins/lastfm/lastfm.c @@ -902,8 +902,8 @@ static const char settings_dlg[] = // define plugin interface static DB_misc_t plugin = { DB_PLUGIN_SET_API_VERSION - .plugin.version_major = 0, - .plugin.version_minor = 1, + .plugin.version_major = 1, + .plugin.version_minor = 0, .plugin.type = DB_PLUGIN_MISC, .plugin.name = "last.fm scrobbler", .plugin.descr = "sends played songs information to your last.fm account", diff --git a/plugins/mms/mmsplug.c b/plugins/mms/mmsplug.c index 4ad57832..5f484273 100644 --- a/plugins/mms/mmsplug.c +++ b/plugins/mms/mmsplug.c @@ -110,8 +110,8 @@ static const char *scheme_names[] = { "mms://", "mmsh://", NULL }; static DB_vfs_t plugin = { DB_PLUGIN_SET_API_VERSION - .plugin.version_major = 0, - .plugin.version_minor = 1, + .plugin.version_major = 1, + .plugin.version_minor = 0, .plugin.type = DB_PLUGIN_VFS, .plugin.name = "mms vfs", .plugin.descr = "MMS streaming plugin based on libmms", diff --git a/plugins/mpgmad/mpgmad.c b/plugins/mpgmad/mpgmad.c index 13544238..03ddbc91 100644 --- a/plugins/mpgmad/mpgmad.c +++ b/plugins/mpgmad/mpgmad.c @@ -1234,8 +1234,8 @@ static const char *exts[] = { // define plugin interface static DB_decoder_t plugin = { DB_PLUGIN_SET_API_VERSION - .plugin.version_major = 0, - .plugin.version_minor = 1, + .plugin.version_major = 1, + .plugin.version_minor = 0, .plugin.type = DB_PLUGIN_DECODER, .plugin.id = "stdmpg", .plugin.name = "MPEG decoder", diff --git a/plugins/musepack/musepack.c b/plugins/musepack/musepack.c index 69d18027..b89126f5 100644 --- a/plugins/musepack/musepack.c +++ b/plugins/musepack/musepack.c @@ -512,8 +512,8 @@ static const char *filetypes[] = { "MusePack", NULL }; // define plugin interface static DB_decoder_t plugin = { DB_PLUGIN_SET_API_VERSION - .plugin.version_major = 0, - .plugin.version_minor = 1, + .plugin.version_major = 1, + .plugin.version_minor = 0, .plugin.type = DB_PLUGIN_DECODER, .plugin.id = "musepack", .plugin.name = "MusePack decoder", diff --git a/plugins/nullout/nullout.c b/plugins/nullout/nullout.c index 8720de6d..9df5d9d5 100644 --- a/plugins/nullout/nullout.c +++ b/plugins/nullout/nullout.c @@ -220,8 +220,8 @@ nullout_load (DB_functions_t *api) { // define plugin interface static DB_output_t plugin = { DB_PLUGIN_SET_API_VERSION - .plugin.version_major = 0, - .plugin.version_minor = 1, + .plugin.version_major = 1, + .plugin.version_minor = 0, .plugin.nostop = 1, .plugin.type = DB_PLUGIN_OUTPUT, .plugin.name = "null output plugin", diff --git a/plugins/oss/oss.c b/plugins/oss/oss.c index 52c417fa..15ed7fb2 100644 --- a/plugins/oss/oss.c +++ b/plugins/oss/oss.c @@ -297,8 +297,8 @@ oss_load (DB_functions_t *api) { // define plugin interface static DB_output_t plugin = { DB_PLUGIN_SET_API_VERSION - .plugin.version_major = 0, - .plugin.version_minor = 1, + .plugin.version_major = 1, + .plugin.version_minor = 0, .plugin.nostop = 0, .plugin.type = DB_PLUGIN_OUTPUT, .plugin.id = "oss", diff --git a/plugins/shellexec/shellexec.c b/plugins/shellexec/shellexec.c index e8298cab..03b3dfc4 100644 --- a/plugins/shellexec/shellexec.c +++ b/plugins/shellexec/shellexec.c @@ -200,6 +200,8 @@ shx_start () static DB_misc_t plugin = { .plugin.api_vmajor = DB_API_VERSION_MAJOR, .plugin.api_vminor = DB_API_VERSION_MINOR, + .plugin.version_major = 1, + .plugin.version_minor = 0, .plugin.type = DB_PLUGIN_MISC, .plugin.id = "shellexec", .plugin.name = "Shell commands", diff --git a/plugins/shn/shn.c b/plugins/shn/shn.c index 1d44f6e8..28fb8bd7 100644 --- a/plugins/shn/shn.c +++ b/plugins/shn/shn.c @@ -1792,8 +1792,8 @@ static const char settings_dlg[] = // define plugin interface static DB_decoder_t plugin = { DB_PLUGIN_SET_API_VERSION - .plugin.version_major = 0, - .plugin.version_minor = 1, + .plugin.version_major = 1, + .plugin.version_minor = 0, .plugin.type = DB_PLUGIN_DECODER, .plugin.id = "shn", .plugin.name = "SHN player", diff --git a/plugins/sid/plugin.c b/plugins/sid/plugin.c index 9a2e9a27..f2df0c62 100644 --- a/plugins/sid/plugin.c +++ b/plugins/sid/plugin.c @@ -31,8 +31,8 @@ static const char settings_dlg[] = DB_decoder_t sid_plugin = { DB_PLUGIN_SET_API_VERSION .plugin.type = DB_PLUGIN_DECODER, - .plugin.version_major = 0, - .plugin.version_minor = 1, + .plugin.version_major = 1, + .plugin.version_minor = 0, .plugin.name = "SID decoder", .plugin.descr = "SID player based on libsidplay2", .plugin.author = "Alexey Yakovenko", diff --git a/plugins/sndfile/sndfile.c b/plugins/sndfile/sndfile.c index ab1d1ee9..f19083ba 100644 --- a/plugins/sndfile/sndfile.c +++ b/plugins/sndfile/sndfile.c @@ -312,8 +312,8 @@ static const char *filetypes[] = { "WAV", NULL }; // define plugin interface static DB_decoder_t plugin = { DB_PLUGIN_SET_API_VERSION - .plugin.version_major = 0, - .plugin.version_minor = 1, + .plugin.version_major = 1, + .plugin.version_minor = 0, .plugin.type = DB_PLUGIN_DECODER, .plugin.id = "sndfile", .plugin.name = "pcm player", diff --git a/plugins/supereq/supereq.c b/plugins/supereq/supereq.c index af4000fd..577af84a 100644 --- a/plugins/supereq/supereq.c +++ b/plugins/supereq/supereq.c @@ -212,6 +212,8 @@ supereq_enabled (void) { static DB_supereq_dsp_t plugin = { .dsp.plugin.api_vmajor = DB_API_VERSION_MAJOR, .dsp.plugin.api_vminor = DB_API_VERSION_MINOR, + .dsp.plugin.version_major = 1, + .dsp.plugin.version_minor = 0, .dsp.plugin.type = DB_PLUGIN_DSP, .dsp.plugin.id = "supereq", .dsp.plugin.name = "SuperEQ", diff --git a/plugins/tta/ttaplug.c b/plugins/tta/ttaplug.c index 196df859..948969e1 100644 --- a/plugins/tta/ttaplug.c +++ b/plugins/tta/ttaplug.c @@ -313,8 +313,8 @@ static const char *filetypes[] = { "TTA", NULL }; // define plugin interface static DB_decoder_t plugin = { DB_PLUGIN_SET_API_VERSION - .plugin.version_major = 0, - .plugin.version_minor = 1, + .plugin.version_major = 1, + .plugin.version_minor = 0, .plugin.type = DB_PLUGIN_DECODER, .plugin.id = "tta", .plugin.name = "tta decoder", diff --git a/plugins/vfs_curl/vfs_curl.c b/plugins/vfs_curl/vfs_curl.c index 048f964e..9f7a6fc0 100644 --- a/plugins/vfs_curl/vfs_curl.c +++ b/plugins/vfs_curl/vfs_curl.c @@ -896,8 +896,8 @@ static const char *scheme_names[] = { "http://", "ftp://", NULL }; // standard stdio vfs static DB_vfs_t plugin = { DB_PLUGIN_SET_API_VERSION - .plugin.version_major = 0, - .plugin.version_minor = 1, + .plugin.version_major = 1, + .plugin.version_minor = 0, .plugin.type = DB_PLUGIN_VFS, .plugin.id = "vfs_curl", .plugin.name = "cURL vfs", diff --git a/plugins/vorbis/vorbis.c b/plugins/vorbis/vorbis.c index fc0afe9e..91f933e5 100644 --- a/plugins/vorbis/vorbis.c +++ b/plugins/vorbis/vorbis.c @@ -694,8 +694,8 @@ static const char *filetypes[] = { "OggVorbis", NULL }; // define plugin interface static DB_decoder_t plugin = { DB_PLUGIN_SET_API_VERSION - .plugin.version_major = 0, - .plugin.version_minor = 1, + .plugin.version_major = 1, + .plugin.version_minor = 0, .plugin.type = DB_PLUGIN_DECODER, .plugin.id = "stdogg", .plugin.name = "OggVorbis decoder", diff --git a/plugins/vtx/vtx.c b/plugins/vtx/vtx.c index 3e4ed6b9..2267f706 100644 --- a/plugins/vtx/vtx.c +++ b/plugins/vtx/vtx.c @@ -293,8 +293,8 @@ vtx_stop (void) { // define plugin interface static DB_decoder_t plugin = { DB_PLUGIN_SET_API_VERSION - .plugin.version_major = 0, - .plugin.version_minor = 1, + .plugin.version_major = 1, + .plugin.version_minor = 0, .plugin.type = DB_PLUGIN_DECODER, .plugin.id = "vtx", .plugin.name = "VTX decoder", diff --git a/plugins/wavpack/wavpack.c b/plugins/wavpack/wavpack.c index e1eb4787..cb3300ab 100644 --- a/plugins/wavpack/wavpack.c +++ b/plugins/wavpack/wavpack.c @@ -442,8 +442,8 @@ static const char *filetypes[] = { "wv", NULL }; // define plugin interface static DB_decoder_t plugin = { DB_PLUGIN_SET_API_VERSION - .plugin.version_major = 0, - .plugin.version_minor = 1, + .plugin.version_major = 1, + .plugin.version_minor = 0, .plugin.type = DB_PLUGIN_DECODER, .plugin.id = "wv", .plugin.name = "WavPack decoder", diff --git a/plugins/wildmidi/wildmidiplug.c b/plugins/wildmidi/wildmidiplug.c index e9c976b3..ccb0978a 100644 --- a/plugins/wildmidi/wildmidiplug.c +++ b/plugins/wildmidi/wildmidiplug.c @@ -186,8 +186,8 @@ static const char settings_dlg[] = DB_decoder_t wmidi_plugin = { DB_PLUGIN_SET_API_VERSION .plugin.type = DB_PLUGIN_DECODER, - .plugin.version_major = 0, - .plugin.version_minor = 1, + .plugin.version_major = 1, + .plugin.version_minor = 0, .plugin.name = "WildMidi player", .plugin.descr = "MIDI player based on WildMidi library", .plugin.author = "Alexey Yakovenko", diff --git a/portable_build.sh b/portable_build.sh index f14946a1..0d4716e2 100755 --- a/portable_build.sh +++ b/portable_build.sh @@ -4,7 +4,7 @@ VERSION=`cat PORTABLE_VERSION | perl -ne 'chomp and print'` CC=$HOME/bin/autopackage/apbuild/apgcc CXX=$HOME/bin/autopackage/apbuild/apgcc ./configure --enable-portable --disable-pulse --enable-maintainer-mode --disable-nls sed -i 's/-lstdc++ -lm -lgcc_s -lc -lgcc_s/-lm -lc/g' libtool -#make clean +make clean make -j9 #./portable_postbuild.sh diff --git a/portable_package.sh b/portable_package.sh index 41cb17e8..f7573a54 100755 --- a/portable_package.sh +++ b/portable_package.sh @@ -10,7 +10,10 @@ PLUGDIR=$SRCDIR/plugins DOCDIR=$SRCDIR/doc PIXMAPDIR=$SRCDIR/pixmaps -tar jcvf deadbeef-$VERSION-portable-build$BUILD.tar.bz2\ +mkdir -p portable_out 2>/dev/null +rm portable_out/* 2>/dev/null + +tar jcvf portable_out/deadbeef-$VERSION-portable-build$BUILD.tar.bz2\ $SRCDIR/deadbeef\ $SRCDIR/deadbeef.png\ $DOCDIR\ @@ -33,3 +36,39 @@ tar jcvf deadbeef-$VERSION-portable-build$BUILD.tar.bz2\ $PLUGDIR/tta.so\ $PIXMAPDIR + +# plugins +cd $PLUGDIR + +plugtable=../../../deadbeef-web/web/plugins-autogen.mkd +echo "" >$plugtable + +for i in *.so ; do + plugname=`basename $i .so` + version="" + for fn in ../../plugins/$plugname/*.c* ; do + VMAJOR=`cat $fn 2>/dev/null | grep -m 1 version_major | perl -pe 's/.*version_major[^\d]+([\d]+).*$/$1/' | perl -ne 'chomp and print'` + VMINOR=`cat $fn 2>/dev/null | grep -m 1 version_minor | perl -pe 's/.*version_minor[^\d]+([\d]+).*$/$1/' | perl -ne 'chomp and print'` + author=`cat $fn 2>/dev/null | grep -m 1 '\.author = ' | perl -pe 's/.*author = "(.*)".*/$1/' | perl -ne 'chomp and print'` + email=`cat $fn 2>/dev/null | grep -m 1 '\.email = ' | perl -pe 's/.*\.email = "(.*)".*/$1/' | perl -ne 'chomp and print'` + descr=`cat $fn 2>/dev/null | grep -m 1 '\.descr = ' | perl -pe 's/.*\.descr = "(.*)".*/$1/' | perl -ne 'chomp and print'` + if [[ -n $VMAJOR ]] && [[ -n $VMINOR ]]; then + version="$VMAJOR.$VMINOR" + break + fi + done + if [[ -n $version ]]; then + echo "$plugname version $VMAJOR.$VMINOR" + else + echo "$plugname version not found" + fi + fname=../../portable_out/deadbeef-$VERSION-portable-$plugname-$version.tar.bz2 + tar jcvf $fname $i + fsize=$(stat -c%s "$fname") + + # add some markdown + echo "" >>$plugtable +done +echo "
NameVersionSizeFor DeadbeefDescriptionAuthor(s)
$plugname$version$fsize$VERSION$descr$author ($email)
" >>$plugtable +cd ../../ + -- cgit v1.2.3