#include <cddecoder.h>
Public Member Functions | |
| CdDecoder (const QString &file, DecoderFactory *, QIODevice *, AudioOutput *) | |
| virtual | ~CdDecoder () |
| virtual bool | initialize () |
| virtual void | seek (double) |
| virtual void | stop () |
| virtual Metadata * | getMetadata (void) |
Get the metadata for filename. | |
| virtual void | commitMetadata (Metadata *mdata) |
Write the given metadata to the filename. | |
| Metadata * | getMetadata (int track) |
| Metadata * | getLastMetadata () |
| double | lengthInSeconds () |
| int | getNumTracks () |
| int | getNumCDAudioTracks () |
| void | setDevice (const QString &dev) |
| void | setCDSpeed (int speed) |
Private Member Functions | |
| void | run () |
| Runs the Qt event loop unless we have a QRunnable, in which case we run the runnable run instead. | |
| void | writeBlock () |
| void | deinit () |
| void | lookupCDDB (const QString &hexID, uint tracks) |
Static Private Member Functions | |
| static QMutex & | getCdioMutex () |
Private Attributes | |
| volatile bool | m_inited |
| volatile bool | m_user_stop |
| QString | m_devicename |
| uint32_t | m_diskID |
| For CDDB1/FreeDB lookup. | |
| uint | m_firstTrack |
| First AUDIO track. | |
| uint | m_lastTrack |
| Last AUDIO track. | |
| uint | m_leadout |
| End of last track. | |
| double | m_lengthInSecs |
| vector< int > | m_tracks |
| Start block offset of each track. | |
| vector< Metadata * > | m_mData |
| After lookup, details of each trk. | |
| DecoderEvent::Type | m_stat |
| char * | m_output_buf |
| std::size_t | m_output_at |
| std::size_t | m_bks |
| std::size_t | m_bksFrames |
| std::size_t | m_decodeBytes |
| bool | m_finish |
| long | m_freq |
| long | m_bitrate |
| int | m_chan |
| double | m_seekTime |
| int | m_settracknum |
| int | m_tracknum |
| CdIo_t * | m_cdio |
| cdrom_drive_t * | m_device |
| cdrom_paranoia_t * | m_paranoia |
| lsn_t | m_start |
| lsn_t | m_end |
| lsn_t | m_curpos |
Definition at line 20 of file cddecoder.h.
| CdDecoder::CdDecoder | ( | const QString & | file, | |
| DecoderFactory * | d, | |||
| QIODevice * | i, | |||
| AudioOutput * | o | |||
| ) |
Definition at line 94 of file cddecoder.cpp.
| CdDecoder::~CdDecoder | ( | ) | [virtual] |
Definition at line 117 of file cddecoder.cpp.
| bool CdDecoder::initialize | ( | ) | [virtual] |
Implements Decoder.
Definition at line 167 of file cddecoder.cpp.
| void CdDecoder::seek | ( | double | pos | ) | [virtual] |
Implements Decoder.
Definition at line 283 of file cddecoder.cpp.
| void CdDecoder::stop | ( | void | ) | [virtual] |
Implements Decoder.
Definition at line 134 of file cddecoder.cpp.
| Metadata * CdDecoder::getMetadata | ( | void | ) | [virtual] |
Get the metadata for filename.
First tries to read the metadata from the database. If there is no database entry, it'll call Decoder::readMetadata.
Metadata owned by the caller Reimplemented from Decoder.
Definition at line 570 of file cddecoder.cpp.
Referenced by getLastMetadata(), getMetadata(), CDWatcherThread::run(), and Ripper::ScanFinished().
| void CdDecoder::commitMetadata | ( | Metadata * | mdata | ) | [virtual] |
Write the given metadata to the filename.
Creates a MetaIO object using Decoder::doCreateTagger and asks the MetaIO object to write the contents of mdata to filename.
mdata the metadata to write to the disk
Reimplemented from Decoder.
Definition at line 788 of file cddecoder.cpp.
| Metadata * CdDecoder::getMetadata | ( | int | track | ) |
Definition at line 512 of file cddecoder.cpp.
| Metadata * CdDecoder::getLastMetadata | ( | ) |
Definition at line 519 of file cddecoder.cpp.
Referenced by CDWatcherThread::run().
| double CdDecoder::lengthInSeconds | ( | ) |
| int CdDecoder::getNumTracks | ( | ) |
Definition at line 470 of file cddecoder.cpp.
Referenced by getLastMetadata(), CDWatcherThread::run(), and Ripper::ScanFinished().
| int CdDecoder::getNumCDAudioTracks | ( | ) |
Definition at line 488 of file cddecoder.cpp.
Referenced by getMetadata(), and CDWatcherThread::run().
| void CdDecoder::setDevice | ( | const QString & | dev | ) |
Definition at line 123 of file cddecoder.cpp.
Referenced by MusicPlayer::decoderHandlerReady(), CDWatcherThread::run(), and Ripper::scanCD().
| void CdDecoder::setCDSpeed | ( | int | speed | ) |
Definition at line 452 of file cddecoder.cpp.
Referenced by deinit(), and initialize().
| void CdDecoder::run | ( | void | ) | [private, virtual] |
Runs the Qt event loop unless we have a QRunnable, in which case we run the runnable run instead.
Reimplemented from MThread.
Definition at line 316 of file cddecoder.cpp.
| void CdDecoder::writeBlock | ( | ) | [private] |
Definition at line 140 of file cddecoder.cpp.
Referenced by run().
| void CdDecoder::deinit | ( | ) | [private] |
Definition at line 291 of file cddecoder.cpp.
Referenced by run(), and ~CdDecoder().
| void CdDecoder::lookupCDDB | ( | const QString & | hexID, | |
| uint | tracks | |||
| ) | [private] |
| QMutex & CdDecoder::getCdioMutex | ( | ) | [static, private] |
Definition at line 160 of file cddecoder.cpp.
Referenced by commitMetadata(), deinit(), getMetadata(), getNumCDAudioTracks(), getNumTracks(), initialize(), run(), and setCDSpeed().
volatile bool CdDecoder::m_inited [private] |
Definition at line 55 of file cddecoder.h.
Referenced by deinit(), initialize(), run(), and ~CdDecoder().
volatile bool CdDecoder::m_user_stop [private] |
Definition at line 56 of file cddecoder.h.
Referenced by deinit(), initialize(), run(), and stop().
QString CdDecoder::m_devicename [private] |
Definition at line 58 of file cddecoder.h.
Referenced by commitMetadata(), getMetadata(), getNumCDAudioTracks(), getNumTracks(), initialize(), setCDSpeed(), and setDevice().
uint32_t CdDecoder::m_diskID [private] |
For CDDB1/FreeDB lookup.
Definition at line 63 of file cddecoder.h.
uint CdDecoder::m_firstTrack [private] |
First AUDIO track.
Definition at line 64 of file cddecoder.h.
uint CdDecoder::m_lastTrack [private] |
Last AUDIO track.
Definition at line 64 of file cddecoder.h.
uint CdDecoder::m_leadout [private] |
End of last track.
Definition at line 64 of file cddecoder.h.
double CdDecoder::m_lengthInSecs [private] |
Definition at line 67 of file cddecoder.h.
vector<int> CdDecoder::m_tracks [private] |
Start block offset of each track.
Definition at line 68 of file cddecoder.h.
vector<Metadata*> CdDecoder::m_mData [private] |
After lookup, details of each trk.
Definition at line 69 of file cddecoder.h.
DecoderEvent::Type CdDecoder::m_stat [private] |
Definition at line 73 of file cddecoder.h.
Referenced by deinit(), initialize(), and run().
char* CdDecoder::m_output_buf [private] |
Definition at line 74 of file cddecoder.h.
Referenced by deinit(), initialize(), run(), and writeBlock().
std::size_t CdDecoder::m_output_at [private] |
Definition at line 75 of file cddecoder.h.
Referenced by initialize(), run(), and writeBlock().
std::size_t CdDecoder::m_bks [private] |
Definition at line 77 of file cddecoder.h.
Referenced by initialize(), run(), and writeBlock().
std::size_t CdDecoder::m_bksFrames [private] |
Definition at line 77 of file cddecoder.h.
Referenced by initialize(), and writeBlock().
std::size_t CdDecoder::m_decodeBytes [private] |
Definition at line 77 of file cddecoder.h.
Referenced by initialize(), and run().
bool CdDecoder::m_finish [private] |
Definition at line 78 of file cddecoder.h.
Referenced by deinit(), initialize(), and run().
long CdDecoder::m_freq [private] |
Definition at line 79 of file cddecoder.h.
Referenced by deinit(), and initialize().
long CdDecoder::m_bitrate [private] |
Definition at line 79 of file cddecoder.h.
Referenced by deinit(), and initialize().
int CdDecoder::m_chan [private] |
Definition at line 80 of file cddecoder.h.
Referenced by deinit(), and initialize().
double CdDecoder::m_seekTime [private] |
Definition at line 81 of file cddecoder.h.
Referenced by initialize(), run(), seek(), and writeBlock().
int CdDecoder::m_settracknum [private] |
Definition at line 83 of file cddecoder.h.
Referenced by getMetadata().
int CdDecoder::m_tracknum [private] |
Definition at line 84 of file cddecoder.h.
Referenced by commitMetadata(), and initialize().
CdIo_t* CdDecoder::m_cdio [private] |
Definition at line 87 of file cddecoder.h.
Referenced by deinit(), getMetadata(), initialize(), and run().
cdrom_drive_t* CdDecoder::m_device [private] |
Definition at line 88 of file cddecoder.h.
Referenced by deinit(), and initialize().
cdrom_paranoia_t* CdDecoder::m_paranoia [private] |
Definition at line 89 of file cddecoder.h.
Referenced by deinit(), initialize(), and run().
lsn_t CdDecoder::m_start [private] |
Definition at line 90 of file cddecoder.h.
Referenced by initialize(), and run().
lsn_t CdDecoder::m_end [private] |
Definition at line 90 of file cddecoder.h.
Referenced by initialize(), and run().
lsn_t CdDecoder::m_curpos [private] |
Definition at line 90 of file cddecoder.h.
Referenced by initialize(), and run().
1.6.3