diff options
author | Suren A. Chilingaryan <csa@suren.me> | 2019-09-02 05:23:45 +0200 |
---|---|---|
committer | Suren A. Chilingaryan <csa@suren.me> | 2019-09-02 05:23:45 +0200 |
commit | 576b6208d6defe240bfa2477d6dd19f1ed83bfaf (patch) | |
tree | 7d54883f16cccc4cbd414398d7fec3c437b36b49 /media-plugins/xmms-wma/files | |
parent | fdd6b67a78a966f6a2131de8fe0e539316511083 (diff) | |
download | darklin4-576b6208d6defe240bfa2477d6dd19f1ed83bfaf.tar.gz darklin4-576b6208d6defe240bfa2477d6dd19f1ed83bfaf.tar.bz2 darklin4-576b6208d6defe240bfa2477d6dd19f1ed83bfaf.tar.xz darklin4-576b6208d6defe240bfa2477d6dd19f1ed83bfaf.zip |
Cleaned most of outdated stuff
Diffstat (limited to 'media-plugins/xmms-wma/files')
5 files changed, 0 insertions, 943 deletions
diff --git a/media-plugins/xmms-wma/files/xmms-wma-ds-ffmpeg.patch b/media-plugins/xmms-wma/files/xmms-wma-ds-ffmpeg.patch deleted file mode 100644 index 3ad7ced..0000000 --- a/media-plugins/xmms-wma/files/xmms-wma-ds-ffmpeg.patch +++ /dev/null @@ -1,193 +0,0 @@ -diff -dPNur xmms-wma-1.0.5/Makefile xmms-wma-1.0.5-new/Makefile ---- xmms-wma-1.0.5/Makefile 2004-03-03 15:47:58.000000000 +0100 -+++ xmms-wma-1.0.5-new/Makefile 2007-04-21 22:51:51.000000000 +0200 -@@ -11,7 +11,7 @@ - export DEPS := $(SOURCES:%.c=$(DEPDIR)/%.d) - - all: -- @cd ffmpeg-strip-wma; make; cd .. -+ #@cd ffmpeg-strip-wma; make; cd .. - @$(MAKE) --no-print-directory -f Makefile.inc - @strip $(PLUGIN_FILE) - @echo "The plug-in has been compiled. Run one of the following:" -@@ -40,5 +40,5 @@ - @echo "The plug-in has been uninstalled." - - clean: -- cd ffmpeg-strip-wma; make clean; cd .. -+ #cd ffmpeg-strip-wma; make clean; cd .. - rm -f $(OBJECTS) $(DEPS) -diff -dPNur xmms-wma-1.0.5/Makefile.inc xmms-wma-1.0.5-new/Makefile.inc ---- xmms-wma-1.0.5/Makefile.inc 2005-09-05 14:48:20.000000000 +0200 -+++ xmms-wma-1.0.5-new/Makefile.inc 2007-04-21 22:51:51.000000000 +0200 -@@ -1,16 +1,18 @@ - CC := gcc --CFLAGS := -O2 -ffast-math -fomit-frame-pointer -fPIC --#CFLAGS := -Wall -g -O3 --CFLAGS += -DHAVE_AV_CONFIG_H -I.. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE --CFLAGS += -I ffmpeg-strip-wma --CFLAGS += `xmms-config --cflags` --LIBS := `xmms-config --libs` -L ffmpeg-strip-wma -lffwma -+MYCFLAGS := $(CFLAGS) -fPIC -+#MYCFLAGS := -Wall -g -O3 -+MYCFLAGS += -DHAVE_AV_CONFIG_H -I.. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -fPIC -+#MYCFLAGS += -I ffmpeg-strip-wma -+MYCFLAGS += `xmms-config --cflags` -+MYCFLAGS += -I/usr/include/ffmpeg -+#LIBS := `xmms-config --libs` -L ffmpeg-strip-wma -lffwma -+LIBS := `xmms-config --libs` -lavcodec -lavformat - - $(PLUGIN_FILE): $(OBJECTS) - $(CC) -o $@ $^ $(LIBS) -shared - - $(OBJDIR)/%.o: %.c -- $(CC) -c -o $@ $(CFLAGS) $< -+ $(CC) -c -o $@ $(MYCFLAGS) $< - - $(DEPDIR)/%.d: %.c - $(CC) -MM $(CFLAGS) $< | sed "s/^$*\.o:/$(OBJDIR)\/$*\.o $(DEPDIR)\/$*\.d:/" > $@ -diff -dPNur xmms-wma-1.0.5/xmms-wma.c xmms-wma-1.0.5-new/xmms-wma.c ---- xmms-wma-1.0.5/xmms-wma.c 2005-09-05 22:19:00.000000000 +0200 -+++ xmms-wma-1.0.5-new/xmms-wma.c 2007-04-22 00:47:20.000000000 +0200 -@@ -42,8 +42,9 @@ - #undef HAVE_AV_CONFIG_H - #endif - --#include "avcodec.h" --#include "avformat.h" -+#include "ffmpeg/avcodec.h" -+#include "ffmpeg/avformat.h" -+#include "ffmpeg/fifo.h" - #include "iir.h" - - #define ABOUT_TXT "Copyright (C) 2004,2005 Mokrushin I.V. aka McMCC (mcmcc@mail.ru).\n \ -@@ -190,8 +191,6 @@ - - static void wma_init(void) - { -- avcodec_init(); -- avcodec_register_all(); - av_register_all(); - init_iir(); - } -@@ -200,9 +199,14 @@ - { - gchar *ext; - ext = strrchr(filename, '.'); -- if(ext) -+ if(ext) { - if(!strcasecmp(ext, ".wma")) - return 1; -+ if(!strcasecmp(ext, ".m4a")) -+ return 1; -+ if(!strcasecmp(ext, ".aac")) -+ return 1; -+ } - return 0; - } - -@@ -337,20 +341,21 @@ - return; - #endif - -- av_find_stream_info(in); -- (*len_real) = get_song_time(in); -- (*title_real) = get_song_title(in, filename); -+ if (!av_find_stream_info(in)) { -+ (*len_real) = get_song_time(in); -+ (*title_real) = get_song_title(in, filename); -+ } - av_close_input_file(in); - } - - static void wma_playbuff(int out_size) - { -- FifoBuffer f; -+ AVFifoBuffer f; - int sst_buff; - -- fifo_init(&f, out_size*2); -- fifo_write(&f, wma_outbuf, out_size, &f.wptr); -- while(!fifo_read(&f, wma_s_outbuf, wma_st_buff, &f.rptr) && wma_decode) -+ av_fifo_init(&f, out_size*2); -+ av_fifo_write(&f, wma_outbuf, out_size); -+ while(!av_fifo_read(&f, wma_s_outbuf, wma_st_buff) && wma_decode) - { - if(wma_eq_on) - sst_buff = iir((gpointer)&wma_s_outbuf, wma_st_buff); -@@ -364,7 +369,7 @@ - wma_ip.output->write_audio((short *)wma_s_outbuf, sst_buff); - memset(wma_s_outbuf, 0, sst_buff); - } -- fifo_free(&f); -+ av_fifo_free(&f); - return; - } - -@@ -373,18 +378,29 @@ - uint8_t *inbuf_ptr; - int out_size, size, len; - AVPacket pkt; -+ int64_t seek_target; - - pthread_mutex_lock(&wma_mutex); - while(wma_decode){ -- - if(wma_seekpos != -1) - { -- av_seek_frame(ic, wma_idx, wma_seekpos * 1000000LL); -+ if (wma_idx>=0) { -+ seek_target = av_rescale_q(wma_seekpos * 1000000LL, AV_TIME_BASE_Q, ic->streams[wma_idx]->time_base); -+ } else { -+ seek_target = wma_seekpos * 1000000LL; -+ } -+ av_seek_frame(ic, wma_idx, seek_target, AVSEEK_FLAG_BACKWARD); - wma_ip.output->flush(wma_seekpos * 1000); - wma_seekpos = -1; - } - -- if(av_read_frame(ic, &pkt) < 0) break; -+ if(av_read_frame(ic, &pkt) < 0) { -+ /*if (url_ferror(&ic->pb) == 0) { -+ usleep(100000); -+ continue; -+ }*/ -+ break; -+ } - - size = pkt.size; - inbuf_ptr = pkt.data; -@@ -427,10 +443,13 @@ - #endif - - for(wma_idx = 0; wma_idx < ic->nb_streams; wma_idx++) { -- c = &ic->streams[wma_idx]->codec; -+ c = ic->streams[wma_idx]->codec; - if(c->codec_type == CODEC_TYPE_AUDIO) break; - } - -+ if(!c || c->codec_type != CODEC_TYPE_AUDIO) -+ return; -+ - av_find_stream_info(ic); - - codec = avcodec_find_decoder(c->codec_id); -@@ -459,7 +478,8 @@ - { - wma_decode = 0; - if(wma_pause) wma_do_pause(0); -- pthread_join(wma_decode_thread, NULL); -+ if(wma_decode_thread) -+ pthread_join(wma_decode_thread, NULL); - wma_ip.output->close_audio(); - } - -@@ -482,7 +502,7 @@ - #endif - - for(i = 0; i < in->nb_streams; i++) { -- s = &in->streams[i]->codec; -+ s = in->streams[i]->codec; - if(s->codec_type == CODEC_TYPE_AUDIO) break; - } - diff --git a/media-plugins/xmms-wma/files/xmms-wma-ds-ffmpeg0.10.patch b/media-plugins/xmms-wma/files/xmms-wma-ds-ffmpeg0.10.patch deleted file mode 100644 index 922eb9a..0000000 --- a/media-plugins/xmms-wma/files/xmms-wma-ds-ffmpeg0.10.patch +++ /dev/null @@ -1,411 +0,0 @@ -diff -dPNur xmms-wma-1.0.5/Makefile xmms-wma-1.0.5-ds/Makefile ---- xmms-wma-1.0.5/Makefile 2004-03-03 15:47:58.000000000 +0100 -+++ xmms-wma-1.0.5-ds/Makefile 2012-11-17 08:49:25.000000000 +0100 -@@ -11,7 +11,7 @@ - export DEPS := $(SOURCES:%.c=$(DEPDIR)/%.d) - - all: -- @cd ffmpeg-strip-wma; make; cd .. -+ #@cd ffmpeg-strip-wma; make; cd .. - @$(MAKE) --no-print-directory -f Makefile.inc - @strip $(PLUGIN_FILE) - @echo "The plug-in has been compiled. Run one of the following:" -@@ -40,5 +40,5 @@ - @echo "The plug-in has been uninstalled." - - clean: -- cd ffmpeg-strip-wma; make clean; cd .. -+ #cd ffmpeg-strip-wma; make clean; cd .. - rm -f $(OBJECTS) $(DEPS) -diff -dPNur xmms-wma-1.0.5/Makefile.inc xmms-wma-1.0.5-ds/Makefile.inc ---- xmms-wma-1.0.5/Makefile.inc 2005-09-05 14:48:20.000000000 +0200 -+++ xmms-wma-1.0.5-ds/Makefile.inc 2012-11-17 08:49:25.000000000 +0100 -@@ -1,16 +1,18 @@ - CC := gcc --CFLAGS := -O2 -ffast-math -fomit-frame-pointer -fPIC --#CFLAGS := -Wall -g -O3 --CFLAGS += -DHAVE_AV_CONFIG_H -I.. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE --CFLAGS += -I ffmpeg-strip-wma --CFLAGS += `xmms-config --cflags` --LIBS := `xmms-config --libs` -L ffmpeg-strip-wma -lffwma -+MYCFLAGS := $(CFLAGS) -fPIC -+#MYCFLAGS := -Wall -g -O3 -+MYCFLAGS += -DHAVE_AV_CONFIG_H -I.. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -fPIC -+#MYCFLAGS += -I ffmpeg-strip-wma -+MYCFLAGS += `xmms-config --cflags` -+MYCFLAGS += -I/usr/include/ffmpeg -+#LIBS := `xmms-config --libs` -L ffmpeg-strip-wma -lffwma -+LIBS := `xmms-config --libs` -lavcodec -lavformat - - $(PLUGIN_FILE): $(OBJECTS) - $(CC) -o $@ $^ $(LIBS) -shared - - $(OBJDIR)/%.o: %.c -- $(CC) -c -o $@ $(CFLAGS) $< -+ $(CC) -c -o $@ $(MYCFLAGS) $< - - $(DEPDIR)/%.d: %.c - $(CC) -MM $(CFLAGS) $< | sed "s/^$*\.o:/$(OBJDIR)\/$*\.o $(DEPDIR)\/$*\.d:/" > $@ -diff -dPNur xmms-wma-1.0.5/xmms-wma.c xmms-wma-1.0.5-ds/xmms-wma.c ---- xmms-wma-1.0.5/xmms-wma.c 2005-09-05 22:19:00.000000000 +0200 -+++ xmms-wma-1.0.5-ds/xmms-wma.c 2012-11-17 08:40:11.000000000 +0100 -@@ -36,14 +36,16 @@ - #include <xmms/configfile.h> - #include <xmms/util.h> - #include <xmms/titlestring.h> -+#include <libxmms/rcc.h> - #endif - - #ifdef HAVE_AV_CONFIG_H - #undef HAVE_AV_CONFIG_H - #endif - --#include "avcodec.h" --#include "avformat.h" -+#include "libavcodec/avcodec.h" -+#include "libavformat/avformat.h" -+#include "libavutil/fifo.h" - #include "iir.h" - - #define ABOUT_TXT "Copyright (C) 2004,2005 Mokrushin I.V. aka McMCC (mcmcc@mail.ru).\n \ -@@ -190,8 +192,6 @@ - - static void wma_init(void) - { -- avcodec_init(); -- avcodec_register_all(); - av_register_all(); - init_iir(); - } -@@ -200,9 +200,14 @@ - { - gchar *ext; - ext = strrchr(filename, '.'); -- if(ext) -+ if(ext) { - if(!strcasecmp(ext, ".wma")) - return 1; -+ if(!strcasecmp(ext, ".m4a")) -+ return 1; -+ if(!strcasecmp(ext, ".aac")) -+ return 1; -+ } - return 0; - } - -@@ -262,12 +267,24 @@ - return splitname; - } - --static char* w_getstr(char* str) -+static char* w_getstr(AVFormatContext *in, char* str) - { -- if(str && strlen(str) > 0) return str; -+ AVDictionaryEntry *entry = av_dict_get(in->metadata, str, NULL, 0); -+ if (!entry) return NULL; -+ -+ -+ if(entry && strlen(entry->value) > 0) { -+ return entry->value; -+ } - return NULL; - } - -+static int w_getnum(AVFormatContext *in, char* str) { -+ char *res = w_getstr(in, str); -+ if (res) return atoi(res); -+ return 0; -+} -+ - static gchar *get_song_title(AVFormatContext *in, gchar * filename) - { - gchar *ret = NULL; -@@ -279,17 +296,14 @@ - XMMS_NEW_TITLEINPUT(input); - #endif - -- if((in->title[0] != '\0') || (in->author[0] != '\0') || (in->album[0] != '\0') || -- (in->comment[0] != '\0') || (in->genre[0] != '\0') || (in->year != 0) || (in->track != 0)) -- { -- input->performer = w_getstr(in->author); -- input->album_name = w_getstr(in->album); -- input->track_name = w_getstr(in->title); -- input->year = in->year; -- input->track_number = in->track; -- input->genre = w_getstr(in->genre); -- input->comment = w_getstr(in->comment); -- } -+ input->performer = w_getstr(in, "artist"); -+ input->album_name = w_getstr(in, "album"); -+ input->track_name = w_getstr(in, "title"); -+ input->year = 0;//in->year; -+ input->track_number = w_getnum(in, "track"); -+ input->genre = w_getstr(in, "genre"); -+ input->comment = w_getstr(in, "comment"); -+ - #ifdef BMP - input->file_name = g_path_get_basename(filename); - input->file_path = g_path_get_dirname(filename); -@@ -298,7 +312,7 @@ - input->file_path = filename; - #endif - input->file_ext = extname(filename); -- ret = xmms_get_titlestring(xmms_get_gentitle_format(), input); -+ ret = xmms_charset_get_titlestring(xmms_get_gentitle_format(), input, XMMS_RCC_UTF8); - if(input) g_free(input); - - if(!ret) -@@ -337,21 +351,23 @@ - return; - #endif - -- av_find_stream_info(in); -- (*len_real) = get_song_time(in); -- (*title_real) = get_song_title(in, filename); -+ if (!av_find_stream_info(in)) { -+ (*len_real) = get_song_time(in); -+ (*title_real) = get_song_title(in, filename); -+ } - av_close_input_file(in); - } -- - static void wma_playbuff(int out_size) - { -- FifoBuffer f; -+ AVFifoBuffer *f; - int sst_buff; -- -- fifo_init(&f, out_size*2); -- fifo_write(&f, wma_outbuf, out_size, &f.wptr); -- while(!fifo_read(&f, wma_s_outbuf, wma_st_buff, &f.rptr) && wma_decode) -- { -+ -+ f = av_fifo_alloc(out_size*2); -+ av_fifo_generic_write(f, wma_outbuf, out_size, NULL); -+ -+ while ((av_fifo_size(f) > 0) && wma_decode) { -+ if (av_fifo_generic_read(f, wma_s_outbuf, wma_st_buff, NULL)) break; -+ - if(wma_eq_on) - sst_buff = iir((gpointer)&wma_s_outbuf, wma_st_buff); - else -@@ -364,7 +380,7 @@ - wma_ip.output->write_audio((short *)wma_s_outbuf, sst_buff); - memset(wma_s_outbuf, 0, sst_buff); - } -- fifo_free(&f); -+ av_fifo_free(f); - return; - } - -@@ -373,18 +389,29 @@ - uint8_t *inbuf_ptr; - int out_size, size, len; - AVPacket pkt; -+ int64_t seek_target; - - pthread_mutex_lock(&wma_mutex); - while(wma_decode){ -- - if(wma_seekpos != -1) - { -- av_seek_frame(ic, wma_idx, wma_seekpos * 1000000LL); -+ if (wma_idx>=0) { -+ seek_target = av_rescale_q(wma_seekpos * 1000000LL, AV_TIME_BASE_Q, ic->streams[wma_idx]->time_base); -+ } else { -+ seek_target = wma_seekpos * 1000000LL; -+ } -+ av_seek_frame(ic, wma_idx, seek_target, AVSEEK_FLAG_BACKWARD); - wma_ip.output->flush(wma_seekpos * 1000); - wma_seekpos = -1; - } - -- if(av_read_frame(ic, &pkt) < 0) break; -+ if(av_read_frame(ic, &pkt) < 0) { -+ /*if (url_ferror(&ic->pb) == 0) { -+ usleep(100000); -+ continue; -+ }*/ -+ break; -+ } - - size = pkt.size; - inbuf_ptr = pkt.data; -@@ -392,8 +419,9 @@ - if(size == 0) break; - - while(size > 0){ -- len = avcodec_decode_audio(c, (short *)wma_outbuf, &out_size, -- inbuf_ptr, size); -+ out_size = AVCODEC_MAX_AUDIO_FRAME_SIZE; -+ -+ len = avcodec_decode_audio3(c, (short *)wma_outbuf, &out_size, &pkt); - if(len < 0) break; - - if(out_size <= 0) continue; -@@ -427,10 +455,13 @@ - #endif - - for(wma_idx = 0; wma_idx < ic->nb_streams; wma_idx++) { -- c = &ic->streams[wma_idx]->codec; -- if(c->codec_type == CODEC_TYPE_AUDIO) break; -+ c = ic->streams[wma_idx]->codec; -+ if(c->codec_type == AVMEDIA_TYPE_AUDIO) break; - } - -+ if(!c || c->codec_type != AVMEDIA_TYPE_AUDIO) -+ return; -+ - av_find_stream_info(ic); - - codec = avcodec_find_decoder(c->codec_id); -@@ -459,7 +490,8 @@ - { - wma_decode = 0; - if(wma_pause) wma_do_pause(0); -- pthread_join(wma_decode_thread, NULL); -+ if(wma_decode_thread) -+ pthread_join(wma_decode_thread, NULL); - wma_ip.output->close_audio(); - } - -@@ -468,6 +500,8 @@ - char *title; - char *tmp; - char *message; -+ char *recoded; -+ char *msg; - AVFormatContext *in = NULL; - AVCodecContext *s = NULL; - AVCodec *codec; -@@ -482,8 +516,8 @@ - #endif - - for(i = 0; i < in->nb_streams; i++) { -- s = &in->streams[i]->codec; -- if(s->codec_type == CODEC_TYPE_AUDIO) break; -+ s = in->streams[i]->codec; -+ if(s->codec_type == AVMEDIA_TYPE_AUDIO) break; - } - - av_find_stream_info(in); -@@ -498,6 +532,11 @@ - - strcpy(message, "\n\n\n"); - strcat(message, "File Name: "); -+ recoded = xmms_rcc_recode(XMMS_RCC_FS, XMMS_RCC_OUT, slashkill(filename)); -+ if (recoded) { -+ strcat(message, recoded); -+ free(recoded); -+ } else - strcat(message, slashkill(filename)); - strcat(message, "\n\n"); - strcat(message, "Audio Info:\n"); -@@ -535,56 +574,85 @@ - } - strcat(message, "\n"); - strcat(message, "Text Info:\n"); -- if (in->title[0] != '\0') -+ msg = w_getstr(in, "title"); -+ if (msg) - { - strcat(message, "Title: "); -- strcat(message, in->title); -+ recoded = xmms_rcc_recode(XMMS_RCC_UTF8, XMMS_RCC_OUT, msg); -+ if (recoded) { -+ strcat(message, recoded); -+ free(recoded); -+ } else -+ strcat(message, msg); - strcat(message, "\n"); -- } -- if (in->author[0] != '\0') -+ } -+ msg = w_getstr(in, "artist"); -+ if (msg) - { - strcat(message, "Author: "); -- strcat(message, in->author); -+ recoded = xmms_rcc_recode(XMMS_RCC_UTF8, XMMS_RCC_OUT, msg); -+ if (recoded) { -+ strcat(message, recoded); -+ free(recoded); -+ } else -+ strcat(message, msg); - strcat(message, "\n"); - } -- if (in->album[0] != '\0') -+ msg = w_getstr(in, "album"); -+ if (msg) - { - strcat(message, "Album: "); -- strcat(message, in->album); -+ recoded = xmms_rcc_recode(XMMS_RCC_UTF8, XMMS_RCC_OUT, msg); -+ if (recoded) { -+ strcat(message, recoded); -+ free(recoded); -+ } else -+ strcat(message, msg); - strcat(message, "\n"); - } -- if (in->year != 0) -+ msg = w_getstr(in, "date"); -+ if (msg) - { -- strcat(message, "Year: "); -- sprintf(tmp, "%d", in->year); -- strcat(message, tmp); -- memset(tmp, 0, 256); -+ strcat(message, "Date: "); -+ strcat(message, msg); - strcat(message, "\n"); - } -- if (in->track != 0) -+ msg = w_getstr(in, "track"); -+ if (msg) - { - strcat(message, "Track: "); -- sprintf(tmp, "%d", in->track); -- strcat(message, tmp); -- memset(tmp, 0, 256); -+ strcat(message, msg); - strcat(message, "\n"); - } -- if (in->genre[0] != '\0') -+ msg = w_getstr(in, "genre"); -+ if (msg) - { - strcat(message, "Genre: "); -- strcat(message, in->genre); -+ strcat(message, msg); - strcat(message, "\n"); - } -- if (in->comment[0] != '\0') -+ msg = w_getstr(in, "comment"); -+ if (msg) - { - strcat(message, "Comments: "); -- strcat(message, in->comment); -+ recoded = xmms_rcc_recode(XMMS_RCC_UTF8, XMMS_RCC_OUT, msg); -+ if (recoded) { -+ strcat(message, recoded); -+ free(recoded); -+ } else -+ strcat(message, msg); - strcat(message, "\n"); - } -- if (in->copyright[0] != '\0') -+ msg = w_getstr(in, "copyright"); -+ if (msg) - { - strcat(message, "Copyright: "); -- strcat(message, in->copyright); -+ recoded = xmms_rcc_recode(XMMS_RCC_UTF8, XMMS_RCC_OUT, msg); -+ if (recoded) { -+ strcat(message, recoded); -+ free(recoded); -+ } else -+ strcat(message, msg); - strcat(message, "\n"); - } - strcat(message, "\n\n"); diff --git a/media-plugins/xmms-wma/files/xmms-wma-ds-ffmpeg20081014.patch b/media-plugins/xmms-wma/files/xmms-wma-ds-ffmpeg20081014.patch deleted file mode 100644 index 23c0b1a..0000000 --- a/media-plugins/xmms-wma/files/xmms-wma-ds-ffmpeg20081014.patch +++ /dev/null @@ -1,209 +0,0 @@ -diff -dPNur xmms-wma-1.0.5/Makefile xmms-wma-1.0.5-ds/Makefile ---- xmms-wma-1.0.5/Makefile 2004-03-03 15:47:58.000000000 +0100 -+++ xmms-wma-1.0.5-ds/Makefile 2008-11-27 01:33:03.000000000 +0100 -@@ -11,7 +11,7 @@ - export DEPS := $(SOURCES:%.c=$(DEPDIR)/%.d) - - all: -- @cd ffmpeg-strip-wma; make; cd .. -+ #@cd ffmpeg-strip-wma; make; cd .. - @$(MAKE) --no-print-directory -f Makefile.inc - @strip $(PLUGIN_FILE) - @echo "The plug-in has been compiled. Run one of the following:" -@@ -40,5 +40,5 @@ - @echo "The plug-in has been uninstalled." - - clean: -- cd ffmpeg-strip-wma; make clean; cd .. -+ #cd ffmpeg-strip-wma; make clean; cd .. - rm -f $(OBJECTS) $(DEPS) -diff -dPNur xmms-wma-1.0.5/Makefile.inc xmms-wma-1.0.5-ds/Makefile.inc ---- xmms-wma-1.0.5/Makefile.inc 2005-09-05 14:48:20.000000000 +0200 -+++ xmms-wma-1.0.5-ds/Makefile.inc 2008-11-27 01:35:01.000000000 +0100 -@@ -1,16 +1,18 @@ - CC := gcc --CFLAGS := -O2 -ffast-math -fomit-frame-pointer -fPIC --#CFLAGS := -Wall -g -O3 --CFLAGS += -DHAVE_AV_CONFIG_H -I.. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE --CFLAGS += -I ffmpeg-strip-wma --CFLAGS += `xmms-config --cflags` --LIBS := `xmms-config --libs` -L ffmpeg-strip-wma -lffwma -+MYCFLAGS := $(CFLAGS) -fPIC -+#MYCFLAGS := -Wall -g -O3 -+MYCFLAGS += -DHAVE_AV_CONFIG_H -I.. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -fPIC -+#MYCFLAGS += -I ffmpeg-strip-wma -+MYCFLAGS += `xmms-config --cflags` -+MYCFLAGS += -I/usr/include/ffmpeg -+#LIBS := `xmms-config --libs` -L ffmpeg-strip-wma -lffwma -+LIBS := `xmms-config --libs` -lavcodec -lavformat - - $(PLUGIN_FILE): $(OBJECTS) - $(CC) -o $@ $^ $(LIBS) -shared - - $(OBJDIR)/%.o: %.c -- $(CC) -c -o $@ $(CFLAGS) $< -+ $(CC) -c -o $@ $(MYCFLAGS) $< - - $(DEPDIR)/%.d: %.c - $(CC) -MM $(CFLAGS) $< | sed "s/^$*\.o:/$(OBJDIR)\/$*\.o $(DEPDIR)\/$*\.d:/" > $@ -diff -dPNur xmms-wma-1.0.5/xmms-wma.c xmms-wma-1.0.5-ds/xmms-wma.c ---- xmms-wma-1.0.5/xmms-wma.c 2008-11-27 02:58:02.000000000 +0100 -+++ xmms-wma-1.0.5-ds/xmms-wma.c 2008-11-27 02:54:38.000000000 +0100 -@@ -43,8 +43,9 @@ - #undef HAVE_AV_CONFIG_H - #endif - --#include "avcodec.h" --#include "avformat.h" -+#include "libavcodec/avcodec.h" -+#include "libavformat/avformat.h" -+#include "libavutil/fifo.h" - #include "iir.h" - - #define ABOUT_TXT "Copyright (C) 2004,2005 Mokrushin I.V. aka McMCC (mcmcc@mail.ru).\n \ -@@ -191,8 +192,6 @@ - - static void wma_init(void) - { -- avcodec_init(); -- avcodec_register_all(); - av_register_all(); - init_iir(); - } -@@ -201,9 +200,14 @@ - { - gchar *ext; - ext = strrchr(filename, '.'); -- if(ext) -+ if(ext) { - if(!strcasecmp(ext, ".wma")) - return 1; -+ if(!strcasecmp(ext, ".m4a")) -+ return 1; -+ if(!strcasecmp(ext, ".aac")) -+ return 1; -+ } - return 0; - } - -@@ -338,21 +342,23 @@ - return; - #endif - -- av_find_stream_info(in); -- (*len_real) = get_song_time(in); -- (*title_real) = get_song_title(in, filename); -+ if (!av_find_stream_info(in)) { -+ (*len_real) = get_song_time(in); -+ (*title_real) = get_song_title(in, filename); -+ } - av_close_input_file(in); - } -- - static void wma_playbuff(int out_size) - { -- FifoBuffer f; -+ AVFifoBuffer f; - int sst_buff; -- -- fifo_init(&f, out_size*2); -- fifo_write(&f, wma_outbuf, out_size, &f.wptr); -- while(!fifo_read(&f, wma_s_outbuf, wma_st_buff, &f.rptr) && wma_decode) -- { -+ -+ av_fifo_init(&f, out_size*2); -+ av_fifo_generic_write(&f, wma_outbuf, out_size, NULL); -+ -+ while ((av_fifo_size(&f) > 0) && wma_decode) { -+ if (av_fifo_read(&f, wma_s_outbuf, wma_st_buff)) break; -+ - if(wma_eq_on) - sst_buff = iir((gpointer)&wma_s_outbuf, wma_st_buff); - else -@@ -365,7 +371,7 @@ - wma_ip.output->write_audio((short *)wma_s_outbuf, sst_buff); - memset(wma_s_outbuf, 0, sst_buff); - } -- fifo_free(&f); -+ av_fifo_free(&f); - return; - } - -@@ -374,18 +380,29 @@ - uint8_t *inbuf_ptr; - int out_size, size, len; - AVPacket pkt; -+ int64_t seek_target; - - pthread_mutex_lock(&wma_mutex); - while(wma_decode){ -- - if(wma_seekpos != -1) - { -- av_seek_frame(ic, wma_idx, wma_seekpos * 1000000LL); -+ if (wma_idx>=0) { -+ seek_target = av_rescale_q(wma_seekpos * 1000000LL, AV_TIME_BASE_Q, ic->streams[wma_idx]->time_base); -+ } else { -+ seek_target = wma_seekpos * 1000000LL; -+ } -+ av_seek_frame(ic, wma_idx, seek_target, AVSEEK_FLAG_BACKWARD); - wma_ip.output->flush(wma_seekpos * 1000); - wma_seekpos = -1; - } - -- if(av_read_frame(ic, &pkt) < 0) break; -+ if(av_read_frame(ic, &pkt) < 0) { -+ /*if (url_ferror(&ic->pb) == 0) { -+ usleep(100000); -+ continue; -+ }*/ -+ break; -+ } - - size = pkt.size; - inbuf_ptr = pkt.data; -@@ -393,7 +410,9 @@ - if(size == 0) break; - - while(size > 0){ -- len = avcodec_decode_audio(c, (short *)wma_outbuf, &out_size, -+ out_size = AVCODEC_MAX_AUDIO_FRAME_SIZE; -+ -+ len = avcodec_decode_audio2(c, (short *)wma_outbuf, &out_size, - inbuf_ptr, size); - if(len < 0) break; - -@@ -428,10 +447,13 @@ - #endif - - for(wma_idx = 0; wma_idx < ic->nb_streams; wma_idx++) { -- c = &ic->streams[wma_idx]->codec; -+ c = ic->streams[wma_idx]->codec; - if(c->codec_type == CODEC_TYPE_AUDIO) break; - } - -+ if(!c || c->codec_type != CODEC_TYPE_AUDIO) -+ return; -+ - av_find_stream_info(ic); - - codec = avcodec_find_decoder(c->codec_id); -@@ -460,7 +482,8 @@ - { - wma_decode = 0; - if(wma_pause) wma_do_pause(0); -- pthread_join(wma_decode_thread, NULL); -+ if(wma_decode_thread) -+ pthread_join(wma_decode_thread, NULL); - wma_ip.output->close_audio(); - } - -@@ -484,7 +507,7 @@ - #endif - - for(i = 0; i < in->nb_streams; i++) { -- s = &in->streams[i]->codec; -+ s = in->streams[i]->codec; - if(s->codec_type == CODEC_TYPE_AUDIO) break; - } - diff --git a/media-plugins/xmms-wma/files/xmms-wma-ds-fifo_init.patch b/media-plugins/xmms-wma/files/xmms-wma-ds-fifo_init.patch deleted file mode 100644 index b2e1d82..0000000 --- a/media-plugins/xmms-wma/files/xmms-wma-ds-fifo_init.patch +++ /dev/null @@ -1,32 +0,0 @@ -diff -dPNur xmms-wma-1.0.5/xmms-wma.c xmms-wma-1.0.5-ds/xmms-wma.c ---- xmms-wma-1.0.5/xmms-wma.c 2010-02-07 15:46:56.000000000 +0100 -+++ xmms-wma-1.0.5-ds/xmms-wma.c 2010-02-07 15:58:23.000000000 +0100 -@@ -350,14 +350,14 @@ - } - static void wma_playbuff(int out_size) - { -- AVFifoBuffer f; -+ AVFifoBuffer *f; - int sst_buff; - -- av_fifo_init(&f, out_size*2); -- av_fifo_generic_write(&f, wma_outbuf, out_size, NULL); -+ f = av_fifo_alloc(out_size*2); -+ av_fifo_generic_write(f, wma_outbuf, out_size, NULL); - -- while ((av_fifo_size(&f) > 0) && wma_decode) { -- if (av_fifo_read(&f, wma_s_outbuf, wma_st_buff)) break; -+ while ((av_fifo_size(f) > 0) && wma_decode) { -+ if (av_fifo_generic_read(f, wma_s_outbuf, wma_st_buff, NULL)) break; - - if(wma_eq_on) - sst_buff = iir((gpointer)&wma_s_outbuf, wma_st_buff); -@@ -371,7 +371,7 @@ - wma_ip.output->write_audio((short *)wma_s_outbuf, sst_buff); - memset(wma_s_outbuf, 0, sst_buff); - } -- av_fifo_free(&f); -+ av_fifo_free(f); - return; - } - diff --git a/media-plugins/xmms-wma/files/xmms-wma-ds-rcc.patch b/media-plugins/xmms-wma/files/xmms-wma-ds-rcc.patch deleted file mode 100644 index fcdc82a..0000000 --- a/media-plugins/xmms-wma/files/xmms-wma-ds-rcc.patch +++ /dev/null @@ -1,98 +0,0 @@ -diff -dPNur xmms-wma-1.0.5-new/xmms-wma.c xmms-wma-1.0.5-new-rcc/xmms-wma.c ---- xmms-wma-1.0.5-new/xmms-wma.c 2007-04-22 00:47:20.000000000 +0200 -+++ xmms-wma-1.0.5-new-rcc/xmms-wma.c 2007-04-22 01:13:08.000000000 +0200 -@@ -36,6 +36,7 @@ - #include <xmms/configfile.h> - #include <xmms/util.h> - #include <xmms/titlestring.h> -+#include <libxmms/rcc.h> - #endif - - #ifdef HAVE_AV_CONFIG_H -@@ -302,7 +303,7 @@ - input->file_path = filename; - #endif - input->file_ext = extname(filename); -- ret = xmms_get_titlestring(xmms_get_gentitle_format(), input); -+ ret = xmms_charset_get_titlestring(xmms_get_gentitle_format(), input, XMMS_RCC_UTF8); - if(input) g_free(input); - - if(!ret) -@@ -488,6 +489,7 @@ - char *title; - char *tmp; - char *message; -+ char *recoded; - AVFormatContext *in = NULL; - AVCodecContext *s = NULL; - AVCodec *codec; -@@ -518,6 +520,11 @@ - - strcpy(message, "\n\n\n"); - strcat(message, "File Name: "); -+ recoded = xmms_rcc_recode(XMMS_RCC_FS, XMMS_RCC_OUT, slashkill(filename)); -+ if (recoded) { -+ strcat(message, recoded); -+ free(recoded); -+ } else - strcat(message, slashkill(filename)); - strcat(message, "\n\n"); - strcat(message, "Audio Info:\n"); -@@ -558,18 +565,33 @@ - if (in->title[0] != '\0') - { - strcat(message, "Title: "); -+ recoded = xmms_rcc_recode(XMMS_RCC_UTF8, XMMS_RCC_OUT, in->title); -+ if (recoded) { -+ strcat(message, recoded); -+ free(recoded); -+ } else - strcat(message, in->title); - strcat(message, "\n"); - } - if (in->author[0] != '\0') - { - strcat(message, "Author: "); -+ recoded = xmms_rcc_recode(XMMS_RCC_UTF8, XMMS_RCC_OUT, in->author); -+ if (recoded) { -+ strcat(message, recoded); -+ free(recoded); -+ } else - strcat(message, in->author); - strcat(message, "\n"); - } - if (in->album[0] != '\0') - { - strcat(message, "Album: "); -+ recoded = xmms_rcc_recode(XMMS_RCC_UTF8, XMMS_RCC_OUT, in->album); -+ if (recoded) { -+ strcat(message, recoded); -+ free(recoded); -+ } else - strcat(message, in->album); - strcat(message, "\n"); - } -@@ -598,12 +620,23 @@ - if (in->comment[0] != '\0') - { - strcat(message, "Comments: "); -+ recoded = xmms_rcc_recode(XMMS_RCC_UTF8, XMMS_RCC_OUT, in->comment); -+ if (recoded) { -+ strcat(message, recoded); -+ free(recoded); -+ } else - strcat(message, in->comment); - strcat(message, "\n"); - } - if (in->copyright[0] != '\0') - { - strcat(message, "Copyright: "); -+ strcat(message, "Comments: "); -+ recoded = xmms_rcc_recode(XMMS_RCC_UTF8, XMMS_RCC_OUT, in->copyright); -+ if (recoded) { -+ strcat(message, recoded); -+ free(recoded); -+ } else - strcat(message, in->copyright); - strcat(message, "\n"); - } |