5#include <IOKit/storage/IOCDMediaBSDClient.h>
6#include <IOKit/storage/IODVDMediaBSDClient.h>
12#define LOC QString("MythCDROMDarwin:")
18 bool SuperMount,
bool AllowEject):
19 MythCDROM(par, DevicePath, SuperMount, AllowEject) {};
25 bool SuperMount,
bool AllowEject)
37 fd = open(raw.toLocal8Bit().constData(), O_RDONLY |
O_NONBLOCK);
40 LOG(VB_MEDIA, LOG_ERR,
LOC +
41 "setDeviceSpeed() can't open drive " + raw);
45 if (ioctl(fd, DKIOCCDSETSPEED, &spd) == -1 &&
46 ioctl(fd, DKIOCDVDSETSPEED, &spd) == -1)
48 LOG(VB_MEDIA, LOG_ERR,
LOC +
"setDeviceSpeed() failed: " +
ENO);
53 LOG(VB_MEDIA, LOG_INFO,
LOC +
"setDeviceSpeed() - CD/DVD speed now " +
54 QString::number(spd));
void setDeviceSpeed(const char *device, int speed) override
MythCDROMDarwin(QObject *par, const QString &DevicePath, bool SuperMount, bool AllowEject)
MythCDROM * GetMythCDROMDarwin(QObject *par, const QString &devicePath, bool SuperMount, bool AllowEject)
#define ENO
This can be appended to the LOG args with "+".
#define LOG(_MASK_, _LEVEL_, _QSTRING_)