From owner-freebsd-gnome Wed Dec 18 2: 4:18 2002 Delivered-To: freebsd-gnome@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D44AD37B401 for ; Wed, 18 Dec 2002 02:03:48 -0800 (PST) Received: from httpd.terions.de (static62-99-146-055.adsl.inode.at [62.99.146.55]) by mx1.FreeBSD.org (Postfix) with SMTP id 330F143ED1 for ; Wed, 18 Dec 2002 02:03:32 -0800 (PST) (envelope-from martin.klaffenboeck@gmx.at) Received: (qmail 1499 invoked from network); 18 Dec 2002 10:06:20 -0000 Received: from unknown (HELO martin.kleinerdrache.org) (127.0.0.1) by loopback with SMTP; 18 Dec 2002 10:06:20 -0000 Date: Wed, 18 Dec 2002 11:06:19 +0100 From: Martin Klaffenboeck To: lioux@freebsd.org Cc: marcus@freebsd.org, gnome@freebsd.org Subject: Re: gstreamer port Message-ID: <20021218100619.GD1210@martin.kdrache.org> References: <20021104203055.GQ373@martin.kdrache.org> <20021217142346.9314.qmail@exxodus.fedaykin.here> <20021217150002.GA65558@martin.kdrache.org> <20021217190107.11051.qmail@exxodus.fedaykin.here> <20021218095932.GA1210@martin.kdrache.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="tKW2IUtsqtDRztdT" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20021218095932.GA1210@martin.kdrache.org>; from martin.klaffenboeck@gmx.at on Mi, Dez 18, 2002 at 10:59:32 +0100 X-Mailer: Balsa 2.0.3 Sender: owner-freebsd-gnome@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --tKW2IUtsqtDRztdT Content-Type: text/plain; format=flowed; charset=ISO-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit Sorry, I forgot the files... Here they are. Martin PS. Meeting rhythmbox developers is good at ircd.gimp.org channel #rhyhtmbox. Am 2002.12.18 10:59 schrieb(en) Martin Klaffenboeck: > > Hi, > >> If this is going to be part of gnome 2.2, we don't need to >> sweat. >> The GNOME folks are working on 2.2 as we speak. :) > > Thats true. But: Joe Marcus Clarke asked me to > work further. I sent him what I send to you today. Maybe you can > ask him if he did some work. (But I think he didn't but I'm not > really sure.) > >> If it's not going to be part of 2.2, we can do something about >> that. > > It will a part of 2.2 fifth-toe, and in 2.4 it will be a part of the > gnome-meta port. But I think, there isn't done enaugh. > > There are three new ports. > > musicbrainz is ok, you can install them like it is. It is required > by monkey-media. > > monkey-media is required by rhythmbox and comes from the same > developer as the rythmbox. > Here I just disabled the CD support for FreeBSD because it's a Linux > implementation. The developer told me, we can change this like other > gnome cd support for FreeBSD. I don't know enaugh about this stuff > so I didn't do anything. See the patch. > > When monkey-media is installed, rythmbox should be installed easyly. > But I allways get a core dump when I try to play some music here. > > Please note: I didn't change the gstreamer dependencies to the new > place where it has moved. > > Some links: > http://www.rhythmbox.org/ > http://bugzilla.gnome.org/show_bug.cgi?id=98721 (I reported the core > dump.) > > I'll give that stuff all over to you right now because I'm not able > to do anything more I think. (My know how is at the end at this > point.) I'm sorry for that. > > Martin > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-gnome" in the body of the message > --tKW2IUtsqtDRztdT Content-Type: text/x-sh; charset=us-ascii Content-Disposition: attachment; filename="musicbrainz.sh" # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # musicbrainz # musicbrainz/Makefile # musicbrainz/distinfo # musicbrainz/pkg-descr # musicbrainz/pkg-plist # musicbrainz/pkg-comment # echo c - musicbrainz mkdir -p musicbrainz > /dev/null 2>&1 echo x - musicbrainz/Makefile sed 's/^X//' >musicbrainz/Makefile << 'END-of-musicbrainz/Makefile' X# New ports collection makefile for: musicbrainz X# Date created: 14 November 2002 X# Whom: Martin Klaffenboeck X# X# $FreeBSD$ X# X XPORTNAME= musicbrainz XPORTVERSION= 1.1.0 XCATEGORIES= audio XMASTER_SITES= ftp://ftp.musicbrainz.org/pub/musicbrainz/ X XMAINTAINER= martin.klaffenboeck@gmx.at X XUSE_GMAKE= yes XGNU_CONFIGURE= yes X XCONFIGURE_ARGS+= --prefix=${PREFIX} XCONFIGURE_TARGET= --target=${MACHINE_ARCH}-unknown-freebsd${OSREL} X X.include END-of-musicbrainz/Makefile echo x - musicbrainz/distinfo sed 's/^X//' >musicbrainz/distinfo << 'END-of-musicbrainz/distinfo' XMD5 (musicbrainz-1.1.0.tar.gz) = 3cb03b32369a8040c5214e964628dae2 END-of-musicbrainz/distinfo echo x - musicbrainz/pkg-descr sed 's/^X//' >musicbrainz/pkg-descr << 'END-of-musicbrainz/pkg-descr' XMusicBrainz is a network of web sites that form an open music Xencyclopedia. Like a normal encyclopedia the MusicBrainz Xencyclopedia contains numerous facts, specifically about artists, Xtheir albums, and tracks. X XWWW: http://www.musicbrainz.org/ X- Martin Klaffenboeck END-of-musicbrainz/pkg-descr echo x - musicbrainz/pkg-plist sed 's/^X//' >musicbrainz/pkg-plist << 'END-of-musicbrainz/pkg-plist' Xinclude/musicbrainz/bitprintinfo.h Xinclude/musicbrainz/bitzi/bitcollider.h Xinclude/musicbrainz/bitzi/gui_win32.h Xinclude/musicbrainz/bitzi/list.h Xinclude/musicbrainz/bitzi/plugin.h Xinclude/musicbrainz/errors.h Xinclude/musicbrainz/mb_c.h Xinclude/musicbrainz/musicbrainz.h Xinclude/musicbrainz/queries.h Xlib/libmusicbrainz.a Xlib/libmusicbrainz.la Xlib/libmusicbrainz.so Xlib/libmusicbrainz.so.2 X@dirrm include/musicbrainz/bitzi X@dirrm include/musicbrainz END-of-musicbrainz/pkg-plist echo x - musicbrainz/pkg-comment sed 's/^X//' >musicbrainz/pkg-comment << 'END-of-musicbrainz/pkg-comment' XA library for the open music encyclopedia END-of-musicbrainz/pkg-comment exit --tKW2IUtsqtDRztdT Content-Type: text/x-sh; charset=us-ascii Content-Disposition: attachment; filename="monkey-media.sh" # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # monkey-media # monkey-media/Makefile # monkey-media/distinfo # monkey-media/pkg-comment # monkey-media/pkg-descr # monkey-media/pkg-plist # monkey-media/files # monkey-media/files/patch-src::monkey-media-audio-cd.c # monkey-media/files/patch-configure # echo c - monkey-media mkdir -p monkey-media > /dev/null 2>&1 echo x - monkey-media/Makefile sed 's/^X//' >monkey-media/Makefile << 'END-of-monkey-media/Makefile' X# New ports collection makefile for: monkey-media X# Date created: 4 November 2002 X# Whom: Martin Klaffenboeck X# X# $FreeBSD$ X# X XPORTNAME= monkey-media XPORTVERSION= 0.6.0 XCATEGORIES= audio gnome XMASTER_SITES= http://www.rhythmbox.org/download/ X XMAINTAINER= martin.klaffenboeck@gmx.at X XBUILD_DEPENDS= gst-launch-ext:${PORTSDIR}/graphics/gstreamer-plugins XLIB_DEPENDS= gnomevfs-2.0:${PORTSDIR}/devel/gnomevfs2 \ X glade-2.0:${PORTSDIR}/devel/libglade2 \ X vorbis.2:${PORTSDIR}/audio/libvorbis \ X id3tag.1:${PORTSDIR}/audio/mad \ X musicbrainz.2:${PORTSDIR}/audio/musicbrainz X XUSE_GNOMENG= yes XUSE_GMAKE= yes XUSE_X_PREFIX= yes XGNU_CONFIGURE= yes XUSE_LIBTOOL= yes XUSE_REINPLACE= yes X XCONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include ${PTHREAD_CFLAGS}" \ X LIBS="-L${LOCALBASE}/lib -lgnuregex -lcompat" X XCONFIGURE_ARGS+= --prefix=${PREFIX} XCONFIGURE_TARGET= --target=${MACHINE_ARCH}-unknown-freebsd${OSREL} X Xpre-patch: X @find ${WRKSRC} -name Makefile.in | xargs ${REINPLACE_CMD} -e \ X 's|[(]libdir[)]/pkgconfig|(prefix)/libdata/pkgconfig|g' X X.include END-of-monkey-media/Makefile echo x - monkey-media/distinfo sed 's/^X//' >monkey-media/distinfo << 'END-of-monkey-media/distinfo' XMD5 (monkey-media-0.6.0.tar.gz) = b5a4f8ef0a07a5b9936b409ce8b0fc94 END-of-monkey-media/distinfo echo x - monkey-media/pkg-comment sed 's/^X//' >monkey-media/pkg-comment << 'END-of-monkey-media/pkg-comment' XA library for multimedia playback END-of-monkey-media/pkg-comment echo x - monkey-media/pkg-descr sed 's/^X//' >monkey-media/pkg-descr << 'END-of-monkey-media/pkg-descr' XMonkeyMedia is a library for multimedia playback (of which only audio Xis supported at this point), offering support for seeking, managing Xvolume, obtaining stream information like ID3 tags and bitrate, Xequalizer, and GStreamer visualization plugins. X XMonkeyMedia builds upon the GStreamer multimedia framework, thereby Xsupporting all formats for which GStreamer plugins have been written. X XAll data retreival is done via GnomeVFS, so it is no problem to play data Xover HTTP, Samba, or whatever GnomeVFS-supported protocol you can think of. X X- Martin Klaffenboeck END-of-monkey-media/pkg-descr echo x - monkey-media/pkg-plist sed 's/^X//' >monkey-media/pkg-plist << 'END-of-monkey-media/pkg-plist' Xetc/gconf/gconf.xml.defaults/schemas/system/monkey_media/%gconf.xml Xetc/gconf/gconf.xml.defaults/system/monkey_media/%gconf.xml Xetc/gconf/schemas/monkey-media.schemas Xinclude/monkey-media/monkey-media-audio-cd.h Xinclude/monkey-media/monkey-media-audio-quality.h Xinclude/monkey-media/monkey-media-audio-reencoder.h Xinclude/monkey-media/monkey-media-audio-stream.h Xinclude/monkey-media/monkey-media-mixer.h Xinclude/monkey-media/monkey-media-stream-info.h Xinclude/monkey-media/monkey-media-stream.h Xinclude/monkey-media/monkey-media-visualization.h Xinclude/monkey-media/monkey-media.h Xlib/libmonkey-media.a Xlib/libmonkey-media.la Xlib/libmonkey-media.so Xlib/libmonkey-media.so.0 Xlibdata/pkgconfig/monkey-media.pc Xshare/locale/cs/LC_MESSAGES/monkey-media.mo Xshare/locale/da/LC_MESSAGES/monkey-media.mo Xshare/locale/de/LC_MESSAGES/monkey-media.mo Xshare/locale/it/LC_MESSAGES/monkey-media.mo Xshare/locale/ko/LC_MESSAGES/monkey-media.mo Xshare/locale/no/LC_MESSAGES/monkey-media.mo Xshare/locale/sv/LC_MESSAGES/monkey-media.mo X@dirrm include/monkey-media X@dirrm etc/gconf/gconf.xml.defaults/system/monkey_media X@dirrm etc/gconf/gconf.xml.defaults/schemas/system/monkey_media END-of-monkey-media/pkg-plist echo c - monkey-media/files mkdir -p monkey-media/files > /dev/null 2>&1 echo x - monkey-media/files/patch-src::monkey-media-audio-cd.c sed 's/^X//' >monkey-media/files/patch-src::monkey-media-audio-cd.c << 'END-of-monkey-media/files/patch-src::monkey-media-audio-cd.c' X--- src/monkey-media-audio-cd.c.orig Thu Sep 26 17:15:09 2002 X+++ src/monkey-media-audio-cd.c Sat Nov 16 18:38:44 2002 X@@ -32,7 +32,7 @@ X #include X #include X #include X-#include X+/* #include We don't have this on FreeBSD */ X X #include "monkey-media.h" X #include "monkey-media-private.h" X@@ -77,13 +77,13 @@ X enum X { X PROP_0, X- PROP_ERROR X+ PROP_ERROR X }; X X enum X { X CD_CHANGED, X- LAST_SIGNAL X+ LAST_SIGNAL X }; X X static guint monkey_media_audio_cd_signals[LAST_SIGNAL] = { 0 }; X@@ -96,131 +96,27 @@ X GType X monkey_media_audio_cd_get_type (void) X { X- static GType type = 0; X- X- if (type == 0) X- { X- static const GTypeInfo our_info = X- { X- sizeof (MonkeyMediaAudioCDClass), X- NULL, X- NULL, X- (GClassInitFunc) monkey_media_audio_cd_class_init, X- NULL, X- NULL, X- sizeof (MonkeyMediaAudioCD), X- 0, X- (GInstanceInitFunc) monkey_media_audio_cd_init, X- }; X- X- type = g_type_register_static (G_TYPE_OBJECT, X- "MonkeyMediaAudioCD", X- &our_info, 0); X- } X- X- return type; X } X X static void X monkey_media_audio_cd_class_init (MonkeyMediaAudioCDClass *klass) X { X- GObjectClass *object_class = G_OBJECT_CLASS (klass); X- X- parent_class = g_type_class_peek_parent (klass); X- X- object_class->finalize = monkey_media_audio_cd_finalize; X- X- object_class->set_property = monkey_media_audio_cd_set_property; X- object_class->get_property = monkey_media_audio_cd_get_property; X- X- g_object_class_install_property (object_class, X- PROP_ERROR, X- g_param_spec_pointer ("error", X- "Error", X- "Failure information", X- G_PARAM_READABLE)); X- X- monkey_media_audio_cd_signals[CD_CHANGED] = X- g_signal_new ("cd_changed", X- G_OBJECT_CLASS_TYPE (object_class), X- G_SIGNAL_RUN_LAST, X- G_STRUCT_OFFSET (MonkeyMediaAudioCDClass, cd_changed), X- NULL, NULL, X- g_cclosure_marshal_VOID__BOOLEAN, X- G_TYPE_NONE, X- 1, X- G_TYPE_BOOLEAN); X } X X X static gboolean X is_cdrom_device (MonkeyMediaAudioCD *cdrom) X { X- int fd; X- X- fd = open (monkey_media_get_cd_drive (), O_RDONLY | O_NONBLOCK); X- if (fd < 0) X- { X- return FALSE; X- } X- X- /* Fire a harmless ioctl at the device. */ X- if (ioctl (fd, CDROM_GET_CAPABILITY, 0) < 0) X- { X- /* Failed, it's not a CDROM drive */ X- close (fd); X- X- return FALSE; X- } X- X- close (fd); X- X- return TRUE; X } X X static void X monkey_media_audio_cd_init (MonkeyMediaAudioCD *cd) X { X- cd->priv = g_new0 (MonkeyMediaAudioCDPrivate, 1); X- X- cd->priv->lock = g_mutex_new (); X- X- if (!is_cdrom_device (cd)) X- { X- cd->priv->error = g_error_new (MONKEY_MEDIA_AUDIO_CD_ERROR, X- MONKEY_MEDIA_AUDIO_CD_ERROR_NOT_OPENED, X- _("%s does not point to a valid CDRom device. This may be caused by:\n" X- "a) CD support is not compiled into Linux\n" X- "b) You do not have the correct permissions to access the CD drive\n" X- "c) %s is not the CD drive.\n"), X- monkey_media_get_cd_drive (), monkey_media_get_cd_drive ()); X- return; X- } X- X- cd->priv->poll_func_id = g_timeout_add (1000, (GSourceFunc) poll_event_cb, cd); X- X- cd->priv->valid_info = FALSE; X- cd->priv->cd_available = monkey_media_audio_cd_available (cd, NULL); X } X X static void X monkey_media_audio_cd_finalize (GObject *object) X { X- MonkeyMediaAudioCD *cd; X- X- cd = MONKEY_MEDIA_AUDIO_CD (object); X- X- g_mutex_free (cd->priv->lock); X- X- g_source_remove (cd->priv->poll_func_id); X- X- g_free (cd->priv->cd_id); X- g_free (cd->priv->track_lengths); X- g_free (cd->priv->track_offsets); X- X- g_free (cd->priv); X- X- G_OBJECT_CLASS (parent_class)->finalize (object); X } X X static void X@@ -229,7 +125,6 @@ X const GValue *value, X GParamSpec *pspec) X { X- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); X } X X static void X@@ -238,230 +133,46 @@ X GValue *value, X GParamSpec *pspec) X { X- MonkeyMediaAudioCD *cd = MONKEY_MEDIA_AUDIO_CD (object); X- X- if (prop_id != PROP_ERROR) X- { X- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); X- return; X- } X- X- g_value_set_pointer (value, cd->priv->error); X } X X void X monkey_media_audio_cd_unref_if_around (void) X { X- if (global_cd != NULL) X- g_object_unref (G_OBJECT (global_cd)); X- if (global_cd_lock != NULL) X- g_mutex_free (global_cd_lock); X } X X MonkeyMediaAudioCD * X monkey_media_audio_cd_new (GError **error) X { X- MonkeyMediaAudioCD *cd; X- GError *tmp; X- X- if (global_cd_lock == NULL) X- global_cd_lock = g_mutex_new (); X- g_mutex_lock (global_cd_lock); X- X- /* we fake creating the object, since we need it internally as well X- * and having multiple instances would just be a waste of memory. */ X- if (global_cd != NULL) X- { X- g_mutex_unlock (global_cd_lock); X- return g_object_ref (G_OBJECT (global_cd)); X- } X- X- cd = MONKEY_MEDIA_AUDIO_CD (g_object_new (MONKEY_MEDIA_TYPE_AUDIO_CD, NULL)); X- X- g_return_val_if_fail (cd->priv != NULL, NULL); X- X- g_object_get (G_OBJECT (cd), "error", &tmp, NULL); X- X- if (tmp != NULL) X- { X- if (error != NULL) X- *error = tmp; X- else X- g_error_free (tmp); X- X- g_object_unref (G_OBJECT (cd)); X- cd = NULL; X- } X- X- global_cd = cd; X- X- g_mutex_unlock (global_cd_lock); X- X- return g_object_ref (G_OBJECT (cd)); X } X X static gboolean X monkey_media_audio_cd_open (MonkeyMediaAudioCD *cd, X GError **error) X { X- if (cd->priv->open_count++ == 0) X- { X- cd->priv->fd = open (monkey_media_get_cd_drive (), O_RDONLY | O_NONBLOCK); X- X- if (cd->priv->fd < 0) X- { X- if (errno == EACCES && error != NULL) X- { X- *error = g_error_new (MONKEY_MEDIA_AUDIO_CD_ERROR, X- MONKEY_MEDIA_AUDIO_CD_ERROR_NOT_OPENED, X- _("You do not seem to have permission to access %s."), X- monkey_media_get_cd_drive ()); X- } X- else if (error != NULL) X- { X- *error = g_error_new (MONKEY_MEDIA_AUDIO_CD_ERROR, X- MONKEY_MEDIA_AUDIO_CD_ERROR_NOT_OPENED, X- _("%s does not appear to point to a valid CD device. This may be because:\n" X- "a) CD support is not compiled into Linux\n" X- "b) You do not have the correct permissions to access the CD drive\n" X- "c) %s is not the CD drive.\n"), X- monkey_media_get_cd_drive (), X- monkey_media_get_cd_drive ()); X- } X- X- cd->priv->open_count = 0; X- return FALSE; X- } X- } X- X- return (cd->priv->fd >= 0); X } X X static void X monkey_media_audio_cd_close (MonkeyMediaAudioCD *cd, X gboolean force_close) X { X- if (--cd->priv->open_count < 0 || force_close) X- { X- cd->priv->open_count = 0; X- } X- X- if (cd->priv->open_count == 0) X- { X- if (cd->priv->fd >= 0) X- close (cd->priv->fd); X- cd->priv->fd = -1; X- } X } X X void X monkey_media_audio_cd_open_tray (MonkeyMediaAudioCD *cd, X GError **error) X { X- int cd_status; X- X- g_return_if_fail (MONKEY_MEDIA_IS_AUDIO_CD (cd)); X- X- g_mutex_lock (cd->priv->lock); X- X- if (monkey_media_audio_cd_open (cd, error) == FALSE) X- { X- g_mutex_unlock (cd->priv->lock); X- return; X- } X- X- cd_status = ioctl (cd->priv->fd, CDROM_DRIVE_STATUS, CDSL_CURRENT); X- X- if (cd_status != -1) X- { X- if (cd_status != CDS_TRAY_OPEN) X- { X- if (ioctl (cd->priv->fd, CDROMEJECT, 0) < 0) X- { X- if (error != NULL) X- { X- *error = g_error_new (MONKEY_MEDIA_AUDIO_CD_ERROR, X- MONKEY_MEDIA_AUDIO_CD_ERROR_SYSTEM_ERROR, X- "(monkey_media_audio_cd_open_tray): ioctl failed: %s", X- g_strerror (errno)); X- } X- X- monkey_media_audio_cd_close (cd, FALSE); X- X- g_mutex_unlock (cd->priv->lock); X- X- return; X- } X- } X- } X- X- monkey_media_audio_cd_close (cd, TRUE); X- X- g_mutex_unlock (cd->priv->lock); X } X X void X monkey_media_audio_cd_close_tray (MonkeyMediaAudioCD *cd, X GError **error) X { X- g_return_if_fail (MONKEY_MEDIA_IS_AUDIO_CD (cd)); X- X- g_mutex_lock (cd->priv->lock); X- X- if (monkey_media_audio_cd_open (cd, error) == FALSE) X- { X- g_mutex_unlock (cd->priv->lock); X- return; X- } X- X- if (ioctl (cd->priv->fd, CDROMCLOSETRAY) < 0) X- { X- if (error != NULL) X- { X- *error = g_error_new (MONKEY_MEDIA_AUDIO_CD_ERROR, X- MONKEY_MEDIA_AUDIO_CD_ERROR_SYSTEM_ERROR, X- "(monkey_media_audio_cd_close_tray): ioctl failed %s", X- g_strerror (errno)); X- } X- X- monkey_media_audio_cd_close (cd, FALSE); X- X- g_mutex_unlock (cd->priv->lock); X- X- return; X- } X- X- monkey_media_audio_cd_close (cd, TRUE); X- X- g_mutex_unlock (cd->priv->lock); X } X X gboolean X monkey_media_audio_cd_available (MonkeyMediaAudioCD *cd, X GError **error) X { X- int cd_status; X- gboolean ret; X- X- g_return_val_if_fail (MONKEY_MEDIA_IS_AUDIO_CD (cd), FALSE); X- X- g_mutex_lock (cd->priv->lock); X- X- if (monkey_media_audio_cd_open (cd, error) == FALSE) X- { X- g_mutex_unlock (cd->priv->lock); X- return FALSE; X- } X- X- cd_status = ioctl (cd->priv->fd, CDROM_DRIVE_STATUS, CDSL_CURRENT); X- X- monkey_media_audio_cd_close (cd, TRUE); X- X- ret = (cd_status == CDS_DISC_OK); X- X- g_mutex_unlock (cd->priv->lock); X- X- return ret; X } X X /* X@@ -521,285 +232,24 @@ X X unsigned char *rfc822_binary (void *src,unsigned long srcl,unsigned long *len) X { X- unsigned char *ret,*d; X- unsigned char *s = (unsigned char *) src; X- char *v = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789._"; X- unsigned long i = ((srcl + 2) / 3) * 4; X- *len = i += 2 * ((i / 60) + 1); X- d = ret = (unsigned char *) malloc ((size_t) ++i); X- for (i = 0; srcl; s += 3) { /* process tuplets */ X- *d++ = v[s[0] >> 2]; /* byte 1: high 6 bits (1) */ X- /* byte 2: low 2 bits (1), high 4 bits (2) */ X- *d++ = v[((s[0] << 4) + (--srcl ? (s[1] >> 4) : 0)) & 0x3f]; X- /* byte 3: low 4 bits (2), high 2 bits (3) */ X- *d++ = srcl ? v[((s[1] << 2) + (--srcl ? (s[2] >> 6) : 0)) & 0x3f] : '-'; X- /* byte 4: low 6 bits (3) */ X- *d++ = srcl ? v[s[2] & 0x3f] : '-'; X- if (srcl) srcl--; /* count third character if processed */ X- if ((++i) == 15) { /* output 60 characters? */ X- i = 0; /* restart line break count, insert CRLF */ X- *d++ = '\015'; *d++ = '\012'; X- } X- } X- *d = '\0'; /* tie off string */ X- X- return ret; /* return the resulting string */ X } X X static gboolean X ensure_sync (MonkeyMediaAudioCD *cd, X GError **error) X { X- int i, j, *track_frames; X- struct cdrom_tochdr tochdr; X- unsigned char track0, track1; X- struct cdrom_tocentry tocentry; X- long *frame_offsets; X- SHA_INFO sha; X- char *tmp; X- unsigned char digest[20], *base64; X- unsigned long size; X- X- /* Don't recalculate data, valid_data can be changed from X- * callback functions */ X- if (cd->priv->valid_info == TRUE) X- return TRUE; X- X- if (monkey_media_audio_cd_open (cd, error) == FALSE) X- return FALSE; X- X- if (ioctl (cd->priv->fd, CDROMREADTOCHDR, &tochdr) < 0) X- { X- if (error != NULL) X- { X- *error = g_error_new (MONKEY_MEDIA_AUDIO_CD_ERROR, X- MONKEY_MEDIA_AUDIO_CD_ERROR_SYSTEM_ERROR, X- _("Error reading CD header: %s"), X- g_strerror (errno)); X- } X- monkey_media_audio_cd_close (cd, FALSE); X- return FALSE; X- } X- X- track0 = tochdr.cdth_trk0; X- track1 = tochdr.cdth_trk1; X- cd->priv->n_audio_tracks = track1 - track0 + 1; X- X- if (cd->priv->track_offsets != NULL) X- { X- g_free (cd->priv->track_offsets); X- g_free (cd->priv->track_lengths); X- } X- X- cd->priv->track_offsets = g_new0 (int, cd->priv->n_audio_tracks + 1); X- cd->priv->track_lengths = g_new0 (int, cd->priv->n_audio_tracks + 1); X- X- frame_offsets = g_new0 (long, 100); X- track_frames = g_new0 (int, cd->priv->n_audio_tracks + 1); X- X- for (i = 0, j = track0; i < cd->priv->n_audio_tracks; i++, j++) X- { X- /* handle time-based stuff */ X- tocentry.cdte_track = j; X- tocentry.cdte_format = CDROM_MSF; X- X- if (ioctl (cd->priv->fd, CDROMREADTOCENTRY, &tocentry) < 0) X- { X- g_warning ("IOCtl failed"); X- continue; X- } X- X- cd->priv->track_offsets[i] = (tocentry.cdte_addr.msf.minute * 60) X- + tocentry.cdte_addr.msf.second; X- track_frames[i] = tocentry.cdte_addr.msf.frame; X- X- /* get frame offest */ X- tocentry.cdte_track = j; X- tocentry.cdte_format = CDROM_LBA; X- X- if (ioctl (cd->priv->fd, CDROMREADTOCENTRY, &tocentry) < 0) X- { X- g_warning ("IOCtl failed"); X- continue; X- } X- X- frame_offsets[i + 1] = tocentry.cdte_addr.lba + 150; X- } X- X- /* handle time based stuff */ X- tocentry.cdte_track = CDROM_LEADOUT; X- tocentry.cdte_format = CDROM_MSF; X- X- if (ioctl (cd->priv->fd, CDROMREADTOCENTRY, &tocentry) < 0) X- goto leadout_error; X- X- cd->priv->track_offsets[cd->priv->n_audio_tracks] = (tocentry.cdte_addr.msf.minute * 60) X- + tocentry.cdte_addr.msf.second; X- track_frames[cd->priv->n_audio_tracks] = tocentry.cdte_addr.msf.frame; X- X- /* get frame offset */ X- tocentry.cdte_track = CDROM_LEADOUT; X- tocentry.cdte_format = CDROM_LBA; X- X- if (ioctl (cd->priv->fd, CDROMREADTOCENTRY, &tocentry) < 0) X- goto leadout_error; X- X- frame_offsets[0] = tocentry.cdte_addr.lba + 150; X- X- for (i = 0; i < cd->priv->n_audio_tracks; i++) X- { X- int f1, f2, df; X- X- /* Convert all addresses to frames */ X- f1 = cd->priv->track_offsets[i] * CD_FRAMES + track_frames[i]; X- f2 = cd->priv->track_offsets[i + 1] * CD_FRAMES + track_frames[i + 1]; X- X- df = f2 - f1; X- cd->priv->track_lengths[i] = df / CD_FRAMES; X- } X- X- /* calculates the musicbrainz disc ID. We do it locally instead of calling X- * the lib for this, since we avoid the cd to be accessed yet another time X- * this way */ X- sha_init (&sha); X- X- tmp = g_strdup_printf ("%02X", track0); X- sha_update (&sha, (unsigned char *) tmp, strlen (tmp)); X- g_free (tmp); X- X- tmp = g_strdup_printf ("%02X", track1); X- sha_update (&sha, (unsigned char *) tmp, strlen (tmp)); X- g_free (tmp); X- X- for (i = 0; i < 100; i++) X- { X- tmp = g_strdup_printf ("%08lX", frame_offsets[i]); X- sha_update (&sha, (unsigned char *) tmp, strlen (tmp)); X- g_free (tmp); X- } X- X- sha_final (digest, &sha); X- X- base64 = rfc822_binary (digest, 20, &size); X- if (cd->priv->cd_id != NULL) X- g_free (cd->priv->cd_id); X- cd->priv->cd_id = g_strndup (base64, size); X- g_free (base64); X- X- g_free (track_frames); X- g_free (frame_offsets); X- X- monkey_media_audio_cd_close (cd, TRUE); X- X- cd->priv->valid_info = TRUE; X- X- return TRUE; X- X-leadout_error: X- if (error != NULL) X- { X- *error = g_error_new (MONKEY_MEDIA_AUDIO_CD_ERROR, X- MONKEY_MEDIA_AUDIO_CD_ERROR_SYSTEM_ERROR, X- _("Error getting leadout: %s"), X- g_strerror (errno)); X- } X- X- monkey_media_audio_cd_close (cd, FALSE); X- X- g_free (track_frames); X- g_free (frame_offsets); X- X- return FALSE; X } X X X static gboolean X poll_event_cb (MonkeyMediaAudioCD *cd) X { X- int cd_status; X- gboolean emit_signal = FALSE, available = FALSE; X- X- g_mutex_lock (cd->priv->lock); X- X- if (monkey_media_audio_cd_open (cd, NULL) == FALSE) X- { X- cd->priv->valid_info = FALSE; X- cd->priv->cd_available = FALSE; X- X- g_mutex_unlock (cd->priv->lock); X- X- return TRUE; X- } X- X- cd_status = ioctl (cd->priv->fd, CDROM_DRIVE_STATUS, CDSL_CURRENT); X- if (cd_status != -1) X- { X- switch (cd_status) X- { X- case CDS_NO_INFO: X- case CDS_NO_DISC: X- case CDS_TRAY_OPEN: X- case CDS_DRIVE_NOT_READY: X- if (cd->priv->cd_available == TRUE) X- { X- cd->priv->cd_available = FALSE; X- cd->priv->valid_info = FALSE; X- X- emit_signal = TRUE; X- available = FALSE; X- } X- break; X- default: X- if (cd->priv->cd_available == FALSE) X- { X- cd->priv->cd_available = TRUE; X- cd->priv->valid_info = FALSE; X- X- emit_signal = TRUE; X- available = TRUE; X- } X- break; X- } X- } X- else X- { X- /* so we went out of sync.. */ X- cd->priv->valid_info = FALSE; X- } X- X- monkey_media_audio_cd_close (cd, FALSE); X- X- g_mutex_unlock (cd->priv->lock); X- X- if (emit_signal == TRUE) X- { X- g_signal_emit (G_OBJECT (cd), monkey_media_audio_cd_signals[CD_CHANGED], 0, available); X- } X- X- return TRUE; X } X X char * X monkey_media_audio_cd_get_disc_id (MonkeyMediaAudioCD *cd, X GError **error) X { X- char *ret; X- X- g_return_val_if_fail (MONKEY_MEDIA_IS_AUDIO_CD (cd), NULL); X- X- g_mutex_lock (cd->priv->lock); X- X- if (ensure_sync (cd, error) == FALSE) X- { X- g_mutex_unlock (cd->priv->lock); X- return NULL; X- } X- X- ret = g_strdup (cd->priv->cd_id); X- X- g_mutex_unlock (cd->priv->lock); X- X- return ret; X } X X long X@@ -807,25 +257,6 @@ X int track, X GError **error) X { X- long ret; X- X- g_return_val_if_fail (MONKEY_MEDIA_IS_AUDIO_CD (cd), -1); X- X- g_mutex_lock (cd->priv->lock); X- X- if (ensure_sync (cd, error) == FALSE) X- { X- g_mutex_unlock (cd->priv->lock); X- return -1; X- } X- X- g_return_val_if_fail (track > 0 && track <= cd->priv->n_audio_tracks, -1); X- X- ret = (long) cd->priv->track_lengths[track - 1]; X- X- g_mutex_unlock (cd->priv->lock); X- X- return ret; X } X X int X@@ -833,25 +264,6 @@ X int track, X GError **error) X { X- int ret; X- X- g_return_val_if_fail (MONKEY_MEDIA_IS_AUDIO_CD (cd), -1); X- X- g_mutex_lock (cd->priv->lock); X- X- if (ensure_sync (cd, error) == FALSE) X- { X- g_mutex_unlock (cd->priv->lock); X- return -1; X- } X- X- g_return_val_if_fail (track > 0 && track <= cd->priv->n_audio_tracks, -1); X- X- ret = cd->priv->track_offsets[track - 1]; X- X- g_mutex_unlock (cd->priv->lock); X- X- return ret; X } X X gboolean X@@ -859,98 +271,26 @@ X int track, X GError **error) X { X- gboolean ret; X- X- g_return_val_if_fail (MONKEY_MEDIA_IS_AUDIO_CD (cd), FALSE); X- X- g_mutex_lock (cd->priv->lock); X- X- if (ensure_sync (cd, error) == FALSE) X- { X- g_mutex_unlock (cd->priv->lock); X- return FALSE; X- } X- X- ret = (track > 0 && track <= cd->priv->n_audio_tracks); X- X- g_mutex_unlock (cd->priv->lock); X- X- return ret; X } X X int X monkey_media_audio_cd_get_n_tracks (MonkeyMediaAudioCD *cd, X GError **error) X { X- int ret; X- X- g_return_val_if_fail (MONKEY_MEDIA_IS_AUDIO_CD (cd), -1); X- X- g_mutex_lock (cd->priv->lock); X- X- if (ensure_sync (cd, error) == FALSE) X- { X- g_mutex_unlock (cd->priv->lock); X- return -1; X- } X- X- ret = cd->priv->n_audio_tracks; X- X- g_mutex_unlock (cd->priv->lock); X- X- return ret; X } X X GList * X monkey_media_audio_cd_list_tracks (MonkeyMediaAudioCD *cd, X GError **error) X { X- GList *ret = NULL; X- int i; X- X- g_return_val_if_fail (MONKEY_MEDIA_IS_AUDIO_CD (cd), NULL); X- X- g_mutex_lock (cd->priv->lock); X- X- if (ensure_sync (cd, error) == FALSE) X- { X- g_mutex_unlock (cd->priv->lock); X- return NULL; X- } X- X- for (i = 0; i < cd->priv->n_audio_tracks; i++) X- { X- char *uri; X- X- uri = g_strdup_printf ("audiocd://%d", i + 1); X- X- ret = g_list_append (ret, uri); X- } X- X- g_mutex_unlock (cd->priv->lock); X- X- return ret; X } X X void X monkey_media_audio_cd_free_tracks (GList *list) X { X- GList *l; X- X- for (l = list; l != NULL; l = g_list_next (l)) X- { X- g_free (l->data); X- } X- X- g_list_free (list); X } X X GQuark X monkey_media_audio_cd_error_quark (void) X { X- static GQuark quark = 0; X- if (!quark) X- quark = g_quark_from_static_string ("monkey_media_audio_cd_error"); X- X- return quark; X } END-of-monkey-media/files/patch-src::monkey-media-audio-cd.c echo x - monkey-media/files/patch-configure sed 's/^X//' >monkey-media/files/patch-configure << 'END-of-monkey-media/files/patch-configure' X--- configure.orig Sat Nov 16 18:41:20 2002 X+++ configure Sat Nov 16 18:42:03 2002 X@@ -8464,13 +8464,13 @@ X warning_flags= X ;; X minimum) X- warning_flags="-Wall -Wunused" X+ warning_flags="-Wunused" X ;; X yes) X- warning_flags="-Wall -Wunused -Wmissing-prototypes -Wmissing-declarations" X+ warning_flags="-Wunused -Wmissing-prototypes -Wmissing-declarations" X ;; X maximum|error) X- warning_flags="-Wall -Wunused -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith" X+ warning_flags="-Wunused -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith" X CFLAGS="$warning_flags $CFLAGS" X for option in -Wsign-promo -Wno-sign-compare; do X SAVE_CFLAGS="$CFLAGS" X@@ -11643,7 +11643,7 @@ X LIBS="$LIBS -lmusicbrainz -lstdc++" X X X-CFLAGS="$CFLAGS -Wall -Werror" X+CFLAGS="$CFLAGS -Werror" X X X LIBS="$LIBS -lgstcontrol" END-of-monkey-media/files/patch-configure exit --tKW2IUtsqtDRztdT Content-Type: text/x-sh; charset=us-ascii Content-Disposition: attachment; filename="rhythmbox.sh" # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # rhythmbox # rhythmbox/Makefile # rhythmbox/distinfo # rhythmbox/pkg-comment # rhythmbox/pkg-descr # rhythmbox/pkg-plist # echo c - rhythmbox mkdir -p rhythmbox > /dev/null 2>&1 echo x - rhythmbox/Makefile sed 's/^X//' >rhythmbox/Makefile << 'END-of-rhythmbox/Makefile' X# New ports collection makefile for: rhythmbox X# Date created: 4 November 2002 X# Whom: Martin Klaffenboeck X# X# $FreeBSD$ X# X XPORTNAME= rhythmbox XPORTVERSION= 0.4.0 XCATEGORIES= audio gnome XMASTER_SITES= http://www.rhythmbox.org/download/ X XMAINTAINER= martin.klaffenboeck@gmx.at X XLIB_DEPENDS= monkey-media.0:${PORTSDIR}/audio/monkey-media X XUSE_GNOMENG= yes XUSE_GNOME= gnomehack gnomeprefix XUSE_X_PREFIX= yes XUSE_GMAKE= yes XGNU_CONFIGURE= yes XUSE_LIBTOOL= yes X XCONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include ${PTHREAD_CFLAGS}" \ X LIBS="-L${LOCALBASE}/lib -lgnuregex -lcompat" X XCONFIGURE_ARGS+= --prefix=${PREFIX} XCONFIGURE_TARGET= --target=${MACHINE_ARCH}-unknown-freebsd${OSREL} X X.include END-of-rhythmbox/Makefile echo x - rhythmbox/distinfo sed 's/^X//' >rhythmbox/distinfo << 'END-of-rhythmbox/distinfo' XMD5 (rhythmbox-0.4.0.tar.gz) = 0060ed6e9220f90a1c4d07ff3a8a882c END-of-rhythmbox/distinfo echo x - rhythmbox/pkg-comment sed 's/^X//' >rhythmbox/pkg-comment << 'END-of-rhythmbox/pkg-comment' XPlaying cd's and music files on the Gnome 2 desktop. END-of-rhythmbox/pkg-comment echo x - rhythmbox/pkg-descr sed 's/^X//' >rhythmbox/pkg-descr << 'END-of-rhythmbox/pkg-descr' XRhythmbox which takes its inspiration from Apple's iTunes application, lets you do everything from importing your audio cd's into mp3 or Ogg Vorbis format, and play these music files and other music files you have. Play your music with an assortment of visualization plugins and burn new audio cd's from your music files. It is a one-stop shopping application for all your music needs. X XWWW: http://www.rhythmbox.org/ X- Martin Klaffenboeck END-of-rhythmbox/pkg-descr echo x - rhythmbox/pkg-plist sed 's/^X//' >rhythmbox/pkg-plist << 'END-of-rhythmbox/pkg-plist' Xbin/rhythmbox Xetc/gconf/gconf.xml.defaults/apps/rhythmbox/%gconf.xml Xetc/gconf/gconf.xml.defaults/apps/rhythmbox/state/%gconf.xml Xetc/gconf/gconf.xml.defaults/apps/rhythmbox/state/library/%gconf.xml Xetc/gconf/gconf.xml.defaults/apps/rhythmbox/ui/%gconf.xml Xetc/gconf/gconf.xml.defaults/schemas/apps/rhythmbox/%gconf.xml Xetc/gconf/gconf.xml.defaults/schemas/apps/rhythmbox/state/%gconf.xml Xetc/gconf/gconf.xml.defaults/schemas/apps/rhythmbox/state/library/%gconf.xml Xetc/gconf/gconf.xml.defaults/schemas/apps/rhythmbox/ui/%gconf.xml Xlibdata/bonobo/servers/GNOME_Rhythmbox_Shell.server Xshare/gnome/application-registry/rhythmbox.applications Xshare/gnome/applications/rhythmbox.desktop Xshare/gnome/gnome-2.0/ui/rhythmbox-group-view.xml Xshare/gnome/gnome-2.0/ui/rhythmbox-library-view.xml Xshare/gnome/gnome-2.0/ui/rhythmbox-test-view-2.xml Xshare/gnome/gnome-2.0/ui/rhythmbox-ui.xml Xshare/gnome/help/rhythmbox/C/authors.xml Xshare/gnome/help/rhythmbox/C/fdl-appendix.xml Xshare/gnome/help/rhythmbox/C/legal.xml Xshare/gnome/help/rhythmbox/C/quick-reference.xml Xshare/gnome/help/rhythmbox/C/rhythmbox.xml Xshare/gnome/help/rhythmbox/C/user-guide.xml Xshare/gnome/omf/rhythmbox/rhythmbox-C.omf Xshare/gnome/pixmaps/rhythmbox.png Xshare/gnome/rhythmbox/art/about-logo.png Xshare/gnome/rhythmbox/art/rhythmbox-album.png Xshare/gnome/rhythmbox/art/rhythmbox-dnd.png Xshare/gnome/rhythmbox/art/rhythmbox-group.png Xshare/gnome/rhythmbox/art/rhythmbox-library.png Xshare/gnome/rhythmbox/art/rhythmbox-next.png Xshare/gnome/rhythmbox/art/rhythmbox-no-star.png Xshare/gnome/rhythmbox/art/rhythmbox-pause.png Xshare/gnome/rhythmbox/art/rhythmbox-play.png Xshare/gnome/rhythmbox/art/rhythmbox-playing.png Xshare/gnome/rhythmbox/art/rhythmbox-playlist.png Xshare/gnome/rhythmbox/art/rhythmbox-previous.png Xshare/gnome/rhythmbox/art/rhythmbox-repeat.png Xshare/gnome/rhythmbox/art/rhythmbox-rewind.png Xshare/gnome/rhythmbox/art/rhythmbox-set-star.png Xshare/gnome/rhythmbox/art/rhythmbox-shuffle.png Xshare/gnome/rhythmbox/art/rhythmbox-stop.png Xshare/gnome/rhythmbox/art/rhythmbox-tray-icon.png Xshare/gnome/rhythmbox/art/rhythmbox-unset-star.png Xshare/gnome/rhythmbox/art/rhythmbox-visuals.png Xshare/gnome/rhythmbox/art/rhythmbox-volume-max.png Xshare/gnome/rhythmbox/art/rhythmbox-volume-medium.png Xshare/gnome/rhythmbox/art/rhythmbox-volume-min.png Xshare/gnome/rhythmbox/art/rhythmbox-volume-mute.png Xshare/gnome/rhythmbox/art/rhythmbox-volume-zero.png Xshare/gnome/rhythmbox/glade/preferences.glade Xshare/gnome/rhythmbox/glade/song-info.glade Xshare/gnome/rhythmbox/glade/toolbar-editor.glade Xshare/gnome/rhythmbox/node-views/rb-node-view-albums.xml Xshare/gnome/rhythmbox/node-views/rb-node-view-artists.xml Xshare/gnome/rhythmbox/node-views/rb-node-view-songs.xml X@dirrm share/gnome/rhythmbox/node-views X@dirrm share/gnome/rhythmbox/glade X@dirrm share/gnome/rhythmbox/art X@dirrm share/gnome/rhythmbox X@dirrm share/gnome/omf/rhythmbox X@dirrm etc/gconf/gconf.xml.defaults/schemas/apps/rhythmbox/ui X@dirrm etc/gconf/gconf.xml.defaults/schemas/apps/rhythmbox/state/library X@dirrm etc/gconf/gconf.xml.defaults/schemas/apps/rhythmbox/state X@dirrm etc/gconf/gconf.xml.defaults/schemas/apps/rhythmbox X@dirrm etc/gconf/gconf.xml.defaults/apps/rhythmbox/ui X@dirrm etc/gconf/gconf.xml.defaults/apps/rhythmbox/state/library X@dirrm etc/gconf/gconf.xml.defaults/apps/rhythmbox/state X@dirrm etc/gconf/gconf.xml.defaults/apps/rhythmbox END-of-rhythmbox/pkg-plist exit --tKW2IUtsqtDRztdT-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-gnome" in the body of the message