Hello community,
here is the log from the commit of package xmms2 for openSUSE:Factory
checked in at Mon Apr 26 23:33:35 CEST 2010.
--------
--- xmms2/xmms2.changes 2010-04-19 18:48:55.000000000 +0200
+++ xmms2/xmms2.changes 2010-04-26 14:35:22.000000000 +0200
@@ -1,0 +2,34 @@
+Mon Apr 26 09:31:14 UTC 2010 - dimstar@opensuse.org
+
+- Add xmms2-pkgconfig.patch: pkg-config version needs to be a
+ version only.
+
+-------------------------------------------------------------------
+Fri Apr 23 08:01:01 UTC 2010 - andrea@opensuse.org
+
+- split out libxmmsclient* libraries
+
+-------------------------------------------------------------------
+Wed Apr 21 09:37:19 UTC 2010 - andrea@opensuse.org
+
+- rewritten spec file, split out packages and reduced dependencies
+ to main package
+
+-------------------------------------------------------------------
+Wed Apr 21 07:54:13 UTC 2010 - andrea@opensuse.org
+
+- removed gamin dependency, no more required
+
+-------------------------------------------------------------------
+Tue Apr 20 23:53:22 UTC 2010 - andrea@opensuse.org
+
+- added xmms2-0.7-cunit.patch to fix missing -lncurses to linker
+ (if build with CUnit)
+- removed mpg123 code because MAY cause legal issues (mp3 support)
+
+-------------------------------------------------------------------
+Tue Apr 20 09:08:19 UTC 2010 - davejplater@gmail.com
+
+- Changed build dependency from fftw to fftw3
+
+-------------------------------------------------------------------
@@ -60,0 +95 @@
+
calling whatdependson for head-i586
New:
----
xmms2-0.7-cunit.patch
xmms2-pkgconfig.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ xmms2.spec ++++++
++++ 1029 lines (skipped)
++++ between xmms2/xmms2.spec
++++ and xmms2/xmms2.spec
++++++ xmms2-0.7-cunit.patch ++++++
diff -uNr xmms2-0.7DrNo/tests/wscript new-xmms2//tests/wscript
--- xmms2-0.7DrNo/tests/wscript 2010-02-19 18:43:54.000000000 +0100
+++ new-xmms2//tests/wscript 2010-04-19 18:55:21.802887561 +0200
@@ -5,6 +5,7 @@ server_suite=["server/t_streamtype.c"]
def configure(conf):
conf.check_cc(header_name="CUnit/CUnit.h", mandatory=True)
conf.check_cc(lib="cunit", uselib_store="cunit", mandatory=True)
+ conf.check_cc(lib="ncurses", uselib_store="ncurses")
code = """
static void T (void) __attribute__ ((constructor (220)));
@@ -20,7 +20,7 @@
obj.source = ['runner/main.c', 'runner/valgrind.c'] + types_suite
obj.includes = '. ../ runner/ ../src ../src/include'
obj.uselib_local = 'xmmstypes'
- obj.uselib = 'cunit valgrind'
+ obj.uselib = 'cunit ncurses valgrind'
obj.install_path = None
obj = bld.new_task_gen('cc', 'program')
@@ -28,7 +28,7 @@
obj.source = ['runner/main.c', 'runner/valgrind.c', '../src/xmms/streamtype.c', '../src/xmms/object.c'] + server_suite
obj.includes = '. ../ runner/ ../src ../src/includepriv ../src/include'
obj.uselib_local = 'xmmstypes'
- obj.uselib = 'cunit valgrind glib2 gthread2'
+ obj.uselib = 'cunit ncurses valgrind glib2 gthread2'
obj.install_path = None
++++++ xmms2-0.7DrNo.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xmms2-0.7DrNo/src/plugins/mpg123/id3v1.c new/xmms2-0.7DrNo/src/plugins/mpg123/id3v1.c
--- old/xmms2-0.7DrNo/src/plugins/mpg123/id3v1.c 2010-02-19 18:43:54.000000000 +0100
+++ new/xmms2-0.7DrNo/src/plugins/mpg123/id3v1.c 1970-01-01 01:00:00.000000000 +0100
@@ -1,223 +0,0 @@
-/* XMMS2 - X Music Multiplexer System
- *
- * Copyright (C) 2003-2009 XMMS2 Team
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- */
-
-/**
- * ID3v1
- */
-
-#include
-#include "xmms/xmms_xformplugin.h"
-#include "xmms/xmms_medialib.h"
-#include "xmms/xmms_log.h"
-#include "id3v1.h"
-
-static const gchar * const id3_genres[] = {
- "Blues", "Classic Rock", "Country", "Dance",
- "Disco", "Funk", "Grunge", "Hip-Hop",
- "Jazz", "Metal", "New Age", "Oldies",
- "Other", "Pop", "R&B", "Rap", "Reggae",
- "Rock", "Techno", "Industrial", "Alternative",
- "Ska", "Death Metal", "Pranks", "Soundtrack",
- "Euro-Techno", "Ambient", "Trip-Hop", "Vocal",
- "Jazz+Funk", "Fusion", "Trance", "Classical",
- "Instrumental", "Acid", "House", "Game",
- "Sound Clip", "Gospel", "Noise", "Alt",
- "Bass", "Soul", "Punk", "Space",
- "Meditative", "Instrumental Pop",
- "Instrumental Rock", "Ethnic", "Gothic",
- "Darkwave", "Techno-Industrial", "Electronic",
- "Pop-Folk", "Eurodance", "Dream",
- "Southern Rock", "Comedy", "Cult",
- "Gangsta Rap", "Top 40", "Christian Rap",
- "Pop/Funk", "Jungle", "Native American",
- "Cabaret", "New Wave", "Psychedelic", "Rave",
- "Showtunes", "Trailer", "Lo-Fi", "Tribal",
- "Acid Punk", "Acid Jazz", "Polka", "Retro",
- "Musical", "Rock & Roll", "Hard Rock", "Folk",
- "Folk/Rock", "National Folk", "Swing",
- "Fast-Fusion", "Bebob", "Latin", "Revival",
- "Celtic", "Bluegrass", "Avantgarde",
- "Gothic Rock", "Progressive Rock",
- "Psychedelic Rock", "Symphonic Rock", "Slow Rock",
- "Big Band", "Chorus", "Easy Listening",
- "Acoustic", "Humour", "Speech", "Chanson",
- "Opera", "Chamber Music", "Sonata", "Symphony",
- "Booty Bass", "Primus", "Porn Groove",
- "Satire", "Slow Jam", "Club", "Tango",
- "Samba", "Folklore", "Ballad", "Power Ballad",
- "Rhythmic Soul", "Freestyle", "Duet",
- "Punk Rock", "Drum Solo", "A Cappella",
- "Euro-House", "Dance Hall", "Goa",
- "Drum & Bass", "Club-House", "Hardcore",
- "Terror", "Indie", "BritPop", "Negerpunk",
- "Polsk Punk", "Beat", "Christian Gangsta Rap",
- "Heavy Metal", "Black Metal", "Crossover",
- "Contemporary Christian", "Christian Rock",
- "Merengue", "Salsa", "Thrash Metal",
- "Anime", "JPop", "Synthpop"
-};
-
-typedef struct id3v1tag_St {
- char tag[3]; /* always "TAG": defines ID3v1 tag 128 bytes before EOF */
- char title[30];
- char artist[30];
- char album[30];
- char year[4];
- union {
- struct {
- char comment[30];
- } v1_0;
- struct {
- char comment[28];
- char __zero;
- unsigned char track_number;
- } v1_1;
- } u;
- unsigned char genre;
-} id3v1tag_t;
-
-static void
-xmms_id3v1_set (xmms_xform_t *xform, const char *key, const char *value,
- int len, const char *encoding)
-{
- gsize readsize,writsize;
- GError *err = NULL;
- gchar *tmp;
-
- /* property already set? */
- if (xmms_xform_metadata_has_val (xform, key)) {
- return;
- }
-
- g_clear_error (&err);
-
- tmp = g_convert (value, len, "UTF-8", encoding, &readsize, &writsize, &err);
- if (!tmp) {
- /* in case of not supported encoding, we try to fallback to latin1 */
- xmms_log_info ("Converting ID3v1 tag '%s' failed (check id3v1_encoding property): %s", key, err ? err->message : "Error not set");
- err = NULL;
- tmp = g_convert (value, len, "UTF-8", "ISO8859-1", &readsize, &writsize, &err);
- }
- if (tmp) {
- g_strstrip (tmp);
- if (tmp[0] != '\0') {
- xmms_xform_metadata_set_str (xform, key, tmp);
- }
- g_free (tmp);
- }
-}
-
-static gboolean
-xmms_id3v1_parse (xmms_xform_t *xform, guchar *buf)
-{
- xmms_config_property_t *config;
- id3v1tag_t *tag = (id3v1tag_t *) buf;
- const char *encoding;
- const gchar *metakey;
-
- if (strncmp (tag->tag, "TAG", 3) != 0) {
- return FALSE;
- }
-
- XMMS_DBG ("Found ID3v1 TAG!");
-
- config = xmms_xform_config_lookup (xform, "id3v1_encoding");
- g_return_val_if_fail (config, FALSE);
- encoding = xmms_config_property_get_string (config);
-
- metakey = XMMS_MEDIALIB_ENTRY_PROPERTY_ARTIST;
- xmms_id3v1_set (xform, metakey, tag->artist,
- sizeof (tag->artist), encoding);
-
- metakey = XMMS_MEDIALIB_ENTRY_PROPERTY_ALBUM;
- xmms_id3v1_set (xform, metakey, tag->album,
- sizeof (tag->album), encoding);
-
- metakey = XMMS_MEDIALIB_ENTRY_PROPERTY_TITLE;
- xmms_id3v1_set (xform, metakey, tag->title,
- sizeof (tag->title), encoding);
-
- metakey = XMMS_MEDIALIB_ENTRY_PROPERTY_YEAR;
- xmms_id3v1_set (xform, metakey, tag->year,
- sizeof (tag->year), encoding);
-
- metakey = XMMS_MEDIALIB_ENTRY_PROPERTY_GENRE;
- if (!xmms_xform_metadata_has_val (xform, metakey)) {
- if (tag->genre >= G_N_ELEMENTS (id3_genres)) {
- metakey = XMMS_MEDIALIB_ENTRY_PROPERTY_GENRE;
- xmms_xform_metadata_set_str (xform, metakey, "Unknown");
- } else {
- metakey = XMMS_MEDIALIB_ENTRY_PROPERTY_GENRE;
- xmms_xform_metadata_set_str (xform, metakey,
- id3_genres[tag->genre]);
- }
- }
-
- if (tag->u.v1_1.__zero == 0 && tag->u.v1_1.track_number > 0) {
- /* V1.1 */
- xmms_id3v1_set (xform, XMMS_MEDIALIB_ENTRY_PROPERTY_COMMENT,
- tag->u.v1_1.comment, sizeof (tag->u.v1_1.comment),
- encoding);
-
- metakey = XMMS_MEDIALIB_ENTRY_PROPERTY_TRACKNR;
- if (!xmms_xform_metadata_has_val (xform, metakey)) {
- metakey = XMMS_MEDIALIB_ENTRY_PROPERTY_TRACKNR;
- xmms_xform_metadata_set_int (xform, metakey,
- tag->u.v1_1.track_number);
- }
- } else {
- metakey = XMMS_MEDIALIB_ENTRY_PROPERTY_COMMENT;
- xmms_id3v1_set (xform, metakey, tag->u.v1_0.comment,
- sizeof (tag->u.v1_0.comment), encoding);
- }
-
- return TRUE;
-}
-
-gint
-xmms_id3v1_get_tags (xmms_xform_t *xform)
-{
- xmms_error_t err;
- gint64 res;
- guchar buf[128];
- gint ret = 0;
-
- xmms_error_reset (&err);
-
- res = xmms_xform_seek (xform, -128, XMMS_XFORM_SEEK_END, &err);
- if (res == -1) {
- XMMS_DBG ("Couldn't seek - not getting id3v1 tag");
- return 0;
- }
-
- if (xmms_xform_read (xform, buf, 128, &err) == 128) {
- if (xmms_id3v1_parse (xform, buf)) {
- ret = 128;
- }
- } else {
- XMMS_DBG ("Read of 128 bytes failed?!");
- xmms_error_reset (&err);
- }
-
- res = xmms_xform_seek (xform, 0, XMMS_XFORM_SEEK_SET, &err);
- if (res == -1) {
- XMMS_DBG ("Couldn't seek after getting id3 tag?!? very bad");
- return -1;
- }
-
- return ret;
-}
-
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xmms2-0.7DrNo/src/plugins/mpg123/id3v1.h new/xmms2-0.7DrNo/src/plugins/mpg123/id3v1.h
--- old/xmms2-0.7DrNo/src/plugins/mpg123/id3v1.h 2010-02-19 18:43:54.000000000 +0100
+++ new/xmms2-0.7DrNo/src/plugins/mpg123/id3v1.h 1970-01-01 01:00:00.000000000 +0100
@@ -1,24 +0,0 @@
-/* XMMS2 - X Music Multiplexer System
- *
- * Copyright (C) 2003-2009 XMMS2 Team
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- */
-
-
-
-
-#ifndef __XMMS_MAD_ID3V1_H__
-#define __XMMS_MAD_ID3V1_H__
-
-gint xmms_id3v1_get_tags (xmms_xform_t *xform);
-
-#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xmms2-0.7DrNo/src/plugins/mpg123/mpg123.c new/xmms2-0.7DrNo/src/plugins/mpg123/mpg123.c
--- old/xmms2-0.7DrNo/src/plugins/mpg123/mpg123.c 2010-02-19 18:43:54.000000000 +0100
+++ new/xmms2-0.7DrNo/src/plugins/mpg123/mpg123.c 1970-01-01 01:00:00.000000000 +0100
@@ -1,399 +0,0 @@
-/* XMMS2 plugin for decoding MPEG audio using libmpg123
- * Copyright (C) 2007-2009 XMMS2 Team
- *
- * PLUGINS ARE NOT CONSIDERED TO BE DERIVED WORK !!!
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * For libmpg123 API have a look at http://mpg123.org/api/ .
- *
- * This is also a very basic mpg123 decoder plugin.
- * Configurable goodies of libmpg123 are missing:
- * - equalizer (fast, using the MPEG frequency bands directly)
- * - forced mono, resampling (xmms2 can handle that itself, I guess)
- * - choose RVA preamp (album/mix, from lame tag ReplayGain info or
- * ID3v2 tags)
- * This should be easy to add for an XMMS2 hacker.
- *
- * Note on metadata:
- * With libmpg123 you can get at least all text and comment ID3v2
- * (version 2.2, 2.3, 2.4) frames as well as the usual id3v1 info
- * (when you get to the end of the file...).
- * The decoder also likes to read ID3 tags for getting RVA-related
- * info that players like foobar2000 store there... Now the problem is:
- * Usually, the id3 xform reads and cuts the id3 data, killing the info
- * for mpg123...
- * Perhaps one can make the generic id3 plugin store the necessary info
- * for retrieval here, or just keep the id3 tags there...
- */
-
-#include "xmms/xmms_xformplugin.h"
-#include "xmms/xmms_log.h"
-#include "xmms/xmms_medialib.h"
-
-#include
-#include
-#include
-
-#include "id3v1.h"
-
-#define BUFSIZE 4096
-
-typedef struct xmms_mpg123_data_St {
- mpg123_handle *decoder;
- mpg123_pars *param;
-
- glong samplerate;
- gint channels;
- gboolean eof_found;
- gint filesize;
-
- /* input data buffer */
- guint8 buf[BUFSIZE];
-} xmms_mpg123_data_t;
-
-/*
- * Function prototypes
- */
-
-static gboolean xmms_mpg123_plugin_setup (xmms_xform_plugin_t *xform_plugin);
-static gint xmms_mpg123_read (xmms_xform_t *xform, xmms_sample_t *buf,
- gint len, xmms_error_t *err);
-static gboolean xmms_mpg123_init (xmms_xform_t *xform);
-static void xmms_mpg123_destroy (xmms_xform_t *xform);
-static gint64 xmms_mpg123_seek (xmms_xform_t *xform, gint64 samples,
- xmms_xform_seek_mode_t whence,
- xmms_error_t *err);
-
-/*
- * Plugin header
- */
-
-XMMS_XFORM_PLUGIN ("mpg123", "mpg123 decoder", XMMS_VERSION,
- "mpg123 decoder for MPEG 1.0/2.0/2.5 layer 1/2/3 audio",
- xmms_mpg123_plugin_setup);
-
-static gboolean
-xmms_mpg123_plugin_setup (xmms_xform_plugin_t *xform_plugin)
-{
- xmms_xform_methods_t methods;
- int result;
-
- result = mpg123_init ();
- if (result != MPG123_OK) {
- return FALSE;
- }
-
- XMMS_XFORM_METHODS_INIT (methods);
- methods.init = xmms_mpg123_init;
- methods.destroy = xmms_mpg123_destroy;
- methods.read = xmms_mpg123_read;
- methods.seek = xmms_mpg123_seek;
- xmms_xform_plugin_methods_set (xform_plugin, &methods);
-
- xmms_xform_plugin_config_property_register (xform_plugin,
- "id3v1_encoding",
- "ISO8859-1",
- NULL,
- NULL);
-
- xmms_xform_plugin_indata_add (xform_plugin,
- XMMS_STREAM_TYPE_MIMETYPE,
- "audio/mpeg",
- XMMS_STREAM_TYPE_PRIORITY,
- 40,
- NULL);
-
- /* Well, I usually only see mp3 and mp2 ... layer 1 files
- * are quite rare.
- */
- xmms_magic_extension_add ("audio/mpeg", "*.mp3");
- xmms_magic_extension_add ("audio/mpeg", "*.mp2");
- xmms_magic_extension_add ("audio/mpeg", "*.mp1");
-
- /* That's copied from the mad xform. */
- xmms_magic_add ("mpeg header", "audio/mpeg",
- "0 beshort&0xfff6 0xfff6",
- "0 beshort&0xfff6 0xfff4",
- "0 beshort&0xffe6 0xffe2",
- NULL);
-
- return TRUE;
-}
-
-static gboolean
-xmms_mpg123_init (xmms_xform_t *xform)
-{
- xmms_mpg123_data_t *data;
- const long *rates;
- size_t num_rates;
- int encoding;
- off_t length;
- int i, result;
-
- g_return_val_if_fail (xform, FALSE);
-
- data = g_new0 (xmms_mpg123_data_t, 1);
- xmms_xform_private_data_set (xform, data);
-
- /* Get the total size of this stream and store it for later */
- if (xmms_xform_metadata_get_int (xform,
- XMMS_MEDIALIB_ENTRY_PROPERTY_SIZE,
- &result)) {
- data->filesize = result;
- }
-
- mpg123_rates (&rates, &num_rates);
-
- data->param = mpg123_new_pars (&result);
- g_return_val_if_fail (data->param, FALSE);
-
- /* Create a quiet (stderr) decoder with auto choosen optimization.
- * Stuff set here should be tunable via plugin config properties!
- * You can also change some things during playback...
- */
- mpg123_par (data->param, MPG123_ADD_FLAGS, MPG123_QUIET, 0);
- mpg123_par (data->param, MPG123_ADD_FLAGS, MPG123_GAPLESS, 0);
- /* choose: MPG123_RVA_OFF, MPG123_RVA_MIX, MPG123_RVA_ALBUM
- * xmms2 has its own ReplayGain plugin to handle the RVA field */
- mpg123_par (data->param, MPG123_RVA, MPG123_RVA_OFF, 0);
-
- /* You could choose a decoder from the list provided by
- * mpg123_supported_decoders () and give that as second parameter.
- */
- data->decoder = mpg123_parnew (data->param, NULL, &result);
- if (data->decoder == NULL) {
- xmms_log_error ("%s", mpg123_plain_strerror (result));
- goto bad;
- }
-
- /* Prepare for buffer input feeding. */
- result = mpg123_open_feed (data->decoder);
- if (result != MPG123_OK) {
- goto mpg123_bad;
- }
-
- /* Let's always decode to signed 16bit for a start.
- Any mpg123-supported sample rate is accepted. */
- if (MPG123_OK != mpg123_format_none (data->decoder)) {
- goto mpg123_bad;
- }
-
- for (i = 0; i < num_rates; i++) {
- result = mpg123_format (data->decoder, rates[i],
- MPG123_MONO | MPG123_STEREO,
- MPG123_ENC_SIGNED_16);
- if (result != MPG123_OK) {
- goto mpg123_bad;
- }
- }
-
- /* Fetch ID3v1 data from the end of file if possible */
- result = xmms_id3v1_get_tags (xform);
- if (result < 0) {
- xmms_log_error ("Seeking error when reading ID3v1 tags");
- goto bad;
- } else if (data->filesize > result) {
- /* Reduce the size of tag data from the filesize */
- data->filesize -= result;
- }
-
- /* Read data from input until decoded data is available from decoder */
- do {
- /* Parse stream and get info. */
- gint ret;
- xmms_error_t err;
-
- ret = xmms_xform_read (xform, data->buf, BUFSIZE, &err);
- if (ret < 0) {
- xmms_log_error ("Error when trying to find beginning of stream");
- goto bad;
- } else if (ret == 0) {
- /* EOF reached before format was found, handled after loop */
- break;
- }
-
- /* With zero output size nothing is actually outputted */
- result = mpg123_decode (data->decoder, data->buf,
- (size_t) ret, NULL, 0, NULL);
- } while (result == MPG123_NEED_MORE); /* Keep feeding... */
-
- if (result != MPG123_NEW_FORMAT) {
- xmms_log_error ("Unable to find beginning of stream (%s)!",
- result == MPG123_ERR ? mpg123_strerror (data->decoder)
- : "unexpected EOF");
- goto bad;
- }
-
- result = mpg123_getformat (data->decoder, &data->samplerate,
- &data->channels, &encoding);
- if (result != MPG123_OK) {
- goto mpg123_bad;
- }
-
- /* Set the filesize so it can be used for duration estimation */
- if (data->filesize > 0) {
- mpg123_set_filesize (data->decoder, data->filesize);
- }
-
- /* Get duration in samples, convert to ms and save to xmms2 */
- length = mpg123_length (data->decoder);
- if (length > 0) {
- length = (off_t) ((gfloat) length / data->samplerate * 1000);
- xmms_xform_metadata_set_int (xform,
- XMMS_MEDIALIB_ENTRY_PROPERTY_DURATION,
- (gint) length);
- }
-
- XMMS_DBG ("mpg123: got stream with %li Hz %i channels, encoding %i",
- data->samplerate, data->channels, encoding);
-
- xmms_xform_outdata_type_add (xform,
- XMMS_STREAM_TYPE_MIMETYPE,
- "audio/pcm",
- XMMS_STREAM_TYPE_FMT_FORMAT,
- XMMS_SAMPLE_FORMAT_S16,
- XMMS_STREAM_TYPE_FMT_CHANNELS,
- data->channels,
- XMMS_STREAM_TYPE_FMT_SAMPLERATE,
- (gint) data->samplerate,
- XMMS_STREAM_TYPE_END);
- return TRUE;
-
-mpg123_bad:
- xmms_log_error ("mpg123 error: %s", mpg123_strerror (data->decoder));
-
-bad:
- mpg123_delete (data->decoder);
- mpg123_delete_pars (data->param);
- g_free (data);
-
- return FALSE;
-}
-
-static void
-xmms_mpg123_destroy (xmms_xform_t *xform)
-{
- xmms_mpg123_data_t *data;
-
- data = xmms_xform_private_data_get (xform);
- g_return_if_fail (data);
-
- if (data != NULL) {
- mpg123_delete (data->decoder);
- mpg123_delete_pars (data->param);
- }
- g_free (data);
-}
-
-static gint
-xmms_mpg123_read (xmms_xform_t *xform, xmms_sample_t *buf, gint len,
- xmms_error_t *err)
-{
- xmms_mpg123_data_t *data;
- int result = MPG123_OK;
- size_t read = 0;
-
- data = xmms_xform_private_data_get (xform);
- g_return_val_if_fail (data, -1);
-
- while (read == 0) {
- gint ret = 0;
-
- if (result == MPG123_NEED_MORE) {
- ret = xmms_xform_read (xform, data->buf, BUFSIZE, err);
- if (ret < 0) {
- return ret;
- } else if (ret == 0) {
- data->eof_found = TRUE;
- }
- }
-
- result = mpg123_decode (data->decoder, data->buf, (size_t) ret,
- buf, len, &read);
-
- if (result == MPG123_NEED_MORE && data->eof_found) {
- /* We need more data, but there's none available
- * so libmpg123 apparently missed an EOF */
- result = MPG123_DONE;
- break;
- } else if (result != MPG123_OK && result != MPG123_NEED_MORE) {
- /* This is some uncommon result like EOF, handle outside
- * the loop */
- break;
- }
- }
-
- if (result == MPG123_DONE) {
- /* This is just normal EOF reported from libmpg123 */
- XMMS_DBG ("Got EOF while decoding stream");
- return 0;
- } else if (result == MPG123_NEW_FORMAT) {
- /* FIXME: When we can handle format changes, modify this */
- xmms_error_set (err,
- XMMS_ERROR_GENERIC,
- "The output format changed, XMMS2 can't handle that");
- return -1;
- } else if (result == MPG123_ERR) {
- xmms_error_set (err,
- XMMS_ERROR_GENERIC,
- mpg123_strerror (data->decoder));
- return -1;
- }
-
- return (gint) read;
-}
-
-static gint64
-xmms_mpg123_seek (xmms_xform_t *xform, gint64 samples,
- xmms_xform_seek_mode_t whence,
- xmms_error_t *err)
-{
- xmms_mpg123_data_t *data;
- gint64 ret;
- off_t byteoff, samploff;
- int mwhence = -1;
-
- data = xmms_xform_private_data_get (xform);
- g_return_val_if_fail (data, -1);
-
- if (whence == XMMS_XFORM_SEEK_SET) {
- mwhence = SEEK_SET;
- } else if (whence == XMMS_XFORM_SEEK_CUR) {
- mwhence = SEEK_CUR;
- } else if (whence == XMMS_XFORM_SEEK_END) {
- mwhence = SEEK_END;
- }
-
- /* Get needed input position and possibly reached sample offset
- * from mpg123.
- */
- samploff = mpg123_feedseek (data->decoder, samples, mwhence,
- &byteoff);
-
- XMMS_DBG ("seeked to %li ... input stream seek following",
- (long) samploff);
-
- if (samploff < 0) {
- xmms_error_set (err,
- XMMS_ERROR_GENERIC,
- mpg123_strerror (data->decoder));
- return -1;
- }
-
- /* Seek in input stream. */
- ret = xmms_xform_seek (xform, byteoff, XMMS_XFORM_SEEK_SET, err);
- if (ret < 0) {
- return ret;
- }
-
- return samploff;
-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xmms2-0.7DrNo/src/plugins/mpg123/wscript new/xmms2-0.7DrNo/src/plugins/mpg123/wscript
--- old/xmms2-0.7DrNo/src/plugins/mpg123/wscript 2010-02-19 18:43:54.000000000 +0100
+++ new/xmms2-0.7DrNo/src/plugins/mpg123/wscript 1970-01-01 01:00:00.000000000 +0100
@@ -1,34 +0,0 @@
-from waftools.plugin import plugin
-
-def plugin_configure(conf):
- if not conf.check_cfg(package="libmpg123", atleast_version="1.5.1", uselib_store="mpg123", args="--cflags --libs"):
- return False
-
- if not conf.check_cc(header_name='mpg123.h', uselib='mpg123',
- errmsg='failed',
- msg='Testing mpg123 with default off_t'):
- # ask python for lfs flags, this fails on Windows and Mac OS
- # windows needs some special care, and Mac OS X alwas uses 64 bit for
- # off_t so we shouldn't be here anyway
-
- import os
- try:
- lfsflags = os.confstr (os.confstr_names['CS_LFS_CFLAGS']).split ()
- # If os.confstr of 'CS_LFS_CFLAGS' is not supported, try with some
- # default values
- except KeyError:
- # Mac OS X and probably other unices end here
- lfsflags = ['-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_BITS=64']
- except AttributeError:
- # Windows ends up here
- lfsflags = ['-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_BITS=64']
- if not conf.check_cc(header_name='mpg123.h', uselib='mpg123',
- cflags=lfsflags, errmsg='failed',
- msg='Testing mpg123 with large off_t'):
- return False
- conf.env['CCFLAGS_mpg123'] += lfsflags
-
- return True
-
-configure, build = plugin("mpg123", configure=plugin_configure,
- source=["mpg123.c", "id3v1.c"], libs=["mpg123"])
++++++ xmms2-pkgconfig.patch ++++++
Index: xmms2-0.7DrNo/xmms2.pc.in
===================================================================
--- xmms2-0.7DrNo.orig/xmms2.pc.in
+++ xmms2-0.7DrNo/xmms2.pc.in
@@ -6,6 +6,6 @@ includedir=@INCLUDEDIR@
Name: @NAME@
Description: XMMS Generation 2
Requires:
-Version: @VERSION@
+Version: 0.7
Libs: -L${libdir} @LIB@
Cflags: -I${includedir}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org