Fix cdparanoia support so that gnome-cd can play CDs even when the CD-ROM
isn't wired to the soundcard.
This commit is contained in:
parent
2e7e4accfc
commit
55cac619d1
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=131707
6 changed files with 44 additions and 70 deletions
|
@ -7,7 +7,7 @@
|
|||
|
||||
PORTNAME= gnomemedia2
|
||||
PORTVERSION= 2.10.0
|
||||
PORTREVISION= 2
|
||||
PORTREVISION= 3
|
||||
CATEGORIES= audio gnome
|
||||
MASTER_SITES= ${MASTER_SITE_GNOME}
|
||||
MASTER_SITE_SUBDIR= sources/gnome-media/2.10
|
||||
|
|
|
@ -1,30 +0,0 @@
|
|||
--- gnome-cd/Makefile.in.orig Sat Mar 12 02:52:17 2005
|
||||
+++ gnome-cd/Makefile.in Sat Mar 12 03:03:20 2005
|
||||
@@ -282,8 +282,8 @@
|
||||
libgnomemedia_cddbslave2_la_SOURCES = $(IDL_GENERATED)
|
||||
@CDROM_HOST_SOLARIS_TRUE@@HAVE_GSTREAMER_FALSE@cd_sources = solaris-cdrom.c solaris-cdrom.h
|
||||
|
||||
-@HAVE_GSTREAMER_TRUE@cd_sources = gst-cdparanoia-cdrom.c
|
||||
-@CDROM_HOST_BSD_TRUE@@HAVE_GSTREAMER_FALSE@cd_sources = bsd-cdrom.c bsd-cdrom.h
|
||||
+#@HAVE_GSTREAMER_TRUE@cd_sources = gst-cdparanoia-cdrom.c
|
||||
+@CDROM_HOST_BSD_TRUE@cd_sources = bsd-cdrom.c bsd-cdrom.h
|
||||
@CDROM_HOST_LINUX_TRUE@@HAVE_GSTREAMER_FALSE@cd_sources = linux-cdrom.c linux-cdrom.h
|
||||
|
||||
bin_PROGRAMS = gnome-cd
|
||||
@@ -352,13 +352,13 @@
|
||||
solaris-cdrom.h gst-cdparanoia-cdrom.c bsd-cdrom.c bsd-cdrom.h \
|
||||
linux-cdrom.c linux-cdrom.h preferences.c preferences.h \
|
||||
cd-selection.c cd-selection.h theme.c
|
||||
-@CDROM_HOST_BSD_TRUE@@HAVE_GSTREAMER_FALSE@am__objects_2 = \
|
||||
-@CDROM_HOST_BSD_TRUE@@HAVE_GSTREAMER_FALSE@ bsd-cdrom.$(OBJEXT)
|
||||
+@CDROM_HOST_BSD_TRUE@am__objects_2 = \
|
||||
+@CDROM_HOST_BSD_TRUE@ bsd-cdrom.$(OBJEXT)
|
||||
@CDROM_HOST_LINUX_TRUE@@HAVE_GSTREAMER_FALSE@am__objects_2 = \
|
||||
@CDROM_HOST_LINUX_TRUE@@HAVE_GSTREAMER_FALSE@ linux-cdrom.$(OBJEXT)
|
||||
@CDROM_HOST_SOLARIS_TRUE@@HAVE_GSTREAMER_FALSE@am__objects_2 = \
|
||||
@CDROM_HOST_SOLARIS_TRUE@@HAVE_GSTREAMER_FALSE@ solaris-cdrom.$(OBJEXT)
|
||||
-@HAVE_GSTREAMER_TRUE@am__objects_2 = gst-cdparanoia-cdrom.$(OBJEXT)
|
||||
+#@HAVE_GSTREAMER_TRUE@am__objects_2 = gst-cdparanoia-cdrom.$(OBJEXT)
|
||||
am_gnome_cd_OBJECTS = eggtrayicon.$(OBJEXT) gnome-cd.$(OBJEXT) \
|
||||
callbacks.$(OBJEXT) cddb.$(OBJEXT) cdrom.$(OBJEXT) \
|
||||
display.$(OBJEXT) $(am__objects_2) preferences.$(OBJEXT) \
|
|
@ -1,6 +1,23 @@
|
|||
--- gnome-cd/gst-cdparanoia-cdrom.c.orig Sat Mar 12 00:09:14 2005
|
||||
+++ gnome-cd/gst-cdparanoia-cdrom.c Sat Mar 12 00:19:15 2005
|
||||
@@ -1443,15 +1443,18 @@
|
||||
--- gnome-cd/gst-cdparanoia-cdrom.c.orig Mon Feb 7 12:39:31 2005
|
||||
+++ gnome-cd/gst-cdparanoia-cdrom.c Sun Mar 20 04:42:32 2005
|
||||
@@ -1213,6 +1213,16 @@
|
||||
*status = NULL;
|
||||
return FALSE;
|
||||
}
|
||||
+#else
|
||||
+ if (ioctl (cdrom->fd, CDIOREADTOCHEADER, priv->tochdr) < 0) {
|
||||
+ realstatus->cd = GNOME_CDROM_STATUS_NO_DISC;
|
||||
+ realstatus->audio = GNOME_CDROM_AUDIO_NOTHING;
|
||||
+ realstatus->track = -1;
|
||||
+
|
||||
+ gst_cdparanoia_cdrom_close (lcd);
|
||||
+ return TRUE;
|
||||
+ }
|
||||
+ realstatus->cd = GNOME_CDROM_STATUS_OK;
|
||||
#endif
|
||||
|
||||
/* Get the volume */
|
||||
@@ -1443,15 +1453,18 @@
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -22,7 +39,7 @@
|
|||
if (ioctl (fd, CDIOCGETVOL, 0) < 0) {
|
||||
#else
|
||||
if (ioctl (fd, CDROM_GET_CAPABILITY, 0) < 0) {
|
||||
@@ -1463,6 +1466,7 @@
|
||||
@@ -1463,6 +1476,7 @@
|
||||
}
|
||||
|
||||
close (fd);
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
PORTNAME= gnomemedia2
|
||||
PORTVERSION= 2.10.0
|
||||
PORTREVISION= 2
|
||||
PORTREVISION= 3
|
||||
CATEGORIES= audio gnome
|
||||
MASTER_SITES= ${MASTER_SITE_GNOME}
|
||||
MASTER_SITE_SUBDIR= sources/gnome-media/2.10
|
||||
|
|
|
@ -1,30 +0,0 @@
|
|||
--- gnome-cd/Makefile.in.orig Sat Mar 12 02:52:17 2005
|
||||
+++ gnome-cd/Makefile.in Sat Mar 12 03:03:20 2005
|
||||
@@ -282,8 +282,8 @@
|
||||
libgnomemedia_cddbslave2_la_SOURCES = $(IDL_GENERATED)
|
||||
@CDROM_HOST_SOLARIS_TRUE@@HAVE_GSTREAMER_FALSE@cd_sources = solaris-cdrom.c solaris-cdrom.h
|
||||
|
||||
-@HAVE_GSTREAMER_TRUE@cd_sources = gst-cdparanoia-cdrom.c
|
||||
-@CDROM_HOST_BSD_TRUE@@HAVE_GSTREAMER_FALSE@cd_sources = bsd-cdrom.c bsd-cdrom.h
|
||||
+#@HAVE_GSTREAMER_TRUE@cd_sources = gst-cdparanoia-cdrom.c
|
||||
+@CDROM_HOST_BSD_TRUE@cd_sources = bsd-cdrom.c bsd-cdrom.h
|
||||
@CDROM_HOST_LINUX_TRUE@@HAVE_GSTREAMER_FALSE@cd_sources = linux-cdrom.c linux-cdrom.h
|
||||
|
||||
bin_PROGRAMS = gnome-cd
|
||||
@@ -352,13 +352,13 @@
|
||||
solaris-cdrom.h gst-cdparanoia-cdrom.c bsd-cdrom.c bsd-cdrom.h \
|
||||
linux-cdrom.c linux-cdrom.h preferences.c preferences.h \
|
||||
cd-selection.c cd-selection.h theme.c
|
||||
-@CDROM_HOST_BSD_TRUE@@HAVE_GSTREAMER_FALSE@am__objects_2 = \
|
||||
-@CDROM_HOST_BSD_TRUE@@HAVE_GSTREAMER_FALSE@ bsd-cdrom.$(OBJEXT)
|
||||
+@CDROM_HOST_BSD_TRUE@am__objects_2 = \
|
||||
+@CDROM_HOST_BSD_TRUE@ bsd-cdrom.$(OBJEXT)
|
||||
@CDROM_HOST_LINUX_TRUE@@HAVE_GSTREAMER_FALSE@am__objects_2 = \
|
||||
@CDROM_HOST_LINUX_TRUE@@HAVE_GSTREAMER_FALSE@ linux-cdrom.$(OBJEXT)
|
||||
@CDROM_HOST_SOLARIS_TRUE@@HAVE_GSTREAMER_FALSE@am__objects_2 = \
|
||||
@CDROM_HOST_SOLARIS_TRUE@@HAVE_GSTREAMER_FALSE@ solaris-cdrom.$(OBJEXT)
|
||||
-@HAVE_GSTREAMER_TRUE@am__objects_2 = gst-cdparanoia-cdrom.$(OBJEXT)
|
||||
+#@HAVE_GSTREAMER_TRUE@am__objects_2 = gst-cdparanoia-cdrom.$(OBJEXT)
|
||||
am_gnome_cd_OBJECTS = eggtrayicon.$(OBJEXT) gnome-cd.$(OBJEXT) \
|
||||
callbacks.$(OBJEXT) cddb.$(OBJEXT) cdrom.$(OBJEXT) \
|
||||
display.$(OBJEXT) $(am__objects_2) preferences.$(OBJEXT) \
|
|
@ -1,6 +1,23 @@
|
|||
--- gnome-cd/gst-cdparanoia-cdrom.c.orig Sat Mar 12 00:09:14 2005
|
||||
+++ gnome-cd/gst-cdparanoia-cdrom.c Sat Mar 12 00:19:15 2005
|
||||
@@ -1443,15 +1443,18 @@
|
||||
--- gnome-cd/gst-cdparanoia-cdrom.c.orig Mon Feb 7 12:39:31 2005
|
||||
+++ gnome-cd/gst-cdparanoia-cdrom.c Sun Mar 20 04:42:32 2005
|
||||
@@ -1213,6 +1213,16 @@
|
||||
*status = NULL;
|
||||
return FALSE;
|
||||
}
|
||||
+#else
|
||||
+ if (ioctl (cdrom->fd, CDIOREADTOCHEADER, priv->tochdr) < 0) {
|
||||
+ realstatus->cd = GNOME_CDROM_STATUS_NO_DISC;
|
||||
+ realstatus->audio = GNOME_CDROM_AUDIO_NOTHING;
|
||||
+ realstatus->track = -1;
|
||||
+
|
||||
+ gst_cdparanoia_cdrom_close (lcd);
|
||||
+ return TRUE;
|
||||
+ }
|
||||
+ realstatus->cd = GNOME_CDROM_STATUS_OK;
|
||||
#endif
|
||||
|
||||
/* Get the volume */
|
||||
@@ -1443,15 +1453,18 @@
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -22,7 +39,7 @@
|
|||
if (ioctl (fd, CDIOCGETVOL, 0) < 0) {
|
||||
#else
|
||||
if (ioctl (fd, CDROM_GET_CAPABILITY, 0) < 0) {
|
||||
@@ -1463,6 +1466,7 @@
|
||||
@@ -1463,6 +1476,7 @@
|
||||
}
|
||||
|
||||
close (fd);
|
||||
|
|
Loading…
Reference in a new issue