Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 184105 - net-www/gnash-0.8.0 and gnash-9999 use flawed logic when setting media handler and sound options.
Summary: net-www/gnash-0.8.0 and gnash-9999 use flawed logic when setting media handle...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: Stefan Schweizer (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-03 16:08 UTC by Harley Peters
Modified: 2007-07-10 07:19 UTC (History)
1 user (show)

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


Attachments
Example ebuild (gnash-0.8.0.ebuild,3.84 KB, text/plain)
2007-07-03 22:40 UTC, Harley Peters
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Harley Peters 2007-07-03 16:08:52 UTC
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 Harley Peters 2007-07-03 22:40:24 UTC
Created attachment 123839 [details]
Example ebuild

With the example ebuild ffmpeg has priority over gstreamer and mad.
Gstreamer has priority over mad.
Comment 2 Stefan Schweizer (RETIRED) gentoo-dev 2007-07-10 07:19:18 UTC
Thank you. I added your patch