Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 254661 - media-video/mplayer: some useflag issues
Summary: media-video/mplayer: some useflag issues
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-12 18:27 UTC by Yaroslav Isakov
Modified: 2009-02-26 22:31 UTC (History)
0 users

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


Attachments
patch for mplayer-1.0_rc2_p28058-r1.ebuild, changing dvd useflag behaviour (mplayer.patch,641 bytes, patch)
2009-01-12 18:30 UTC, Yaroslav Isakov
Details | Diff
suggestion to useflags (mplayer-test.patch,2.04 KB, patch)
2009-01-13 01:29 UTC, Yaroslav Isakov
Details | Diff
cleaned up use flags (mplayer-1.0_rc2_p28058-r2.patch,13.18 KB, patch)
2009-01-22 01:19 UTC, Steve Dibb (RETIRED)
Details | Diff
patch to patch with some fixes (mplayer-1.0_rc2_p28058-r2.patch,1.63 KB, patch)
2009-01-22 04:06 UTC, Yaroslav Isakov
Details | Diff
updated patch (mp.patch,13.19 KB, patch)
2009-01-23 00:00 UTC, Steve Dibb (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yaroslav Isakov 2009-01-12 18:27:40 UTC
I found that using dvd useflag is a bit confusing - disabling it doesn't mean that mplayer will be compiled without DVD support at all - it means that it will be compiled without external dvdnav and dvdread libs. And so, dvd useflag is not needed at all, because nothing changes when it is disabled/enabled. So I propose that it may be deleted or disable internal dvdread and libdvdcss. Also now there is no dvdread flag so '&& ! use dvdread' is obsolete. So I propose patch to mplayer-1.0_rc2_p28058-r1.ebuild. Also I think that internal a52 must be enabled indepently on dvd or a52 useflag, because it not depends on external libs.
Comment 1 Yaroslav Isakov 2009-01-12 18:30:17 UTC
Created attachment 178203 [details, diff]
patch for mplayer-1.0_rc2_p28058-r1.ebuild, changing dvd useflag behaviour
Comment 2 Yaroslav Isakov 2009-01-12 23:30:50 UTC
Also there is issue with vorbis useflag - mplayer currently uses internal tremor lib, so I think that there must be a flag to enable compiling with external libvorbis (tremor is a fixed-point version of the Vorbis decoder)
Comment 3 Yaroslav Isakov 2009-01-12 23:34:16 UTC
BTW, vorbis flag is not needed at all, because internal tremor (always enabled) have priority before external libvorbis
Comment 4 Yaroslav Isakov 2009-01-13 01:28:35 UTC
I propose change meaning of dvd and vorbis useflags. I suggest that they enable building mplayer with external libs (libdvdread and libvorbis). Also I suggest dropping a52 flag, because internal liba52 not depends on external libs. Please consider my suggestions. I also create patch to mplayer-1.0_rc2_p28058-r1.ebuild to demonstrate my changes.
Comment 5 Yaroslav Isakov 2009-01-13 01:29:05 UTC
Created attachment 178307 [details, diff]
suggestion to useflags
Comment 6 Steve Dibb (RETIRED) gentoo-dev 2009-01-13 21:21:42 UTC
That's actually a common problem with some of the codec use flags, vorbis and a52 included, they can either mean enable internal support, enable external library support, or both.

I'd rather add more use flags to let the user decide which library they'd prefer to use, rather than pick ourselves.

An example may be, say have vorbis use flag for internal, and libvorbis for external.
Comment 7 Yaroslav Isakov 2009-01-13 21:32:30 UTC
Thanks for answer! But i think that those libs not depend on external libs, so may be compiled as a fallback, if useflags not enabled. But it's my opinion, I'm only want to compile mplayer with internal/external vorbis and dvdread (and I think that nobody want mplayer without vorbis or dvd support at all :) )
Comment 8 Yaroslav Isakov 2009-01-13 21:46:48 UTC
I'am also think that my patch makes those useflags like a swith (external/internal). Having two useflags instead of one...
+tremor +libvorbis - which?
+tremor -libvorbis - internal tremor
-tremor +libvorbis - external libvorbis
-tremor -libvorbis - none (hmm... we can have free vorbis support with internal tremor, why we want to disable it?)

and so with a52, faad2, libdvdread and soon with dvdnav... There will be 10 useflags instead of five! So, I advice to use my idea :)
Comment 9 Yaroslav Isakov 2009-01-13 21:51:06 UTC
BTW, I think that mplayer must be compiled mainly with included libs, because of local fixes/changes. External dvdread may be needed to disable dvdcss and external libvorbis is posssibly more accurate than internal fixed point tremor
Comment 10 Yaroslav Isakov 2009-01-13 22:01:01 UTC
Hmm... seems that internal if enabled, disable compilation with external ones. So
+tremor +libvorbis = +tremor -libvorbis
Comment 11 Steve Dibb (RETIRED) gentoo-dev 2009-01-22 01:19:44 UTC
Created attachment 179274 [details, diff]
cleaned up use flags
Comment 12 Steve Dibb (RETIRED) gentoo-dev 2009-01-22 01:24:25 UTC
(In reply to comment #11)
> Created an attachment (id=179274) [edit]
> cleaned up use flags
> 

Alright, I took the chance to finally do a lot of necessary cleanup (including the above issues) to fix the ebuild.  Here's the changes:

New/changed useflags:
vorbis - enables internal vorbis support (tremor)
libvorbis - uses external libvorbis
aac - only uses internal support
libfaac - external faac support
libfaad external faad support
dvdnav - uses internal dvdnav playback
libdvdread - external libdvdread support
libdvdnav - external libdvdnav support
network - enables network support
real - enables internal real support
realcodecs - external realplayer binary support

Also added some documentation to the ebuild as to why things are written the way they are, and fixed up some encoding checks and stuff.

If we do use this, we're going to have to change the masks for the real use flag (again), but I think since real codecs now have more native support in libavcodec, we need to distinguish between native and binary.
Comment 13 Yaroslav Isakov 2009-01-22 02:06:35 UTC
Hmm... currently, I have libdvdread-4.1.3-r1 and libdvdnav-4.1.3 installed. Some tests:

1) -dvdnav, -libdvdnav, -libdvdread:
Enabled optional drivers:
    Input: libdvdcss(internal) dvdread(internal) vcd network
Correct
2) -dvdnav, -libdvdnav, +libdvdread
  Enabled optional drivers:
    Input: dvdnav dvdread(external) vcd network
Incorrect! dvdnav must be disabled!
3) -dvdnav, +libdvdnav, -libdvdread
  Enabled optional drivers:
    Input: dvdnav dvdread(external) vcd network
Hmmm... What means this combination of flags?
4) -dvdnav, +libdvdnav, +libdvdread
  Enabled optional drivers:
    Input: dvdnav dvdread(external) vcd network
Correct

So, I have 3 identical results of four combinations of two flags (dvdnav flag is always disabled because of masking on amd64)
Comment 14 Yaroslav Isakov 2009-01-22 02:09:37 UTC
And BTW, what is the meaning of dvd flag? because when I disable it, I receive such results:

  Enabled optional drivers:
    Input: libdvdcss(internal) dvdread(internal) vcd network
Comment 15 Steve Dibb (RETIRED) gentoo-dev 2009-01-22 02:13:19 UTC
(In reply to comment #13)
> Hmm... currently, I have libdvdread-4.1.3-r1 and libdvdnav-4.1.3 installed.
> Some tests:
> 
> 1) -dvdnav, -libdvdnav, -libdvdread:
> Enabled optional drivers:
>     Input: libdvdcss(internal) dvdread(internal) vcd network
> Correct
> 2) -dvdnav, -libdvdnav, +libdvdread
>   Enabled optional drivers:
>     Input: dvdnav dvdread(external) vcd network
> Incorrect! dvdnav must be disabled!

External *and* internal could work together, though I don't like the idea of
that happening (I foresee issues).

> 3) -dvdnav, +libdvdnav, -libdvdread
>   Enabled optional drivers:
>     Input: dvdnav dvdread(external) vcd network
> Hmmm... What means this combination of flags?

That's the same as #2

> 4) -dvdnav, +libdvdnav, +libdvdread
>   Enabled optional drivers:
>     Input: dvdnav dvdread(external) vcd network
> Correct
> 
> So, I have 3 identical results of four combinations of two flags (dvdnav flag
> is always disabled because of masking on amd64)

Well, dvdnav is going to get unmasked, and libdvdnav/read are going to be the
masked ones.

dvd flag is -- DVD support.  That's it.  Without it, it'll turn everything off.  If on, it'll use internal libdvdcss and internal libdvdread.
Comment 16 Yaroslav Isakov 2009-01-22 02:33:29 UTC
>dvd flag is -- DVD support.  That's it.  Without it, it'll turn everything off.
 If on, it'll use internal libdvdcss and internal libdvdread.

Yes, but when I disable it, I still have internal libdvdread!

Comment 17 Steve Dibb (RETIRED) gentoo-dev 2009-01-22 02:37:36 UTC
(In reply to comment #16)
> >dvd flag is -- DVD support.  That's it.  Without it, it'll turn everything off.
>  If on, it'll use internal libdvdcss and internal libdvdread.
> 
> Yes, but when I disable it, I still have internal libdvdread!
> 

oh okay, I accidentally removed --disable-dvdread-internal --disable-libdvdcss-internal from the patch.
Comment 18 Yaroslav Isakov 2009-01-22 02:40:33 UTC
And 2nd test - I didn't understand your answer. I think that if I have -libdvdnav and -dvdnav, mplayer must me compiled without dvdnav at all. But I got different result.
Comment 19 Yaroslav Isakov 2009-01-22 03:13:17 UTC
And another issue, mplayer knows about 3 types of vorbis - external libvorbis, external tremor and internal tremor, so I think that you need to fix the patch like this:

use vorbis || myconf="${myconf} --disable-tremor-internal"
Comment 20 Yaroslav Isakov 2009-01-22 03:21:17 UTC
And I think that there is no line for libvorbis. So when I have installed libvorbis and disabled libvorbis and vorbis flag, mplayer will be compiled with external vorbis, but without libvorbis depend in RDEPEND
Comment 21 Yaroslav Isakov 2009-01-22 04:06:17 UTC
Created attachment 179286 [details, diff]
patch to patch with some fixes

So, there is patch to your patch with my suggestions
Comment 22 Steve Dibb (RETIRED) gentoo-dev 2009-01-23 00:00:44 UTC
Created attachment 179396 [details, diff]
updated patch

alright, this should cover everything up until now.

Dropped libdvd{read,nav} use flags as it's probably only going to add more confusion, and I can't imagine anyone wanting to use an older version (which of course will haunt me).

Also cleaned up the docs install.
Comment 23 Yaroslav Isakov 2009-01-23 00:12:44 UTC
I think that external libdvdread may be useful when it merged without libdvdcss (for DRM-free system). But anyway, thanks for all your hard work!
Comment 24 Steve Dibb (RETIRED) gentoo-dev 2009-02-26 20:23:21 UTC
All cleaned up in mplayer-20090226.28734.ebuild
Comment 25 Yaroslav Isakov 2009-02-26 22:10:36 UTC
Hello! Thanks for a new package, but I found typo - vorbis useflag and
libvorbis? ( media-libs/libvorbis )
And why all this new flags are on by default? (with +)
Comment 26 Steve Dibb (RETIRED) gentoo-dev 2009-02-26 22:31:27 UTC
(In reply to comment #25)
> Hello! Thanks for a new package, but I found typo - vorbis useflag and
> libvorbis? ( media-libs/libvorbis )

Whoops, fixed.

> And why all this new flags are on by default? (with +)

Upstream's request to enable more stuff by default so it'll work out of the box.