diff options
author | Jörg Bornkessel <hd_brummy@gentoo.org> | 2007-11-14 04:38:32 +0000 |
---|---|---|
committer | Jörg Bornkessel <hd_brummy@gentoo.org> | 2007-11-14 04:38:32 +0000 |
commit | 4ab389eeeeebb5d9109491081ff8f37722be1059 (patch) | |
tree | 4f3dde918a0f05462d28053944d609087885058b /media-plugins | |
parent | amd64 stable, bug 198375 (diff) | |
download | gentoo-2-4ab389eeeeebb5d9109491081ff8f37722be1059.tar.gz gentoo-2-4ab389eeeeebb5d9109491081ff8f37722be1059.tar.bz2 gentoo-2-4ab389eeeeebb5d9109491081ff8f37722be1059.zip |
new snapshot, added patch to reduce the playspeed; thx to Sebastian Kemper on bug #199026
(Portage version: 2.1.3.19)
Diffstat (limited to 'media-plugins')
-rw-r--r-- | media-plugins/vdr-dvd/ChangeLog | 10 | ||||
-rw-r--r-- | media-plugins/vdr-dvd/files/digest-vdr-dvd-0.3.7_pre20071113 | 3 | ||||
-rw-r--r-- | media-plugins/vdr-dvd/files/dvd-a52drc-pre20071113.diff | 63 | ||||
-rw-r--r-- | media-plugins/vdr-dvd/files/dvdspeed-cvs-20071113.diff | 253 | ||||
-rw-r--r-- | media-plugins/vdr-dvd/files/gcc-4.x-compilefix.diff | 14 | ||||
-rw-r--r-- | media-plugins/vdr-dvd/vdr-dvd-0.3.7_pre20071113.ebuild | 30 |
6 files changed, 372 insertions, 1 deletions
diff --git a/media-plugins/vdr-dvd/ChangeLog b/media-plugins/vdr-dvd/ChangeLog index c25341eb64d8..9e51ab35d32b 100644 --- a/media-plugins/vdr-dvd/ChangeLog +++ b/media-plugins/vdr-dvd/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for media-plugins/vdr-dvd # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-plugins/vdr-dvd/ChangeLog,v 1.11 2007/08/18 22:32:25 zzam Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-plugins/vdr-dvd/ChangeLog,v 1.12 2007/11/14 04:38:32 hd_brummy Exp $ + +*vdr-dvd-0.3.7_pre20071113 (14 Nov 2007) + + 14 Nov 2007; Joerg Bornkessel <hd_brummy@gentoo.org> + +files/gcc-4.x-compilefix.diff, +files/dvd-a52drc-pre20071113.diff, + +files/dvdspeed-cvs-20071113.diff, +vdr-dvd-0.3.7_pre20071113.ebuild: + new snapshot, added patch to reduce the playspeed; thx to Sebastian Kemper + on bug #199026 *vdr-dvd-0.3.7_pre20070819 (18 Aug 2007) diff --git a/media-plugins/vdr-dvd/files/digest-vdr-dvd-0.3.7_pre20071113 b/media-plugins/vdr-dvd/files/digest-vdr-dvd-0.3.7_pre20071113 new file mode 100644 index 000000000000..8b05a944e372 --- /dev/null +++ b/media-plugins/vdr-dvd/files/digest-vdr-dvd-0.3.7_pre20071113 @@ -0,0 +1,3 @@ +MD5 70213c95fa9db4047ef098ffa54c9ac0 vdr-dvd-cvs-20071113.tar.bz2 64057 +RMD160 8a7919dddff059c233957dad025f809b1ee59519 vdr-dvd-cvs-20071113.tar.bz2 64057 +SHA256 b50e4952c49942fd6ddee38a2c88cb0e56a4fd857508ef3c9588c5ae87fdcbbc vdr-dvd-cvs-20071113.tar.bz2 64057 diff --git a/media-plugins/vdr-dvd/files/dvd-a52drc-pre20071113.diff b/media-plugins/vdr-dvd/files/dvd-a52drc-pre20071113.diff new file mode 100644 index 000000000000..ebf94cae50fc --- /dev/null +++ b/media-plugins/vdr-dvd/files/dvd-a52drc-pre20071113.diff @@ -0,0 +1,63 @@ +diff -Nur dvd.old/i18n.c dvd/i18n.c +--- dvd.old/i18n.c 2007-09-16 18:36:41.000000000 +0200 ++++ dvd/i18n.c 2007-11-13 15:05:07.000000000 +0100 +@@ -409,6 +409,32 @@ + "Seçilen audio ses bulunamadý!" // Türkçe + #endif + }, ++ { ++ "Setup.DVD$A52 DRC", // English ++ "A52 DRC", // Deutsch ++ "A52 DRC", // Slovenski ++ "A52 DRC", // Italiano ++ "A52 DRC", // Nederlands ++ "A52 DRC", // Portugus ++ "A52 DRC", // Franais ++ "A52 DRC", // Norsk ++ "A52 DRC", // suomi ++ "A52 DRC", // Polski ++ "A52 DRC", // Espanol ++ "A52 DRC", // ÅëëçíéêÜ (Greek) ++ "A52 DRC", // Svenska ++ "A52 DRC", // Romaneste ++ "A52 DRC", // Magyar ++ "A52 DRC", // Catal ++ "A52 DRC", // ÀãááÚØÙ (Russian) ++ "A52 DRC", // Hrvatski (Croatian) ++ "A52 DRC", // Eesti ++ "A52 DRC", // Dansk ++ "A52 DRC", // Czech ++#if VDRVERSNUM >= 10502 ++ "A52 DRC" // Türkçe ++#endif ++ }, + { NULL } + }; + #endif +diff -Nur dvd.old/setup-dvd.c dvd/setup-dvd.c +--- dvd.old/setup-dvd.c 2007-08-12 18:57:22.000000000 +0200 ++++ dvd/setup-dvd.c 2007-11-13 15:01:00.000000000 +0100 +@@ -48,6 +48,7 @@ + else if (!strcasecmp(Name, "HideMainMenu")) HideMainMenu = atoi(Value); + else if (!strcasecmp(Name, "ReadAHead")) ReadAHead = atoi(Value); + else if (!strcasecmp(Name, "Gain")) Gain = atoi(Value); ++ else if (!strcasecmp(Name, "AC3dynrng")) AC3dynrng = atoi(Value); + else + return false; + return true; +@@ -73,6 +74,7 @@ + Add(new cMenuEditBoolItem(tr("Setup.DVD$Hide Mainmenu Entry"), &data.HideMainMenu)); + Add(new cMenuEditBoolItem(tr("Setup.DVD$ReadAHead"), &data.ReadAHead)); + Add(new cMenuEditIntItem( tr("Setup.DVD$Gain (analog)"), &data.Gain, 0, 10)); ++ Add(new cMenuEditBoolItem(tr("Setup.DVD$A52 DRC"), &data.AC3dynrng)); + } + + void cMenuSetupDVD::Store(void) +@@ -86,6 +88,7 @@ + SetupStore("HideMainMenu", DVDSetup.HideMainMenu ); + SetupStore("ReadAHead", DVDSetup.ReadAHead ); + SetupStore("Gain", DVDSetup.Gain ); ++ SetupStore("AC3dynrng", DVDSetup.AC3dynrng ); + } + + diff --git a/media-plugins/vdr-dvd/files/dvdspeed-cvs-20071113.diff b/media-plugins/vdr-dvd/files/dvdspeed-cvs-20071113.diff new file mode 100644 index 000000000000..4b30c8bdae2e --- /dev/null +++ b/media-plugins/vdr-dvd/files/dvdspeed-cvs-20071113.diff @@ -0,0 +1,253 @@ +diff -Nur dvd/i18n.c dvd.new/i18n.c +--- dvd/i18n.c 2007-11-13 15:59:36.000000000 +0100 ++++ dvd.new/i18n.c 2007-11-13 15:51:06.000000000 +0100 +@@ -280,6 +280,32 @@ + #endif + }, + { ++ "Setup.DVD$DVD-ROM Speed", // English ++ "DVD-ROM-Geschwindigkeit", // Deutsch ++ "DVD-ROM Speed", // Slovenski ++ "DVD-ROM Speed", // Italiano ++ "DVD-ROM Speed", // Nederlands ++ "DVD-ROM Speed", // Português ++ "DVD-ROM Speed", // Français ++ "DVD-ROM Speed", // Norsk ++ "DVD-ROM Speed", // suomi ++ "DVD-ROM Speed", // Polski ++ "DVD-ROM Speed", // Español ++ "DVD-ROM Speed", // ÅëëçíéêÜ (Greek) ++ "DVD-ROM Speed", // Svenska ++ "DVD-ROM Speed", // Romaneste ++ "DVD-ROM Speed", // Magyar ++ "DVD-ROM Speed", // Català ++ "DVD-ROM Speed", // ÀãááÚØÙ (Russian) ++ "DVD-ROM Speed", // Hrvatski (Croatian) ++ "DVD-ROM Speed", // Eesti ++ "DVD-ROM Speed", // Dansk ++ "DVD-ROM Speed", // Czech ++#if VDRVERSNUM >= 10502 ++ "DVD-ROM Speed" // Türkçe ++#endif ++ }, ++ { + "Setup.DVD$Gain (analog)", + "Verstärkung (analog)", // Deutsch + "Ojaèanje (analogno)", // Slovenski +diff -Nur dvd/player-dvd.c dvd.new/player-dvd.c +--- dvd/player-dvd.c 2007-09-17 21:04:43.000000000 +0200 ++++ dvd.new/player-dvd.c 2007-11-13 15:58:50.000000000 +0100 +@@ -35,6 +35,11 @@ + #include "control-dvd.h" + #include "dvd.h" + ++/* Needed for DvdSetSpeed() */ ++#include <linux/cdrom.h> ++#include <scsi/sg.h> ++#include <sys/ioctl.h> ++ + /** + * this was "weak"'s solution of a forced + * SPU only stream choice, +@@ -252,6 +257,7 @@ + bool cDvdPlayer::HasBitStreamOut = false; + bool cDvdPlayer::HasSoftDeviceOut = false; + bool cDvdPlayer::SoftDeviceOutActive = false; ++bool cDvdPlayer::DvdSetSpeedActive = false; + + const int cDvdPlayer::MaxAudioTracks = 0x20; + const int cDvdPlayer::AudioTrackMask = 0x1F; +@@ -565,6 +571,93 @@ + #endif + } + ++/* This function was ripped off of mplayer */ ++void cDvdPlayer::DvdSetSpeed(const char *device, int speed) ++{ ++#if defined(SG_IO) && defined(GPCMD_SET_STREAMING) ++ int fd; ++ unsigned char buffer[28]; ++ unsigned char cmd[16]; ++ unsigned char sense[16]; ++ struct sg_io_hdr sghdr; ++ struct stat st; ++ ++ memset(&sghdr, 0, sizeof(sghdr)); ++ memset(buffer, 0, sizeof(buffer)); ++ memset(sense, 0, sizeof(sense)); ++ memset(cmd, 0, sizeof(cmd)); ++ memset(&st, 0, sizeof(st)); ++ ++ if (stat(device, &st) == -1) { ++ esyslog("ERROR: dvd-plugin: DVD device %s doesn't exist", device); ++ return; ++ } ++ ++ if (!S_ISBLK(st.st_mode)) { ++ esyslog("ERROR: dvd-plugin: DVD device %s is not a block device", device); ++ return; ++ } ++ ++ if ((fd = open(device, O_RDWR | O_NONBLOCK)) == -1) { ++ esyslog("ERROR: dvd-plugin: Failed to open DVD device %s O_RDWR | O_NONBLOCK", device); ++ return; ++ } ++ ++ if (speed < 100 && speed > 0) { /* speed times 1350KB/s (DVD single speed) */ ++ speed *= 1350; ++ } ++ ++ switch (speed) { ++ case 0: /* don't touch speed setting */ ++ close(fd); ++ return; ++ case -1: /* restore default value */ ++ speed = 0; ++ buffer[0] = 4; /* restore default */ ++ isyslog("dvd-plugin: Restoring initial DVD drive speed"); ++ break; ++ default: /* limit to <speed> KB/s */ ++ isyslog("dvd-plugin: Limiting speed to %d KB/s", speed); ++ break; ++ } ++ ++ sghdr.interface_id = 'S'; ++ sghdr.timeout = 5000; ++ sghdr.dxfer_direction = SG_DXFER_TO_DEV; ++ sghdr.mx_sb_len = sizeof(sense); ++ sghdr.dxfer_len = sizeof(buffer); ++ sghdr.cmd_len = sizeof(cmd); ++ sghdr.sbp = sense; ++ sghdr.dxferp = buffer; ++ sghdr.cmdp = cmd; ++ ++ cmd[0] = GPCMD_SET_STREAMING; ++ cmd[10] = sizeof(buffer); ++ ++ buffer[8] = 0xff; /* first sector 0, last sector 0xffffffff */ ++ buffer[9] = 0xff; ++ buffer[10] = 0xff; ++ buffer[11] = 0xff; ++ ++ buffer[12] = buffer[20] = (speed >> 24) & 0xff; /* <speed> kilobyte */ ++ buffer[13] = buffer[21] = (speed >> 16) & 0xff; ++ buffer[14] = buffer[22] = (speed >> 8) & 0xff; ++ buffer[15] = buffer[23] = speed & 0xff; ++ ++ buffer[18] = buffer[26] = 0x03; /* 1 second */ ++ buffer[19] = buffer[27] = 0xe8; ++ ++ if (ioctl(fd, SG_IO, &sghdr) < 0) { ++ esyslog("ERROR: dvd-plugin: DVD speed limiting failed"); ++ close(fd); ++ return; ++ } ++ isyslog("dvd-plugin: DVD speed limiting successful"); ++ DvdSetSpeedActive = true; ++ close(fd); ++#endif ++} ++ + void cDvdPlayer::Action(void) { + memset(event_buf, 0, sizeof(uint8_t)*4096); + +@@ -590,12 +683,21 @@ + } + dsyslog("dvd-plugin: SoftDeviceOutActive=%d, HasSoftDeviceOut=%d", SoftDeviceOutActive, HasSoftDeviceOut); + ++ /* Try to reduce drive speed if the user wants us to */ ++ if (DVDSetup.Speed) ++ DvdSetSpeed(const_cast<char *>(cDVD::getDVD()->DeviceName()), DVDSetup.Speed); ++ + if (dvdnav_open(&nav, const_cast<char *>(cDVD::getDVD()->DeviceName())) != DVDNAV_STATUS_OK) { + Skins.Message(mtError, tr("Error.DVD$Error opening DVD!")); + esyslog("ERROR: dvd-plugin cannot open dvdnav device %s -> input thread ended (pid=%d) !", const_cast<char *>(cDVD::getDVD()->DeviceName()), getpid()); + active = running = false; + nav=NULL; + fflush(NULL); ++ /* Try to restore drive speed if it was previously changed */ ++ if (DvdSetSpeedActive) { ++ DvdSetSpeed(const_cast<char *>(cDVD::getDVD()->DeviceName()), -1); ++ DvdSetSpeedActive = false; ++ } + return; + } + dvdnav_set_readahead_flag(nav, DVDSetup.ReadAHead); +@@ -1203,6 +1305,12 @@ + dvdnav_close(nav); + nav=NULL; + ++ /* Try to restore drive speed if it was previously changed */ ++ if (DvdSetSpeedActive) { ++ DvdSetSpeed(const_cast<char *>(cDVD::getDVD()->DeviceName()), -1); ++ DvdSetSpeedActive = false; ++ } ++ + DEBUGDVD("%s:%d: input thread ended (pid=%d)\n", __FILE__, __LINE__, getpid()); + fflush(NULL); + } +diff -Nur dvd/player-dvd.h dvd.new/player-dvd.h +--- dvd/player-dvd.h 2007-09-17 21:04:43.000000000 +0200 ++++ dvd.new/player-dvd.h 2007-11-13 15:51:06.000000000 +0100 +@@ -168,6 +168,7 @@ + static bool HasBitStreamOut; + static bool SoftDeviceOutActive; // currently used to switch for xine + static bool HasSoftDeviceOut; // currently used to switch for xine ++ static bool DvdSetSpeedActive; + + //dvd stuff + int currButtonN; +@@ -229,6 +230,7 @@ + void DrawSPU(); + void HideSPU(); + void EmptySPU(); ++ void DvdSetSpeed(const char*, int); + + void Pause(void); + void Play(void); +diff -Nur dvd/setup-dvd.c dvd.new/setup-dvd.c +--- dvd/setup-dvd.c 2007-11-13 15:59:36.000000000 +0100 ++++ dvd.new/setup-dvd.c 2007-11-13 15:51:06.000000000 +0100 +@@ -35,6 +35,7 @@ + Gain = 4; + + AC3dynrng = 0; ++ Speed = 0; + } + + bool cDVDSetup::SetupParse(const char *Name, const char *Value) +@@ -47,6 +48,7 @@ + else if (!strcasecmp(Name, "ShowSubtitles")) ShowSubtitles = atoi(Value); + else if (!strcasecmp(Name, "HideMainMenu")) HideMainMenu = atoi(Value); + else if (!strcasecmp(Name, "ReadAHead")) ReadAHead = atoi(Value); ++ else if (!strcasecmp(Name, "Speed")) Speed = atoi(Value); + else if (!strcasecmp(Name, "Gain")) Gain = atoi(Value); + else if (!strcasecmp(Name, "AC3dynrng")) AC3dynrng = atoi(Value); + else +@@ -73,6 +75,7 @@ + Add(new cMenuEditBoolItem(tr("Setup.DVD$Display subtitles"), &data.ShowSubtitles)); + Add(new cMenuEditBoolItem(tr("Setup.DVD$Hide Mainmenu Entry"), &data.HideMainMenu)); + Add(new cMenuEditBoolItem(tr("Setup.DVD$ReadAHead"), &data.ReadAHead)); ++ Add(new cMenuEditIntItem( tr("Setup.DVD$DVD-ROM Speed"), &data.Speed, 0, 4)); + Add(new cMenuEditIntItem( tr("Setup.DVD$Gain (analog)"), &data.Gain, 0, 10)); + Add(new cMenuEditBoolItem(tr("Setup.DVD$A52 DRC"), &data.AC3dynrng)); + } +@@ -87,6 +90,7 @@ + SetupStore("ShowSubtitles", DVDSetup.ShowSubtitles ); + SetupStore("HideMainMenu", DVDSetup.HideMainMenu ); + SetupStore("ReadAHead", DVDSetup.ReadAHead ); ++ SetupStore("Speed", DVDSetup.Speed ); + SetupStore("Gain", DVDSetup.Gain ); + SetupStore("AC3dynrng", DVDSetup.AC3dynrng ); + } +diff -Nur dvd/setup-dvd.h dvd.new/setup-dvd.h +--- dvd/setup-dvd.h 2005-01-05 17:32:21.000000000 +0100 ++++ dvd.new/setup-dvd.h 2007-11-13 15:51:06.000000000 +0100 +@@ -23,6 +23,7 @@ + int HideMainMenu; + int ReadAHead; + int Gain; ++ int Speed; + + // AC3 stuff + int AC3dynrng; diff --git a/media-plugins/vdr-dvd/files/gcc-4.x-compilefix.diff b/media-plugins/vdr-dvd/files/gcc-4.x-compilefix.diff new file mode 100644 index 000000000000..ea6e7b8f56c4 --- /dev/null +++ b/media-plugins/vdr-dvd/files/gcc-4.x-compilefix.diff @@ -0,0 +1,14 @@ +fix compile warnings on gcc-4.x +Joerg Bornkessel <hd_brummy@gentoo.org> 14 Nov 2007 +diff -Naur dvd-cvs-20071113.orig/player-dvd.c dvd-cvs-20071113/player-dvd.c +--- dvd-cvs-20071113.orig/player-dvd.c 2007-11-13 17:57:34.000000000 +0100 ++++ dvd-cvs-20071113/player-dvd.c 2007-11-13 17:57:58.000000000 +0100 +@@ -2768,7 +2768,7 @@ + void cDvdPlayer::GetAudioLanguageStr(const char **AudioLanguageStr) const + { + static char buffer[100]; +- char *audioTypeDescr = NULL; ++ const char *audioTypeDescr = NULL; + + if (!DVDActiveAndRunning()) { + *AudioLanguageStr = "n.a."; diff --git a/media-plugins/vdr-dvd/vdr-dvd-0.3.7_pre20071113.ebuild b/media-plugins/vdr-dvd/vdr-dvd-0.3.7_pre20071113.ebuild new file mode 100644 index 000000000000..0f47f3736351 --- /dev/null +++ b/media-plugins/vdr-dvd/vdr-dvd-0.3.7_pre20071113.ebuild @@ -0,0 +1,30 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-plugins/vdr-dvd/vdr-dvd-0.3.7_pre20071113.ebuild,v 1.1 2007/11/14 04:38:32 hd_brummy Exp $ + +inherit vdr-plugin + +MY_P="${PN}-cvs-${PV#*_pre}" +S="${WORKDIR}/${MY_P#vdr-}" + +DESCRIPTION="VDR Plugin: DVD-Player" +HOMEPAGE="http://sourceforge.net/projects/dvdplugin" +SRC_URI="mirror://gentoo/${MY_P}.tar.bz2 + http://dev.gentoo.org/~zzam/distfiles/${MY_P}.tar.bz2" + +SLOT="0" +LICENSE="GPL-2" +KEYWORDS="~amd64 ~x86" +IUSE="" + +DEPEND=">=media-video/vdr-1.3.34 + >=media-libs/libdvdcss-1.2.8 + >=media-libs/libdvdnav-0.1.9 + >=media-libs/libdvdread-0.9.4 + >=media-libs/a52dec-0.7.4" + +RDEPEND="${DEPEND}" + +PATCHES="${FILESDIR}/dvd-a52drc-pre20071113.diff + ${FILESDIR}/dvdspeed-cvs-20071113.diff + ${FILESDIR}/gcc-4.x-compilefix.diff" |