|
MythTV
0.26-pre
|
Use Linux-specific ioctl()s to detect Audio-CDs, changed media, open trays and blank writable media. More...
Public Member Functions | |
| MythCDROMLinux (QObject *par, const char *DevicePath, bool SuperMount, bool AllowEject) | |
| virtual MythMediaError | testMedia (void) |
| virtual bool | mediaChanged (void) |
| virtual bool | checkOK (void) |
| virtual MythMediaStatus | checkMedia (void) |
| virtual MythMediaError | eject (bool open_close=true) |
| virtual void | setSpeed (int speed) |
| virtual void | setSpeed (const char *device, int speed) |
| virtual bool | isSameDevice (const QString &path) |
| virtual MythMediaError | lock (void) |
| virtual MythMediaError | unlock (void) |
Private Member Functions | |
| int | driveStatus (void) |
| Exhaustively determine the status. | |
| bool | hasWritableMedia (void) |
| Is there blank or eraseable media in the drive? | |
| int | SCSIstatus (void) |
| Use a SCSI query packet to see if the drive is _really_ open. | |
Use Linux-specific ioctl()s to detect Audio-CDs, changed media, open trays and blank writable media.
Definition at line 124 of file mythcdrom-linux.cpp.
| MythCDROMLinux::MythCDROMLinux | ( | QObject * | par, |
| const char * | DevicePath, | ||
| bool | SuperMount, | ||
| bool | AllowEject | ||
| ) | [inline] |
Definition at line 127 of file mythcdrom-linux.cpp.
| MythMediaError MythCDROMLinux::testMedia | ( | void | ) | [virtual] |
Reimplemented from MythMediaDevice.
Definition at line 324 of file mythcdrom-linux.cpp.
| bool MythCDROMLinux::mediaChanged | ( | void | ) | [virtual] |
Reimplemented from MythCDROM.
Definition at line 312 of file mythcdrom-linux.cpp.
Referenced by checkMedia().
| bool MythCDROMLinux::checkOK | ( | void | ) | [virtual] |
Reimplemented from MythCDROM.
Definition at line 317 of file mythcdrom-linux.cpp.
| MythMediaStatus MythCDROMLinux::checkMedia | ( | void | ) | [virtual] |
Reimplemented from MythCDROM.
Definition at line 361 of file mythcdrom-linux.cpp.
| MythMediaError MythCDROMLinux::eject | ( | bool | open_close = true | ) | [virtual] |
Reimplemented from MythMediaDevice.
Definition at line 286 of file mythcdrom-linux.cpp.
| void MythCDROMLinux::setSpeed | ( | int | speed | ) | [virtual] |
Reimplemented from MythMediaDevice.
Definition at line 651 of file mythcdrom-linux.cpp.
| void MythCDROMLinux::setSpeed | ( | const char * | device, |
| int | speed | ||
| ) | [virtual] |
Reimplemented from MythCDROM.
Definition at line 656 of file mythcdrom-linux.cpp.
| bool MythCDROMLinux::isSameDevice | ( | const QString & | path | ) | [virtual] |
Reimplemented from MythMediaDevice.
Definition at line 624 of file mythcdrom-linux.cpp.
| MythMediaError MythCDROMLinux::lock | ( | void | ) | [virtual] |
Reimplemented from MythMediaDevice.
Definition at line 599 of file mythcdrom-linux.cpp.
Referenced by checkMedia().
| MythMediaError MythCDROMLinux::unlock | ( | void | ) | [virtual] |
Reimplemented from MythMediaDevice.
Definition at line 608 of file mythcdrom-linux.cpp.
Referenced by checkMedia().
| int MythCDROMLinux::driveStatus | ( | void | ) | [private] |
Exhaustively determine the status.
If the CDROM is managed by the SCSI driver, then CDROM_DRIVE_STATUS as reported by ioctl will always return CDS_TRAY_OPEN if the tray is closed with no media. To determine the actual drive status we need to ask the drive directly by sending a SCSI packet to the drive.
Definition at line 164 of file mythcdrom-linux.cpp.
Referenced by checkMedia(), eject(), and testMedia().
| bool MythCDROMLinux::hasWritableMedia | ( | void | ) | [private] |
Is there blank or eraseable media in the drive?
Definition at line 183 of file mythcdrom-linux.cpp.
Referenced by checkMedia().
| int MythCDROMLinux::SCSIstatus | ( | void | ) | [private] |
Use a SCSI query packet to see if the drive is _really_ open.
Note that in recent kernels, whether you have an IDE/ATA/SATA or SCSI CDROM, the drive is managed by the SCSI driver and therefore needs this workaround. This code is based on the routine cdrom_get_media_event in cdrom.c of the linux kernel
Definition at line 236 of file mythcdrom-linux.cpp.
Referenced by driveStatus().
1.7.6.1