Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 201095 - media-tv/mythtv-0.21_pre15025 should use libXvMCNVIDIA if installed
Summary: media-tv/mythtv-0.21_pre15025 should use libXvMCNVIDIA if installed
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Television related Applications in Gentoo's Portage
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-03 12:38 UTC by Daniel Burr
Modified: 2008-04-27 23:49 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Enable libXvMCNVIDIA (libXvMCNVIDIA.patch,520 bytes, patch)
2007-12-03 12:56 UTC, Daniel Burr
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Burr 2007-12-03 12:38:06 UTC
If both libXvMCW (from x11-libs/libXvMC) and libXvMCNVIDIA (from x11-drivers/nvidia-drivers) are installed then the mythtv configure script (around line 2631) will choose to use libXvMCW and not libXvMCNVIDIA.  This happens regardless of whether the "xvmc" USE flag is set or "nvidia" is specified in VIDEO_CARDS.

Reproducible: Always

Steps to Reproduce:
1. Set "xvmc" USE flag
2. Add "nvidia" to VIDEO_CARDS
3. emerge mythtv

Actual Results:  
Configure script shows:
XvMC OpenGL sup.      no
XvMC libs             -lXvMCW

Expected Results:  
Configure script shows:
XvMC OpenGL sup.      yes
XvMC libs             -lXvMCNVIDIA

The attached patch changes the ebuild to use explicitly request libXvMCNVIDIA if xvmc is enabled and nvidia is specified in VIDEO_CARDS.  Perhaps there should be a new USE flag to specify this behaviour (xvmc-opengl)?
Comment 1 Daniel Burr 2007-12-03 12:56:59 UTC
Created attachment 137615 [details, diff]
Enable libXvMCNVIDIA
Comment 2 Doug Goldstein (RETIRED) gentoo-dev 2007-12-03 14:18:34 UTC
This has been discussed before. The depend changes are incorrect however since you will still need libXvMC installed. XvMCW is merely a wrapper to the proper XvMC backend. Currently MythTV does not have the proper code to handle directly linking to the libraries. Try this patch and then try to actually use MythTV and play back some HD videos. It won't work.
Comment 3 Daniel Burr 2007-12-03 23:29:45 UTC
I realise that XvMCW is a wrapper but the mythtv configure script disables xvmc_opengl unless VENDOR_XVMC_LIBS is equal to XvMCNVIDIA.  For this reason we need a way to specify that mythtv should link directly against XvMCNVIDIA instead of using the wrapper.

> The depend changes are incorrect however since
> you will still need libXvMC installed.

I tested this on my system with no libXvMC installed and everything is working fine.

> Currently MythTV does not have the proper code to handle 
> directly linking to the libraries.

This may have been the case in the past but it most certainly is possible with SVN head.  If you have a look at the configure script you can see that there are various allowed values for VENDOR_XVMC_LIBS which are used to directly link against the libraries.

> Try this patch and then try to actually use MythTV
> and play back some HD videos. It won't work.

HD playback is working fine for me with this patch if I use the xvmc-blit video renderer (xvmc-opengl looks odd, but it wouldn't even work before the patch because as I said above, it is disabled if the VENDOR_XVMC_LIBS does not specify XvMCNVIDIA).
Comment 4 Doug Goldstein (RETIRED) gentoo-dev 2008-02-21 17:13:58 UTC
add libXvMCNVIDIA_dynamic.so.1 to /etc/X11/XvMCConfig and it'll work fine.
Comment 5 Daniel Burr 2008-04-04 15:07:02 UTC
I'm sorry, but you are mistaken.

With the "opengl opengl-video opengl-xvmc xvmc" USE flags, --xvmc-lib=XvMCW will be passed to the configure script and it will output:

XvMC support              yes
XvMC VLD support          no
XvMC pro support          no
XvMC OpenGL sup.          no

Changing it to use --xvmc-lib=XvMCNVIDIA the configure script will output:

XvMC support              yes
XvMC VLD support          no
XvMC pro support          no
XvMC OpenGL sup.          yes

This makes the opengl renderer available.  It is not enough to merely enable XvMC on the system - the configure script checks explicitly for libXvMCNVIDIA
Comment 6 Doug Goldstein (RETIRED) gentoo-dev 2008-04-04 16:31:22 UTC
use mythtv-0.21_p16944.ebuild. It explicitly disables xvmcw.
Comment 7 Doug Goldstein (RETIRED) gentoo-dev 2008-04-04 16:31:34 UTC
what I said above..
Comment 8 Alan Sheridan 2008-04-27 21:12:15 UTC
After reading through the comments and my failure over the past two days to xvmc working with mythtv-0.21, I am not convinced that this issue has been resolved.

My problem may be unrelated to this, but the output at the beginning of the mythtv emerge suggests that this may be the exact cause of my problem.  

(Also, If I add the opengl-xvmc USE flag, I seem to encounter bug 219149)

# VIDEO_CARDS="nvidia" emerge -av mythtv

These are the packages that would be merged, in order:

[ebuild   R   ] media-tv/mythtv-0.21_p17100  USE="aac alsa dvb dvd mmx opengl perl python xvmc (-altivec) -autostart -debug -directv -ieee1394 -jack -lcd -lirc -opengl-video -opengl-xvmc" VIDEO_CARDS="nvidia -via" 0 kB 

Total: 1 package (1 reinstall), Size of downloads: 0 kB

Would you like to merge these packages? [Yes/No] y

.
.
.

# Video Output Support
x11 support               yes
xrandr support            yes
xv support                yes
XvMC support              yes
XvMC VLD support          yes
XvMC pro support          no
XvMC OpenGL sup.          no
XvMC libs                 -lXvMCW
OpenGL video              no
OpenGL vsync              yes
DirectFB                  no
Fribidi formatting        no

Comment 9 Alan Sheridan 2008-04-27 22:51:03 UTC
A few details on the problem I ave encountered can be seen here:

http://forums.gentoo.org/viewtopic-p-5075762.html#5075762
Comment 10 Doug Goldstein (RETIRED) gentoo-dev 2008-04-27 23:49:51 UTC
(In reply to comment #8)
> After reading through the comments and my failure over the past two days to
> xvmc working with mythtv-0.21, I am not convinced that this issue has been
> resolved.
> 
> My problem may be unrelated to this, but the output at the beginning of the
> mythtv emerge suggests that this may be the exact cause of my problem.  
> 
> (Also, If I add the opengl-xvmc USE flag, I seem to encounter bug 219149)
> 
> # VIDEO_CARDS="nvidia" emerge -av mythtv
> 
> These are the packages that would be merged, in order:
> 
> [ebuild   R   ] media-tv/mythtv-0.21_p17100  USE="aac alsa dvb dvd mmx opengl
> perl python xvmc (-altivec) -autostart -debug -directv -ieee1394 -jack -lcd
> -lirc -opengl-video -opengl-xvmc" VIDEO_CARDS="nvidia -via" 0 kB 
> 

Completely different version then what was reported here and fixed. There are newer issues with newer versions.