Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

XineControl Class Reference

#include </home/clem/local/src/opie/noncore/multimedia/opieplayer2/xinecontrol.h>

Collaboration diagram for XineControl:

Collaboration graph
[legend]
List of all members.

Public Slots

void play (const QString &fileName)
void stop (bool)
void pause (bool)
void setFullscreen (bool)
long currentTime ()
void seekTo (long)
void length ()
long position ()
void nextMedia ()
QString getMetaInfo ()
QString getErrorCode ()
void videoResized (const QSize &s)
void setGamma (int)

Signals

void positionChanged (long)

Public Member Functions

 XineControl (XINE::Lib *xine, XineVideoWidget *xineWidget, MediaPlayerState &_mediaPlayerState, QObject *parent=0, const char *name=0)
 ~XineControl ()
bool hasVideo () const
bool hasAudio () const

Private Member Functions

void init ()

Private Attributes

XINE::LiblibXine
long m_currentTime
long m_position
int m_length
QString m_fileName
bool disabledSuspendScreenSaver: 1
bool hasVideoChannel: 1
bool hasAudioChannel: 1
MediaPlayerStatemediaPlayerState
XineVideoWidgetxineVideoWidget
bool m_wasError: 1

Constructor & Destructor Documentation

XineControl::XineControl XINE::Lib xine,
XineVideoWidget xineWidget,
MediaPlayerState _mediaPlayerState,
QObject *  parent = 0,
const char *  name = 0
 

Definition at line 47 of file xinecontrol.cpp.

References XINE::Lib::ensureInitialized(), init(), m_wasError, and XINE::Lib::setWidget().

XineControl::~XineControl  ) 
 

Definition at line 75 of file xinecontrol.cpp.

References disabledSuspendScreenSaver, QPEApplication::Enable, FALSE, and libXine.


Member Function Documentation

long XineControl::currentTime  )  [slot]
 

get current time in playback

Definition at line 168 of file xinecontrol.cpp.

References XINE::Lib::currentTime(), libXine, and m_currentTime.

Referenced by position().

QString XineControl::getErrorCode  )  [slot]
 

get the error code and "translate" it for the user

Definition at line 251 of file xinecontrol.cpp.

References XINE::Lib::error(), libXine, odebug, oendl, and tr.

Referenced by getMetaInfo(), and play().

QString XineControl::getMetaInfo  )  [slot]
 

Get as much info about the stream from xine as possible

Definition at line 208 of file xinecontrol.cpp.

References getErrorCode(), libXine, m_fileName, m_wasError, XINE::Lib::metaInfo(), QString::replace(), and tr.

bool XineControl::hasAudio  )  const [inline]
 

Definition at line 52 of file xinecontrol.h.

References hasAudioChannel.

bool XineControl::hasVideo  )  const [inline]
 

Definition at line 51 of file xinecontrol.h.

References hasVideoChannel.

void XineControl::init  )  [private]
 

Definition at line 61 of file xinecontrol.cpp.

References disabledSuspendScreenSaver, FALSE, libXine, mediaPlayerState, nextMedia(), pause(), positionChanged(), seekTo(), setFullscreen(), setGamma(), stop(), stopped, videoResized(), and xineVideoWidget.

Referenced by XineControl().

void XineControl::length  )  [slot]
 

Set the length of the media file

Definition at line 177 of file xinecontrol.cpp.

References XINE::Lib::length(), libXine, m_length, mediaPlayerState, and MediaPlayerState::setLength().

Referenced by play().

void XineControl::nextMedia  )  [slot]
 

Proceed to the next media file in playlist

Definition at line 134 of file xinecontrol.cpp.

References mediaPlayerState, and MediaPlayerState::setNext().

Referenced by init().

void XineControl::pause bool   )  [slot]
 

Pause the media stream

Parameters:
if pause or not

Definition at line 160 of file xinecontrol.cpp.

References libXine, and XINE::Lib::pause().

Referenced by init().

void XineControl::play const QString fileName  )  [slot]
 

Definition at line 86 of file xinecontrol.cpp.

References MediaPlayerState::Audio, QPEApplication::Disable, disabledSuspendScreenSaver, QPEApplication::DisableSuspend, FALSE, getErrorCode(), hasAudioChannel, XINE::Lib::hasVideo(), hasVideoChannel, XINE::Lib::isSeekable(), l, length(), libXine, m_fileName, m_wasError, mediaPlayerState, XINE::Lib::play(), position(), MediaPlayerState::setDisplayType(), MediaPlayerState::setIsSeekable(), MediaPlayerState::setPlaying(), XINE::Lib::setShowVideo(), tr, TRUE, MediaPlayerState::Video, and warning().

long XineControl::position  )  [slot]
 

Reports the position the xine backend is at right now

Returns:
long the postion in seconds

Definition at line 187 of file xinecontrol.cpp.

References currentTime(), MediaPlayerState::isPlaying, m_position, mediaPlayerState, positionChanged(), and MediaPlayerState::updatePosition().

Referenced by play().

void XineControl::positionChanged long   )  [signal]
 

Referenced by init(), and position().

void XineControl::seekTo long  second  )  [slot]
 

Seek to a position in the track

Parameters:
second the second to jump to

Definition at line 276 of file xinecontrol.cpp.

References libXine, and XINE::Lib::seekTo().

Referenced by init().

void XineControl::setFullscreen bool   )  [slot]
 

Set videos fullscreen

Parameters:
yes or no

Definition at line 203 of file xinecontrol.cpp.

References libXine, and XINE::Lib::showVideoFullScreen().

Referenced by init().

void XineControl::setGamma int   )  [slot]
 

Set the gamma value of the video output

Parameters:
int value between -100 and 100, 0 is original

Definition at line 138 of file xinecontrol.cpp.

References libXine, and XINE::Lib::setGamma().

Referenced by init().

void XineControl::stop bool   )  [slot]
 

Definition at line 142 of file xinecontrol.cpp.

References disabledSuspendScreenSaver, QPEApplication::Enable, FALSE, libXine, and XINE::Lib::stop().

Referenced by init().

void XineControl::videoResized const QSize &  s  )  [slot]
 

Definition at line 280 of file xinecontrol.cpp.

References libXine, and XINE::Lib::resize().

Referenced by init().


Member Data Documentation

bool XineControl::disabledSuspendScreenSaver [private]
 

Definition at line 112 of file xinecontrol.h.

Referenced by init(), play(), stop(), and ~XineControl().

bool XineControl::hasAudioChannel [private]
 

Definition at line 114 of file xinecontrol.h.

Referenced by hasAudio(), and play().

bool XineControl::hasVideoChannel [private]
 

Definition at line 113 of file xinecontrol.h.

Referenced by hasVideo(), and play().

XINE::Lib* XineControl::libXine [private]
 

Definition at line 107 of file xinecontrol.h.

Referenced by currentTime(), getErrorCode(), getMetaInfo(), init(), length(), pause(), play(), seekTo(), setFullscreen(), setGamma(), stop(), videoResized(), and ~XineControl().

long XineControl::m_currentTime [private]
 

Definition at line 108 of file xinecontrol.h.

Referenced by currentTime().

QString XineControl::m_fileName [private]
 

Definition at line 111 of file xinecontrol.h.

Referenced by getMetaInfo(), and play().

int XineControl::m_length [private]
 

Definition at line 110 of file xinecontrol.h.

Referenced by length().

long XineControl::m_position [private]
 

Definition at line 109 of file xinecontrol.h.

Referenced by position().

bool XineControl::m_wasError [private]
 

Definition at line 117 of file xinecontrol.h.

Referenced by getMetaInfo(), play(), and XineControl().

MediaPlayerState& XineControl::mediaPlayerState [private]
 

Definition at line 115 of file xinecontrol.h.

Referenced by init(), length(), nextMedia(), play(), and position().

XineVideoWidget* XineControl::xineVideoWidget [private]
 

Definition at line 116 of file xinecontrol.h.

Referenced by init().


The documentation for this class was generated from the following files:
Generated on Sat Nov 5 17:55:59 2005 for OPIE by  doxygen 1.4.2