#include <mmsdvd.h>
Public Member Functions | |
MMSDVD (MMSWindow *window, const string device="/dev/dvd", const bool verbose=false) | |
Constructor of MMSDVD class. | |
~MMSDVD () | |
Destructor of MMSDVD class. | |
void | startPlaying (const bool cont=true) |
Starts playing. | |
void | rewind () |
Playback will be switched to rewind. | |
void | previous () |
Jump to previous chapter. | |
void | next () |
Jump to next chapter. | |
void | anglePrevious () |
Use the previous available angle. | |
void | angleNext () |
Use the next available angle. | |
void | audioChannelPrevious () |
Use the previous available subtitle channel. | |
void | audioChannelNext () |
Use the next available audio channel. | |
void | spuChannelPrevious () |
Use the previous available subtitle channel. | |
void | spuChannelNext () |
Use the next available subtitle channel. | |
void | eject () |
Eject the dvd. | |
void | menuUp () |
The same as pressing 'Up' in a dvd menu. | |
void | menuDown () |
The same as pressing 'Down' in a dvd menu. | |
void | menuLeft () |
The same as pressing 'Left' in a dvd menu. | |
void | menuRight () |
The same as pressing 'Right' in a dvd menu. | |
void | menuSelect () |
The same as pressing 'Select' in a dvd menu. | |
void | showMainMenu () |
Jump to dvd main menu. | |
bool | inMenu () |
Determines if the dvd menu is currently shown. | |
void | mouseButton (const unsigned int x, const unsigned int y) const |
Send mouse-button-event. | |
void | mouseMove (const unsigned int x, const unsigned int y) const |
Send mouse-move-event. | |
string | getTitle () |
Gets the name of the dvd. | |
int | getChapterNumber () |
Gets the chapter number that is currently being played. | |
int | getChapterCount () |
Gets amount of chapters available for the current title. | |
int | getTitleNumber () |
Gets the title number that is currently being played. | |
int | getTitleCount () |
Gets amount of titles available on the current dvd. | |
void | updateChannelInfo () |
Updates internal variables for saving current available audio channels and subtitle channels. | |
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_ANGLE_PREVIOUS = 103 |
setting previous angle | |
static const unsigned short | STATUS_ANGLE_NEXT = 104 |
setting next angle | |
static const unsigned short | STATUS_AUDIO_PREVIOUS = 105 |
using previous audio channel | |
static const unsigned short | STATUS_AUDIO_NEXT = 106 |
using next audio channel | |
static const unsigned short | STATUS_SPU_PREVIOUS = 107 |
using previous subtitle channel | |
static const unsigned short | STATUS_SPU_NEXT = 108 |
using next subtitle channel | |
Private Member Functions | |
void | checkDevice (const string device) |
Check for DVD device. | |
void | initialize (MMSWindow *window, const string device, const bool verbose) |
void | mouseEvent (const unsigned int event, const unsigned int x, const unsigned int y) const |
Send mouse-event. | |
void | xineOpen () |
Private Attributes | |
string | device |
dvd device to use | |
int | audioChannel |
current audio channel | |
int | spuChannel |
current subtitle channel | |
int | maxAudioChannels |
number of available audio channels | |
int | maxSpuChannels |
number of available subtitle channels | |
unsigned int | windowWidth |
width of given video window | |
unsigned int | windowHeight |
height of given video window |
This class is derived from MMSAV and specialized in handling DVD playback.
Definition at line 53 of file mmsdvd.h.
Constructor of MMSDVD 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 133 of file mmsdvd.cpp.
MMSDVD::~MMSDVD | ( | ) |
void MMSDVD::checkDevice | ( | const string | device | ) | [private] |
Check for DVD 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 |
MMSDVDError | no usable dvd device found |
Definition at line 90 of file mmsdvd.cpp.
void MMSDVD::initialize | ( | MMSWindow * | window, | |
const string | device, | |||
const bool | verbose | |||
) | [private] |
void MMSDVD::mouseEvent | ( | const unsigned int | event, | |
const unsigned int | x, | |||
const unsigned int | y | |||
) | const [private] |
Send mouse-event.
event | [in] which xine input event to send | |
x | [in] x coordinate | |
y | [in] y coordinate |
Definition at line 523 of file mmsdvd.cpp.
void MMSDVD::xineOpen | ( | ) | [private] |
void MMSDVD::startPlaying | ( | const bool | cont = true |
) |
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 173 of file mmsdvd.cpp.
void MMSDVD::rewind | ( | ) |
Playback will be switched to rewind.
Definition at line 188 of file mmsdvd.cpp.
void MMSDVD::previous | ( | ) |
void MMSDVD::next | ( | ) |
void MMSDVD::anglePrevious | ( | ) |
Use the previous available angle.
Definition at line 239 of file mmsdvd.cpp.
void MMSDVD::angleNext | ( | ) |
Use the next available angle.
Definition at line 257 of file mmsdvd.cpp.
void MMSDVD::audioChannelPrevious | ( | ) |
Use the previous available subtitle channel.
Definition at line 275 of file mmsdvd.cpp.
void MMSDVD::audioChannelNext | ( | ) |
Use the next available audio channel.
Definition at line 295 of file mmsdvd.cpp.
void MMSDVD::spuChannelPrevious | ( | ) |
Use the previous available subtitle channel.
Definition at line 315 of file mmsdvd.cpp.
void MMSDVD::spuChannelNext | ( | ) |
Use the next available subtitle channel.
Definition at line 335 of file mmsdvd.cpp.
void MMSDVD::eject | ( | ) |
Eject the dvd.
It disposes the xine stream and tries to eject dvd with ioctl
Definition at line 356 of file mmsdvd.cpp.
void MMSDVD::menuUp | ( | ) |
void MMSDVD::menuDown | ( | ) |
void MMSDVD::menuLeft | ( | ) |
void MMSDVD::menuRight | ( | ) |
void MMSDVD::menuSelect | ( | ) |
void MMSDVD::showMainMenu | ( | ) |
Jump to dvd main menu.
Definition at line 499 of file mmsdvd.cpp.
bool MMSDVD::inMenu | ( | ) |
Determines if the dvd menu is currently shown.
Definition at line 602 of file mmsdvd.cpp.
void MMSDVD::mouseButton | ( | const unsigned int | x, | |
const unsigned int | y | |||
) | const |
Send mouse-button-event.
x | [in] x coordinate | |
y | [in] y coordinate |
Definition at line 555 of file mmsdvd.cpp.
void MMSDVD::mouseMove | ( | const unsigned int | x, | |
const unsigned int | y | |||
) | const |
Send mouse-move-event.
x | [in] x coordinate | |
y | [in] y coordinate |
Definition at line 581 of file mmsdvd.cpp.
string MMSDVD::getTitle | ( | ) |
Gets the name of the dvd.
If this is not supported, it will be set to 'UNKNOWN'.
Definition at line 612 of file mmsdvd.cpp.
int MMSDVD::getChapterNumber | ( | ) |
Gets the chapter number that is currently being played.
Definition at line 650 of file mmsdvd.cpp.
int MMSDVD::getChapterCount | ( | ) |
Gets amount of chapters available for the current title.
Definition at line 671 of file mmsdvd.cpp.
int MMSDVD::getTitleNumber | ( | ) |
Gets the title number that is currently being played.
Definition at line 692 of file mmsdvd.cpp.
int MMSDVD::getTitleCount | ( | ) |
Gets amount of titles available on the current dvd.
Definition at line 713 of file mmsdvd.cpp.
void MMSDVD::updateChannelInfo | ( | ) |
Updates internal variables for saving current available audio channels and subtitle channels.
Definition at line 733 of file mmsdvd.cpp.
string MMSDVD::device [private] |
int MMSDVD::audioChannel [private] |
int MMSDVD::spuChannel [private] |
int MMSDVD::maxAudioChannels [private] |
int MMSDVD::maxSpuChannels [private] |
unsigned int MMSDVD::windowWidth [private] |
unsigned int MMSDVD::windowHeight [private] |
const unsigned short MMSDVD::STATUS_PREVIOUS = 100 [static] |
const unsigned short MMSDVD::STATUS_NEXT = 101 [static] |
const unsigned short MMSDVD::STATUS_EJECT = 102 [static] |
const unsigned short MMSDVD::STATUS_ANGLE_PREVIOUS = 103 [static] |
const unsigned short MMSDVD::STATUS_ANGLE_NEXT = 104 [static] |
const unsigned short MMSDVD::STATUS_AUDIO_PREVIOUS = 105 [static] |
const unsigned short MMSDVD::STATUS_AUDIO_NEXT = 106 [static] |
const unsigned short MMSDVD::STATUS_SPU_PREVIOUS = 107 [static] |
const unsigned short MMSDVD::STATUS_SPU_NEXT = 108 [static] |