#include <mmscda.h>

Public Member Functions | |
| MMSCDA (MMSWindow *window, const string device="/dev/cdrom", const bool verbose=false) | |
| Constructor of MMSCDA class. | |
| ~MMSCDA () | |
| Destructor of MMSCDA class. | |
| void | startPlaying (int tracknum=1) |
| Starts playing. | |
| void | rewind () |
| Playback will be switched to rewind. | |
| void | previous () |
| Jump to previous chapter. | |
| void | next () |
| Jump to next chapter. | |
| void | checktoc () |
| void | eject () |
| Eject the cd. | |
| int | getTitleNumber () |
| Gets the title number that is currently being played. | |
| int | getTitleCount () |
| Gets amount of titles available on the current dvd. | |
Static Public Attributes | |
| static const unsigned short | STATUS_PREVIOUS = 100 |
| playing previous chapter | |
| static const unsigned short | STATUS_NEXT = 101 |
| playing next chapter | |
| static const unsigned short | STATUS_EJECT = 102 |
| ejecting DVD | |
| static const unsigned short | STATUS_FINISHED = 103 |
| ejecting DVD | |
Private Member Functions | |
| void | checkDevice (const string device) |
| Check for CD device. | |
| void | initialize (MMSWindow *window, const string device, const bool verbose) |
| void | xineOpen () |
Private Attributes | |
| string | device |
| dvd device to use | |
| unsigned int | windowWidth |
| width of given video window | |
| unsigned int | windowHeight |
| height of given video window | |
| int | titlecount |
| int | currtitle |
This class is derived from MMSAV and specialized in handling CDA playback.
Definition at line 53 of file mmscda.h.
| MMSCDA::MMSCDA | ( | MMSWindow * | window, | |
| const string | device = "/dev/cdrom", |
|||
| const bool | verbose = false | |||
| ) |
Constructor of MMSCDA class.
It does initializing by calling MMSAV::initialize() and checks the given device. If the device is not correct "/dev/dvd" will be used.
| window | [in] main window for dvd playing | |
| device | [in] device to check as dvd device | |
| verbose | [in] if true the xine engine writes debug messages to stdout |
Definition at line 119 of file mmscda.cpp.
| MMSCDA::~MMSCDA | ( | ) |
| void MMSCDA::checkDevice | ( | const string | device | ) | [private] |
Check for CD device.
It uses xine health check to implement this. First it will check for a given device. If it fails it also checks for '/dev/dvd'.
| device | [in] device to check as dvd device |
| MMSCDAError | no usable dvd device found |
Definition at line 83 of file mmscda.cpp.
| void MMSCDA::initialize | ( | MMSWindow * | window, | |
| const string | device, | |||
| const bool | verbose | |||
| ) | [private] |
| void MMSCDA::xineOpen | ( | ) | [private] |
| void MMSCDA::startPlaying | ( | int | tracknum = 1 |
) |
Starts playing.
If the continue flag is set it tries to continue at the position where it was stopped before.
| cont | if true it tries to continue at a position stopped before |
Definition at line 157 of file mmscda.cpp.
| void MMSCDA::rewind | ( | ) |
Playback will be switched to rewind.
Definition at line 177 of file mmscda.cpp.
| void MMSCDA::previous | ( | ) |
| void MMSCDA::next | ( | ) |
| void MMSCDA::checktoc | ( | ) |
Definition at line 320 of file mmscda.cpp.
| void MMSCDA::eject | ( | ) |
Eject the cd.
It disposes the xine stream and tries to eject dvd with ioctl
Definition at line 239 of file mmscda.cpp.
| int MMSCDA::getTitleNumber | ( | ) |
Gets the title number that is currently being played.
Definition at line 282 of file mmscda.cpp.
| int MMSCDA::getTitleCount | ( | ) |
Gets amount of titles available on the current dvd.
Definition at line 303 of file mmscda.cpp.
string MMSCDA::device [private] |
unsigned int MMSCDA::windowWidth [private] |
unsigned int MMSCDA::windowHeight [private] |
int MMSCDA::titlecount [private] |
int MMSCDA::currtitle [private] |
const unsigned short MMSCDA::STATUS_PREVIOUS = 100 [static] |
const unsigned short MMSCDA::STATUS_NEXT = 101 [static] |
const unsigned short MMSCDA::STATUS_EJECT = 102 [static] |
const unsigned short MMSCDA::STATUS_FINISHED = 103 [static] |