Allow setting track ID

This commit is contained in:
Martchus 2017-05-25 23:33:32 +02:00
parent 4e9a28aee3
commit 966c0edc2e
2 changed files with 11 additions and 2 deletions

View File

@ -168,8 +168,8 @@ set(META_APP_AUTHOR "Martchus")
set(META_APP_URL "https://github.com/${META_APP_AUTHOR}/${META_PROJECT_NAME}")
set(META_APP_DESCRIPTION "C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags")
set(META_VERSION_MAJOR 6)
set(META_VERSION_MINOR 2)
set(META_VERSION_PATCH 2)
set(META_VERSION_MINOR 3)
set(META_VERSION_PATCH 0)
set(META_PUBLIC_SHARED_LIB_DEPENDS c++utilities)
set(META_PUBLIC_STATIC_LIB_DEPENDS c++utilities_static)
set(META_PRIVATE_COMPILE_DEFINITIONS LEGACY_API)

View File

@ -64,6 +64,7 @@ public:
uint64 size() const;
uint32 trackNumber() const;
uint64 id() const;
void setId(uint64 id);
const std::string name() const;
const ChronoUtilities::TimeSpan &duration() const;
double bitrate() const;
@ -326,6 +327,14 @@ inline uint64 AbstractTrack::id() const
}
/*!
* \brief Sets the track ID.
* \remarks Whether the new value is applied when saving changes depends on the implementation.
*/
inline void AbstractTrack::setId(uint64 id)
{
m_id = id;
}
* \brief Returns the track name if known; otherwise returns an empty string.
*/
inline const std::string AbstractTrack::name() const