MythTV  0.26-pre
Public Types | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | Friends
DecoderHandler Class Reference

Class for starting stream decoding. More...

#include <decoderhandler.h>

Inheritance diagram for DecoderHandler:
MythObservable

List of all members.

Public Types

enum  State { ACTIVE, LOADING, STOPPED }

Public Member Functions

 DecoderHandler (void)
virtual ~DecoderHandler (void)
DecodergetDecoder (void)
void start (Metadata *mdata)
void stop (void)
void customEvent (QEvent *e)
bool done (void)
bool next (void)
void error (const QString &msg)

Protected Member Functions

void doOperationStart (const QString &name)
void doOperationStop (void)
void doConnectDecoder (const QUrl &url, const QString &format)
void doFailed (const QUrl &url, const QString &message)
void doInfo (const QString &message)

Private Member Functions

bool createPlaylist (const QUrl &url)
bool createPlaylistForSingleFile (const QUrl &url)
bool createPlaylistFromFile (const QUrl &url)
bool createPlaylistFromRemoteUrl (const QUrl &url)
bool haveIOFactory (void)
DecoderIOFactorygetIOFactory (void)
void createIOFactory (const QUrl &url)
void deleteIOFactory (void)

Private Attributes

int m_state
int m_playlist_pos
PlayListFile m_playlist
DecoderIOFactorym_io_factory
Decoderm_decoder
Metadatam_meta
bool m_op
uint m_redirects

Static Private Attributes

static const uint MaxRedirects = 3

Friends

class DecoderIOFactory

Detailed Description

Class for starting stream decoding.

This class handles starting the Decoder for the MusicPlayer via DecoderIOFactorys.

It operates on a playlist, either created with a single file, by loading a .pls or downloading it, and for each entry creates an appropriate DecoderIOFactory. The creator is simply a intermediate class that translates the next URL in the playlist to QIODevice. Ie. the DecoderIOFactoryFile just returns a QFile, whereas the DecoderIOFactoryShoutcast returns a QSocket subclass, where reads do the necessary translation of the shoutcast stream.

Definition at line 79 of file decoderhandler.h.


Member Enumeration Documentation

Enumerator:
ACTIVE 
LOADING 
STOPPED 

Definition at line 84 of file decoderhandler.h.


Constructor & Destructor Documentation

Definition at line 291 of file decoderhandler.cpp.

Definition at line 302 of file decoderhandler.cpp.


Member Function Documentation

Definition at line 94 of file decoderhandler.h.

Referenced by MusicPlayer::getDecoder(), and DecoderIOFactory::getDecoder().

Definition at line 307 of file decoderhandler.cpp.

Referenced by MusicPlayer::play().

Definition at line 399 of file decoderhandler.cpp.

Referenced by MusicPlayer::stopDecoder(), and ~DecoderHandler().

Definition at line 431 of file decoderhandler.cpp.

Definition at line 346 of file decoderhandler.cpp.

Referenced by next().

Definition at line 360 of file decoderhandler.cpp.

Referenced by MusicPlayer::nextAuto(), and start().

void DecoderHandler::error ( const QString &  msg)

Definition at line 339 of file decoderhandler.cpp.

void DecoderHandler::doOperationStart ( const QString &  name) [protected]
void DecoderHandler::doConnectDecoder ( const QUrl &  url,
const QString &  format 
) [protected]

Definition at line 513 of file decoderhandler.cpp.

Referenced by DecoderIOFactory::doConnectDecoder().

void DecoderHandler::doFailed ( const QUrl &  url,
const QString &  message 
) [protected]

Definition at line 537 of file decoderhandler.cpp.

Referenced by doConnectDecoder(), DecoderIOFactory::doFailed(), and start().

void DecoderHandler::doInfo ( const QString &  message) [protected]

Definition at line 546 of file decoderhandler.cpp.

Referenced by DecoderIOFactory::doInfo().

bool DecoderHandler::createPlaylist ( const QUrl &  url) [private]

Definition at line 440 of file decoderhandler.cpp.

Referenced by start().

bool DecoderHandler::createPlaylistForSingleFile ( const QUrl &  url) [private]

Definition at line 458 of file decoderhandler.cpp.

Referenced by createPlaylist().

bool DecoderHandler::createPlaylistFromFile ( const QUrl &  url) [private]

Definition at line 472 of file decoderhandler.cpp.

Referenced by createPlaylist().

bool DecoderHandler::createPlaylistFromRemoteUrl ( const QUrl &  url) [private]

Definition at line 486 of file decoderhandler.cpp.

Referenced by createPlaylist().

bool DecoderHandler::haveIOFactory ( void  ) [inline, private]

Definition at line 116 of file decoderhandler.h.

Referenced by createIOFactory(), deleteIOFactory(), and next().

Definition at line 117 of file decoderhandler.h.

Referenced by doConnectDecoder(), and next().

void DecoderHandler::createIOFactory ( const QUrl &  url) [private]

Definition at line 569 of file decoderhandler.cpp.

Referenced by next().

Definition at line 584 of file decoderhandler.cpp.

Referenced by createIOFactory(), next(), and stop().


Friends And Related Function Documentation

friend class DecoderIOFactory [friend]

Definition at line 82 of file decoderhandler.h.


Member Data Documentation

Definition at line 121 of file decoderhandler.h.

Referenced by deleteIOFactory(), done(), next(), start(), and stop().

Definition at line 122 of file decoderhandler.h.

Referenced by done(), next(), and start().

Definition at line 124 of file decoderhandler.h.

Referenced by createIOFactory(), deleteIOFactory(), getIOFactory(), and haveIOFactory().

Definition at line 125 of file decoderhandler.h.

Referenced by doConnectDecoder(), getDecoder(), and stop().

Definition at line 126 of file decoderhandler.h.

Referenced by createIOFactory(), next(), and start().

Definition at line 127 of file decoderhandler.h.

Referenced by doOperationStart(), and doOperationStop().

Definition at line 128 of file decoderhandler.h.

Referenced by start().

const uint DecoderHandler::MaxRedirects = 3 [static, private]

Definition at line 130 of file decoderhandler.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends