The CueParser class provides CUE parser.
More...
#include <cueparser.h>
|
| CueParser ()=default |
|
| CueParser (const QByteArray &data, const QByteArray &codecName=QByteArray()) |
|
| ~CueParser () |
|
void | loadData (const QByteArray &data, const QByteArray &codecName=QByteArray()) |
|
void | loadData (const QByteArray &data, QTextCodec *codec) |
|
QList< TrackInfo * > | createPlayList (int track=-1) const |
|
const QStringList & | files () const |
|
qint64 | offset (int track) const |
|
qint64 | duration (int track) const |
|
QString | file (int track) const |
|
QString | url (int track) const |
|
int | count () const |
|
bool | isEmpty () const |
|
TrackInfo * | info (int track) const |
|
void | setDuration (const QString &file, qint64 duration) |
|
void | setDuration (qint64 duration) |
|
void | setProperties (const QString &file, const QMap< Qmmp::TrackProperty, QString > &properties) |
|
void | setProperties (const QMap< Qmmp::TrackProperty, QString > &properties) |
|
void | setMetaData (int track, Qmmp::MetaData key, const QVariant &value) |
|
void | setUrl (const QString &scheme, const QString &path) |
|
void | clear () |
|
The CueParser class provides CUE parser.
- Author
- Ilya Kotov forko.nosp@m.tov0.nosp@m.2@ya..nosp@m.ru
Definition at line 33 of file cueparser.h.
Constructs empty CUE parser.
CueParser::CueParser |
( |
const QByteArray & |
data, |
|
|
const QByteArray & |
codecName = QByteArray() |
|
) |
| |
Constructs CUE parser and parses given content.
- Parameters
-
data | Content of CUE file. |
codecName | Codec name ("UTF-8" by default). |
CueParser::~CueParser |
( |
| ) |
|
void CueParser::clear |
( |
| ) |
|
int CueParser::count |
( |
| ) |
const |
Returns number of tracks.
QList<TrackInfo*> CueParser::createPlayList |
( |
int |
track = -1 | ) |
const |
Creates playlist using parsed CUE metadata.
- Parameters
-
track | Track number to return (-1 for all playlist or 1..n for specific track) |
qint64 CueParser::duration |
( |
int |
track | ) |
const |
Returns duration in milliseconds of the given track.
QString CueParser::file |
( |
int |
track | ) |
const |
Returns data file of the given track.
const QStringList& CueParser::files |
( |
| ) |
const |
Returns a list of data files.
qint64 CueParser::getLength |
( |
const QString & |
str | ) |
|
|
private |
Returns information for the given track.
bool CueParser::isEmpty |
( |
| ) |
const |
Returns true if parser has no data, otherwise returns false.
void CueParser::loadData |
( |
const QByteArray & |
data, |
|
|
const QByteArray & |
codecName = QByteArray() |
|
) |
| |
Parses CUE file content.
- Parameters
-
data | Content of CUE file. |
codecName | Codec name ("UTF-8" by default). |
void CueParser::loadData |
( |
const QByteArray & |
data, |
|
|
QTextCodec * |
codec |
|
) |
| |
Parses CUE file content.
- Parameters
-
data | Content of CUE file. |
codec | Codec. |
qint64 CueParser::offset |
( |
int |
track | ) |
const |
Returns offset in milliseconds of the given track.
void CueParser::setDuration |
( |
const QString & |
file, |
|
|
qint64 |
duration |
|
) |
| |
Sets duration for the given content file.
- Parameters
-
file | Content file path. |
duration | Duration in milliseconds. |
void CueParser::setDuration |
( |
qint64 |
duration | ) |
|
Sets duration for the single content file (useful for embedded CUE).
- Parameters
-
duration | Duration in milliseconds. |
Updates metadata of the track.
- Parameters
-
track | Track number (1..n). |
key | Metadata key. |
value | Metadata value. |
Sets audio properties for the given content file.
- Parameters
-
file | Content file path. |
properties | Audio properties. |
Sets audio properties for the single content file (useful for embedded CUE).
- Parameters
-
properties | Audio properties. |
void CueParser::setUrl |
( |
const QString & |
scheme, |
|
|
const QString & |
path |
|
) |
| |
Sets URLs for CUE tracks in the following format: {scheme}://{path}#{track number}
- Parameters
-
scheme | URL scheme. |
path | Content file path. |
QStringList CueParser::splitLine |
( |
const QString & |
line | ) |
|
|
private |
QString CueParser::url |
( |
int |
track | ) |
const |
Returns URL of the given track.
QStringList CueParser::m_files |
|
private |
The documentation for this class was generated from the following file: