MMSDVD Class Reference
[Media playback (mmsmedia)]

Handles DVD playback. More...

#include <mmsdvd.h>

Inheritance diagram for MMSDVD:

List of all members.


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

Detailed Description

Handles DVD playback.

Author:
Stefan Schwarzer (stefan.schwarzer@diskohq.org)

Matthias Hardt (matthias.hardt@diskohq.org)

Jens Schneider (pupeider@gmx.de)

Guido Madaus (guido.madaus@diskohq.org)

Patrick Helterhoff (patrick.helterhoff@diskohq.org)

René Bählkow (rene.baehlkow@diskohq.org)

This class is derived from MMSAV and specialized in handling DVD playback.

Definition at line 53 of file mmsdvd.h.


Constructor & Destructor Documentation

MMSDVD::MMSDVD ( MMSWindow window,
const string  device = "/dev/dvd",
const bool  verbose = false 
)

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.

Parameters:
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 (  ) 

Destructor of MMSDVD class.

Definition at line 152 of file mmsdvd.cpp.


Member Function Documentation

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'.

Parameters:
device [in] device to check as dvd device
Exceptions:
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.

Note:
This is for internal use only.
Parameters:
event [in] which xine input event to send
x [in] x coordinate
y [in] y coordinate
See also:
MMSDVD::mouseButton()

MMSDVD::mouseMove()

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.

Parameters:
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.

See also:
MMSDVD::slow()

MMSDVD::ffwd()

Definition at line 188 of file mmsdvd.cpp.

void MMSDVD::previous (  ) 

Jump to previous chapter.

See also:
MMSDVD::next()

Definition at line 203 of file mmsdvd.cpp.

void MMSDVD::next (  ) 

Jump to next chapter.

See also:
MMSDVD::previous()

Definition at line 221 of file mmsdvd.cpp.

void MMSDVD::anglePrevious (  ) 

Use the previous available angle.

See also:
MMSDVD::angleNext()

Definition at line 239 of file mmsdvd.cpp.

void MMSDVD::angleNext (  ) 

Use the next available angle.

See also:
MMSDVD::anglePrevious()

Definition at line 257 of file mmsdvd.cpp.

void MMSDVD::audioChannelPrevious (  ) 

Use the previous available subtitle channel.

See also:
MMSDVD::audioChannelNext()

Definition at line 275 of file mmsdvd.cpp.

void MMSDVD::audioChannelNext (  ) 

Use the next available audio channel.

See also:
MMSDVD::audioChannelPrevious()

Definition at line 295 of file mmsdvd.cpp.

void MMSDVD::spuChannelPrevious (  ) 

Use the previous available subtitle channel.

See also:
MMSDVD::spuChannelNext()

Definition at line 315 of file mmsdvd.cpp.

void MMSDVD::spuChannelNext (  ) 

Use the next available subtitle channel.

See also:
MMSDVD::spuChannelNext()

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 (  ) 

The same as pressing 'Up' in a dvd menu.

See also:
MMSDVD::menuDown()

MMSDVD::menuLeft()

MMSDVD::menuRight()

MMSDVD::menuSelect()

Definition at line 401 of file mmsdvd.cpp.

void MMSDVD::menuDown (  ) 

The same as pressing 'Down' in a dvd menu.

See also:
MMSDVD::menuUp()

MMSDVD::menuLeft()

MMSDVD::menuRight()

MMSDVD::menuSelect()

Definition at line 421 of file mmsdvd.cpp.

void MMSDVD::menuLeft (  ) 

The same as pressing 'Left' in a dvd menu.

See also:
MMSDVD::menuUp()

MMSDVD::menuDown()

MMSDVD::menuRight()

MMSDVD::menuSelect()

Definition at line 441 of file mmsdvd.cpp.

void MMSDVD::menuRight (  ) 

The same as pressing 'Right' in a dvd menu.

See also:
MMSDVD::menuUp()

MMSDVD::menuDown()

MMSDVD::menuLeft()

MMSDVD::menuSelect()

Definition at line 461 of file mmsdvd.cpp.

void MMSDVD::menuSelect (  ) 

The same as pressing 'Select' in a dvd menu.

See also:
MMSDVD::menuUp()

MMSDVD::menuDown()

MMSDVD::menuLeft()

MMSDVD::menuRight()

Definition at line 481 of file mmsdvd.cpp.

void MMSDVD::showMainMenu (  ) 

Jump to dvd main menu.

Note:
This may not be possible if the dvd just started playing and the menu wasn't shown before.

Definition at line 499 of file mmsdvd.cpp.

bool MMSDVD::inMenu (  ) 

Determines if the dvd menu is currently shown.

Note:
It assumes that menus don't have chapters.
Returns:
true if in dvd menu
See also:
MMSDVD::getChapterNumber()

Definition at line 602 of file mmsdvd.cpp.

void MMSDVD::mouseButton ( const unsigned int  x,
const unsigned int  y 
) const

Send mouse-button-event.

Parameters:
x [in] x coordinate
y [in] y coordinate
See also:
MMSDVD::mouseMove()

Definition at line 555 of file mmsdvd.cpp.

void MMSDVD::mouseMove ( const unsigned int  x,
const unsigned int  y 
) const

Send mouse-move-event.

Parameters:
x [in] x coordinate
y [in] y coordinate
See also:
MMSDVD::mouseButton()

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'.

Returns:
title name

Definition at line 612 of file mmsdvd.cpp.

int MMSDVD::getChapterNumber (  ) 

Gets the chapter number that is currently being played.

Returns:
chapter number

Definition at line 650 of file mmsdvd.cpp.

int MMSDVD::getChapterCount (  ) 

Gets amount of chapters available for the current title.

Returns:
chapter count

Definition at line 671 of file mmsdvd.cpp.

int MMSDVD::getTitleNumber (  ) 

Gets the title number that is currently being played.

Returns:
title number

Definition at line 692 of file mmsdvd.cpp.

int MMSDVD::getTitleCount (  ) 

Gets amount of titles available on the current dvd.

Returns:
title count

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.


Member Data Documentation

string MMSDVD::device [private]

dvd device to use

Definition at line 55 of file mmsdvd.h.

int MMSDVD::audioChannel [private]

current audio channel

Definition at line 56 of file mmsdvd.h.

int MMSDVD::spuChannel [private]

current subtitle channel

Definition at line 56 of file mmsdvd.h.

int MMSDVD::maxAudioChannels [private]

number of available audio channels

Definition at line 58 of file mmsdvd.h.

int MMSDVD::maxSpuChannels [private]

number of available subtitle channels

Definition at line 58 of file mmsdvd.h.

unsigned int MMSDVD::windowWidth [private]

width of given video window

Definition at line 60 of file mmsdvd.h.

unsigned int MMSDVD::windowHeight [private]

height of given video window

Definition at line 60 of file mmsdvd.h.

const unsigned short MMSDVD::STATUS_PREVIOUS = 100 [static]

playing previous chapter

Definition at line 78 of file mmsdvd.h.

const unsigned short MMSDVD::STATUS_NEXT = 101 [static]

playing next chapter

Definition at line 79 of file mmsdvd.h.

const unsigned short MMSDVD::STATUS_EJECT = 102 [static]

ejecting DVD

Definition at line 80 of file mmsdvd.h.

const unsigned short MMSDVD::STATUS_ANGLE_PREVIOUS = 103 [static]

setting previous angle

Definition at line 81 of file mmsdvd.h.

const unsigned short MMSDVD::STATUS_ANGLE_NEXT = 104 [static]

setting next angle

Definition at line 82 of file mmsdvd.h.

const unsigned short MMSDVD::STATUS_AUDIO_PREVIOUS = 105 [static]

using previous audio channel

Definition at line 83 of file mmsdvd.h.

const unsigned short MMSDVD::STATUS_AUDIO_NEXT = 106 [static]

using next audio channel

Definition at line 84 of file mmsdvd.h.

const unsigned short MMSDVD::STATUS_SPU_PREVIOUS = 107 [static]

using previous subtitle channel

Definition at line 85 of file mmsdvd.h.

const unsigned short MMSDVD::STATUS_SPU_NEXT = 108 [static]

using next subtitle channel

Definition at line 86 of file mmsdvd.h.


The documentation for this class was generated from the following files: