After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 346059 - Ogg support for gnome-games
Ogg support for gnome-games
Status: RESOLVED FIXED
Product: gnome-games-superseded
Classification: Deprecated
Component: general
2.15.x
Other All
: High enhancement
: ---
Assigned To: GNOME Games maintainers
GNOME Games maintainers
Depends on: 94615
Blocks:
 
 
Reported: 2006-06-27 21:59 UTC by Andreas Røsdal
Modified: 2007-05-17 15:59 UTC
See Also:
GNOME target: ---
GNOME version: 2.15/2.16


Attachments
Patch adding GStreamer support to gnome-games. (17.82 KB, patch)
2006-07-09 10:56 UTC, Andreas Røsdal
none Details | Review

Description Andreas Røsdal 2006-06-27 21:59:00 UTC
I think gnome-games should support the .ogg sound format.
By using .ogg instead of .wav, the sound files distributed with gnome-games
can be reduced from about 600 KB to as little as 200 KB. As more sounds are added, the savings will be eaven greater.

Gnome-games used libgnome for sound, which only supports .wav at the moment.
Support for .ogg is planned, but not implemented.

SDL_mixer can be used to play .ogg files, so I strongly think
that we should use this library to play .ogg, until libgnome catches up.

Patches to add SDL_mixer support to gnome-games is welcome.  :)
Comment 1 Callum McKenzie 2006-06-27 23:05:52 UTC
I don't think SDL_mixer is the right library to use. gstreamer is the library we should be using since the rest of the GNOME desktop already uses it. Unfortunately gstreamer doesn't have beeps and whistles as its target use and is a little inefficient.

There is sample code in gnomine showing roughly how to do this, but not all the caching problems where sorted out. 

gstreamer supports ogg (and flac and whatever else might be appropriate).
Comment 2 Richard Hoelscher 2006-06-28 01:15:17 UTC
Like Callum, I disagree on using an SDL implementation, but agree on using compressed files, and more imporatntly, using gstreamer for the implementation... Gnometris does the best job of exposing weird side effects and bugs I've heardon almost every platform I've played it on. 

Comment 3 Andreas Røsdal 2006-06-28 07:16:19 UTC
What makes gstreamer the best library to use? Neither of you provided any  arguments for using gstreamer. The gstreamer implementation in gnomine has been commented out and unusable for over a year. Why has it not been fixed before? If the library is very difficult to use, this is a large disadvantage. 
Comment 4 Callum McKenzie 2006-06-28 09:07:30 UTC
gstreamer is part of the GNOME platform so we can guarantee it is available. SDL_mixer is something we'd have to test for and make a compile-time option. Given that currently SDL_mixer is typically outside the core of most distributions this could cause trouble if distros decide to ship gnome-games without sound rather than shipping with a dependency on SDL_mixer.

It would also appear that gstreamer supports more formats (although that could be  a limitation of the documentation I've found rather than the actual software).

gstreamer is less than ideal - it is hideously over-engineered for our needs - but the critical code only needs to be written once and can be recycled throughout the games.

The gnomine code isn't exactly broken, it is incomplete and never got beyond a proof-of-concept before I ran out of spare time to make it useful.

Comment 5 Richard Hoelscher 2006-06-28 16:09:52 UTC
Besides the simple deployment and dependency issues, there are significant advantages to using components sticking with the GNOME stack, especially if there's no great advantage to using SDL. We are fairly certain that gstreamer will continue to have developers and volunteers there to support it, ABI stability, that the package will be rigourously bugfixed and see stable releases every 6 months, and if we really need to get some API or features added, then it'll probably happen... Gnome-games has been the origin of several additions to other core libraries through the years.

Why has it not been fixed before? Time is the quick answer for me as well, but really, it's just not a priority that anyone cares terribly much about, and feature additions have really taken a back seat to bug fixing during the past year or so. I certainly care less about the code and far more about replacing the sounds we've got with ones that don't sound like trash (see gnobots) (Bug #152107), and honestly, that would be easy work.
Comment 6 Andreas Røsdal 2006-06-29 08:06:45 UTC
Ok. I have a look at gstreamer, and try to make to work properly in gnomine first.
Comment 7 Andreas Røsdal 2006-07-09 10:56:51 UTC
Created attachment 68662 [details] [review]
Patch adding GStreamer support to gnome-games.
Comment 8 Andreas Røsdal 2006-07-09 11:02:42 UTC
The above patch adds GStreamer support to gnome-games,
which allows .ogg files to be played. Currently, only gnometris is modified
to use the GStreamer. It would be nice if people could test and possibly improve this patch enough, so that it could be integrated into gnome-games 2.15.4.

To test the patch, first apply it, then run 'oggenc *.wav' in gnometris/sounds to create ogg files from the wav files.

I have tested the patch using GStreamer 0.10.4, 0.10.8 and 0.10.8.1.
Version 0.10.4 sometimes creashes, while 0.10.8 and 0.10.8.1 creates a GStreamer-CRITICAL warning. These warnings and crashes need to be resolved.
Comment 9 Jason Clinton 2006-07-10 00:25:50 UTC
Have you found the cause of the CRITICAL warnings?
Comment 10 Andreas Røsdal 2006-07-10 06:56:03 UTC
The GStreamer-CRITICAL is:

Trying to dispose object "audiosinkringbuffer1", but it still has a parent "alsasink1".
You need to let the parent manage the object instead of unreffing the object directly.

I get the same warning from some other applications using GStreamer as well, so it could be a problem with GStreamer, and not the patch itself...
Comment 11 Andreas Røsdal 2006-07-12 08:51:26 UTC
Waiting for this to be fixed in Bug #94615 instead.
Comment 12 Andreas Røsdal 2007-05-17 15:59:52 UTC
Now gnome-games has experimental GStreamer support in SVN.