MMSCDA Class Reference
[Media playback (mmsmedia)]

Handles CDA playback. More...

#include <mmscda.h>

Inheritance diagram for MMSCDA:

List of all members.


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

Detailed Description

Handles CDA 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 CDA playback.

Definition at line 53 of file mmscda.h.


Constructor & Destructor Documentation

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.

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 119 of file mmscda.cpp.

MMSCDA::~MMSCDA (  ) 

Destructor of MMSCDA class.

Definition at line 136 of file mmscda.cpp.


Member Function Documentation

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

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

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

See also:
MMSCDA::slow()

MMSCDA::ffwd()

Definition at line 177 of file mmscda.cpp.

void MMSCDA::previous (  ) 

Jump to previous chapter.

See also:
MMSCDA::next()

Definition at line 192 of file mmscda.cpp.

void MMSCDA::next (  ) 

Jump to next chapter.

See also:
MMSCDA::previous()

Definition at line 215 of file mmscda.cpp.

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.

Returns:
title number

Definition at line 282 of file mmscda.cpp.

int MMSCDA::getTitleCount (  ) 

Gets amount of titles available on the current dvd.

Returns:
title count

Definition at line 303 of file mmscda.cpp.


Member Data Documentation

string MMSCDA::device [private]

dvd device to use

Definition at line 55 of file mmscda.h.

unsigned int MMSCDA::windowWidth [private]

width of given video window

Definition at line 56 of file mmscda.h.

unsigned int MMSCDA::windowHeight [private]

height of given video window

Definition at line 56 of file mmscda.h.

int MMSCDA::titlecount [private]

Definition at line 58 of file mmscda.h.

int MMSCDA::currtitle [private]

Definition at line 59 of file mmscda.h.

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

playing previous chapter

Definition at line 72 of file mmscda.h.

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

playing next chapter

Definition at line 73 of file mmscda.h.

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

ejecting DVD

Definition at line 74 of file mmscda.h.

const unsigned short MMSCDA::STATUS_FINISHED = 103 [static]

ejecting DVD

Definition at line 75 of file mmscda.h.


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