Bug 184105 - net-www/gnash-0.8.0 and gnash-9999 use flawed logic when setting media handler and sound options.
Bug#: 184105 Product:  Gentoo Linux Version: unspecified Platform: All
OS/Version: Linux Status: RESOLVED Severity: normal Priority: P2
Resolution: FIXED Assigned To: genstef@gentoo.org Reported By: harley@thepetersclan.com
Component: Ebuilds
URL: 
Summary: net-www/gnash-0.8.0 and gnash-9999 use flawed logic when setting media handler and sound options.
Keywords:  
Status Whiteboard: 
Opened: 2007-07-03 16:08 0000
Description:   Opened: 2007-07-03 16:08 0000
With the current ebuilds no matter what you set for use variables ffmpeg or
gstreamer. Gnash will be compiled with ffmpeg for the media handler and sdl for
sound.
The ebuild is trying to set --enable-sound=gst when using the gstreamer use
setting.

#--enable-sound=gst,sdl
        if use gstreamer; then
                myconf="${myconf} --enable-sound=gst"
        else
                myconf="${myconf} --enable-sound=sdl"
        fi

This is useless as when gnash checks that the media handler is still set to
ffmpeg (the default) it ignore's this setting and use's sdl instead.

The only possible options are:

ffmpeg as media handler and sdl for sound.
mad as media handler and sdl for sound.
gst as media handler and gst for sound.

Everything else is invalid.

I suggest your replace the following code:

#--enable-sound=gst,sdl
        if use gstreamer; then
                myconf="${myconf} --enable-sound=gst"
        else
                myconf="${myconf} --enable-sound=sdl"
        fi

        if use ffmpeg; then
                myconf="${myconf} --with-mp3-decoder=ffmpeg"
        fi

With something similar to:

#--enable-media=gst||ffmpeg||mad
        if use gstreamer; then
                myconf="${myconf} --enable-media=gst"
        fi

        if use ffmpeg; then
                myconf="${myconf} --enable-media=ffmpeg"
        fi

        if use !gstreamer && use !ffmpeg; then
                myconf="${myconf} --enable-media=mad"
        fi      

This will set the media handler using the use words ffmpeg and gstreamer (will
default to mad) which in turn will automatically set the correct sound option
(gst,sdl).

You should also add the option --disable-debugger to the ebuild. It improves
performance a little.

------- Comment #1 From Harley Peters 2007-07-03 22:40:24 0000 -------
Created an attachment (id=123839) [details]
Example ebuild

With the example ebuild ffmpeg has priority over gstreamer and mad.
Gstreamer has priority over mad.

------- Comment #2 From Stefan Schweizer 2007-07-10 07:19:18 0000 -------
Thank you. I added your patch