diff options
author | Jeremy Huddleston <eradicator@gentoo.org> | 2005-05-03 19:58:36 +0000 |
---|---|---|
committer | Jeremy Huddleston <eradicator@gentoo.org> | 2005-05-03 19:58:36 +0000 |
commit | a495259c6e09a1b7a9f8ae7dd60f9603a6851734 (patch) | |
tree | 6c4da6f51a4a16e1e578ea248fac6b92ba071ed3 /media-plugins/xmms-xmmsmplayer | |
parent | Added amd64 patch and added to ~amd64. Closes bug #66595. (diff) | |
download | historical-a495259c6e09a1b7a9f8ae7dd60f9603a6851734.tar.gz historical-a495259c6e09a1b7a9f8ae7dd60f9603a6851734.tar.bz2 historical-a495259c6e09a1b7a9f8ae7dd60f9603a6851734.zip |
Filter valid extensions to use this plugin for. Closes bug #81690 thanks to James Le Cuirot <chewi@ffaura.com>.
Package-Manager: portage-2.0.51.21
Diffstat (limited to 'media-plugins/xmms-xmmsmplayer')
4 files changed, 249 insertions, 0 deletions
diff --git a/media-plugins/xmms-xmmsmplayer/Manifest b/media-plugins/xmms-xmmsmplayer/Manifest index a0e65f1c6410..a86673e75436 100644 --- a/media-plugins/xmms-xmmsmplayer/Manifest +++ b/media-plugins/xmms-xmmsmplayer/Manifest @@ -1,4 +1,17 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + MD5 0d038b1988d58b2a35d0e6d4ea3dd7f0 ChangeLog 1291 MD5 223dfdc3e10800dbb22bad28c928b52a metadata.xml 177 MD5 7935e417a6d15524843e979f9acd0c33 xmms-xmmsmplayer-0.5.ebuild 916 +MD5 ea1975f3e901f82b74a15e2c9f502875 xmms-xmmsmplayer-0.5-r1.ebuild 940 MD5 1b7ac53d1d91e6e03452da584d63d8c3 files/digest-xmms-xmmsmplayer-0.5 67 +MD5 4e43eabdfe813855a2c9b5d4e182c65b files/exts-filter.patch 7597 +MD5 1b7ac53d1d91e6e03452da584d63d8c3 files/digest-xmms-xmmsmplayer-0.5-r1 67 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.1 (GNU/Linux) + +iD4DBQFCd9gHArHZZzCEUG0RAmQRAJiYEL002Yhz0RJjN81K2BXbBqRZAKCDSDSb +yS68l/By4kQHOh2kj1fibw== +=blTy +-----END PGP SIGNATURE----- diff --git a/media-plugins/xmms-xmmsmplayer/files/digest-xmms-xmmsmplayer-0.5-r1 b/media-plugins/xmms-xmmsmplayer/files/digest-xmms-xmmsmplayer-0.5-r1 new file mode 100644 index 000000000000..b7c25c4c4ed9 --- /dev/null +++ b/media-plugins/xmms-xmmsmplayer/files/digest-xmms-xmmsmplayer-0.5-r1 @@ -0,0 +1 @@ +MD5 10adb012bd741af84b891958504866db xmmsmplayer-0.5.tar.gz 230696 diff --git a/media-plugins/xmms-xmmsmplayer/files/exts-filter.patch b/media-plugins/xmms-xmmsmplayer/files/exts-filter.patch new file mode 100644 index 000000000000..67deccfbace4 --- /dev/null +++ b/media-plugins/xmms-xmmsmplayer/files/exts-filter.patch @@ -0,0 +1,196 @@ +diff -Naur xmmsmplayer-0.5_old/xmmsmplayer/common.c xmmsmplayer-0.5_new/xmmsmplayer/common.c +--- xmmsmplayer-0.5_old/xmmsmplayer/common.c 2003-05-20 15:21:16.000000000 +0100 ++++ xmmsmplayer-0.5_new/xmmsmplayer/common.c 2005-02-25 14:58:46.191127339 +0000 +@@ -14,6 +14,7 @@ + xmms_cfg_read_boolean(cfg,"xmms-mplayer","idx",&(new_cfg->idx)); + xmms_cfg_read_boolean(cfg,"xmms-mplayer","onewin",&(new_cfg->onewin)); + xmms_cfg_read_boolean(cfg,"xmms-mplayer","xmmsaudio",&(new_cfg->xmmsaudio)); ++ xmms_cfg_read_string(cfg,"xmms-mplayer","exts",&(new_cfg->exts)); + xmms_cfg_read_string(cfg,"xmms-mplayer","extra",&(new_cfg->extra)); + return new_cfg; + } +diff -Naur xmmsmplayer-0.5_old/xmmsmplayer/interface.c xmmsmplayer-0.5_new/xmmsmplayer/interface.c +--- xmmsmplayer-0.5_old/xmmsmplayer/interface.c 2004-03-30 15:24:18.000000000 +0100 ++++ xmmsmplayer-0.5_new/xmmsmplayer/interface.c 2005-02-25 15:00:38.498443708 +0000 +@@ -32,6 +32,7 @@ + static GtkWidget *ao_esd; + static GtkWidget *ao_alsa; + static GtkWidget *ao_sdl; ++static GtkWidget *entry_exts; + static GtkWidget *entry_extra_opts; + + static GtkWidget *mplayer_configure_win = NULL; +@@ -80,6 +81,7 @@ + new_cfg.xmmsaudio=gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(opt_xmmsaudio)); + if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(opt_xmmsaudio))) + new_cfg.ao=MPLAYER_AO_XMMS; ++ new_cfg.exts=gtk_entry_get_text(GTK_ENTRY(entry_exts)); + new_cfg.extra=gtk_entry_get_text(GTK_ENTRY(entry_extra_opts)); + + cfg = xmms_cfg_open_default_file(); +@@ -90,9 +92,12 @@ + xmms_cfg_write_boolean(cfg,"xmms-mplayer","idx",new_cfg.idx); + xmms_cfg_write_boolean(cfg,"xmms-mplayer","onewin",new_cfg.onewin); + xmms_cfg_write_boolean(cfg,"xmms-mplayer","xmmsaudio",new_cfg.xmmsaudio); ++ xmms_cfg_write_string(cfg,"xmms-mplayer","exts",new_cfg.exts); + xmms_cfg_write_string(cfg,"xmms-mplayer","extra",new_cfg.extra); + xmms_cfg_write_default_file(cfg); + xmms_cfg_free(cfg); ++ ++ mplayer_update_cfg(); + + gtk_widget_destroy(mplayer_configure_win); + mplayer_configure_win=NULL; +@@ -119,6 +124,7 @@ + GtkWidget *label_other; + GtkWidget *scrolledwindow5; + GtkWidget *layout5; ++ GtkWidget *label_exts; + GtkWidget *label_extra_des; + GtkWidget *label_extra; + GtkWidget *btn_ok; +@@ -389,12 +395,30 @@ + GTK_ADJUSTMENT (GTK_LAYOUT (layout5)->hadjustment)->step_increment = 10; + GTK_ADJUSTMENT (GTK_LAYOUT (layout5)->vadjustment)->step_increment = 10; + ++ entry_exts = gtk_entry_new (); ++ gtk_widget_ref (entry_exts); ++ gtk_object_set_data_full (GTK_OBJECT (window1), "entry_exts", entry_exts, ++ (GtkDestroyNotify) gtk_widget_unref); ++ gtk_widget_show (entry_exts); ++ gtk_layout_put (GTK_LAYOUT (layout5), entry_exts, 40, 128); ++ gtk_widget_set_usize (entry_exts, 392, 24); ++ ++ label_exts = gtk_label_new ("Specify the file types that you DON'T want\nthe plugin to play here. These must be\nseparated by spaces. Don't include the dots."); ++ gtk_widget_ref (label_exts); ++ gtk_object_set_data_full (GTK_OBJECT (window1), "label_exts", label_exts, ++ (GtkDestroyNotify) gtk_widget_unref); ++ gtk_widget_show (label_exts); ++ gtk_layout_put (GTK_LAYOUT (layout5), label_exts, 40, 48); ++ gtk_widget_set_usize (label_exts, 392, 64); ++ gtk_label_set_justify (GTK_LABEL (label_exts), GTK_JUSTIFY_LEFT); ++ gtk_misc_set_alignment (GTK_MISC (label_exts), 0.18, 1); ++ + entry_extra_opts = gtk_entry_new (); + gtk_widget_ref (entry_extra_opts); + gtk_object_set_data_full (GTK_OBJECT (window1), "entry_extra_opts", entry_extra_opts, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (entry_extra_opts); +- gtk_layout_put (GTK_LAYOUT (layout5), entry_extra_opts, 40, 192); ++ gtk_layout_put (GTK_LAYOUT (layout5), entry_extra_opts, 40, 224); + gtk_widget_set_usize (entry_extra_opts, 392, 24); + + label_extra_des = gtk_label_new ("Extra options for mplayer can be added here.\nParsing is done based on spaces.\nQuotes and escapes are not recognised yet."); +@@ -403,7 +427,7 @@ + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (label_extra_des); + gtk_layout_put (GTK_LAYOUT (layout5), label_extra_des, 40, 48); +- gtk_widget_set_usize (label_extra_des, 392, 128); ++ gtk_widget_set_usize (label_extra_des, 392, 160); + gtk_label_set_justify (GTK_LABEL (label_extra_des), GTK_JUSTIFY_LEFT); + gtk_misc_set_alignment (GTK_MISC (label_extra_des), 0.18, 1); + +@@ -494,5 +518,6 @@ + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (ao_alsa), TRUE); + break; + } ++ gtk_entry_set_text(GTK_ENTRY(entry_exts),cfg->exts); + gtk_entry_set_text(GTK_ENTRY(entry_extra_opts),cfg->extra); + } +diff -Naur xmmsmplayer-0.5_old/xmmsmplayer/xmmsmplayer.c xmmsmplayer-0.5_new/xmmsmplayer/xmmsmplayer.c +--- xmmsmplayer-0.5_old/xmmsmplayer/xmmsmplayer.c 2003-09-28 22:18:51.000000000 +0100 ++++ xmmsmplayer-0.5_new/xmmsmplayer/xmmsmplayer.c 2005-02-25 15:00:15.243312470 +0000 +@@ -76,32 +76,41 @@ + } + + void mplayer_init(){ +- /*Add read configure!! */ ++ mplayer_update_cfg(); ++} + +- /*mplayer_playing=0;*/ ++void mplayer_update_cfg(){ ++ mplayer_debugf("debug- reading configfile\n"); ++ if (mplayer_current_cfg){ ++ g_free(mplayer_current_cfg->exts); ++ g_free(mplayer_current_cfg->extra); ++ g_free(mplayer_current_cfg); ++ } ++ mplayer_current_cfg=mplayer_read_cfg(); + } ++ + int mplayer_is_our_file(char *filename){ + gchar *ext; + ext = strrchr(filename, '.'); +- if (ext){ +- if((!strcasecmp(ext, ".mpg")) || +- (!strcasecmp(ext, ".mpeg")) || +- (!strcasecmp(ext, ".divx")) || +- (!strcasecmp(ext, ".qt")) || +- (!strcasecmp(ext, ".mov")) || +- (!strcasecmp(ext, ".mp2")) || +- (!strcasecmp(ext, ".mpa")) || +- (!strcasecmp(ext, ".dat")) || +- (!strcasecmp(ext, ".rm")) || +- (!strcasecmp(ext, ".swf")) || +- (!strcasecmp(ext, ".wma")) || +- (!strcasecmp(ext, ".wmv")) || +- (!strcasecmp(ext, ".wmp")) || +- (!strcasecmp(ext, ".asf")) || +- (!strcasecmp(ext, ".avi")) +- ) return TRUE; ++ ext++; ++ ++ char *tok; ++ char *exts = strdup(mplayer_current_cfg->exts); ++ ++ strcpy(exts, mplayer_current_cfg->exts); ++ tok = strtok(exts, " "); ++ ++ while (tok != NULL){ ++ if (!strcasecmp(ext, tok)) { ++ free(exts); ++ return FALSE; ++ } ++ ++ tok = strtok(NULL, " "); + } +- return FALSE; ++ ++ free(exts); ++ return TRUE; + } + void mplayer_play_file(char *filename){ + pthread_attr_t tattr; +@@ -130,12 +139,6 @@ + mplayer_current_info->rate, + mplayer_current_info->nch); + mplayer_debugf("debug-play-sent-info\n"); +- mplayer_debugf("debug- reading configfile\n"); +- if (mplayer_current_cfg){ +- g_free(mplayer_current_cfg->extra); +- g_free(mplayer_current_cfg); +- } +- mplayer_current_cfg=mplayer_read_cfg(); + if(mplayer_current_cfg->onewin &&(!mplayer_video)){ + /* mplayer_video=gtk_window_new(GTK_WINDOW_DIALOG); + gtk_widget_set_usize(GTK_WIDGET(mplayer_video), 320, 240); +diff -Naur xmmsmplayer-0.5_old/xmmsmplayer/xmmsmplayer.h xmmsmplayer-0.5_new/xmmsmplayer/xmmsmplayer.h +--- xmmsmplayer-0.5_old/xmmsmplayer/xmmsmplayer.h 2003-05-30 23:19:11.000000000 +0100 ++++ xmmsmplayer-0.5_new/xmmsmplayer/xmmsmplayer.h 2005-02-25 15:02:15.049381334 +0000 +@@ -60,6 +60,7 @@ + struct mplayer_cfg{ + gint vo,ao; + gboolean zoom,framedrop,idx,onewin,xmmsaudio; ++ gchar *exts; + gchar *extra; + }; + +@@ -79,6 +80,7 @@ + gint mplayer_get_time(); + void mplayer_get_song_info(char * filename, char ** title, int * length); + void mplayer_init(); ++void mplayer_update_cfg(); + InputPlugin *get_iplugin_info(void); + + void on_button_ok_clicked (GtkButton *button, gpointer user_data); diff --git a/media-plugins/xmms-xmmsmplayer/xmms-xmmsmplayer-0.5-r1.ebuild b/media-plugins/xmms-xmmsmplayer/xmms-xmmsmplayer-0.5-r1.ebuild new file mode 100644 index 000000000000..26bad9948573 --- /dev/null +++ b/media-plugins/xmms-xmmsmplayer/xmms-xmmsmplayer-0.5-r1.ebuild @@ -0,0 +1,39 @@ +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-plugins/xmms-xmmsmplayer/xmms-xmmsmplayer-0.5-r1.ebuild,v 1.1 2005/05/03 19:58:36 eradicator Exp $ + +inherit eutils + +IUSE="" + +MY_PN="xmmsmplayer" +MY_P="${MY_PN}-${PV}" + +S="${WORKDIR}/${MY_P}" + +DESCRIPTION="Xmms-Mplayer is a input plugin for xmms that allows you to play all video files in xmms." +HOMEPAGE="http://xmmsmplayer.sourceforge.net/" +SRC_URI="mirror://sourceforge/xmmsmplayer/${MY_P}.tar.gz" + +SLOT="0" +LICENSE="GPL-2" +KEYWORDS="-amd64 ~ppc ~sparc ~x86" + +DEPEND="media-sound/xmms + media-video/mplayer" + +src_unpack() { + unpack ${A} + cd ${S} + epatch ${FILESDIR}/exts-filter.patch +} + +src_compile() { + econf --libdir=`xmms-config --input-plugin-dir` + emake || die "Compilation failed" +} + +src_install() { + make DESTDIR="${D}" install || die "Install failed" + dodoc AUTHORS COPYING README +} |