summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris White <chriswhite@gentoo.org>2004-08-18 06:24:01 +0000
committerChris White <chriswhite@gentoo.org>2004-08-18 06:24:01 +0000
commit68e99c81e11e4e67b6579a989f62f0e37945d658 (patch)
tree47209583ad6615aca5097c8b5a457556f5af1901 /media-video
parentAdding 3dnowex, mmx2, sse2, i8x0, nvidia, xvmc USE flags, fbdev removed to ut... (diff)
downloadgentoo-2-68e99c81e11e4e67b6579a989f62f0e37945d658.tar.gz
gentoo-2-68e99c81e11e4e67b6579a989f62f0e37945d658.tar.bz2
gentoo-2-68e99c81e11e4e67b6579a989f62f0e37945d658.zip
I fixed.. lots.. and lots.. of stuff. See the ChangeLog as I can't list them all here without re-writing war and peace.
Diffstat (limited to 'media-video')
-rw-r--r--media-video/mplayer/ChangeLog11
-rw-r--r--media-video/mplayer/Manifest30
-rw-r--r--media-video/mplayer/files/digest-mplayer-1.0_pre4-r71
-rw-r--r--media-video/mplayer/files/digest-mplayer-1.0_pre5-r21
-rw-r--r--media-video/mplayer/files/digest-mplayer-1.0_pre5-r37
-rw-r--r--media-video/mplayer/files/mplayer-1.0_pre4-mga-kernel2.6.patch610
-rw-r--r--media-video/mplayer/files/mplayer-1.0_pre4-mpst.patch10
-rw-r--r--media-video/mplayer/files/mplayer-1.0_pre5-alsa-gui.patch847
-rw-r--r--media-video/mplayer/mplayer-1.0_pre4-r7.ebuild33
-rw-r--r--media-video/mplayer/mplayer-1.0_pre5-r2.ebuild13
-rw-r--r--media-video/mplayer/mplayer-1.0_pre5-r3.ebuild508
11 files changed, 577 insertions, 1494 deletions
diff --git a/media-video/mplayer/ChangeLog b/media-video/mplayer/ChangeLog
index bb1f7b9c8742..fe1bdee33b45 100644
--- a/media-video/mplayer/ChangeLog
+++ b/media-video/mplayer/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for media-video/mplayer
# Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-video/mplayer/ChangeLog,v 1.196 2004/08/12 18:52:28 chriswhite Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-video/mplayer/ChangeLog,v 1.197 2004/08/18 06:24:01 chriswhite Exp $
+
+ 18 Aug 2004; Chris White <chriswhite@gentoo.org> :
+ I added some xvmc related USE flags. Fixed matroska and live versions. Added a
+ doc USE flag in -r3. Fixed an mspt issue in pre4-r7. Anything else I can't
+ remember too.
+
+ 14 Aug 2004; Chris White <chriswhite@gentoo.org> mplayer-1.0_pre4-r7.ebuild,
+ mplayer-1.0_pre5-r2.ebuild:
+ Fixed some live version issues. Thanks to Merlin for reporting.
13 Aug 2004; Chris White <chriswhite@gentoo.org>
-files/amd64_fix_the_blue_love.patch, -files/default-skin.diff,
diff --git a/media-video/mplayer/Manifest b/media-video/mplayer/Manifest
index 6077bcf3ff0b..646e1c44fccb 100644
--- a/media-video/mplayer/Manifest
+++ b/media-video/mplayer/Manifest
@@ -1,26 +1,28 @@
-MD5 f18ddfffee96f4a1448f0b7e60c19266 ChangeLog 36641
+MD5 f58aaa6593d36d21f23df5e93027d757 .#Manifest.1.235 2136
+MD5 8598f715af0024da17438b1e3af5cbcf ChangeLog 36818
MD5 31018765c8c65a239dba78a98c405543 metadata.xml 224
-MD5 65b1b70ed3282c2c69827b3ae0651c50 mplayer-1.0_pre4-r7.ebuild 12638
-MD5 0a6ea1415b37c80ea53306f8de5db55b mplayer-1.0_pre5-r2.ebuild 14408
+MD5 911ea8ba2a0fbd420a531f5c99b9da9e mplayer-1.0_pre4-r7.ebuild 12778
+MD5 218dea02e73c421b5c48027fc8fe4d41 mplayer-1.0_pre5-r2.ebuild 14446
+MD5 e7fd9227d13695337d415e71d72a4163 mplayer-1.0_pre5-r3.ebuild 15402
+MD5 1f9260386b063367f192b6d5d65d6aea files/real_demux.patch 3107
MD5 34f948b8f242a2aadb53a1e2b00e3155 files/vuln02-fix.diff 467
+MD5 88afe4c7008da4f33b5b89ddc1ab8069 files/digest-mplayer-1.0_pre5-r3 527
+MD5 09766023054d07a5f795eda66f247c42 files/mplayer-1.0_pre4-mpst.patch 459
+MD5 65d49d490b98ac8cabcafc5cb439825c files/mplayer-odml.patch 730
MD5 a71fc9832d953424652af1125fb7ea64 files/mplayer-0.90-coreutils-fixup.patch 1857
-MD5 c2d65649f15837c5a326557ded4e47c5 files/mplayer.desktop 119
MD5 c54c7ba8e18c8e7f3412c6d6939d010a files/mplayer-1.0-gtk2.patch 5903
MD5 a9fa1b94e4e3842e2c5e552644b03eaa files/mplayer-1.0_pre4-alsa-gcc34.patch 299
-MD5 38c7908ce49f7f6a272993ba5bc9dd09 files/mplayer-mythtv.patch 13755
MD5 a39bd930af792269808dc4bdbc382fbb files/mplayer-1.0_pre4-altivec-gcc34.patch 650
MD5 42733acde24d84c1482db03c777360ab files/mplayer-1.0_pre4-help_mp-ro.h.patch 3267
-MD5 65d49d490b98ac8cabcafc5cb439825c files/mplayer-odml.patch 730
MD5 5cc95d6b380dc27e5ceae0f53ab88f99 files/mplayer-1.0_pre5-mga-kernel-2.6.patch 15043
MD5 ad254e1f8a5166ae1c5b53bc3c76ffd2 files/mplayer-1.0_pre5-yuv2rbg_kludge.patch 12585
-MD5 e4581f6934f66ccecc8c1682664623d0 files/digest-mplayer-1.0_pre4-r7 358
-MD5 1f9260386b063367f192b6d5d65d6aea files/real_demux.patch 3107
-MD5 7d81475ff0d1ba01de3b714d6dcc4891 files/gui_vuln_code.patch 17981
+MD5 c2d65649f15837c5a326557ded4e47c5 files/mplayer.desktop 119
+MD5 484c45fb52a157c6b056b4298f787f3d files/cachefill.patch 6053
+MD5 0c3c71bf461e94d4dcffabab341ddeec files/digest-mplayer-1.0_pre5-r2 440
MD5 c39b2e0baa9cc24d22b62765776426ad files/str_undefined.patch 1845
MD5 e614f6546020b77ced4ba12c36e5b51e files/strl.c 950
-MD5 7dce8f2598e84e3d94186e2eb50f553b files/mplayer-1.0_pre4-mga-kernel2.6.patch 27826
-MD5 3aabe241ce3c7d60ea6f607cb7ab033a files/digest-mplayer-1.0_pre5-r2 358
-MD5 484c45fb52a157c6b056b4298f787f3d files/cachefill.patch 6053
-MD5 d77341e4aea32e3e992f01ce5cc12ae0 files/mplayer-1.0_pre5-r1-conf_locale.patch 853
-MD5 702fb665a765edfafa8fcb3e099ea08f files/mplayer-1.0_pre5-alsa-gui.patch 31929
+MD5 7d81475ff0d1ba01de3b714d6dcc4891 files/gui_vuln_code.patch 17981
+MD5 38c7908ce49f7f6a272993ba5bc9dd09 files/mplayer-mythtv.patch 13755
+MD5 b72a70cd788b73c1012ebe763e1125f6 files/digest-mplayer-1.0_pre4-r7 445
MD5 4be5ce1a1c93b8d40bc961468fcc1aa7 files/mplayer-1.0_pre5-live.patch 378
+MD5 d77341e4aea32e3e992f01ce5cc12ae0 files/mplayer-1.0_pre5-r1-conf_locale.patch 853
diff --git a/media-video/mplayer/files/digest-mplayer-1.0_pre4-r7 b/media-video/mplayer/files/digest-mplayer-1.0_pre4-r7
index 18d8bea4d6ed..55d2adb2a0e5 100644
--- a/media-video/mplayer/files/digest-mplayer-1.0_pre4-r7
+++ b/media-video/mplayer/files/digest-mplayer-1.0_pre4-r7
@@ -1,5 +1,6 @@
MD5 83ebac0f05b192516a41fca2350ca01a MPlayer-1.0pre4.tar.bz2 4913390
MD5 1ecd31d17b51f16332b1fcc7da36b312 font-arial-iso-8859-1.tar.bz2 234242
MD5 7b47904a925cf58ea546ca15f3df160c font-arial-iso-8859-2.tar.bz2 222208
+MD5 62d4d7af62f1081e2849d4a0a44463de mplayer-1.0_pre4-mga-kernel2.6.patch.tar.bz2 9848
MD5 3f1b9eb2ba639bf42c61f7b9189f6524 svgalib_helper-1.9.17-mplayer.tar.bz2 7234
MD5 5fdc36704c4ec3a6dc6b57a536608180 Blue-1.4.tar.bz2 221734
diff --git a/media-video/mplayer/files/digest-mplayer-1.0_pre5-r2 b/media-video/mplayer/files/digest-mplayer-1.0_pre5-r2
index a5d89e119968..76f2c5d8eada 100644
--- a/media-video/mplayer/files/digest-mplayer-1.0_pre5-r2
+++ b/media-video/mplayer/files/digest-mplayer-1.0_pre5-r2
@@ -1,5 +1,6 @@
MD5 fbe6919eb025526e8ed129cd61a49969 MPlayer-1.0pre5.tar.bz2 5072836
MD5 1ecd31d17b51f16332b1fcc7da36b312 font-arial-iso-8859-1.tar.bz2 234242
MD5 7b47904a925cf58ea546ca15f3df160c font-arial-iso-8859-2.tar.bz2 222208
+MD5 48493efca70c570f2cda0134e63cb5df mplayer-1.0_pre5-alsa-gui.patch.tar.bz2 5852
MD5 3f1b9eb2ba639bf42c61f7b9189f6524 svgalib_helper-1.9.17-mplayer.tar.bz2 7234
MD5 5fdc36704c4ec3a6dc6b57a536608180 Blue-1.4.tar.bz2 221734
diff --git a/media-video/mplayer/files/digest-mplayer-1.0_pre5-r3 b/media-video/mplayer/files/digest-mplayer-1.0_pre5-r3
new file mode 100644
index 000000000000..de94ce9089e0
--- /dev/null
+++ b/media-video/mplayer/files/digest-mplayer-1.0_pre5-r3
@@ -0,0 +1,7 @@
+MD5 fbe6919eb025526e8ed129cd61a49969 MPlayer-1.0pre5.tar.bz2 5072836
+MD5 1ecd31d17b51f16332b1fcc7da36b312 font-arial-iso-8859-1.tar.bz2 234242
+MD5 7b47904a925cf58ea546ca15f3df160c font-arial-iso-8859-2.tar.bz2 222208
+MD5 62d4d7af62f1081e2849d4a0a44463de mplayer-1.0_pre4-mga-kernel2.6.patch.tar.bz2 9848
+MD5 48493efca70c570f2cda0134e63cb5df mplayer-1.0_pre5-alsa-gui.patch.tar.bz2 5852
+MD5 3f1b9eb2ba639bf42c61f7b9189f6524 svgalib_helper-1.9.17-mplayer.tar.bz2 7234
+MD5 5fdc36704c4ec3a6dc6b57a536608180 Blue-1.4.tar.bz2 221734
diff --git a/media-video/mplayer/files/mplayer-1.0_pre4-mga-kernel2.6.patch b/media-video/mplayer/files/mplayer-1.0_pre4-mga-kernel2.6.patch
deleted file mode 100644
index b461620575ce..000000000000
--- a/media-video/mplayer/files/mplayer-1.0_pre4-mga-kernel2.6.patch
+++ /dev/null
@@ -1,610 +0,0 @@
-diff -Naur MPlayer-1.0pre4/drivers/Makefile MPlayer-1.0pre5/drivers/Makefile
---- MPlayer-1.0pre4/drivers/Makefile 2003-03-08 03:42:08.000000000 +0900
-+++ MPlayer-1.0pre5/drivers/Makefile 2004-06-26 23:03:06.000000000 +0900
-@@ -1,16 +1,30 @@
--
--KERNEL_INCLUDES = /usr/src/linux/include
--INCLUDES = -I$(KERNEL_INCLUDES)
--CFLAGS = -O2 -D__KERNEL__ -DMODULE -include $(KERNEL_INCLUDES)/linux/modversions.h -Wall
-+KERNEL_DIR=/lib/modules/`uname -r`/build
-+KERNEL_INCLUDES= $(KERNEL_DIR)/include
-+INCLUDES = -I$(KERNEL_INCLUDES) -I$(KERNEL_INCLUDES)/asm
- VERSION = $(shell grep UTS_RELEASE $(KERNEL_INCLUDES)/linux/version.h | cut -d '"' -f2)
- MDIR = /lib/modules/$(VERSION)/misc
-
--all: mga_vid.o mga_vid_test
-+ifneq (,$(findstring 2.6, $(VERSION)))
-+obj-m += mga_vid.o
-+CFLAGS = -O2 -D__KERNEL__ -DMODULE -include $(KERNEL_INCLUDES)/config/modversions.h -Wall
-+else
-+CFLAGS = -O2 -D__KERNEL__ -DMODULE -include $(KERNEL_INCLUDES)/linux/modversions.h -Wall
-+endif
-+
-+all:
-+ifneq (,$(findstring 2.6, $(VERSION)))
-+ $(MAKE) mga_vid.ko mga_vid_test
-+else
-+ $(MAKE) mga_vid.o mga_vid_test
-+endif
- # sis_vid.o
-
- mga_vid.o: mga_vid.c mga_vid.h
- $(CC) $(CFLAGS) $(INCLUDES) -c $(basename $@).c
-
-+mga_vid.ko: mga_vid.c mga_vid.h
-+ $(MAKE) -C $(KERNEL_DIR) SUBDIRS=$(PWD) modules
-+
- sis_vid.o: sis_vid.c sis_vid.h
- $(CC) $(CFLAGS) $(INCLUDES) -c $(basename $@).c
-
-@@ -25,13 +39,21 @@
-
- install: mga_vid.o
- if test ! -d $(MDIR) ; then mkdir -p $(MDIR) ; fi
-+ifneq (,$(findstring 2.6, $(VERSION)))
-+ install -m 644 mga_vid.ko $(MDIR)/mga_vid.ko
-+else
- install -m 644 mga_vid.o $(MDIR)/mga_vid.o
-+endif
- depmod -a
-
- dep:
-
- clean:
- rm -f *.o *~
-+ifneq (,$(findstring 2.6, $(VERSION)))
-+ rm -f *.ko .mga* mga_vid.mod.c
-+endif
-
- distclean: clean
- rm -f mga_vid_test
-+
-diff -Naur MPlayer-1.0pre4/drivers/mga_vid.c MPlayer-1.0pre5/drivers/mga_vid.c
---- MPlayer-1.0pre4/drivers/mga_vid.c 2003-10-05 02:28:54.000000000 +0900
-+++ MPlayer-1.0pre5/drivers/mga_vid.c 2004-07-22 08:49:53.260791744 +0900
-@@ -1,9 +1,14 @@
-+#define MODULENAME "mga_vid"
-+
- //#define CRTC2
-
- // YUY2 support (see config.format) added by A'rpi/ESP-team
- // double buffering added by A'rpi/ESP-team
- // brightness/contrast introduced by eyck
- // multiple card support by Attila Kinali <attila@kinali.ch>
-+// ported to the 2.6 series kernels by F.O. Tempel
-+// thankfully using the ground work done by Ed Sweetman (for the devfs work)
-+// and Gergely Nagy for pushing into the right direction with his patch for 2.6.0-test1
-
- // Set this value, if autodetection fails! (video ram size in megabytes)
- // #define MGA_MEMORY_SIZE 16
-@@ -36,6 +41,12 @@
- #include <linux/config.h>
- #include <linux/version.h>
- #include <linux/module.h>
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
-+#include <linux/moduleparam.h>
-+#include <linux/kobject.h>
-+#include <linux/kobj_map.h>
-+#include <linux/cdev.h>
-+#endif
- #include <linux/types.h>
- #include <linux/kernel.h>
- #include <linux/sched.h>
-@@ -43,6 +54,10 @@
- #include <linux/string.h>
- #include <linux/errno.h>
-
-+#ifdef MGA_ALLOW_IRQ
-+#include <asm/mach-default/irq_vectors.h>
-+#include <linux/interrupt.h>
-+#endif
- #if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,10)
- #include <linux/malloc.h>
- #else
-@@ -117,7 +132,8 @@
- #ifndef min
- #define min(x,y) (((x)<(y))?(x):(y))
- #endif
--
-+// These functions are provided by the 2.6.0 kernel these days.
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
- #if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0)
- #include <linux/ctype.h>
-
-@@ -155,7 +171,7 @@
- return simple_strtoul(cp,endp,base);
- }
- #endif
--
-+#endif // 2.6.0
-
- typedef struct bes_registers_s
- {
-@@ -348,17 +364,30 @@
- #define ICLEAR 0x1e18
- #define STATUS 0x1e14
-
--
--// global devfs handle for /dev/mga_vid
-+/* Global handles for cdev and devfs */
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
-+static struct cdev *mga_vid_cdev;
-+static dev_t mga_cdev_handle;
-+#ifdef CONFIG_DEVFS_FS
-+typedef struct devfs_entry *devfs_handle_t;
-+devfs_handle_t dev_handle = NULL;
-+#endif
-+#else
- #ifdef CONFIG_DEVFS_FS
--static devfs_handle_t dev_handle = NULL;
-+ devfs_handle_t dev_handle = NULL;
-+#endif
- #endif
-
- // card local config
- typedef struct mga_card_s {
-
- // local devfs handle for /dev/mga_vidX
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
- #ifdef CONFIG_DEVFS_FS
-+ struct devfs_entry *devfs_handle_t;
-+#endif
-+#endif
-+#if CONFIG_DEVFS_FS
- devfs_handle_t dev_handle;
- #endif
-
-@@ -397,6 +426,7 @@
- int next_frame;
- } mga_card_t;
-
-+
- #define MGA_MAX_CARDS 16
- // this is used as init value for the parameter arrays
- // it should have exactly MGA_MAX_CARDS elements
-@@ -411,11 +441,19 @@
- static int mga_contrast[MGA_MAX_CARDS] = MGA_MAX_CARDS_INIT_ARRAY;
- static int mga_top_reserved[MGA_MAX_CARDS] = MGA_MAX_CARDS_INIT_ARRAY;
-
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
-+module_param(mga_ram_size, int, 0);
-+module_param(mga_top_reserved, int, 0);
-+module_param(mga_brightness, int, 0);
-+module_param(mga_contrast, int, 0);
-+module_param(major, int, 0);
-+#else
- MODULE_PARM(mga_ram_size, "1-" __MODULE_STRING(MGA_MAX_CARDS) "i");
- MODULE_PARM(mga_top_reserved, "1-" __MODULE_STRING(MGA_MAX_CARDS) "i");
- MODULE_PARM(mga_brightness, "1-" __MODULE_STRING(MGA_MAX_CARDS) "i");
- MODULE_PARM(mga_contrast, "1-" __MODULE_STRING(MGA_MAX_CARDS) "i");
- MODULE_PARM(major, "i");
-+#endif
-
- #ifdef CRTC2
- static void crtc2_frame_sel(mga_card_t * card, int frame)
-@@ -642,7 +680,7 @@
- writel( card->regs.besglobctl + ((readl(card->mmio_base + VCOUNT)+2)<<16),
- card->mmio_base + BESGLOBCTL);
-
--#if 0
-+#ifdef MP_DEBUG
- printk(KERN_DEBUG "mga_vid: wrote BES registers\n");
- printk(KERN_DEBUG "mga_vid: BESCTL = 0x%08x\n",
- readl(card->mmio_base + BESCTL));
-@@ -651,6 +689,7 @@
- printk(KERN_DEBUG "mga_vid: BESSTATUS= 0x%08x\n",
- readl(card->mmio_base + BESSTATUS));
- #endif
-+
- #ifdef CRTC2
- // printk("c2ctl:0x%08x c2datactl:0x%08x\n", readl(card->mmio_base + C2CTL), readl(card->mmio_base + C2DATACTL));
- // printk("c2misc:0x%08x\n", readl(card->mmio_base + C2MISC));
-@@ -1100,7 +1139,7 @@
-
- #ifdef MGA_ALLOW_IRQ
-
--static void enable_irq(mga_card_t * card){
-+static void mga_enable_irq(mga_card_t * card){
- long int cc;
-
- cc = readl(card->mmio_base + IEN);
-@@ -1116,16 +1155,18 @@
-
- }
-
--static void disable_irq(mga_card_t * card){
-+static void mga_disable_irq(mga_card_t * card){
-
- writeb(0x11, card->mmio_base + CRTCX);
- writeb(0x20, card->mmio_base + CRTCD); /* clear 0, enable off */
-
- }
-
--static void mga_handle_irq(int irq, void *dev_id, struct pt_regs *pregs) {
-+static int mga_handle_irq(int irq, void *dev_id, struct pt_regs *pregs) {
- // static int frame=0;
--// static int counter=0;
-+#ifdef MP_DEBUG
-+ static int counter=0;
-+#endif
- long int cc;
- mga_card_t * card = dev_id;
-
-@@ -1136,7 +1177,7 @@
- // check whether the interrupt is really for us (irq sharing)
- if ( irq != -1 ) {
- cc = readl(card->mmio_base + STATUS);
-- if ( ! (cc & 0x10) ) return; /* vsyncpen */
-+ if ( ! (cc & 0x10) ) return 0; /* vsyncpen */
- // debug_irqcnt++;
- }
-
-@@ -1152,15 +1193,15 @@
- // i han echt kei ahnig was das obe heisse söll
- crtc2_frame_sel(card->next_frame);
- #endif
--
--#if 0
-+
-+#ifdef MP_DEBUG
- ++counter;
- if(!(counter&63)){
- printk("mga irq counter = %d\n",counter);
- }
- #endif
-
--// } else {
-+ // } else {
- // debug_irqignore = 1;
- // }
-
-@@ -1173,7 +1214,7 @@
- // writel( card->regs.besglobctl, card->mmio_base + BESGLOBCTL);
-
-
-- return;
-+ return 0;
-
- }
-
-@@ -1257,7 +1298,7 @@
- mga_vid_write_regs(card, 0);
- }
- #ifdef MGA_ALLOW_IRQ
-- if ( card->irq != -1 ) enable_irq(card);
-+ if ( card->irq != -1 ) mga_enable_irq(card);
- #endif
- card->next_frame=0;
- break;
-@@ -1268,7 +1309,7 @@
- #endif
- card->vid_src_ready = 0;
- #ifdef MGA_ALLOW_IRQ
-- if ( card->irq != -1 ) disable_irq(card);
-+ if (card->irq != -1 ) mga_disable_irq(card);
- #endif
- card->regs.besctl &= ~1;
- card->regs.besglobctl &= ~(1<<6); // UYVY format selected
-@@ -1317,6 +1358,11 @@
- static void cards_init(mga_card_t * card, struct pci_dev * dev, int card_number, int is_g400);
-
- // returns the number of found cards
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
-+#define PCI_DEV_NAME(d) (d)->name
-+#else
-+#define PCI_DEV_NAME(d) pci_name((d))
-+#endif
- static int mga_vid_find_card(void)
- {
- struct pci_dev *dev = NULL;
-@@ -1347,27 +1393,27 @@
- switch(dev->device) {
- case PCI_DEVICE_ID_MATROX_G550:
- mga_dev_name = "MGA G550";
-- printk(KERN_INFO "mga_vid: Found %s at %s [%s]\n", mga_dev_name, dev->slot_name, dev->name);
-+ printk(KERN_INFO "mga_vid: Found %s at %s [%s]\n", mga_dev_name, dev->slot_name, PCI_DEV_NAME(dev));
- cards_init(card, dev, mga_cards_num - 1, 1);
- break;
- case PCI_DEVICE_ID_MATROX_G400:
- mga_dev_name = "MGA G400/G450";
-- printk(KERN_INFO "mga_vid: Found %s at %s [%s]\n", mga_dev_name, dev->slot_name, dev->name);
-+ printk(KERN_INFO "mga_vid: Found %s at %s [%s]\n", mga_dev_name, dev->slot_name, PCI_DEV_NAME(dev));
- cards_init(card, dev, mga_cards_num - 1, 1);
- break;
- case PCI_DEVICE_ID_MATROX_G200_AGP:
- mga_dev_name = "MGA G200 AGP";
-- printk(KERN_INFO "mga_vid: Found %s at %s [%s]\n", mga_dev_name, dev->slot_name, dev->name);
-+ printk(KERN_INFO "mga_vid: Found %s at %s [%s]\n", mga_dev_name, dev->slot_name, PCI_DEV_NAME(dev));
- cards_init(card, dev, mga_cards_num - 1, 0);
- break;
- case PCI_DEVICE_ID_MATROX_G200_PCI:
- mga_dev_name = "MGA G200";
-- printk(KERN_INFO "mga_vid: Found %s at %s [%s]\n", mga_dev_name, dev->slot_name, dev->name);
-+ printk(KERN_INFO "mga_vid: Found %s at %s [%s]\n", mga_dev_name, dev->slot_name, PCI_DEV_NAME(dev));
- cards_init(card, dev, mga_cards_num - 1, 0);
- break;
- default:
- mga_cards_num--;
-- printk(KERN_INFO "mga_vid: ignoring matrox device (%d) at %s [%s]\n", dev->device, dev->slot_name, dev->name);
-+ printk(KERN_INFO "mga_vid: ignoring matrox device (%d) at %s [%s]\n", dev->device, dev->slot_name, PCI_DEV_NAME(dev));
- break;
- }
- }
-@@ -1473,7 +1519,7 @@
- return(-EAGAIN);
- }
-
-- return(0);
-+ return 0;
- }
-
- static int mga_vid_release(struct inode *inode, struct file *file)
-@@ -1493,8 +1539,9 @@
- // card->config.colkey_on=0; //!!!
- mga_vid_write_regs(card, 1);
- card->vid_in_use = 0;
--
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
- MOD_DEC_USE_COUNT;
-+#endif
- return 0;
- }
-
-@@ -1508,7 +1555,11 @@
- mga_card_t * card;
-
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,2)
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
-+ int minor = iminor(inode);
-+#else
- int minor = MINOR(inode->i_rdev.value);
-+#endif
- #else
- int minor = MINOR(inode->i_rdev);
- #endif
-@@ -1539,8 +1590,10 @@
- return(-EBUSY);
-
- card->vid_in_use = 1;
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
- MOD_INC_USE_COUNT;
-- return(0);
-+#endif
-+ return 0;
- }
-
- #if LINUX_VERSION_CODE >= 0x020400
-@@ -1573,10 +1626,6 @@
- static void cards_init(mga_card_t * card, struct pci_dev * dev, int card_number, int is_g400)
- {
- unsigned int card_option;
--// temp buffer for device filename creation used only by devfs
--#ifdef CONFIG_DEVFS_FS
-- char buffer[16];
--#endif
-
- memset(card,0,sizeof(mga_card_t));
- card->irq = -1;
-@@ -1647,10 +1696,11 @@
- // case 0x13: card->ram_size = 8; break;
- default: card->ram_size = 8;
- }
-- }
-+}
-+
- #if 0
- // printk("List resources -----------\n");
-- for(temp=0;temp<DEVICE_COUNT_RESOURCE;temp++){
-+ for(int temp=0;temp<DEVICE_COUNT_RESOURCE;temp++){
- struct resource *res=&dev->resource[temp];
- if(res->flags){
- int size=(1+res->end-res->start)>>20;
-@@ -1665,7 +1715,6 @@
- #endif
- }
-
--
- #ifdef MGA_ALLOW_IRQ
- if ( card->irq != -1 ) {
- int tmp = request_irq(card->irq, mga_handle_irq, SA_INTERRUPT | SA_SHIRQ, "Syncfb Time Base", card);
-@@ -1683,16 +1732,15 @@
- printk(KERN_INFO "syncfb (mga): IRQ disabled in mga_vid.c\n");
- card->irq=-1;
- #endif
--
-- // register devfs, let the kernel give us major and minor numbers
--#ifdef CONFIG_DEVFS_FS
-- snprintf(buffer, 16, "mga_vid%d", card_number);
-+// register devfs, let the kernel give us major and minor numbers
-+#if CONFIG_DEVFS_FS && LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
-+ char buffer[16];
-+ snprintf(buffer, 16, "%s%d", MODULENAME, card_number);
- card->dev_handle = devfs_register(NULL, buffer, DEVFS_FL_AUTO_DEVNUM,
- 0, 0,
- S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IFCHR,
- &mga_vid_fops, card);
- #endif
--
- }
-
- /*
-@@ -1701,71 +1749,101 @@
-
- static int mga_vid_initialize(void)
- {
-- int i;
--
--// printk(KERN_INFO "Matrox MGA G200/G400 YUV Video interface v0.01 (c) Aaron Holtzman \n");
-+ int i;
- printk(KERN_INFO "Matrox MGA G200/G400/G450/G550 YUV Video interface v2.01 (c) Aaron Holtzman & A'rpi\n");
--
-- for(i = 0; i < MGA_MAX_CARDS; i++)
-+
-+ if(mga_vid_find_card())
- {
-- if (mga_ram_size[i]) {
-- if (mga_ram_size[i]<4 || mga_ram_size[i]>64) {
-- printk(KERN_ERR "mga_vid: invalid RAMSIZE: %d MB\n", mga_ram_size[i]);
-- return -EINVAL;
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
-+ if(register_chrdev(major, MODULENAME, &mga_vid_fops))
-+ {
-+ printk(KERN_ERR "mga_vid: unable to get major: %d\n", major);
-+ return -EIO;
-+ }
-+ /* Have the kernel generate a major device number */
-+ //if(!alloc_chrdev_region(&mga_cdev_handle, 0, mga_cards_num, "mga_vid"))
-+ // major = MAJOR(mga_cdev_handle);
-+ printk(KERN_INFO "mga_vid: using major: %d\n", major);
-+ /* Allocate a cdev for this character device, and fill in some parameters it needs */
-+ mga_vid_cdev = cdev_alloc();
-+ mga_vid_cdev->owner = THIS_MODULE;
-+ strcpy(mga_vid_cdev->kobj.name, MODULENAME);
-+ mga_vid_cdev->ops = &mga_vid_fops;
-+ /* Add this character device to the system */
-+ cdev_add(mga_vid_cdev, mga_cdev_handle, mga_cards_num);
-+#endif
-+ for(i = 0; i < mga_cards_num; i++)
-+ {
-+#if CONFIG_DEVFS_FS && LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
-+ /* Create the device, and register a symlink for the first card found.
-+ * Lets not break default behaviour, eh? */
-+ devfs_mk_cdev(MKDEV(major,i), S_IFCHR | S_IRUSR | S_IRGRP | S_IWUSR, "video/mga_vid%d", i);
-+ if( i == 0 ) {
-+ devfs_mk_symlink(MODULENAME,"video/mga_vid0");
-+ }
-+#endif
-+ if (mga_ram_size[i]) {
-+ if (mga_ram_size[i]<4 || mga_ram_size[i]>64) {
-+ printk(KERN_ERR "mga_vid: invalid RAMSIZE: %d MB\n", mga_ram_size[i]);
-+ return -EINVAL;
-+ }
- }
- }
-- }
-
-- if(register_chrdev(major, "mga_vid", &mga_vid_fops))
-- {
-- printk(KERN_ERR "mga_vid: unable to get major: %d\n", major);
-- return -EIO;
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
-+ if(register_chrdev(major, MODULENAME, &mga_vid_fops))
-+ {
-+ printk(KERN_ERR "mga_vid: unable to get major: %d\n", major);
-+ return -EIO;
-+ }
-+#endif
-+ return 0;
- }
--
-- if (!mga_vid_find_card())
-+ else
- {
-- printk(KERN_ERR "mga_vid: no supported devices found\n");
-- unregister_chrdev(major, "mga_vid");
-- return -EINVAL;
-+ return -EFAULT;
- }
--#ifdef CONFIG_DEVFS_FS
-- else {
-- // we assume that this always succeedes
-- dev_handle = devfs_register(NULL, "mga_vid", DEVFS_FL_AUTO_DEVNUM,
-- 0,0,
-- S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IFCHR,
-- &mga_vid_fops, mga_cards[0]);
-- }
--#endif
--
-- return(0);
- }
-
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
-+module_init(mga_vid_initialize);
-+#else
- int init_module(void)
- {
- return mga_vid_initialize();
- }
-+#endif
-
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
-+static void mga_cleanup_module(void)
-+#else
- void cleanup_module(void)
-+#endif
- {
- int i;
- mga_card_t * card;
-
-+ printk(KERN_INFO "mga_vid: Cleaning up module\n");
- for (i = 0; i < MGA_MAX_CARDS; i++)
- {
- card = mga_cards[i];
- if(card)
- {
- #ifdef MGA_ALLOW_IRQ
-- if (card->irq != -1)
-- free_irq(card->irq, &(card->irq));
-+ if ( card->irq != -1)
-+// free_irq(card->irq, &(card->irq));
-+ free_irq(card->irq, card);
- #endif
-
- if(card->mmio_base)
- iounmap(card->mmio_base);
- if(card->param_buff)
- kfree(card->param_buff);
--#ifdef CONFIG_DEVFS_FS
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
-+#ifdef CONFIG_DEVFS_FS
-+ devfs_remove("video/%s%d",MODULENAME, i);
-+#endif
-+#else
- if(card->dev_handle) devfs_unregister(card->dev_handle);
- #endif
-
-@@ -1775,9 +1853,20 @@
- }
-
- //FIXME turn off BES
-- printk(KERN_INFO "mga_vid: Cleaning up module\n");
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
- #ifdef CONFIG_DEVFS_FS
-- if(dev_handle) devfs_unregister(dev_handle);
-+ devfs_unregister(dev_handle);
-+#endif
-+ unregister_chrdev(major, MODULENAME);
-+#else
-+#ifdef CONFIG_DEVFS_FS
-+ devfs_remove(MODULENAME);
-+#endif
-+ cdev_del(mga_vid_cdev);
-+ unregister_chrdev_region(mga_cdev_handle, mga_cards_num);
- #endif
-- unregister_chrdev(major, "mga_vid");
- }
-+
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
-+module_exit(mga_cleanup_module);
-+#endif
-diff -Naur MPlayer-1.0pre4/drivers/mga_vid_test MPlayer-1.0pre5/drivers/mga_vid_test
---- MPlayer-1.0pre4/drivers/mga_vid_test 1970-01-01 09:00:00.000000000 +0900
-+++ MPlayer-1.0pre5/drivers/mga_vid_test 2004-07-22 08:49:59.630823352 +0900
-@@ -0,0 +1,16 @@
-+ELF
-+
-+
-+
-+
-+
-+
-+
-+
-+ the upper left corner displayed
-+ corners (starting top left going CW)
-+
-+
-+
-+
-+
-\ ¥Õ¥¡¥¤¥ëËöÈø¤Ë²þ¹Ô¤¬¤¢¤ê¤Þ¤»¤ó
diff --git a/media-video/mplayer/files/mplayer-1.0_pre4-mpst.patch b/media-video/mplayer/files/mplayer-1.0_pre4-mpst.patch
new file mode 100644
index 000000000000..1f17cf1508e0
--- /dev/null
+++ b/media-video/mplayer/files/mplayer-1.0_pre4-mpst.patch
@@ -0,0 +1,10 @@
+--- libmpdemux/open.c 11 Jun 2004 20:57:03 -0000 1.97
++++ libmpdemux/open.c 25 Jun 2004 15:19:11 -0000 1.98
+@@ -484,6 +484,7 @@
+ if (strncmp("tv://", filename, 5) && strncmp("mf://", filename, 5) &&
+ strncmp("vcd://", filename, 6) && strncmp("dvb://", filename, 6) &&
+ strncmp("cdda://", filename, 7) && strncmp("cddb://", filename, 7) &&
++ strncmp("mpst://", filename, 7) &&
+ strstr(filename, "://")) {
+ url = url_new(filename);
+ }
diff --git a/media-video/mplayer/files/mplayer-1.0_pre5-alsa-gui.patch b/media-video/mplayer/files/mplayer-1.0_pre5-alsa-gui.patch
deleted file mode 100644
index 822c1442b1fb..000000000000
--- a/media-video/mplayer/files/mplayer-1.0_pre5-alsa-gui.patch
+++ /dev/null
@@ -1,847 +0,0 @@
-Index: help/help_mp-en.h
-===================================================================
-RCS file: /cvsroot/mplayer/main/help/help_mp-en.h,v
-retrieving revision 1.121
-diff -u -r1.121 help_mp-en.h
---- help/help_mp-en.h 6 Jul 2004 11:14:29 -0000 1.121
-+++ help/help_mp-en.h 24 Jul 2004 22:15:47 -0000
-@@ -386,8 +387,7 @@
- #define MSGTR_SkinBrowser "Skin Browser"
- #define MSGTR_Network "Network streaming..."
- #define MSGTR_Preferences "Preferences"
--#define MSGTR_OSSPreferences "OSS driver configuration"
--#define MSGTR_SDLPreferences "SDL driver configuration"
-+#define MSGTR_AudioPreferences "Audio driver configuration"
- #define MSGTR_NoMediaOpened "No media opened."
- #define MSGTR_VCDTrack "VCD track %d"
- #define MSGTR_NoChapter "No chapter"
-@@ -512,6 +512,7 @@
- #define MSGTR_PREFERENCES_Misc "Misc"
-
- #define MSGTR_PREFERENCES_None "None"
-+#define MSGTR_PREFERENCES_DriverDefault "driver default"
- #define MSGTR_PREFERENCES_AvailableDrivers "Available drivers:"
- #define MSGTR_PREFERENCES_DoNotPlaySound "Do not play sound"
- #define MSGTR_PREFERENCES_NormalizeSound "Normalize sound"
-@@ -552,9 +553,9 @@
- #define MSGTR_PREFERENCES_FRAME_CodecDemuxer "Codec & demuxer"
- #define MSGTR_PREFERENCES_FRAME_Cache "Cache"
- #define MSGTR_PREFERENCES_FRAME_Misc "Misc"
--#define MSGTR_PREFERENCES_OSS_Device "Device:"
--#define MSGTR_PREFERENCES_OSS_Mixer "Mixer:"
--#define MSGTR_PREFERENCES_SDL_Driver "Driver:"
-+#define MSGTR_PREFERENCES_Audio_Device "Device:"
-+#define MSGTR_PREFERENCES_Audio_Mixer "Mixer:"
-+#define MSGTR_PREFERENCES_Audio_MixerChannel "Mixer channel:"
- #define MSGTR_PREFERENCES_Message "Please remember that you need to restart playback for some options to take effect!"
- #define MSGTR_PREFERENCES_DXR3_VENC "Video encoder:"
- #define MSGTR_PREFERENCES_DXR3_LAVC "Use LAVC (FFmpeg)"
-Index: Gui/cfg.c
-===================================================================
-RCS file: /cvsroot/mplayer/main/Gui/cfg.c,v
-retrieving revision 1.40
-diff -u -r1.40 cfg.c
---- Gui/cfg.c 8 Nov 2003 00:26:44 -0000 1.40
-+++ Gui/cfg.c 24 Jul 2004 22:15:49 -0000
-@@ -38,8 +38,14 @@
- float gtkAOExtraStereoMul = 1.0;
- #ifdef USE_OSS_AUDIO
- char * gtkAOOSSMixer;
-+char * gtkAOOSSMixerChannel;
- char * gtkAOOSSDevice;
- #endif
-+#if defined(HAVE_ALSA9) || defined (HAVE_ALSA1X)
-+char * gtkAOALSAMixer;
-+char * gtkAOALSAMixerChannel;
-+char * gtkAOALSADevice;
-+#endif
- #ifdef HAVE_SDL
- char * gtkAOSDLDriver;
- #endif
-@@ -110,8 +116,14 @@
- { "ao_extra_stereo_coefficient",&gtkAOExtraStereoMul,CONF_TYPE_FLOAT,CONF_RANGE,-10,10,NULL },
- #ifdef USE_OSS_AUDIO
- { "ao_oss_mixer",&gtkAOOSSMixer,CONF_TYPE_STRING,0,0,0,NULL },
-+ { "ao_oss_mixer_channel",&gtkAOOSSMixerChannel,CONF_TYPE_STRING,0,0,0,NULL },
- { "ao_oss_device",&gtkAOOSSDevice,CONF_TYPE_STRING,0,0,0,NULL },
- #endif
-+#if defined(HAVE_ALSA9) || defined (HAVE_ALSA1X)
-+ { "ao_alsa_mixer",&gtkAOALSAMixer,CONF_TYPE_STRING,0,0,0,NULL },
-+ { "ao_alsa_mixer_channel",&gtkAOALSAMixerChannel,CONF_TYPE_STRING,0,0,0,NULL },
-+ { "ao_alsa_device",&gtkAOALSADevice,CONF_TYPE_STRING,0,0,0,NULL },
-+#endif
- #ifdef HAVE_SDL
- { "ao_sdl_subdriver",&gtkAOSDLDriver,CONF_TYPE_STRING,0,0,0,NULL },
- #endif
-Index: Gui/cfg.h
-===================================================================
-RCS file: /cvsroot/mplayer/main/Gui/cfg.h,v
-retrieving revision 1.15
-diff -u -r1.15 cfg.h
---- Gui/cfg.h 20 Mar 2003 12:41:32 -0000 1.15
-+++ Gui/cfg.h 24 Jul 2004 22:15:49 -0000
-@@ -14,8 +14,14 @@
- extern float gtkAOExtraStereoMul;
- #ifdef USE_OSS_AUDIO
- extern char * gtkAOOSSMixer;
-+extern char * gtkAOOSSMixerChannel;
- extern char * gtkAOOSSDevice;
- #endif
-+#if defined(HAVE_ALSA9) || defined (HAVE_ALSA1X)
-+extern char * gtkAOALSAMixer;
-+extern char * gtkAOALSAMixerChannel;
-+extern char * gtkAOALSADevice;
-+#endif
- #ifdef HAVE_SDL
- extern char * gtkAOSDLDriver;
- #endif
-Index: Gui/interface.c
-===================================================================
-RCS file: /cvsroot/mplayer/main/Gui/interface.c,v
-retrieving revision 1.95
-diff -u -r1.95 interface.c
---- Gui/interface.c 26 Jun 2004 13:26:10 -0000 1.95
-+++ Gui/interface.c 24 Jul 2004 22:15:53 -0000
-@@ -173,10 +173,6 @@
- guiIntfStruct.StreamType=-1;
-
- memset( &gtkEquChannels,0,sizeof( gtkEquChannels ) );
--#ifdef USE_OSS_AUDIO
-- if ( !gtkAOOSSMixer ) gtkAOOSSMixer=strdup( PATH_DEV_MIXER );
-- if ( !gtkAOOSSDevice ) gtkAOOSSDevice=strdup( PATH_DEV_DSP );
--#endif
- #ifdef HAVE_DXR3
- if ( !gtkDXR3Device ) gtkDXR3Device=strdup( "/dev/em8300-0" );
- #endif
-@@ -797,19 +793,42 @@
- ao_plugin_cfg.pl_extrastereo_mul=gtkAOExtraStereoMul;
- }
- #ifdef USE_OSS_AUDIO
-- mixer_device=gstrdup( gtkAOOSSMixer );
-- if ( audio_driver_list && !gstrncmp( audio_driver_list[0],"oss",3 ) && gtkAOOSSDevice )
-+ if ( audio_driver_list && !gstrncmp( audio_driver_list[0],"oss",3 ) )
- {
-- char * tmp = calloc( 1,strlen( gtkAOOSSDevice ) + 7 );
-+ char *tmp;
-+ mixer_device = gtkAOOSSMixer;
-+ mixer_channel = gtkAOOSSMixerChannel;
-+ if (gtkAOOSSDevice) {
-+ tmp = calloc( 1,strlen( gtkAOOSSDevice ) + 7 );
- sprintf( tmp,"oss:%s",gtkAOOSSDevice );
-+ } else
-+ tmp = "oss";
-+ gaddlist( &audio_driver_list,tmp );
-+ }
-+#endif
-+#if defined(HAVE_ALSA9) || defined (HAVE_ALSA1X)
-+ if ( audio_driver_list && !gstrncmp( audio_driver_list[0],"alsa",4 ) )
-+ {
-+ char *tmp;
-+ mixer_device = gtkAOALSAMixer;
-+ mixer_channel = gtkAOALSAMixerChannel;
-+ if (gtkAOALSADevice) {
-+ tmp = calloc( 1,strlen( gtkAOALSADevice ) + 14 );
-+ sprintf( tmp,"alsa:device=%s",gtkAOALSADevice );
-+ } else
-+ tmp = "alsa";
- gaddlist( &audio_driver_list,tmp );
- }
- #endif
- #ifdef HAVE_SDL
-- if ( audio_driver_list && !gstrncmp( audio_driver_list[0],"sdl",3 ) && gtkAOSDLDriver )
-+ if ( audio_driver_list && !gstrncmp( audio_driver_list[0],"sdl",3 ) )
- {
-- char * tmp = calloc( 1,strlen( gtkAOSDLDriver ) + 10 );
-+ char *tmp;
-+ if (gtkAOSDLDriver) {
-+ tmp = calloc( 1,strlen( gtkAOSDLDriver ) + 10 );
- sprintf( tmp,"sdl:%s",gtkAOSDLDriver );
-+ } else
-+ tmp = "sdl";
- gaddlist( &audio_driver_list,tmp );
- }
- #endif
-Index: Gui/mplayer/gtk/opts.c
-===================================================================
-RCS file: /cvsroot/mplayer/main/Gui/mplayer/gtk/opts.c,v
-retrieving revision 1.63
-diff -u -r1.63 opts.c
---- Gui/mplayer/gtk/opts.c 26 Jun 2004 13:26:11 -0000 1.63
-+++ Gui/mplayer/gtk/opts.c 24 Jul 2004 22:15:59 -0000
-@@ -152,18 +152,13 @@
- static char * vo_driver[3];
- static int old_video_driver = 0;
-
--#ifdef USE_OSS_AUDIO
-- void ShowOSSConfig( void );
-- void HideOSSConfig( void );
--#endif
- #ifdef HAVE_DXR3
- void ShowDXR3Config( void );
- void HideDXR3Config( void );
- #endif
--#ifdef HAVE_SDL
-- void ShowSDLConfig( void );
-- void HideSDLConfig( void );
--#endif
-+ void ShowAudioConfig();
-+ void HideAudioConfig();
-+
- static gboolean prHScaler( GtkWidget * widget,GdkEventMotion * event,gpointer user_data );
- static void prToggled( GtkToggleButton * togglebutton,gpointer user_data );
- static void prCListRow( GtkCList * clist,gint row,gint column,GdkEvent * event,gpointer user_data );
-@@ -210,12 +201,10 @@
- gtk_clist_select_row( GTK_CLIST( CLADrivers ),old_audio_driver,0 );
- gtk_clist_get_text( GTK_CLIST( CLADrivers ),old_audio_driver,0,(char **)&ao_driver );
- gtk_widget_set_sensitive( AConfig,FALSE );
--#ifdef USE_OSS_AUDIO
-- if ( !strncmp( ao_driver[0],"oss",3 ) ) gtk_widget_set_sensitive( AConfig,TRUE );
--#endif
--#ifdef HAVE_SDL
-- if ( !strncmp( ao_driver[0],"sdl",3 ) ) gtk_widget_set_sensitive( AConfig,TRUE );
--#endif
-+ if ( !strncmp( ao_driver[0],"oss",3 ) ||
-+ !strncmp( ao_driver[0],"alsa",4 ) ||
-+ !strncmp( ao_driver[0],"sdl",3 ) )
-+ gtk_widget_set_sensitive( AConfig,TRUE );
- }
- }
-
-@@ -465,12 +454,7 @@
- gtk_widget_hide( Preferences );
- gtk_widget_destroy( Preferences );
- Preferences=NULL;
--#ifdef USE_OSS_AUDIO
-- HideOSSConfig();
--#endif
--#ifdef HAVE_SDL
-- HideSDLConfig();
--#endif
-+ HideAudioConfig();
- #ifdef HAVE_DXR3
- HideDXR3Config();
- #endif
-@@ -615,12 +599,12 @@
- case bAConfig:
- if ( !ao_driver[0] ) break;
- gtk_widget_set_sensitive( AConfig,FALSE );
--#ifdef USE_OSS_AUDIO
-- if ( !strncmp( ao_driver[0],"oss",3 ) ) { ShowOSSConfig(); gtk_widget_set_sensitive( AConfig,TRUE ); }
--#endif
--#ifdef HAVE_SDL
-- if ( !strncmp( ao_driver[0],"sdl",3 ) ) { ShowSDLConfig(); gtk_widget_set_sensitive( AConfig,TRUE ); }
--#endif
-+ if ( !strncmp( ao_driver[0],"oss",3 ) ||
-+ !strncmp( ao_driver[0],"alsa",4 ) ||
-+ !strncmp( ao_driver[0],"sdl",3 ) ) {
-+ ShowAudioConfig();
-+ gtk_widget_set_sensitive( AConfig,TRUE );
-+ }
- break;
- case bVconfig:
- if ( !vo_driver[0] ) break;
-@@ -737,12 +721,10 @@
- case 0: // audio driver
- gtk_clist_get_text( GTK_CLIST( CLADrivers ),row,0,(char **)&ao_driver );
- gtk_widget_set_sensitive( AConfig,FALSE );
--#ifdef USE_OSS_AUDIO
-- if ( !strncmp( ao_driver[0],"oss",3 ) ) gtk_widget_set_sensitive( AConfig,TRUE );
--#endif
--#ifdef HAVE_SDL
-- if ( !strncmp( ao_driver[0],"sdl",3 ) ) gtk_widget_set_sensitive( AConfig,TRUE );
--#endif
-+ if ( !strncmp( ao_driver[0],"oss",3 ) ||
-+ !strncmp( ao_driver[0],"alsa",4 ) ||
-+ !strncmp( ao_driver[0],"sdl",3 ) )
-+ gtk_widget_set_sensitive( AConfig,TRUE );
- break;
- case 1: // video driver
- gtk_clist_get_text( GTK_CLIST( CLVDrivers ),row,0,(char **)&vo_driver );
-@@ -1308,272 +1290,307 @@
- }
-
- #ifdef USE_OSS_AUDIO
-- GtkWidget * OSSConfig;
--static GtkWidget * CEOssDevice;
--static GtkWidget * CEOssMixer;
--static GtkWidget * CBOssMixer;
--static GtkWidget * CBOssDevice;
--static GtkWidget * BOssOk;
--static GtkWidget * BOssCancel;
--
--void ShowOSSConfig( void )
--{
-- if ( OSSConfig ) gtkActive( OSSConfig );
-- else OSSConfig=create_OSSConfig();
--
-- gtk_entry_set_text( GTK_ENTRY( CEOssMixer ),gtkAOOSSMixer );
-- gtk_entry_set_text( GTK_ENTRY( CEOssDevice ),gtkAOOSSDevice );
--
-- gtk_widget_show( OSSConfig );
-- gtkSetLayer( OSSConfig );
--}
--
--void HideOSSConfig( void )
--{
-- if ( !OSSConfig ) return;
-- gtk_widget_hide( OSSConfig );
-- gtk_widget_destroy( OSSConfig );
-- OSSConfig=NULL;
-+GList *appendOSSDevices(GList *l) {
-+ // careful! the current implementation allows only string constants!
-+ l = g_list_append(l, (gpointer)"/dev/dsp");
-+ if (gtkAOOSSDevice && strncmp(gtkAOOSSDevice, "/dev/sound", 10) == 0) {
-+ l = g_list_append(l, (gpointer)"/dev/sound/dsp0");
-+ l = g_list_append(l, (gpointer)"/dev/sound/dsp1");
-+ l = g_list_append(l, (gpointer)"/dev/sound/dsp2");
-+ l = g_list_append(l, (gpointer)"/dev/sound/dsp3");
-+ } else {
-+ l = g_list_append(l, (gpointer)"/dev/dsp0");
-+ l = g_list_append(l, (gpointer)"/dev/dsp1");
-+ l = g_list_append(l, (gpointer)"/dev/dsp2");
-+ l = g_list_append(l, (gpointer)"/dev/dsp3");
-+ }
-+#ifdef HAVE_DXR3
-+ l = g_list_append(l, (gpointer)"/dev/em8300_ma");
-+ l = g_list_append(l, (gpointer)"/dev/em8300_ma-0");
-+ l = g_list_append(l, (gpointer)"/dev/em8300_ma-1");
-+ l = g_list_append(l, (gpointer)"/dev/em8300_ma-2");
-+ l = g_list_append(l, (gpointer)"/dev/em8300_ma-3");
-+#endif
-+ return l;
- }
-
--static void ossButton( GtkButton * button,gpointer user_data )
--{
-- switch( (int)user_data )
-- {
-- case 1:
-- gfree( (void **)&gtkAOOSSMixer ); gtkAOOSSMixer=strdup( gtk_entry_get_text( GTK_ENTRY( CEOssMixer ) ) );
-- gfree( (void **)&gtkAOOSSDevice ); gtkAOOSSDevice=strdup( gtk_entry_get_text( GTK_ENTRY( CEOssDevice ) ) );
-- case 0:
-- HideOSSConfig();
-- break;
-+GList *appendOSSMixers(GList *l) {
-+ // careful! the current implementation allows only string constants!
-+ l = g_list_append(l, (gpointer)"/dev/mixer");
-+ if (gtkAOOSSMixer && strncmp(gtkAOOSSMixer, "/dev/sound", 10) == 0) {
-+ l = g_list_append(l, (gpointer)"/dev/sound/mixer0");
-+ l = g_list_append(l, (gpointer)"/dev/sound/mixer1");
-+ l = g_list_append(l, (gpointer)"/dev/sound/mixer2");
-+ l = g_list_append(l, (gpointer)"/dev/sound/mixer3");
-+ } else {
-+ l = g_list_append(l, (gpointer)"/dev/mixer0");
-+ l = g_list_append(l, (gpointer)"/dev/mixer1");
-+ l = g_list_append(l, (gpointer)"/dev/mixer2");
-+ l = g_list_append(l, (gpointer)"/dev/mixer3");
- }
-+ return l;
- }
-
--GtkWidget * create_OSSConfig( void )
--{
-- GList * CBOssDevice_items=NULL;
-- GList * CBOssMixer_items=NULL;
-- GtkWidget * vbox604;
-- GtkWidget * table2;
-- GtkWidget * label;
-- GtkWidget * hbuttonbox6;
-- GtkAccelGroup * accel_group;
--
-- accel_group=gtk_accel_group_new();
--
-- OSSConfig=gtk_window_new( GTK_WINDOW_TOPLEVEL );
-- gtk_widget_set_name( OSSConfig,"OSSConfig" );
-- gtk_object_set_data( GTK_OBJECT( OSSConfig ),"OSSConfig",OSSConfig );
-- gtk_widget_set_usize( OSSConfig,270,92 );
-- gtk_window_set_title( GTK_WINDOW( OSSConfig ),MSGTR_OSSPreferences );
-- gtk_window_set_position( GTK_WINDOW( OSSConfig ),GTK_WIN_POS_CENTER );
-- gtk_window_set_policy( GTK_WINDOW( OSSConfig ),FALSE,FALSE,FALSE );
-- gtk_window_set_wmclass( GTK_WINDOW( OSSConfig ),"OSS Config","MPlayer" );
--
-- gtk_widget_realize( OSSConfig );
-- gtkAddIcon( OSSConfig );
--
-- vbox604=AddVBox( AddDialogFrame( OSSConfig ),0 );
--
-- table2=gtk_table_new( 2,2,FALSE );
-- gtk_widget_set_name( table2,"table2" );
-- gtk_widget_show( table2 );
-- gtk_box_pack_start( GTK_BOX( vbox604 ),table2,TRUE,TRUE,0 );
--
-- label=AddLabel( MSGTR_PREFERENCES_OSS_Device,NULL );
-- gtk_table_attach( GTK_TABLE( table2 ),label,0,1,0,1,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
--
-- label=AddLabel( MSGTR_PREFERENCES_OSS_Mixer,NULL );
-- gtk_table_attach( GTK_TABLE( table2 ),label,0,1,1,2,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
--
-- CBOssDevice=AddComboBox( NULL );
-- gtk_table_attach( GTK_TABLE( table2 ),CBOssDevice,1,2,0,1,(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
--
-- CBOssDevice_items=g_list_append( CBOssDevice_items,(gpointer)"/dev/dsp" );
-- if ( gtkAOOSSDevice && !strncmp( gtkAOOSSDevice,"/dev/sound",10 ) )
-- {
-- CBOssDevice_items=g_list_append( CBOssDevice_items,(gpointer)"/dev/sound/dsp0" );
-- CBOssDevice_items=g_list_append( CBOssDevice_items,(gpointer)"/dev/sound/dsp1" );
-- CBOssDevice_items=g_list_append( CBOssDevice_items,(gpointer)"/dev/sound/dsp2" );
-- CBOssDevice_items=g_list_append( CBOssDevice_items,(gpointer)"/dev/sound/dsp3" );
-- }
-- else
-- {
-- CBOssDevice_items=g_list_append( CBOssDevice_items,(gpointer)"/dev/dsp0" );
-- CBOssDevice_items=g_list_append( CBOssDevice_items,(gpointer)"/dev/dsp1" );
-- CBOssDevice_items=g_list_append( CBOssDevice_items,(gpointer)"/dev/dsp2" );
-- CBOssDevice_items=g_list_append( CBOssDevice_items,(gpointer)"/dev/dsp3" );
-- }
--#ifdef HAVE_DXR3
-- CBOssDevice_items=g_list_append( CBOssDevice_items,(gpointer)"/dev/em8300_ma" );
-- CBOssDevice_items=g_list_append( CBOssDevice_items,(gpointer)"/dev/em8300_ma-0" );
-- CBOssDevice_items=g_list_append( CBOssDevice_items,(gpointer)"/dev/em8300_ma-1" );
-- CBOssDevice_items=g_list_append( CBOssDevice_items,(gpointer)"/dev/em8300_ma-2" );
-- CBOssDevice_items=g_list_append( CBOssDevice_items,(gpointer)"/dev/em8300_ma-3" );
--#endif
-- gtk_combo_set_popdown_strings( GTK_COMBO( CBOssDevice ),CBOssDevice_items );
-- g_list_free( CBOssDevice_items );
--
-- CEOssDevice=GTK_COMBO( CBOssDevice )->entry;
-- gtk_widget_set_name( CEOssDevice,"CEOssDevice" );
-- gtk_widget_show( CEOssDevice );
--
-- CBOssMixer=AddComboBox( NULL );
-- gtk_table_attach( GTK_TABLE( table2 ),CBOssMixer,1,2,1,2,(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
-- CBOssMixer_items=g_list_append( CBOssMixer_items,(gpointer)"/dev/mixer" );
-- if ( gtkAOOSSMixer && !strncmp( gtkAOOSSMixer,"/dev/sound",10 ) )
-- {
-- CBOssMixer_items=g_list_append( CBOssMixer_items,(gpointer)"/dev/sound/mixer0" );
-- CBOssMixer_items=g_list_append( CBOssMixer_items,(gpointer)"/dev/sound/mixer1" );
-- CBOssMixer_items=g_list_append( CBOssMixer_items,(gpointer)"/dev/sound/mixer2" );
-- CBOssMixer_items=g_list_append( CBOssMixer_items,(gpointer)"/dev/sound/mixer3" );
-- }
-- else
-- {
-- CBOssMixer_items=g_list_append( CBOssMixer_items,(gpointer)"/dev/mixer0" );
-- CBOssMixer_items=g_list_append( CBOssMixer_items,(gpointer)"/dev/mixer1" );
-- CBOssMixer_items=g_list_append( CBOssMixer_items,(gpointer)"/dev/mixer2" );
-- CBOssMixer_items=g_list_append( CBOssMixer_items,(gpointer)"/dev/mixer3" );
-- }
-- gtk_combo_set_popdown_strings( GTK_COMBO( CBOssMixer ),CBOssMixer_items );
-- g_list_free( CBOssMixer_items );
--
-- CEOssMixer=GTK_COMBO( CBOssMixer )->entry;
-- gtk_widget_set_name( CEOssMixer,"CEOssMixer" );
-- gtk_widget_show( CEOssMixer );
--
-- AddHSeparator( vbox604 );
--
-- hbuttonbox6=AddHButtonBox( vbox604 );
-- gtk_button_box_set_layout( GTK_BUTTON_BOX( hbuttonbox6 ),GTK_BUTTONBOX_END );
-- gtk_button_box_set_spacing( GTK_BUTTON_BOX( hbuttonbox6 ),10 );
-- BOssOk=AddButton( MSGTR_Ok,hbuttonbox6 );
-- BOssCancel=AddButton( MSGTR_Cancel,hbuttonbox6 );
--
-- gtk_signal_connect( GTK_OBJECT( OSSConfig ),"destroy",GTK_SIGNAL_FUNC( WidgetDestroy ),&OSSConfig );
--
-- gtk_signal_connect( GTK_OBJECT( BOssOk ),"clicked",GTK_SIGNAL_FUNC( ossButton ),(void*)1 );
-- gtk_signal_connect( GTK_OBJECT( BOssCancel ),"clicked",GTK_SIGNAL_FUNC( ossButton ),(void*)0 );
--
-- gtk_widget_add_accelerator( BOssOk,"clicked",accel_group,GDK_Return,0,GTK_ACCEL_VISIBLE );
-- gtk_widget_add_accelerator( BOssCancel,"clicked",accel_group,GDK_Escape,0,GTK_ACCEL_VISIBLE );
-+GList *appendOSSMixerChannels(GList *l) {
-+ l = g_list_append(l, (gpointer)"vol");
-+ l = g_list_append(l, (gpointer)"pcm");
-+ l = g_list_append(l, (gpointer)"line");
-+ return l;
-+}
-+#endif
-
-- gtk_window_add_accel_group( GTK_WINDOW( OSSConfig ),accel_group );
-+#if defined(HAVE_ALSA9) || defined (HAVE_ALSA1X)
-+GList *appendALSADevices(GList *l) {
-+ l = g_list_append(l, (gpointer)"default");
-+ l = g_list_append(l, (gpointer)"hw#0.0");
-+ l = g_list_append(l, (gpointer)"hw#0.1");
-+ l = g_list_append(l, (gpointer)"hw#0.2");
-+ l = g_list_append(l, (gpointer)"surround40");
-+ l = g_list_append(l, (gpointer)"surround51");
-+ l = g_list_append(l, (gpointer)"plug:surround40");
-+ l = g_list_append(l, (gpointer)"plug:surround51");
-+ return l;
-+}
-
-- return OSSConfig;
-+GList *appendALSAMixers(GList *l) {
-+ l = g_list_append(l, (gpointer)"default");
-+ return l;
- }
-
-+GList *appendALSAMixerChannels(GList *l) {
-+ l = g_list_append(l, (gpointer)"Master");
-+ l = g_list_append(l, (gpointer)"Line");
-+ l = g_list_append(l, (gpointer)"PCM");
-+ return l;
-+}
- #endif
-
- #ifdef HAVE_SDL
-- GtkWidget * SDLConfig;
--static GtkWidget * CESDLDriver;
--static GtkWidget * CBSDLDriver;
--static GtkWidget * BSDLOk;
--static GtkWidget * BSDLCancel;
--
--void ShowSDLConfig( void )
--{
-- if ( SDLConfig ) gtkActive( SDLConfig );
-- else SDLConfig=create_SDLConfig();
--
-- if ( gtkAOSDLDriver )
-- gtk_entry_set_text( GTK_ENTRY( CESDLDriver ), gtkAOSDLDriver );
--
-- gtk_widget_show( SDLConfig );
-- gtkSetLayer( SDLConfig );
-+GList *appendSDLDevices(GList *l) {
-+ l = g_list_append(l, (gpointer)"alsa");
-+ l = g_list_append(l, (gpointer)"arts");
-+ l = g_list_append(l, (gpointer)"esd");
-+ l = g_list_append(l, (gpointer)"jack");
-+ l = g_list_append(l, (gpointer)"oss");
-+ l = g_list_append(l, (gpointer)"nas");
-+ return l;
- }
-+#endif
-
--void HideSDLConfig( void )
--{
-- if ( !SDLConfig ) return;
-- gtk_widget_hide( SDLConfig );
-- gtk_widget_destroy( SDLConfig );
-- SDLConfig=NULL;
-+// Gets text string from a gtk entry, interpreting
-+// MSGTR_PREFERENCES_DriverDefault as null string.
-+char *getGtkEntryText(GtkWidget *from) {
-+ char *tmp = gtk_entry_get_text(GTK_ENTRY(from));
-+ if (strcmp(tmp, MSGTR_PREFERENCES_DriverDefault) == 0) {
-+ tmp = NULL;
-+ }
-+ return tmp;
- }
-
--static void sdlButton( GtkButton * button,gpointer user_data )
--{
-- switch( (int)user_data )
-- {
-- case 1:
-- gfree( (void **)&gtkAOSDLDriver ); gtkAOSDLDriver=strdup( gtk_entry_get_text( GTK_ENTRY( CESDLDriver ) ) );
-- case 0:
-- HideSDLConfig();
-- break;
-+// Sets text string of a gtk entry, interpreting
-+// null string as MSGTR_PREFERENCES_DriverDefault.
-+void setGtkEntryText(GtkWidget *dest, char *to) {
-+ if (!to) {
-+ to = MSGTR_PREFERENCES_DriverDefault;
- }
-+ gtk_entry_set_text(GTK_ENTRY(dest),to);
- }
-
--GtkWidget * create_SDLConfig( void )
--{
-- GList * CBSDLDriver_items=NULL;
-- GtkWidget * vbox604;
-- GtkWidget * table2;
-- GtkWidget * label;
-- GtkWidget * hbuttonbox6;
-- GtkAccelGroup * accel_group;
-+ GtkWidget *AudioConfig;
-+static GtkWidget *CEAudioDevice;
-+static GtkWidget *CBAudioDevice;
-+static GtkWidget *CEAudioMixer;
-+static GtkWidget *CBAudioMixer;
-+static GtkWidget *CEAudioMixerChannel;
-+static GtkWidget *CBAudioMixerChannel;
-+static GtkWidget *BAudioOk;
-+static GtkWidget *BAudioCancel;
-+
-+void ShowAudioConfig() {
-+ if (AudioConfig) gtkActive(AudioConfig);
-+ else AudioConfig = create_AudioConfig();
-
-- accel_group=gtk_accel_group_new();
-+#ifdef USE_OSS_AUDIO
-+ if (strncmp(ao_driver[0], "oss", 3) == 0) {
-+ setGtkEntryText(CEAudioDevice, gtkAOOSSDevice);
-+ setGtkEntryText(CEAudioMixer, gtkAOOSSMixer);
-+ setGtkEntryText(CEAudioMixerChannel, gtkAOOSSMixerChannel);
-+ }
-+#endif
-+#if defined(HAVE_ALSA9) || defined (HAVE_ALSA1X)
-+ if (strncmp(ao_driver[0], "alsa", 4) == 0) {
-+ setGtkEntryText(CEAudioDevice, gtkAOALSADevice);
-+ setGtkEntryText(CEAudioMixer, gtkAOALSAMixer);
-+ setGtkEntryText(CEAudioMixerChannel, gtkAOALSAMixerChannel);
-+ }
-+#endif
-+#ifdef HAVE_SDL
-+ if (strncmp(ao_driver[0], "sdl", 3) == 0) {
-+ setGtkEntryText(CEAudioDevice, gtkAOSDLDriver);
-+ }
-+#endif
-
-- SDLConfig=gtk_window_new( GTK_WINDOW_TOPLEVEL );
-- gtk_widget_set_name( SDLConfig,"SDLConfig" );
-- gtk_object_set_data( GTK_OBJECT( SDLConfig ),"SDLConfig",SDLConfig );
-- gtk_widget_set_usize( SDLConfig,270,70 );
-- gtk_window_set_title( GTK_WINDOW( SDLConfig ),MSGTR_SDLPreferences );
-- gtk_window_set_position( GTK_WINDOW( SDLConfig ),GTK_WIN_POS_CENTER );
-- gtk_window_set_policy( GTK_WINDOW( SDLConfig ),FALSE,FALSE,FALSE );
-- gtk_window_set_wmclass( GTK_WINDOW( SDLConfig ),"SDL Config","MPlayer" );
--
-- gtk_widget_realize( SDLConfig );
-- gtkAddIcon( SDLConfig );
--
-- vbox604=AddVBox( AddDialogFrame( SDLConfig ),0 );
--
-- table2=gtk_table_new( 2,2,FALSE );
-- gtk_widget_set_name( table2,"table2" );
-- gtk_widget_show( table2 );
-- gtk_box_pack_start( GTK_BOX( vbox604 ),table2,TRUE,TRUE,0 );
--
-- label=AddLabel( MSGTR_PREFERENCES_SDL_Driver,NULL );
-- gtk_table_attach( GTK_TABLE( table2 ),label,0,1,0,1,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
--
-- CBSDLDriver=AddComboBox( NULL );
-- gtk_table_attach( GTK_TABLE( table2 ),CBSDLDriver,1,2,0,1,(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
-- CBSDLDriver_items=g_list_append( CBSDLDriver_items,(gpointer) NULL );
-- CBSDLDriver_items=g_list_append( CBSDLDriver_items,(gpointer)"alsa" );
-- CBSDLDriver_items=g_list_append( CBSDLDriver_items,(gpointer)"arts" );
-- CBSDLDriver_items=g_list_append( CBSDLDriver_items,(gpointer)"esd" );
-- CBSDLDriver_items=g_list_append( CBSDLDriver_items,(gpointer)"jack" );
-- CBSDLDriver_items=g_list_append( CBSDLDriver_items,(gpointer)"oss" );
-- CBSDLDriver_items=g_list_append( CBSDLDriver_items,(gpointer)"nas" );
-- gtk_combo_set_popdown_strings( GTK_COMBO( CBSDLDriver ),CBSDLDriver_items );
-- g_list_free( CBSDLDriver_items );
--
-- CESDLDriver=GTK_COMBO( CBSDLDriver )->entry;
-- gtk_widget_set_name( CESDLDriver,"CESDLDriver" );
-- gtk_widget_show( CESDLDriver );
--
-- AddHSeparator( vbox604 );
--
-- hbuttonbox6=AddHButtonBox( vbox604 );
-- gtk_button_box_set_layout( GTK_BUTTON_BOX( hbuttonbox6 ),GTK_BUTTONBOX_END );
-- gtk_button_box_set_spacing( GTK_BUTTON_BOX( hbuttonbox6 ),10 );
-- BSDLOk=AddButton( MSGTR_Ok,hbuttonbox6 );
-- BSDLCancel=AddButton( MSGTR_Cancel,hbuttonbox6 );
-+ gtk_widget_show(AudioConfig);
-+ gtkSetLayer(AudioConfig);
-+}
-
-- gtk_signal_connect( GTK_OBJECT( SDLConfig ),"destroy",GTK_SIGNAL_FUNC( WidgetDestroy ),&SDLConfig );
--
-- gtk_signal_connect( GTK_OBJECT( BSDLOk ),"clicked",GTK_SIGNAL_FUNC( sdlButton ),(void*)1 );
-- gtk_signal_connect( GTK_OBJECT( BSDLCancel ),"clicked",GTK_SIGNAL_FUNC( sdlButton ),(void*)0 );
-+void HideAudioConfig() {
-+ if (!AudioConfig) return;
-+ gtk_widget_hide(AudioConfig);
-+ gtk_widget_destroy(AudioConfig);
-+ AudioConfig=NULL;
-+}
-
-- gtk_widget_add_accelerator( BSDLOk,"clicked",accel_group,GDK_Return,0,GTK_ACCEL_VISIBLE );
-- gtk_widget_add_accelerator( BSDLCancel,"clicked",accel_group,GDK_Escape,0,GTK_ACCEL_VISIBLE );
-+static void audioButton(GtkButton *button, gpointer user_data) {
-+ switch( (int)user_data ) {
-+ case 1:
-+#ifdef USE_OSS_AUDIO
-+ if (strncmp(ao_driver[0], "oss", 3) == 0) {
-+ gfree(&gtkAOOSSDevice);
-+ gtkAOOSSDevice = gstrdup(getGtkEntryText(CEAudioDevice));
-+ gfree(&gtkAOOSSMixer);
-+ gtkAOOSSMixer = gstrdup(getGtkEntryText(CEAudioMixer));
-+ gfree(&gtkAOOSSMixerChannel);
-+ gtkAOOSSMixer = gstrdup(getGtkEntryText(CEAudioMixerChannel));
-+ }
-+#endif
-+#if defined(HAVE_ALSA9) || defined (HAVE_ALSA1X)
-+ if (strncmp(ao_driver[0], "alsa", 4) == 0) {
-+ gfree(&gtkAOALSADevice);
-+ gtkAOALSADevice = gstrdup(getGtkEntryText(CEAudioDevice));
-+ gfree(&gtkAOALSAMixer);
-+ gtkAOALSAMixer = gstrdup(getGtkEntryText(CEAudioMixer));
-+ gfree(&gtkAOALSAMixerChannel);
-+ gtkAOALSAMixer = gstrdup(getGtkEntryText(CEAudioMixerChannel));
-+ }
-+#endif
-+#ifdef HAVE_SDL
-+ if (strncmp(ao_driver[0], "sdl", 3) == 0) {
-+ gfree(&gtkAOSDLDriver);
-+ gtkAOSDLDriver = gstrdup(getGtkEntryText(CEAudioDevice));
-+ }
-+#endif
-+ case 0:
-+ HideAudioConfig();
-+ break;
-+ }
-+}
-
-- gtk_window_add_accel_group( GTK_WINDOW( SDLConfig ),accel_group );
-+GtkWidget *create_AudioConfig() {
-+ GList *items = NULL;
-+ GtkWidget *vbox;
-+ GtkWidget *table;
-+ GtkWidget *label;
-+ GtkWidget *hbuttonbox;
-+ GtkAccelGroup *accel_group;
-+
-+ AudioConfig = gtk_window_new(GTK_WINDOW_TOPLEVEL);
-+ gtk_widget_set_name(AudioConfig, "AudioConfig");
-+ gtk_object_set_data(GTK_OBJECT(AudioConfig), "AudioConfig", AudioConfig);
-+ gtk_window_set_title(GTK_WINDOW(AudioConfig), MSGTR_AudioPreferences);
-+ gtk_window_set_position(GTK_WINDOW(AudioConfig), GTK_WIN_POS_CENTER);
-+ gtk_window_set_policy(GTK_WINDOW(AudioConfig), FALSE, FALSE, FALSE);
-+ gtk_window_set_wmclass(GTK_WINDOW(AudioConfig), "Audio Config", "MPlayer");
-+
-+ gtk_widget_realize(AudioConfig);
-+ gtkAddIcon(AudioConfig);
-+
-+ vbox = AddVBox(AddDialogFrame(AudioConfig), 0);
-+
-+ table = gtk_table_new(2, 3, FALSE);
-+ gtk_widget_set_name(table, "table");
-+ gtk_widget_show(table);
-+ gtk_box_pack_start(GTK_BOX(vbox), table, TRUE, TRUE, 0);
-+
-+ label = AddLabel(MSGTR_PREFERENCES_Audio_Device, NULL);
-+ gtk_table_attach(GTK_TABLE(table), label, 0, 1, 0, 1, (GtkAttachOptions)(GTK_FILL), (GtkAttachOptions)(0), 0, 0);
-+
-+ CBAudioDevice = AddComboBox(NULL);
-+ gtk_table_attach(GTK_TABLE(table), CBAudioDevice, 1, 2, 0, 1, (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), (GtkAttachOptions)(0), 0, 0);
-+ items = g_list_append(items,(gpointer)MSGTR_PREFERENCES_DriverDefault);
-+#ifdef USE_OSS_AUDIO
-+ if (strncmp(ao_driver[0], "oss", 3) == 0)
-+ items = appendOSSDevices(items);
-+#endif
-+#if defined(HAVE_ALSA9) || defined (HAVE_ALSA1X)
-+ if (strncmp(ao_driver[0], "alsa", 4) == 0)
-+ items = appendALSADevices(items);
-+#endif
-+#ifdef HAVE_SDL
-+ if (strncmp(ao_driver[0], "sdl", 3) == 0)
-+ items = appendSDLDevices(items);
-+#endif
-+ gtk_combo_set_popdown_strings(GTK_COMBO(CBAudioDevice), items);
-+ g_list_free(items);
-+ items = NULL;
-+
-+ CEAudioDevice = GTK_COMBO(CBAudioDevice)->entry;
-+ gtk_widget_set_name(CEAudioDevice, "CEAudioDevice");
-+ gtk_widget_show(CEAudioDevice);
-+
-+ label = AddLabel(MSGTR_PREFERENCES_Audio_Mixer, NULL);
-+ gtk_table_attach(GTK_TABLE(table), label, 0, 1, 1, 2, (GtkAttachOptions)(GTK_FILL), (GtkAttachOptions)(0), 0, 0);
-+
-+ CBAudioMixer = AddComboBox(NULL);
-+ gtk_table_attach(GTK_TABLE(table), CBAudioMixer, 1, 2, 1, 2, (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), (GtkAttachOptions)(0), 0, 0);
-+ items = g_list_append(items, (gpointer)MSGTR_PREFERENCES_DriverDefault);
-+#ifdef USE_OSS_AUDIO
-+ if (strncmp(ao_driver[0], "oss", 3) == 0)
-+ items = appendOSSMixers(items);
-+#endif
-+#if defined(HAVE_ALSA9) || defined (HAVE_ALSA1X)
-+ if (strncmp(ao_driver[0], "alsa", 4) == 0)
-+ items = appendALSAMixers(items);
-+#endif
-+ gtk_combo_set_popdown_strings(GTK_COMBO(CBAudioMixer), items);
-+ g_list_free(items);
-+ items = NULL;
-+
-+ CEAudioMixer = GTK_COMBO(CBAudioMixer)->entry;
-+ gtk_widget_set_name(CEAudioMixer, "CEAudioMixer");
-+ gtk_widget_show(CEAudioMixer);
-+
-+ label = AddLabel(MSGTR_PREFERENCES_Audio_MixerChannel, NULL);
-+ gtk_table_attach(GTK_TABLE(table), label, 0, 1, 2, 3, (GtkAttachOptions)(GTK_FILL), (GtkAttachOptions)(0), 0, 0);
-+
-+ CBAudioMixerChannel = AddComboBox(NULL);
-+ gtk_table_attach(GTK_TABLE(table), CBAudioMixerChannel, 1, 2, 2, 3, (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), (GtkAttachOptions)(0), 0, 0);
-+ items = g_list_append(items, (gpointer)MSGTR_PREFERENCES_DriverDefault);
-+#ifdef USE_OSS_AUDIO
-+ if (strncmp(ao_driver[0], "oss", 3) == 0)
-+ items = appendOSSMixerChannels(items);
-+#endif
-+#if defined(HAVE_ALSA9) || defined (HAVE_ALSA1X)
-+ if (strncmp(ao_driver[0], "alsa", 4) == 0)
-+ items = appendALSAMixerChannels(items);
-+#endif
-+ gtk_combo_set_popdown_strings(GTK_COMBO(CBAudioMixerChannel), items);
-+ g_list_free(items);
-+ items = NULL;
-+
-+ CEAudioMixerChannel = GTK_COMBO(CBAudioMixerChannel)->entry;
-+ gtk_widget_set_name(CEAudioMixerChannel, "CEAudioMixerChannel");
-+ gtk_widget_show(CEAudioMixerChannel);
-+
-+ AddHSeparator(vbox);
-+
-+ hbuttonbox = AddHButtonBox(vbox);
-+ gtk_button_box_set_layout(GTK_BUTTON_BOX(hbuttonbox), GTK_BUTTONBOX_END);
-+ gtk_button_box_set_spacing(GTK_BUTTON_BOX(hbuttonbox), 10);
-+ BAudioOk = AddButton(MSGTR_Ok, hbuttonbox);
-+ BAudioCancel = AddButton(MSGTR_Cancel, hbuttonbox);
-+
-+ gtk_signal_connect(GTK_OBJECT(AudioConfig), "destroy", GTK_SIGNAL_FUNC(WidgetDestroy), &AudioConfig);
-+ gtk_signal_connect(GTK_OBJECT(BAudioOk), "clicked", GTK_SIGNAL_FUNC(audioButton), (void*)1);
-+ gtk_signal_connect(GTK_OBJECT(BAudioCancel), "clicked", GTK_SIGNAL_FUNC(audioButton), (void*)0);
-+
-+ accel_group = gtk_accel_group_new();
-+ gtk_widget_add_accelerator(BAudioOk, "clicked", accel_group, GDK_Return, 0, GTK_ACCEL_VISIBLE);
-+ gtk_widget_add_accelerator(BAudioCancel, "clicked", accel_group, GDK_Escape, 0, GTK_ACCEL_VISIBLE);
-+ gtk_window_add_accel_group(GTK_WINDOW(AudioConfig), accel_group);
-
-- return SDLConfig;
-+ return AudioConfig;
- }
--#endif
-
- #ifdef HAVE_DXR3
- // --- dxr3 config box
-@@ -1667,6 +1688,6 @@
- vbox1=AddVBox( AddDialogFrame( DXR3Config ),0 );
- vbox2=AddVBox( vbox1,0 );
- hbox1=AddHBox( vbox2,1 );
-- AddLabel( MSGTR_PREFERENCES_OSS_Device,hbox1 );
-+ AddLabel( MSGTR_PREFERENCES_Audio_Device,hbox1 );
-
- CBDevice=AddComboBox( hbox1 );
-Index: Gui/mplayer/gtk/opts.h
-===================================================================
-RCS file: /cvsroot/mplayer/main/Gui/mplayer/gtk/opts.h,v
-retrieving revision 1.7
-diff -u -r1.7 opts.h
---- Gui/mplayer/gtk/opts.h 2 Jan 2003 12:42:31 -0000 1.7
-+++ Gui/mplayer/gtk/opts.h 24 Jul 2004 22:15:59 -0000
-@@ -4,22 +4,12 @@
-
- #include <gtk/gtk.h>
-
--#ifdef USE_OSS_AUDIO
--extern GtkWidget * OSSConfig;
--#endif
--#ifdef HAVE_SDL
--extern GtkWidget * SDLConfig;
--#endif
-+extern GtkWidget * AudioConfig;
- extern GtkWidget * Preferences;
- extern GtkWidget * prEFontName;
-
- extern GtkWidget * create_Preferences( void );
--#ifdef USE_OSS_AUDIO
--extern GtkWidget * create_OSSConfig( void );
--#endif
--#ifdef HAVE_SDL
--extern GtkWidget * create_SDLConfig( void );
--#endif
-+extern GtkWidget * create_AudioConfig( void );
-
- extern void ShowPreferences( void );
-
diff --git a/media-video/mplayer/mplayer-1.0_pre4-r7.ebuild b/media-video/mplayer/mplayer-1.0_pre4-r7.ebuild
index 2abbbf7a758f..f88b72658f54 100644
--- a/media-video/mplayer/mplayer-1.0_pre4-r7.ebuild
+++ b/media-video/mplayer/mplayer-1.0_pre4-r7.ebuild
@@ -1,10 +1,10 @@
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-video/mplayer/mplayer-1.0_pre4-r7.ebuild,v 1.12 2004/08/12 17:31:43 ferringb Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-video/mplayer/mplayer-1.0_pre4-r7.ebuild,v 1.13 2004/08/18 06:24:01 chriswhite Exp $
inherit eutils flag-o-matic kmod
-IUSE="3dfx 3dnow aalib alsa altivec arts bidi debug divx4linux dvb cdparanoia directfb dvd dvdread edl encode esd fbdev gif ggi gtk ipv6 joystick jpeg libcaca lirc live lzo mad matroska matrox mmx mpeg mythtv nas network nls oggvorbis opengl oss png rtc samba sdl sse svga tga theora truetype v4l v4l2 xinerama X xmms xv xvid gnome"
+IUSE="3dfx 3dnow 3dnowex aalib alsa altivec arts bidi debug divx4linux dvb cdparanoia directfb dvd dvdread edl encode esd fbcon gif ggi gtk ipv6 joystick jpeg libcaca lirc live lzo mad matroska matrox mmx mmx2 mpeg mythtv nas network nls oggvorbis opengl oss png rtc samba sdl sse sse2 svga tga theora truetype v4l v4l2 xinerama X xmms xv xvid gnome"
BLUV=1.4
SVGV=1.9.17
@@ -15,6 +15,7 @@ S="${WORKDIR}/MPlayer-${MY_PV}"
SRC_URI="mirror://mplayer/MPlayer/releases/MPlayer-${MY_PV}.tar.bz2
mirror://mplayer/releases/fonts/font-arial-iso-8859-1.tar.bz2
mirror://mplayer/releases/fonts/font-arial-iso-8859-2.tar.bz2
+ mirror://gentoo/${P}-mga-kernel2.6.patch.tar.bz2
svga? ( http://mplayerhq.hu/~alex/svgalib_helper-${SVGV}-mplayer.tar.bz2 )
gtk? ( mirror://mplayer/Skin/Blue-${BLUV}.tar.bz2 )"
# Only install Skin if GUI should be build (gtk as USE flag)
@@ -79,8 +80,9 @@ KEYWORDS="x86 ppc alpha amd64 ~ia64 ~hppa ~sparc"
pkg_setup() {
echo
einfo "Please note that we do not use C[XX]FLAGS from /etc/make.conf"
- einfo "or the environment, as the MPlayer guys then do not give support"
- einfo "in case of bug reports!."
+ einfo "or the environment, as the upstream maintainers will then"
+ einfo "ignore bug reports and refuse support."
+
echo
echo -ne "\a" ; sleep 0.1 &>/dev/null ; sleep 0,1 &>/dev/null
echo -ne "\a" ; sleep 1
@@ -100,6 +102,9 @@ src_unpack() {
cd ${S}
+ # fixes bug reported by email from Selwyn Tang
+ epatch ${FILESDIR}/${P}-mpst.patch
+
# fixes bug #55456 for amd64 and fullscreen Bug #43010
epatch ${FILESDIR}/gui_vuln_code.patch
@@ -134,7 +139,7 @@ src_unpack() {
#Setup the matrox makefile
if use matrox; then
get_kernel_info
- epatch ${FILESDIR}/mplayer-1.0_pre4-mga-kernel2.6.patch
+ epatch ${DISTDIR}/${P}-mga-kernel2.6.patch.tar.bz2
sed -i -e \
"s:^#KERNEL_OUTPUT_PATH=: \
KERNEL_OUTPUT_PATH =${KV_OUTPUT}:" \
@@ -208,16 +213,12 @@ src_compile() {
myconf="${myconf} $(use_enable matrox xmga)"
fi
- if ! use 3dnow; then
- myconf="${myconf} --disable-3dnow --disable-3dnowex";
- fi
-
- if ! use sse; then
- myconf="${myconf} --disable-sse --disable-sse2";
- fi
- if use !mmx && use !3dnow && use !sse; then
- myconf="${myconf} --disable-mmx --disable-mmx2";
- fi
+ myconf="${myconf} $(use_enable 3dnow)"
+ myconf="${myconf} $(use_enable 3dnowex)"
+ myconf="${myconf} $(use_enable sse)"
+ myconf="${myconf} $(use_enable sse2)"
+ myconf="${myconf} $(use_enable mmx)"
+ myconf="${myconf} $(use_enable mmx2)"
if [ -d /opt/RealPlayer9/Real/Codecs ]; then
einfo "Setting REALLIBDIR to /opt/RealPlayer9/Real/Codecs..."
@@ -284,7 +285,7 @@ src_compile() {
$(use_enable aalib aa) \
$(use_enable directfb) \
$(use_enable dvb) \
- $(use_enable fbdev) \
+ $(use_enable fbcon fbdev) \
$(use_enable ggi) \
$(use_enable libcaca caca) \
$(use_enable opengl gl) \
diff --git a/media-video/mplayer/mplayer-1.0_pre5-r2.ebuild b/media-video/mplayer/mplayer-1.0_pre5-r2.ebuild
index e60a097aaa94..0f6000580db3 100644
--- a/media-video/mplayer/mplayer-1.0_pre5-r2.ebuild
+++ b/media-video/mplayer/mplayer-1.0_pre5-r2.ebuild
@@ -1,10 +1,10 @@
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-video/mplayer/mplayer-1.0_pre5-r2.ebuild,v 1.15 2004/08/12 15:09:20 chriswhite Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-video/mplayer/mplayer-1.0_pre5-r2.ebuild,v 1.16 2004/08/18 06:24:01 chriswhite Exp $
inherit eutils flag-o-matic kmod
-IUSE="3dfx 3dnow aalib alsa altivec arts bidi debug divx4linux dvb cdparanoia directfb dvd dvdread edl encode esd fbdev gif ggi gtk ipv6 joystick jpeg libcaca lirc live lzo mad matroska matrox mpeg mmx mythtv nas network nls oggvorbis opengl oss rtc samba sdl sse svga tga theora truetype v4l v4l2 X xinerama xmms xv xvid"
+IUSE="3dfx 3dnow aalib alsa altivec arts bidi debug divx4linux dvb cdparanoia directfb dvd dvdread edl encode esd fbcon gif ggi gtk ipv6 joystick jpeg libcaca lirc live lzo mad matroska matrox mpeg mmx mythtv nas network nls oggvorbis opengl oss rtc samba sdl sse svga tga theora truetype v4l v4l2 X xinerama xmms xv xvid"
BLUV=1.4
SVGV=1.9.17
@@ -15,6 +15,7 @@ S="${WORKDIR}/MPlayer-${MY_PV}"
SRC_URI="mirror://mplayer/MPlayer/releases/MPlayer-${MY_PV}.tar.bz2
mirror://mplayer/releases/fonts/font-arial-iso-8859-1.tar.bz2
mirror://mplayer/releases/fonts/font-arial-iso-8859-2.tar.bz2
+ mirror://gentoo/${P}-alsa-gui.patch.tar.bz2
svga? ( http://mplayerhq.hu/~alex/svgalib_helper-${SVGV}-mplayer.tar.bz2 )
gtk? ( mirror://mplayer/Skin/Blue-${BLUV}.tar.bz2 )"
@@ -140,12 +141,12 @@ src_unpack() {
#mplayer gui uses oss all the time.
#this patch enables true alsa output in
#gmplayer. Fixes Bug #58619.
- use alsa && epatch ${FILESDIR}/${P}-alsa-gui.patch
+ use alsa && epatch ${DISTDIR}/${P}-alsa-gui.patch
#Setup the matrox makefile
if use matrox; then
get_kernel_info
- epatch ${FILESDIR}/mplayer-1.0_pre5-mga-kernel-2.6.patch
+ epatch ${FILESDIR}/${P}-mga-kernel-2.6.patch
sed -i -e \
"s:^#KERNEL_OUTPUT_PATH=: \
KERNEL_OUTPUT_PATH =${KV_OUTPUT}:" \
@@ -245,7 +246,7 @@ src_compile() {
else
myconf="${myconf} --disable-tdfxvid"
fi
- if use fbdev && use 3dfx; then
+ if use fbcon && use 3dfx; then
myconf="${myconf} --enable-tdfxfb"
else
myconf="${myconf} --disable-tdfxfb"
@@ -253,7 +254,7 @@ src_compile() {
myconf="${myconf} $(use_enable aalib aa)"
myconf="${myconf} $(use_enable directfb)"
myconf="${myconf} $(use_enable dvb)"
- myconf="${myconf} $(use_enable fbdev)"
+ myconf="${myconf} $(use_enable fbcon fbdev)"
myconf="${myconf} $(use_enable ggi)"
myconf="${myconf} $(use_enable libcaca caca)"
if use matrox && use X; then
diff --git a/media-video/mplayer/mplayer-1.0_pre5-r3.ebuild b/media-video/mplayer/mplayer-1.0_pre5-r3.ebuild
new file mode 100644
index 000000000000..77e65fe64d42
--- /dev/null
+++ b/media-video/mplayer/mplayer-1.0_pre5-r3.ebuild
@@ -0,0 +1,508 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-video/mplayer/mplayer-1.0_pre5-r3.ebuild,v 1.1 2004/08/18 06:24:01 chriswhite Exp $
+
+inherit eutils flag-o-matic kmod
+
+IUSE="3dfx 3dnow 3dnowex aalib alsa altivec arts bidi debug divx4linux doc dvb cdparanoia directfb dvd dvdread edl encode esd fbcon gif ggi gtk i8x0 ipv6 joystick jpeg libcaca lirc live lzo mad matroska matrox mpeg mmx mmx2 mythtv nas network nls nvidia oggvorbis opengl oss png rtc samba sdl sse sse2 svga tga theora truetype v4l v4l2 X xinerama xmms xv xvid xvmc"
+
+BLUV=1.4
+SVGV=1.9.17
+
+# Handle PREversions as well
+MY_PV="${PV/_/}"
+S="${WORKDIR}/MPlayer-${MY_PV}"
+SRC_URI="mirror://mplayer/MPlayer/releases/MPlayer-${MY_PV}.tar.bz2
+ mirror://mplayer/releases/fonts/font-arial-iso-8859-1.tar.bz2
+ mirror://mplayer/releases/fonts/font-arial-iso-8859-2.tar.bz2
+ mirror://gentoo/mplayer-1.0_pre4-mga-kernel2.6.patch.tar.bz2
+ mirror://gentoo/${P}-alsa-gui.patch.tar.bz2
+ svga? ( http://mplayerhq.hu/~alex/svgalib_helper-${SVGV}-mplayer.tar.bz2 )
+ gtk? ( mirror://mplayer/Skin/Blue-${BLUV}.tar.bz2 )"
+
+# Only install Skin if GUI should be build (gtk as USE flag)
+DESCRIPTION="Media Player for Linux"
+HOMEPAGE="http://www.mplayerhq.hu/"
+
+# 'encode' in USE for MEncoder.
+RDEPEND="xvid? ( >=media-libs/xvid-0.9.0 )
+ x86? (
+ divx4linux? ( >=media-libs/divx4linux-20030428 )
+ >=media-libs/win32codecs-0.60
+ )
+ aalib? ( media-libs/aalib )
+ alsa? ( media-libs/alsa-lib )
+ arts? ( kde-base/arts )
+ bidi? ( dev-libs/fribidi )
+ cdparanoia? ( media-sound/cdparanoia )
+ directfb? ( dev-libs/DirectFB )
+ dvd? ( dvdread? ( media-libs/libdvdread ) )
+ encode? (
+ media-sound/lame
+ >=media-libs/libdv-0.9.5
+ )
+ esd? ( media-sound/esound )
+ gif? ( media-libs/giflib
+ media-libs/libungif )
+ ggi? ( media-libs/libggi )
+ gtk? (
+ media-libs/libpng
+ virtual/x11
+ =x11-libs/gtk+-1.2*
+ =dev-libs/glib-1.2*
+ )
+ jpeg? ( media-libs/jpeg )
+ libcaca? ( media-libs/libcaca )
+ lirc? ( app-misc/lirc )
+ lzo? ( dev-libs/lzo )
+ mad? ( media-libs/libmad )
+ matroska? ( >=media-libs/libmatroska-0.7.0 )
+ mpeg? ( media-libs/faad2 )
+ nas? ( media-libs/nas )
+ nls? ( sys-devel/gettext )
+ oggvorbis? ( media-libs/libvorbis )
+ opengl? ( virtual/opengl )
+ png? ( media-libs/libpng )
+ samba? ( >=net-fs/samba-2.2.8a )
+ sdl? ( media-libs/libsdl )
+ svga? ( media-libs/svgalib )
+ !ia64? (
+ theora? ( media-libs/libtheora )
+ live? ( >=media-plugins/live-2004.07.20 )
+ )
+ truetype? ( >=media-libs/freetype-2.1 )
+ xinerama? ( virtual/x11 )
+ xmms? ( media-sound/xmms )
+ >=sys-apps/portage-2.0.36"
+
+DEPEND="${RDEPEND}
+ x86? ( dev-lang/nasm )
+ app-arch/unzip"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~x86 ~ppc ~alpha ~amd64 ~ia64 ~hppa ~sparc"
+
+
+pkg_setup() {
+ echo
+ einfo "Please note that we do not use C[XX]FLAGS from /etc/make.conf"
+ einfo "or the environment, as the upstream maintainers will then"
+ einfo "ignore bug reports and refuse support."
+
+ echo
+ echo -ne "\a" ; sleep 0.1 &>/dev/null ; sleep 0,1 &>/dev/null
+ echo -ne "\a" ; sleep 1
+ echo -ne "\a" ; sleep 0.1 &>/dev/null ; sleep 0,1 &>/dev/null
+ echo -ne "\a" ; sleep 1
+ sleep 3
+}
+
+src_unpack() {
+
+ unpack MPlayer-${MY_PV}.tar.bz2 \
+ font-arial-iso-8859-1.tar.bz2 font-arial-iso-8859-2.tar.bz2
+
+ use svga && unpack svgalib_helper-${SVGV}-mplayer.tar.bz2
+
+ use gtk && unpack Blue-${BLUV}.tar.bz2
+
+ cd ${S}
+
+ if use !network; then
+ einfo "Please note, a new network USE flag was added for users"
+ einfo "with networkless installs. If you use mplayer for streaming"
+ einfo "media, please enable the network USE flag or it will not work!"
+ einfo
+ fi
+
+ # Fix head/tail call for new coreutils
+ epatch ${FILESDIR}/${PN}-0.90-coreutils-fixup.patch
+
+ #bug #49669, horrid syntax errors in help/help_mp-ro.h
+ epatch ${FILESDIR}/mplayer-1.0_pre4-help_mp-ro.h.patch
+
+ #adds mythtv support to mplayer
+ use mythtv && epatch ${FILESDIR}/mplayer-mythtv.patch
+
+ # GCC 3.4 fixes
+ epatch ${FILESDIR}/mplayer-1.0_pre4-alsa-gcc34.patch
+
+ #Workaround for the altivec softscaler issues
+ epatch ${FILESDIR}/mplayer-1.0_pre5-yuv2rbg_kludge.patch
+
+ #bug #55936, eradicator's cachefill patch.
+ epatch ${FILESDIR}/cachefill.patch
+
+ #bug #58082. Fixes LANGUAGE variable issues
+ epatch ${FILESDIR}/mplayer-1.0_pre5-r1-conf_locale.patch
+
+ #fixes recent api changes to the latest live
+ use live && epatch ${FILESDIR}/${P}-live.patch
+
+ #mplayer gui uses oss all the time.
+ #this patch enables true alsa output in
+ #gmplayer. Fixes Bug #58619.
+ use alsa && epatch ${DISTDIR}/${P}-alsa-gui.patch.tar.bz2
+
+ #Setup the matrox makefile
+ if use matrox; then
+ get_kernel_info
+ epatch ${FILESDIR}/${P}-mga-kernel-2.6.patch
+ sed -i -e \
+ "s:^#KERNEL_OUTPUT_PATH=: \
+ KERNEL_OUTPUT_PATH =${KV_OUTPUT}:" \
+ ${S}/Makefile
+ fi # end of matrox related stuff
+
+ # Fix hppa compilation
+ [ "${ARCH}" = "hppa" ] && sed -i -e "s/-O4/-O1/" "${S}/configure"
+
+ if use svga
+ then
+ echo
+ einfo "Enabling vidix non-root mode."
+ einfo "(You need a proper svgalib_helper.o module for your kernel"
+ einfo " to actually use this)"
+ echo
+
+ mv ${WORKDIR}/svgalib_helper ${S}/libdha
+ fi
+
+ # Remove kernel-2.6 workaround as the problem it works around is
+ # fixed, and the workaround breaks sparc
+ use sparc && sed -i 's:#define __KERNEL__::' osdep/kerneltwosix.h
+}
+
+src_compile() {
+
+ filter-flags -fPIE -fPIC
+
+ local myconf=
+ ################
+ #Optional features#
+ ###############
+ myconf="${myconf} $(use_enable bidi fribidi)"
+ myconf="${myconf} $(use_enable cdparanoia)"
+ if use dvd; then
+ myconf="${myconf} $(use_enable dvdread) $(use_enable !dvdread mpdvdkit)"
+ else
+ myconf="${myconf} --disable-dvdread --disable-mpdvdkit"
+ fi
+ myconf="${myconf} $(use_enable edl)"
+ myconf="${myconf} $(use_enable encode mencoder)"
+ myconf="${myconf} $(use_enable gtk gui)"
+
+ if use !gtk && use !X && use !xv && use !xinerama; then
+ myconf="${myconf} --disable-gui --disable-x11 --disable-xv --disable-xmga --disable-xinerama --disable-vm --disable-xvmc"
+ else
+ #note we ain't touching --enable-vm. That should be locked down in the future.
+ myconf="${myconf} --enable-x11 $(use_enable xinerama) $(use_enable xv) $(use_enable gtk gui)"
+ fi
+
+ # disable png *only* if gtk && png aren't on
+ if use png || use gtk; then
+ myconf="${myconf} --enable-png"
+ else
+ myconf="${myconf} --disable-png"
+ fi
+ myconf="${myconf} $(use_enable ipv6 inet6)"
+ myconf="${myconf} $(use_enable joystick)"
+ myconf="${myconf} $(use_enable lirc)"
+ if use ia64 || use !network; then
+ myconf="${myconf} --disable-live"
+ else
+ myconf="${myconf} $(use_enable live)"
+ fi
+ myconf="${myconf} $(use_enable network) $(use_enable network ftp)"
+ myconf="${myconf} $(use_enable rtc)"
+ myconf="${myconf} $(use_enable samba smb)"
+ myconf="${myconf} $(use_enable truetype freetype)"
+ myconf="${myconf} $(use_enable v4l tv-v4l)"
+ myconf="${myconf} $(use_enable v4l2 tv-v4l2)"
+
+ #########
+ # Codecs #
+ ########
+ myconf="${myconf} $(use_enable divx4linux)"
+ myconf="${myconf} $(use_enable gif)"
+ myconf="${myconf} $(use_enable jpeg)"
+ myconf="${myconf} $(use_enable lzo liblzo)"
+ myconf="${myconf} $(use_enable matroska external-matroska) $(use_enable !matroska internal-matroska)"
+ myconf="${myconf} $(use_enable mpeg external-faad) $(use_enable !mpeg internal-faad)"
+ myconf="${myconf} $(use_enable oggvorbis vorbis)"
+ if use ia64; then
+ myconf="${myconf} --disable-theora"
+ else
+ myconf="${myconf} $(use_enable theora)"
+ fi
+ myconf="${myconf} $(use_enable xmms)"
+ myconf="${myconf} $(use_enable xvid)"
+
+ #############
+ # Video Output #
+ #############
+ myconf="${myconf} $(use_enable 3dfx)"
+ if use xvid && use 3dfx; then
+ myconf="${myconf} --enable-tdfxvid"
+ else
+ myconf="${myconf} --disable-tdfxvid"
+ fi
+ if use fbcon && use 3dfx; then
+ myconf="${myconf} --enable-tdfxfb"
+ else
+ myconf="${myconf} --disable-tdfxfb"
+ fi
+ myconf="${myconf} $(use_enable aalib aa)"
+ myconf="${myconf} $(use_enable directfb)"
+ myconf="${myconf} $(use_enable dvb)"
+ myconf="${myconf} $(use_enable fbcon fbdev)"
+ myconf="${myconf} $(use_enable ggi)"
+ myconf="${myconf} $(use_enable libcaca caca)"
+ if use matrox && use X; then
+ myconf="${myconf} $(use_enable matrox xmga)"
+ fi
+ myconf="${myconf} $(use_enable opengl gl)"
+ myconf="${myconf} $(use_enable sdl)"
+ myconf="${myconf} $(use_enable svga)"
+ myconf="${myconf} $(use_enable tga)"
+
+ ( use xvmc && use nvidia ) \
+ && myconf="${myconf} --enable-xvmc --with-xvmclib=XvMCNVIDIA"
+
+ ( use xvmc && use i8x0 ) \
+ && myconf="${myconf} --enable-xvmc --with-xvmclib=I810XvMC"
+
+ ( use xvmc && use nvidia && use i8x0 ) \
+ && {
+ eerror "Invalid combination of USE flags"
+ eerror "When building support for xvmc, you may only"
+ eerror "include support for one video card:"
+ eerror " nvidia, i8x0"
+ eerror ""
+ eerror "Emerge again with different USE flags"
+
+ exit 1
+ }
+
+ ( use xvmc && ! use nvidia && ! use i8x0 ) && {
+ ewarn "You tried to build with xvmc support."
+ ewarn "No supported graphics hardware was specified."
+ ewarn ""
+ ewarn "No xvmc support will be included."
+ ewarn "Please one appropriate USE flag and re-emerge:"
+ ewarn " nvidia or i8x0"
+
+ myconf="${myconf} --disable-xvmc"
+ }
+
+ #############
+ # Audio Output #
+ #############
+ myconf="${myconf} $(use_enable alsa)"
+ myconf="${myconf} $(use_enable arts)"
+ myconf="${myconf} $(use_enable esd)"
+ myconf="${myconf} $(use_enable mad)"
+ myconf="${myconf} $(use_enable nas)"
+ myconf="${myconf} $(use_enable oss ossaudio)"
+
+ #################
+ # Advanced Options #
+ #################
+ myconf="${myconf} $(use_enable 3dnow)"
+ myconf="${myconf} $(use_enable 3dnowex)";
+ myconf="${myconf} $(use_enable sse)"
+ myconf="${myconf} $(use_enable sse2)";
+ myconf="${myconf} $(use_enable mmx)"
+ myconf="${myconf} $(use_enable mmx2)"
+ myconf="${myconf} $(use_enable 3dnow) $(use_enable 3dnow 3dnowex)"
+ myconf="${myconf} $(use_enable altivec)"
+ myconf="${myconf} $(use_enable debug)"
+ myconf="${myconf} $(use_enable nls i18n)"
+
+ if [ -d /opt/RealPlayer9/Real/Codecs ]
+ then
+ einfo "Setting REALLIBDIR to /opt/RealPlayer9/Real/Codecs..."
+ REALLIBDIR="/opt/RealPlayer9/Real/Codecs"
+ elif [ -d /opt/RealPlayer8/Codecs ]
+ then
+ einfo "Setting REALLIBDIR to /opt/RealPlayer8/Codecs..."
+ REALLIBDIR="/opt/RealPlayer8/Codecs"
+ else
+ REALLIBDIR="/usr/lib/real"
+ fi
+
+ if [ -e /dev/.devfsd ]
+ then
+ myconf="${myconf} --enable-linux-devfs"
+ fi
+
+ # Build the matrox driver before mplayer configuration.
+ # That way the configure script sees it and builds the support
+ #build the matrox driver before the
+ if use matrox ; then
+ if use x86 ; then
+ check_KV
+ cd ${S}/drivers
+ # bad hack, will be fixed later
+ addwrite /usr/src/linux/
+ unset ARCH
+ make all || die "Matrox build failed! Your kernel may need to have `make mrproper` run on it before trying to use matrox support in this ebuild again."
+ cd ${S}
+ else
+ einfo "Not building matrox driver. It doesn't seem to like other archs. Please let me know at chriswhite@gentoo.org if you find out otherwise."
+ fi
+ fi
+
+ # leave this in place till the configure/compilation borkage is completely corrected back to pre4-r4 levels.
+ # it's intended for debugging so we can get the options we configure mplayer w/, rather then hunt about.
+ # it *will* be removed asap; in the meantime, doesn't hurt anything.
+ echo "${myconf}" > ${T}/configure-options
+
+ unset CFLAGS CXXFLAGS
+ ./configure --prefix=/usr \
+ --confdir=/usr/share/mplayer \
+ --datadir=/usr/share/mplayer \
+ --disable-runtime-cpudetection \
+ --enable-largefiles \
+ --enable-menu \
+ --enable-real \
+ --with-reallibdir=${REALLIBDIR} \
+ --with-x11incdir=/usr/X11R6/include \
+ ${myconf} || die
+
+ # when gif is autodetected, GIF_LIB is set correctly. We're explicitly controlling it, and it doesn't behave correctly.
+ # so... we have to help it along.
+ if use gif; then
+ sed -e "s:GIF_LIB =:GIF_LIB = -lungif:" -i config.mak
+ fi
+
+ einfo "Make"
+ make all || die "Failed to build MPlayer!"
+ einfo "Make completed"
+
+ # We build the shared libpostproc.so here so that our
+ # mplayer binary is not linked to it, ensuring that we
+ # do not run into issues ... (bug #14479)
+ cd ${S}/libavcodec/libpostproc
+ make SHARED_PP="yes" || die "Failed to build libpostproc.so!"
+}
+
+src_install() {
+
+ einfo "Make install"
+ make prefix=${D}/usr \
+ BINDIR=${D}/usr/bin \
+ LIBDIR=${D}/usr/lib \
+ CONFDIR=${D}/usr/share/mplayer \
+ DATADIR=${D}/usr/share/mplayer \
+ MANDIR=${D}/usr/share/man \
+ install || die "Failed to install MPlayer!"
+ einfo "Make install completed"
+
+ if use matrox; then
+ cd ${S}/drivers
+ insinto /lib/modules/${KV}/kernel/drivers/char
+ doins mga_vid.${KV_OBJ}
+ fi
+
+ dodoc AUTHORS ChangeLog README
+ # Install the documentation; DOCS is all mixed up not just html
+ if use doc ; then
+ find "${S}/DOCS" -type d | xargs -- chmod 0755
+ find "${S}/DOCS" -type f | xargs -- chmod 0644
+ cp -r "${S}/DOCS" "${D}/usr/share/doc/${PF}/" || die
+ fi
+
+ # Copy misc tools to documentation path, as they're not installed directly
+ # and yes, we are nuking the +x bit.
+ find "${S}/TOOLS" -type d | xargs -- chmod 0755
+ find "${S}/TOOLS" -type f | xargs -- chmod 0644
+ cp -r "${S}/TOOLS" "${D}/usr/share/doc/${PF}/" || die
+
+ # Install the default Skin and Gnome menu entry
+ if use gtk; then
+ dodir /usr/share/mplayer/Skin
+ cp -r ${WORKDIR}/Blue ${D}/usr/share/mplayer/Skin/default || die
+
+ # Fix the symlink
+ rm -rf ${D}/usr/bin/gmplayer
+ dosym mplayer /usr/bin/gmplayer
+ fi
+
+ if use gnome; then
+ insinto /usr/share/pixmaps
+ newins ${S}/Gui/mplayer/pixmaps/logo.xpm mplayer.xpm
+ insinto /usr/share/gnome/apps/Multimedia
+ doins ${FILESDIR}/mplayer.desktop
+ fi
+
+ dodir /usr/share/mplayer/fonts
+ local x=
+ # Do this generic, as the mplayer people like to change the structure
+ # of their zips ...
+ for x in $(find ${WORKDIR}/ -type d -name 'font-arial-??-iso-*')
+ do
+ cp -Rd ${x} ${D}/usr/share/mplayer/fonts
+ done
+ # Fix the font symlink ...
+ rm -rf ${D}/usr/share/mplayer/font
+ dosym fonts/font-arial-14-iso-8859-1 /usr/share/mplayer/font
+
+ insinto /etc
+ newins ${S}/etc/example.conf mplayer.conf
+ dosed -e 's/include =/#include =/' /etc/mplayer.conf
+ dosed -e 's/fs=yes/fs=no/' /etc/mplayer.conf
+ dosym ../../../etc/mplayer.conf /usr/share/mplayer/mplayer.conf
+
+ insinto /usr/share/mplayer
+ doins ${S}/etc/codecs.conf
+ doins ${S}/etc/input.conf
+ doins ${S}/etc/menu.conf
+}
+
+pkg_preinst() {
+
+ if [ -d "${ROOT}/usr/share/mplayer/Skin/default" ]
+ then
+ rm -rf ${ROOT}/usr/share/mplayer/Skin/default
+ fi
+}
+
+pkg_postinst() {
+
+ if use ppc
+ then
+ echo
+ einfo "When you see only GREEN salad on your G4 while playing"
+ einfo "a DivX, you should recompile _without_ altivec enabled."
+ einfo "Further information: http://bugs.gentoo.org/show_bug.cgi?id=18511"
+ echo
+ einfo "If everything functions fine with watching DivX and"
+ einfo "altivec enabled, please drop a comment on the mentioned bug!"
+ echo
+ einfo "libpostproc is no longer installed by mplayer. If you have an"
+ einfo "application that depends on it, install >=ffmpeg-0.4.8.20040222"
+ fi
+
+ if use matrox; then
+ depmod -a &>/dev/null || :
+ fi
+}
+
+pkg_postrm() {
+
+ # Cleanup stale symlinks
+ if [ -L ${ROOT}/usr/share/mplayer/font -a \
+ ! -e ${ROOT}/usr/share/mplayer/font ]
+ then
+ rm -f ${ROOT}/usr/share/mplayer/font
+ fi
+
+ if [ -L ${ROOT}/usr/share/mplayer/subfont.ttf -a \
+ ! -e ${ROOT}/usr/share/mplayer/subfont.ttf ]
+ then
+ rm -f ${ROOT}/usr/share/mplayer/subfont.ttf
+ fi
+}
+