Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 32027

Summary: Adding i810 XvMC support for MPlayer
Product: Gentoo Linux Reporter: sa <sa>
Component: New packagesAssignee: Chris White (RETIRED) <chriswhite>
Status: RESOLVED FIXED    
Severity: enhancement CC: media-video, sbriesen, tt
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Ebuild with xvmc support

Description sa 2003-10-26 04:12:58 UTC
hello,

to add XvMC to mplayer you first need to do this: (not sure what ebuild this should be in)

cd /usr/X11R6/lib/
ld -shared -o libI810XvMC.so --whole-archive libI810XvMC.a
ld -shared -o libXvMC.so --whole-archive libXvMC.a
env-update

then add this to the mplayer ebuild:

--- mplayer-1.0_pre2.ebuild.orig        2003-10-26 04:36:22.000000000 -0700
+++ mplayer-1.0_pre2.ebuild     2003-10-26 04:34:07.000000000 -0700
@@ -164,6 +164,9 @@
        use oss \
                || myconf="${myconf} --disable-ossaudio"
 
+       use i8x0 \
+               && myconf="${myconf} --enable-xvmc --with-xvmclib=I810XvMC"
+
        use opengl \
                || myconf="${myconf} --disable-gl"
 
Mplayer will now build with a xvmc video output plugin. I havent been able to test it though because i think my video card is unsupported (its a i830 chip).
Comment 1 Preston Crow 2004-01-28 10:03:29 UTC
Also add support for nvidia:

	(use xvmc && use nvidia ) \
		&& myconf="${myconf} --enable-xvmc --with-xvmclib=XvMCNVIDIA"

I added a xvmc use flag, but that's probably not necessary.  I suppose someone might want the NVidia drivers, but has a card that doesn't support XvMC.  For full correctness, I should also add the dependency on the nvidia modules.

Also, I see a reference to the S3 Savage having XvMC support, so a line for that would also be a good idea, adding --with-xvmclib=savageXvMC.

This is based on information I found at:
http://mplayerhq.hu/pipermail/mplayer-docs/2003-November/000301.html
Comment 2 Preston Crow 2004-01-31 07:24:05 UTC
Created attachment 24690 [details]
Ebuild with xvmc support

Here is my proposed ebuild that solves the bug.

Someone with more experience with ebuilds should diff it with the current pre3
ebuild and see if all my changes are done the right way.

This adds a new flag "xvmc" which does nothing unless "nvidia" or "i8x0" is
also defined.  There is a warning if "xvmc" is set without a supported video
card.
Comment 3 Robert Larkin 2004-05-23 03:22:48 UTC
based on the example provided by Preston Crows' ebuild I edited the (masked) mplayer-1.0_pre4-r2.ebuild to have an xvmc tag and enable xmvc.  However, during configuration mplayer reported "Checking for xvmc ... no".  Looking in the configure file for the mplayer tarball itself I noticed that xvmc is "autodected" and that the configure script is set to find XvMCNVIDIA.  I tried many, many different ways to override this in the ebuild (--with-xvmclib=/usr/X11R6/lib/XvMCNVIDIA.so.1.0.5336, etc.) but mplayer's configure script continued to look for "XvMCNVIDIA".

So, in the 1.0_pre4-r2.ebuild, no changes are required to support xvmc but a symlink named "XvMCNVIDIA" must be placed in /usr/X11R6/lib/ that points to your adapter specific xvmc library.
Comment 4 Brian Harring (RETIRED) gentoo-dev 2004-06-25 12:36:03 UTC
Actually, you should've kept hunting the configure script :)
while it states that it is autodetect, if you hunt down to _xvmc 's definition, it's set to no (non-autodected, disabled by default) :)

It'll be included soon.
Comment 5 Brian Harring (RETIRED) gentoo-dev 2004-06-29 00:50:43 UTC
Looking at including this support in -r5.
Comment 6 Brian Harring (RETIRED) gentoo-dev 2004-07-22 18:49:06 UTC
Down the line; fun w/ the mplayer gui security issues.
Comment 7 Chris White (RETIRED) gentoo-dev 2004-08-17 08:39:30 UTC
Adding this along with some other mplayer fixes.
Comment 8 Chris White (RETIRED) gentoo-dev 2004-08-17 23:25:44 UTC
Avaliable now in cvs in pre5-r3.  Thanks for posting!