diff options
author | 2007-07-31 20:25:16 +0000 | |
---|---|---|
committer | 2007-07-31 20:25:16 +0000 | |
commit | 38753c32a57d80e64d9baef247123d9bf78290ca (patch) | |
tree | d4086b3f102c5a98e3a6d59458e2e506c443ae72 /media-plugins/vdr-softdevice | |
parent | Version bump to 1.0.2 and removing older versions. Closing bug #186640. (diff) | |
download | gentoo-2-38753c32a57d80e64d9baef247123d9bf78290ca.tar.gz gentoo-2-38753c32a57d80e64d9baef247123d9bf78290ca.tar.bz2 gentoo-2-38753c32a57d80e64d9baef247123d9bf78290ca.zip |
Solved audio problems with older recordings and similar stuff, Bug #175490.
(Portage version: 2.1.3_rc9)
Diffstat (limited to 'media-plugins/vdr-softdevice')
5 files changed, 214 insertions, 1 deletions
diff --git a/media-plugins/vdr-softdevice/ChangeLog b/media-plugins/vdr-softdevice/ChangeLog index 838e0925c8fb..1f7c7a21a473 100644 --- a/media-plugins/vdr-softdevice/ChangeLog +++ b/media-plugins/vdr-softdevice/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for media-plugins/vdr-softdevice # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-plugins/vdr-softdevice/ChangeLog,v 1.46 2007/07/29 10:41:07 zzam Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-plugins/vdr-softdevice/ChangeLog,v 1.47 2007/07/31 20:25:16 zzam Exp $ + +*vdr-softdevice-0.4.0.20070711-r1 (31 Jul 2007) + + 31 Jul 2007; Matthias Schwarzott <zzam@gentoo.org> + files/patches-0.4.0/series, +files/patches-0.4.0/stream-repacker.diff, + +vdr-softdevice-0.4.0.20070711-r1.ebuild: + Solved audio problems with older recordings and similar stuff, Bug #175490. 29 Jul 2007; Matthias Schwarzott <zzam@gentoo.org> -vdr-softdevice-0.4.0.20070515.ebuild: diff --git a/media-plugins/vdr-softdevice/files/digest-vdr-softdevice-0.4.0.20070711-r1 b/media-plugins/vdr-softdevice/files/digest-vdr-softdevice-0.4.0.20070711-r1 new file mode 100644 index 000000000000..3eeecc3b1532 --- /dev/null +++ b/media-plugins/vdr-softdevice/files/digest-vdr-softdevice-0.4.0.20070711-r1 @@ -0,0 +1,3 @@ +MD5 79ea86ce835afb2a2814dda089a150cb vdr-softdevice-cvs-20070711.tar.bz2 152000 +RMD160 23be2f95bbb3e4d649a3ade799c443c579f80b84 vdr-softdevice-cvs-20070711.tar.bz2 152000 +SHA256 6c869ae0c86fe42a24f767c40f538d07f70806474d7851643870b3a778b68c1a vdr-softdevice-cvs-20070711.tar.bz2 152000 diff --git a/media-plugins/vdr-softdevice/files/patches-0.4.0/series b/media-plugins/vdr-softdevice/files/patches-0.4.0/series index 2e3227d1b560..4feeaefd5db2 100644 --- a/media-plugins/vdr-softdevice/files/patches-0.4.0/series +++ b/media-plugins/vdr-softdevice/files/patches-0.4.0/series @@ -1,2 +1,3 @@ shm-fullscreen-parameter.diff shm-init-setupStore.diff +stream-repacker.diff diff --git a/media-plugins/vdr-softdevice/files/patches-0.4.0/stream-repacker.diff b/media-plugins/vdr-softdevice/files/patches-0.4.0/stream-repacker.diff new file mode 100644 index 000000000000..cec716a4336c --- /dev/null +++ b/media-plugins/vdr-softdevice/files/patches-0.4.0/stream-repacker.diff @@ -0,0 +1,67 @@ +Index: softdevice-cvs/mpeg2decoder.c +=================================================================== +--- softdevice-cvs.orig/mpeg2decoder.c ++++ softdevice-cvs/mpeg2decoder.c +@@ -174,7 +174,7 @@ void cStreamDecoder::Action() + freezeMode=false; + AVPacket *pkt; + +- while ( PacketQueue.Available() < 7 && active) { ++ while ( PacketQueue.Available() < 3 && active) { + BUFDEB("wait while loop packets %d StreamDecoder pid:%d type %d\n", + PacketQueue.Available(),getpid(),context->codec_type ); + usleep(10000); +@@ -1124,20 +1124,31 @@ void cMpeg2Decoder::Action() + usleep(50000); + + BUFDEB("av_read_frame start\n"); +- //ret = av_read_frame(ic, &pkt); +- ret = av_read_packet(ic, &pkt); ++ ret = av_read_frame(ic, &pkt); ++ //ret = av_read_packet(ic, &pkt); + if (ret < 0) { + BUFDEB("cMpeg2Decoder Stream Error!\n"); + if (ThreadActive) + usleep(10000); + continue; + } +- //av_dup_packet(&pkt); ++ av_dup_packet(&pkt); + PacketCount++; + BUFDEB("got packet from av_read_frame!\n"); + ++#if LIBAVFORMAT_BUILD > 4623 ++ AVRational time_base; ++ time_base=ic->streams[pkt.stream_index]->time_base; ++ if ( pkt.pts != (int64_t) AV_NOPTS_VALUE ) { ++ pkt.pts=av_rescale(pkt.pts, AV_TIME_BASE* (int64_t)time_base.num, time_base.den)/100 ; ++ }; ++ ++ //printf("PTS: %lld new %lld num %d den %d\n",PTS,pkt.pts, ++ // time_base.num,time_base.den); ++#else + if ( pkt.pts != (int64_t) AV_NOPTS_VALUE ) + pkt.pts/=9; ++#endif + + QueuePacket(ic,pkt,packetMode); + +@@ -1193,9 +1204,6 @@ void cMpeg2Decoder::ResetDecoder(int Str + void cMpeg2Decoder::QueuePacket(const AVFormatContext *ic, AVPacket &pkt, + bool PacketMode) + { +- BUFDEB("QueuePacket AudioIdx: %d VideoIdx %d pkt.stream_index: %d\n", +- AudioIdx,VideoIdx,pkt.stream_index); +- + if (!ic) { + fprintf(stderr,"Error: ic is null!\n"); + av_free_packet(&pkt); +@@ -1221,6 +1229,8 @@ void cMpeg2Decoder::QueuePacket(const AV + BUFDEB("Unknown packet type! Return;\n"); + return; + }; ++ BUFDEB("QueuePacket AudioIdx: %d VideoIdx %d pkt.stream_index: %d, packet_type: %d\n", ++ AudioIdx,VideoIdx,pkt.stream_index,packet_type); + + // check if there are new streams + if ( AudioIdx != DONT_PLAY && packet_type == CODEC_TYPE_AUDIO diff --git a/media-plugins/vdr-softdevice/vdr-softdevice-0.4.0.20070711-r1.ebuild b/media-plugins/vdr-softdevice/vdr-softdevice-0.4.0.20070711-r1.ebuild new file mode 100644 index 000000000000..e8d1bff4e9c5 --- /dev/null +++ b/media-plugins/vdr-softdevice/vdr-softdevice-0.4.0.20070711-r1.ebuild @@ -0,0 +1,135 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-plugins/vdr-softdevice/vdr-softdevice-0.4.0.20070711-r1.ebuild,v 1.1 2007/07/31 20:25:16 zzam Exp $ + +inherit vdr-plugin versionator + +DESCRIPTION="VDR Plugin: Software output-Device" +HOMEPAGE="http://softdevice.berlios.de/" + +# Detect snapshots +SNAP_V="$(get_version_component_range 4)" +if [[ "$SNAP_V" ]]; then + MY_P="${PN}-cvs-${SNAP_V}" + S="${WORKDIR}/${MY_P#vdr-}" + SRC_URI="mirror://gentoo/${MY_P}.tar.bz2 + http://dev.gentoo.org/~zzam/distfiles/${MY_P}.tar.bz2" +else + SRC_URI="mirror://berlios/${PN#vdr-}/${P}.tgz" +fi + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="xv fbcon directfb mmx mmxext xinerama" + +RDEPEND=">=media-video/vdr-1.3.36 + >=media-video/ffmpeg-0.4.9_pre1 + directfb? ( + dev-libs/DirectFB + dev-libs/DFB++ + ) + media-libs/alsa-lib + xv? ( x11-libs/libX11 + x11-libs/libXext + x11-libs/libXi + x11-libs/libXv + xinerama? ( x11-libs/libXinerama ) + )" + +DEPEND="${RDEPEND} + xv? ( x11-proto/xproto + x11-proto/xextproto + x11-libs/libXv + xinerama? ( x11-proto/xineramaproto ) + ) + fbcon? ( sys-kernel/linux-headers ) + dev-util/pkgconfig" +# Make sure the assembler USE flags are unmasked on amd64 +# Remove this once default-linux/amd64/2006.1 is deprecated +DEPEND="${DEPEND} amd64? ( >=sys-apps/portage-2.1.2 )" + +PATCHES=" + ${FILESDIR}/patches-0.4.0/shm-fullscreen-parameter.diff + ${FILESDIR}/patches-0.4.0/shm-init-setupStore.diff + ${FILESDIR}/patches-0.4.0/stream-repacker.diff" + +pkg_setup() { + vdr-plugin_pkg_setup + + if use !xv && use !fbcon && use !directfb; then + ewarn "You need to set at least one of these use-flags: xv fbcon directfb" + die "no output-method enabled" + fi + + COMPILE_SHM=0 + if has_version ">=media-video/vdr-1.3.0"; then + if use xv; then + COMPILE_SHM=1 + else + elog "SHM does only support xv at the moment" + fi + else + elog "SHM not supported on vdr-1.2" + fi + case ${COMPILE_SHM} in + 0) elog "SHM support will not be compiled." ;; + 1) elog "SHM support will be compiled." ;; + esac + + # Check for ffmpeg relying on libtheora without pkg-config-file + # Bug #142250 + if built_with_use media-video/ffmpeg theora && \ + has_version "<media-libs/libtheora/libtheora-1.0_alpha4"; then + + eerror "This package will not work when using ffmpeg with" + eerror "USE=\"theora\" combined with media-libs/libtheora" + eerror "older than version 1.0_alpha4." + eerror "Please update to at least media-libs/libtheora-1.0_alpha4." + die "Please update to at least media-libs/libtheora-1.0_alpha4." + fi +} + +src_compile() { + local MYOPTS="" + MYOPTS="${MYOPTS} --disable-vidix" + use xv || MYOPTS="${MYOPTS} --disable-xv" + use fbcon || MYOPTS="${MYOPTS} --disable-fb" + use directfb || MYOPTS="${MYOPTS} --disable-dfb" + + use mmx || MYOPTS="${MYOPTS} --disable-mmx" + use mmxext || MYOPTS="${MYOPTS} --disable-mmx2" + + if use !mmx && use !mmxext; then + ewarn "${PN}"' does not compile with USE="-mmx -mmxext".' + ewarn 'Please enable at least one of these two use-flags.' + die "${PN}"' does not compile with USE="-mmx -mmxext".' + fi + + use xinerama || MYOPTS="${MYOPTS} --disable-xinerama" + + [[ ${COMPILE_SHM} == 1 ]] || MYOPTS="${MYOPTS} --disable-shm" + + cd ${S} + elog configure ${MYOPTS} + ./configure ${MYOPTS} || die "configure failed" + + vdr-plugin_src_compile +} + +src_install() { + vdr-plugin_src_install + + cd ${S} + + insinto "${VDR_PLUGIN_DIR}" + doins libsoftdevice-*.so.* + + if [[ "${COMPILE_SHM}" = "1" ]]; then + exeinto "/usr/bin" + doexe ShmClient + fi + + insinto /usr/include/vdr-softdevice + doins *.h +} |