aminepfe / gentoo-china-overlay

Automatically exported from code.google.com/p/gentoo-china-overlay
GNU General Public License v2.0
0 stars 0 forks source link

加上coreavc解码器的mplayer #55

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
为mplayer打上了dshowserver的补丁并加了一个USE:coreavc,
使用coreavc需要安装media-libs/dshowserver。

无论怎样搞,我也没法用make.conf的CFLAGS优化编译dshowserver,只
好自己编译覆
盖文件。请指点一下:(

播放实例:
YUKI.N> mplayer -vc coreserve ACGN/Animation/Okami\ to\
Kōshinryō/\[I.G\&CASO\]\[Spice_and_Wolf\]\[GB_BIG5\]\[01\]\[BDRIP\]\[1920x1080
\]\[x264_FLAC\]\[E961B66D\].mkv
Starting
Initialization is complete
VDec: vo 配置请求 - 1920 x 1080 (色彩空间首选项: Packed YUY2)
[PP] 使用编解码器的后处理过滤器, max q = 4。
VDec: 使用 Planar YV12 作为输出 csp (没有 0)
电影宽高比为 1.78:1 - 预放大到正确的电影宽高比。
VO: [xv] 1920x1080 => 1920x1080 Planar YV12
Dshowserver Connected to host
Found DirectShow filter已选视频编解码器: [coreserve] vfm: dshowserver
(CoreAVC DShow H26
==========================================================================
==========================================================================
打开音频解码器: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 48000 Hz, 2 ch, s16le, 0.0 kbit/0.00% (ratio: 0->192000)
已选音频编解码器: [ffflac] afm: ffmpeg (FFmpeg FLAC audio)
==========================================================================
AO: [alsa] 48000Hz 2ch s16le (2 bytes per sample)
开始播放...
pts value < previousV:  0.325 ct:  0.000   0/  0 ??% ??% ??,?% 0 0
A:  30.4 V:  30.4 A-V:  0.000 ct:  0.044   0/  0 20%  8%  0.5% 2 0

MPlayer 被 2 信号中断(位于 sleep_timer 模块)
Destroying filter A-V:  0.000 ct:  0.044   0/  0 20%  8%  0.5% 2 0
正在退出...(退出)

Original issue reported on code.google.com by mygarfie...@gmail.com on 15 Aug 2009 at 1:32

Attachments:

GoogleCodeExporter commented 9 years ago
大略看了一下 dshowserver 的ebuild.
你可以用上 EAPi="2"
这样 src_unpack 可以全部删除掉了,
src_compile 里面可以试一试
emake CC=$(tc_getCC) CFLAGS=${CFLAGS} LDFLAGS=${LDFLAGS}   || die "blah"

S可设定为,这样几个 CD,路径。
S=${WORKDIR}/coreavc-for-linux/dshowserver

另 Move CoreAVC to /usr/lib/win32/CoreAVCDecoder.ax 
这个,为什么不在ebuild
里处理

Original comment by oahong@gmail.com on 15 Aug 2009 at 3:32

GoogleCodeExporter commented 9 years ago
另:如果想帮忙维护overlay里的ebuild,请自己发送邮件给 
robert.zhangle.

Original comment by oahong@gmail.com on 15 Aug 2009 at 3:32

GoogleCodeExporter commented 9 years ago
又改了下,为mplayer加上注册提示。

dshowserver:
emake CC=$(tc_getCC) CFLAGS=${CFLAGS} 
LDFLAGS=${LDFLAGS}不行,会报-O是未知选项什么
的。我又查了查其他方法,试着用sed添加CFLAGS+="${CFLAGS}"优化:
D
因为dshowserver只是一个使用CoreAVC编解码器的interface,使用CoreA
VC的编解码器必须获得
授权(申请试用或购买),所以要自己装上编解码器。

我发悄悄话问过,他说要看我的补丁质量决定。

# Copyright 2000-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit eutils flag-o-matic subversion

EAPI="2"

DESCRIPTION="CoreAVC codec for Linux"
HOMEPAGE="http://coreavc-for-linux.googlecode.com"

ESVN_REPO_URI="http://coreavc-for-linux.googlecode.com/svn/trunk"
ESVN_PROJECT="coreavc-for-linux"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS=""
IUSE=""

RDEPEND=""
DEPEND="${RDEPEND}"

S="${WORKDIR}/coreavc-for-linux/"

src_compile() {
        sed -i "s:i586:i686" ./config.mak
        sed -i "/CFLAGS=/aCFLAGS+=${CFLAGS}" dshowserver/Makefile
        cd dshowserver
        emake || die "emake failed"
}

src_install() {
        dobin dshowserver/{dshowserver,registercodec}
        doman man/{dshowserver.1,registercodec.1}
}

pkg_postinst() {
        elog "Move CoreAVC to /usr/lib/win32/CoreAVCDecoder.ax"
        elog "and reemerge patched mplayer, xine or mythtv"
}

Original comment by mygarfie...@gmail.com on 16 Aug 2009 at 2:44

Attachments:

GoogleCodeExporter commented 9 years ago
按照惯例, 对源代码的一些变动应该放在 
src_prepare(EAPI>=2才有这个phase) 里面进行处理。
另:你的ebuild 里好像不需要 flag-o-matic 和 eutils。

Original comment by oahong@gmail.com on 16 Aug 2009 at 7:50

GoogleCodeExporter commented 9 years ago
有没有兴趣完成这个ebuild:
http://www.linuxsir.org/bbs/thread355124.html
我试了一下,听音乐还是很不错的。

Original comment by oahong@gmail.com on 16 Aug 2009 at 8:16

GoogleCodeExporter commented 9 years ago
都完成了:)
(協議在deb包裏有聲明)

# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit qt4

EAPI="2"

DESCRIPTION="Linux 1g1g is a desktop application for 1g1g.com"
HOMEPAGE="http://linux1g1g.mrcongwang.com/"
SRC_URI="https://sites.google.com/site/${PN}/home/${P/.2/-2}-src.tar.bz2?attredi
rects=0
        -> ${P}.tar.bz2"

S="${WORKDIR}/${PN}"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""

DEPEND="x11-libs/qt-core
        x11-libs/qt-gui
        >=x11-libs/qt-webkit-4.5.0"
RDEPEND="${DEPEND}
        www-plugins/adobe-flash"

src_configure(){
        eqmake4
}

src_install(){
        dobin linux1g1g bindkeys.sh
        dodoc README
}

pkg_postinst() {
        einfo "Linux1g1g is a desktop application for linux user to listen to"
        einfo "1g1g.com without opening a browser."
        einfo "It is based on Qt and Webkit and developed by two fans of 1g1g.com"
        einfo "Visit www.1g1g.com and you will like it."
}

Original comment by mygarfie...@gmail.com on 17 Aug 2009 at 8:28

Attachments:

GoogleCodeExporter commented 9 years ago
SRC_URI 裏用上 versionator.eclass 就比較完美了,我幫你放上 
linux1g1g. 希望早點看到你自己擁有提交
權限 ;-)

Original comment by oahong@gmail.com on 17 Aug 2009 at 10:20

GoogleCodeExporter commented 9 years ago
还要购买coreavc的授权才能用,所以基本没人测试吧。虽然包�
��得不错,但还是放弃吧。

Original comment by coder...@gmail.com on 14 Sep 2009 at 2:29