Tag Parser
9.1.3
C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags
|
Go to the documentation of this file.
32 void OverallTests::parseFile(
const string &path,
void (
OverallTests::*checkRoutine)(
void))
35 cerr <<
"- testing " << path << endl;
42 (this->*checkRoutine)();
50 void OverallTests::makeFile(
const string &path,
void (
OverallTests::*modifyRoutine)(
void),
void (
OverallTests::*checkRoutine)(
void))
53 cerr <<
"- testing " << path << endl;
64 if (m_fileInfo.
tagPosition() != ElementPosition::Keep) {
68 if (m_expectedTagPos == ElementPosition::Keep) {
75 case ContainerFormat::Matroska:
78 if (m_fileInfo.
tagPosition() != ElementPosition::Keep) {
86 if (m_fileInfo.
indexPosition() != ElementPosition::Keep && m_expectedIndexPos != ElementPosition::Keep) {
94 (this->*modifyRoutine)();
100 (this->*checkRoutine)();
103 case ContainerFormat::Matroska:
104 checkMkvConstraints();
107 checkMp4Constraints();
111 checkMp3PaddingConstraints();
118 remove(path.c_str());
119 remove((path +
".bak").c_str());
125 void OverallTests::removeAllTags()
134 void OverallTests::noop()
141 void OverallTests::removeSecondTrack()
virtual ElementPosition determineTagPosition(Diagnostics &diag) const
Determines the position of the tags inside the file.
The AbortableProgressFeedback class provides feedback about an ongoing operation via callbacks....
void reopen(bool readOnly=false)
Opens a std::fstream for the current file.
void assignPosition(PositionInSet value)
Assigns the given PositionInSet value.
CPPUNIT_TEST_SUITE_REGISTRATION(OverallTests)
void setPath(const std::string &path)
Sets the current file.
virtual AbstractTrack * track(std::size_t index)
Returns the track with the specified index.
void assignText(const char *text, std::size_t textSize, TagTextEncoding textEncoding=TagTextEncoding::Latin1, TagTextEncoding convertTo=TagTextEncoding::Unspecified)
Assigns a copy of the given text.
void assignInteger(int value)
Assigns the given integer value.
void setUp() override
Creates some test meta data.
virtual std::size_t trackCount() const
Returns the number of tracks the container holds.
void setDescription(const std::string &value, TagTextEncoding encoding=TagTextEncoding::Latin1)
Sets the description.
The PositionInSet class describes the position of an element in a set which consists of a certain num...
The OverallTests class tests reading and writing tags and parsing technical information for all suppo...
void close()
A possibly opened std::fstream will be closed.
virtual bool removeTrack(AbstractTrack *track)
Removes the specified track to the container.
virtual ElementPosition determineIndexPosition(Diagnostics &diag) const
Determines the position of the index.