|
Lines 12-17
Link Here
|
| 12 |
# include <cdio/paranoia.h> |
12 |
# include <cdio/paranoia.h> |
| 13 |
#endif //def HAVE_CDIO |
13 |
#endif //def HAVE_CDIO |
| 14 |
|
14 |
|
|
|
15 |
#ifdef HAVE_CDIO_PARANOIA |
| 16 |
# include <cdio/paranoia/cdda.h> |
| 17 |
# include <cdio/paranoia/paranoia.h> |
| 18 |
#endif //def HAVE_CDIO_PARANOIA |
| 19 |
|
| 15 |
// C++ includes |
20 |
// C++ includes |
| 16 |
#include <iostream> |
21 |
#include <iostream> |
| 17 |
#include <memory> |
22 |
#include <memory> |
|
Lines 52-60
Link Here
|
| 52 |
|
57 |
|
| 53 |
// MythMusic includes |
58 |
// MythMusic includes |
| 54 |
#include "cdrip.h" |
59 |
#include "cdrip.h" |
| 55 |
#ifdef HAVE_CDIO |
60 |
#if defined HAVE_CDIO || defined HAVE_CDIO_PARANOIA |
| 56 |
#include "cddecoder.h" |
61 |
#include "cddecoder.h" |
| 57 |
#endif // HAVE_CDIO |
62 |
#endif // HAVE_CDIO || HAVE_CDIO_PARANOIA |
| 58 |
#include "encoder.h" |
63 |
#include "encoder.h" |
| 59 |
#include "vorbisencoder.h" |
64 |
#include "vorbisencoder.h" |
| 60 |
#include "lameencoder.h" |
65 |
#include "lameencoder.h" |
|
Lines 64-70
Link Here
|
| 64 |
#include "mythlogging.h" |
69 |
#include "mythlogging.h" |
| 65 |
#include "musicutils.h" |
70 |
#include "musicutils.h" |
| 66 |
|
71 |
|
| 67 |
#ifdef HAVE_CDIO |
72 |
#if defined HAVE_CDIO || defined HAVE_CDIO_PARANOIA |
| 68 |
// libparanoia compatibility |
73 |
// libparanoia compatibility |
| 69 |
#ifndef cdrom_paranoia |
74 |
#ifndef cdrom_paranoia |
| 70 |
#define cdrom_paranoia cdrom_paranoia_t |
75 |
#define cdrom_paranoia cdrom_paranoia_t |
|
Lines 73-79
Link Here
|
| 73 |
#ifndef CD_FRAMESIZE_RAW |
78 |
#ifndef CD_FRAMESIZE_RAW |
| 74 |
# define CD_FRAMESIZE_RAW CDIO_CD_FRAMESIZE_RAW |
79 |
# define CD_FRAMESIZE_RAW CDIO_CD_FRAMESIZE_RAW |
| 75 |
#endif // CD_FRAMESIZE_RAW |
80 |
#endif // CD_FRAMESIZE_RAW |
| 76 |
#endif // HAVE_CDIO |
81 |
#endif // HAVE_CDIO || HAVE_CDIO_PARANOIA |
| 77 |
|
82 |
|
| 78 |
QEvent::Type RipStatusEvent::kTrackTextEvent = |
83 |
QEvent::Type RipStatusEvent::kTrackTextEvent = |
| 79 |
(QEvent::Type) QEvent::registerEventType(); |
84 |
(QEvent::Type) QEvent::registerEventType(); |
|
Lines 132-138
Link Here
|
| 132 |
|
137 |
|
| 133 |
static long int getSectorCount (QString &cddevice, int tracknum) |
138 |
static long int getSectorCount (QString &cddevice, int tracknum) |
| 134 |
{ |
139 |
{ |
| 135 |
#ifdef HAVE_CDIO |
140 |
#if defined HAVE_CDIO || defined HAVE_CDIO_PARANOIA |
| 136 |
QByteArray devname = cddevice.toLatin1(); |
141 |
QByteArray devname = cddevice.toLatin1(); |
| 137 |
cdrom_drive *device = cdda_identify(devname.constData(), 0, NULL); |
142 |
cdrom_drive *device = cdda_identify(devname.constData(), 0, NULL); |
| 138 |
|
143 |
|
|
Lines 168-182
Link Here
|
| 168 |
cdda_close(device); |
173 |
cdda_close(device); |
| 169 |
#else |
174 |
#else |
| 170 |
(void)cddevice; (void)tracknum; |
175 |
(void)cddevice; (void)tracknum; |
| 171 |
#endif // HAVE_CDIO |
176 |
#endif // HAVE_CDIO || HAVE_CDIO_PARANOIA |
| 172 |
return 0; |
177 |
return 0; |
| 173 |
} |
178 |
} |
| 174 |
|
179 |
|
| 175 |
#ifdef HAVE_CDIO |
180 |
#if defined HAVE_CDIO || defined HAVE_CDIO_PARANOIA |
| 176 |
static void paranoia_cb(long, paranoia_cb_mode_t) |
181 |
static void paranoia_cb(long, paranoia_cb_mode_t) |
| 177 |
{ |
182 |
{ |
| 178 |
} |
183 |
} |
| 179 |
#endif // HAVE_CDIO |
184 |
#endif // HAVE_CDIO || HAVE_CDIO_PARANOIA |
| 180 |
|
185 |
|
| 181 |
CDRipperThread::CDRipperThread(RipStatus *parent, QString device, |
186 |
CDRipperThread::CDRipperThread(RipStatus *parent, QString device, |
| 182 |
QVector<RipTrack*> *tracks, int quality) : |
187 |
QVector<RipTrack*> *tracks, int quality) : |
|
Lines 413-419
Link Here
|
| 413 |
|
418 |
|
| 414 |
int CDRipperThread::ripTrack(QString &cddevice, Encoder *encoder, int tracknum) |
419 |
int CDRipperThread::ripTrack(QString &cddevice, Encoder *encoder, int tracknum) |
| 415 |
{ |
420 |
{ |
| 416 |
#ifdef HAVE_CDIO |
421 |
#if defined HAVE_CDIO || defined HAVE_CDIO_PARANOIA |
| 417 |
QByteArray devname = cddevice.toLatin1(); |
422 |
QByteArray devname = cddevice.toLatin1(); |
| 418 |
cdrom_drive *device = cdda_identify(devname.constData(), 0, NULL); |
423 |
cdrom_drive *device = cdda_identify(devname.constData(), 0, NULL); |
| 419 |
|
424 |
|
|
Lines 529-535
Link Here
|
| 529 |
#else |
534 |
#else |
| 530 |
(void)cddevice; (void)encoder; (void)tracknum; |
535 |
(void)cddevice; (void)encoder; (void)tracknum; |
| 531 |
return 0; |
536 |
return 0; |
| 532 |
#endif // HAVE_CDIO |
537 |
#endif // HAVE_CDIO || HAVE_CDIO_PARANOIA |
| 533 |
} |
538 |
} |
| 534 |
|
539 |
|
| 535 |
/////////////////////////////////////////////////////////////////////////////// |
540 |
/////////////////////////////////////////////////////////////////////////////// |
|
Lines 873-885
Link Here
|
| 873 |
|
878 |
|
| 874 |
void Ripper::scanCD(void) |
879 |
void Ripper::scanCD(void) |
| 875 |
{ |
880 |
{ |
| 876 |
#ifdef HAVE_CDIO |
881 |
#if defined HAVE_CDIO || defined HAVE_CDIO_PARANOIA |
| 877 |
{ |
882 |
{ |
| 878 |
LOG(VB_MEDIA, LOG_INFO, QString("Ripper::%1 CD='%2'"). |
883 |
LOG(VB_MEDIA, LOG_INFO, QString("Ripper::%1 CD='%2'"). |
| 879 |
arg(__func__).arg(m_CDdevice)); |
884 |
arg(__func__).arg(m_CDdevice)); |
| 880 |
(void)cdio_close_tray(m_CDdevice.toLatin1().constData(), NULL); |
885 |
(void)cdio_close_tray(m_CDdevice.toLatin1().constData(), NULL); |
| 881 |
} |
886 |
} |
| 882 |
#endif // HAVE_CDIO |
887 |
#endif // HAVE_CDIO || HAVE_CDIO_PARANOIA |
| 883 |
|
888 |
|
| 884 |
if (m_decoder) |
889 |
if (m_decoder) |
| 885 |
delete m_decoder; |
890 |
delete m_decoder; |
|
Lines 1226-1232
Link Here
|
| 1226 |
bool bEjectCD = gCoreContext->GetNumSetting("EjectCDAfterRipping",1); |
1231 |
bool bEjectCD = gCoreContext->GetNumSetting("EjectCDAfterRipping",1); |
| 1227 |
if (bEjectCD) |
1232 |
if (bEjectCD) |
| 1228 |
{ |
1233 |
{ |
| 1229 |
#ifdef HAVE_CDIO |
1234 |
#if defined HAVE_CDIO || defined HAVE_CDIO_PARANOIA |
| 1230 |
LOG(VB_MEDIA, LOG_INFO, QString("Ripper::%1 '%2'"). |
1235 |
LOG(VB_MEDIA, LOG_INFO, QString("Ripper::%1 '%2'"). |
| 1231 |
arg(__func__).arg(m_CDdevice)); |
1236 |
arg(__func__).arg(m_CDdevice)); |
| 1232 |
(void)cdio_eject_media_drive(m_CDdevice.toLatin1().constData()); |
1237 |
(void)cdio_eject_media_drive(m_CDdevice.toLatin1().constData()); |
|
Lines 1242-1248
Link Here
|
| 1242 |
mon->Unlock(pMedia); |
1247 |
mon->Unlock(pMedia); |
| 1243 |
} |
1248 |
} |
| 1244 |
} |
1249 |
} |
| 1245 |
#endif // HAVE_CDIO |
1250 |
#endif // HAVE_CDIO || HAVE_CDIO_PARANOIA |
| 1246 |
} |
1251 |
} |
| 1247 |
} |
1252 |
} |
| 1248 |
|
1253 |
|