diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2021-03-17 21:18:16 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2021-03-17 21:18:16 +0000 |
| commit | f5f2ef04e80c6ed23d7bb25b6d59fe508dd17356 (patch) | |
| tree | 3b8e3580358eae2cc54cc5a1f2356774e5fd9e0e | |
| parent | 3f5dea85bc54e567b3485bf7ef37027e44e444b9 (diff) | |
| download | qmmp-f5f2ef04e80c6ed23d7bb25b6d59fe508dd17356.tar.gz qmmp-f5f2ef04e80c6ed23d7bb25b6d59fe508dd17356.tar.bz2 qmmp-f5f2ef04e80c6ed23d7bb25b6d59fe508dd17356.zip | |
added CueParser documentation
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@9758 90c681e8-e032-0410-971d-27865f9a5e38
| -rw-r--r-- | src/qmmp/cueparser.h | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/src/qmmp/cueparser.h b/src/qmmp/cueparser.h index 467430630..03cdec531 100644 --- a/src/qmmp/cueparser.h +++ b/src/qmmp/cueparser.h @@ -28,29 +28,114 @@ #include "trackinfo.h" #include "qmmp_export.h" +/*! @brief The CueParser class provides CUE parser. + * @author Ilya Kotov <forkotov02@ya.ru> + */ class QMMP_EXPORT CueParser { public: + /*! + * Constructs empty CUE parser. + */ CueParser(); + /*! + * Constructs CUE parser and parses given content. + * \param data Content of CUE file. + * \param codecName Codec name ("UTF-8" by default). + */ CueParser(const QByteArray &data, const QByteArray &codecName = QByteArray()); + /*! + * Object destructor. + */ ~CueParser(); + /*! + * Parses CUE file content. + * \param data Content of CUE file. + * \param codecName Codec name ("UTF-8" by default). + */ void loadData(const QByteArray &data, const QByteArray &codecName = QByteArray()); + /*! + * Parses CUE file content. + * \param data Content of CUE file. + * \param codecName Codec. + */ void loadData(const QByteArray &data, QTextCodec *codec); + /*! + * Creates playlist using parsed CUE metadata. + * \param track Track number to return (-1 for all playlist or 1..n for specific track) + */ QList<TrackInfo *> createPlayList(int track = -1) const; + /*! + * Returns a list of data files. + */ const QStringList &files() const; + /*! + * Returns offset in milliseconds of the given \b track. + */ qint64 offset(int track) const; + /*! + * Returns duration in milliseconds of the given \b track. + */ qint64 duration(int track) const; + /*! + * Returns data file of the given \b track. + */ QString file(int track) const; + /*! + * Returns URL of the given \b track. + */ QString url(int track) const; + /*! + * Returns number of tracks. + */ int count() const; + /*! + * Returns \b true if parser has no data, otherwise returns \b false. + */ bool isEmpty() const; + /*! + * Returns information for the given \b track. + */ const TrackInfo *info(int track) const; + /*! + * Sets duration for the given content file. + * \param file Content file path. + * \param duration Duration in milliseconds. + */ void setDuration(const QString &file, qint64 duration); + /*! + * Sets duration for the single content file (useful for embedded CUE). + * \param duration Duration in milliseconds. + */ void setDuration(qint64 duration); + /*! + * Sets audio properties for the given content file. + * \param file Content file path. + * \param properties Audio properties. + */ void setProperties(const QString &file, const QMap<Qmmp::TrackProperty, QString> &properties); + /*! + * Sets audio properties for the single content file (useful for embedded CUE). + * \param properties Audio properties. + */ void setProperties(const QMap<Qmmp::TrackProperty, QString> &properties); + /*! + * Updates metadata of the \b track. + * \param track Track number (1..n). + * \param key Metadata key. + * \param value Metadata value. + */ void setMetaData(int track, Qmmp::MetaData key, const QVariant &value); + /*! + * Sets URLs for CUE tracks in the following format: + * {scheme}://{path}#{track number} + * \param scheme URL scheme. + * \param path Content file path. + */ void setUrl(const QString &scheme, const QString &path); + /*! + * Removes all parsed data. + */ void clear(); private: |
